Skip to content

Commit

Permalink
cuda docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sronilsson committed Aug 31, 2024
1 parent 88d9bfe commit 2440082
Show file tree
Hide file tree
Showing 1,380 changed files with 372,729 additions and 101 deletions.
Binary file added docs/_build/html/doctrees/Untitled.doctree
Binary file not shown.
Binary file added docs/_build/html/doctrees/Untitled1.doctree
Binary file not shown.
Binary file added docs/_build/html/doctrees/Untitled2.doctree
Binary file not shown.
Binary file added docs/_build/html/doctrees/api.doctree
Binary file not shown.
Binary file not shown.
Binary file added docs/_build/html/doctrees/credits.doctree
Binary file not shown.
Binary file added docs/_build/html/doctrees/docs.doctree
Binary file not shown.
Binary file added docs/_build/html/doctrees/docs/workflow.doctree
Binary file not shown.
Binary file added docs/_build/html/doctrees/environment.pickle
Binary file not shown.
Binary file added docs/_build/html/doctrees/examples.doctree
Binary file not shown.
Binary file added docs/_build/html/doctrees/index.doctree
Binary file not shown.
Binary file added docs/_build/html/doctrees/labelling.doctree
Binary file not shown.
Binary file added docs/_build/html/doctrees/links.doctree
Binary file not shown.
Binary file added docs/_build/html/doctrees/modules.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added docs/_build/html/doctrees/nb/gantt_plots.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added docs/_build/html/doctrees/nb/heatmap_clf.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added docs/_build/html/doctrees/nb/multiclass.doctree
Binary file not shown.
Binary file not shown.
Binary file added docs/_build/html/doctrees/nb/path_plots.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added docs/_build/html/doctrees/nb/train_models.doctree
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
460 changes: 460 additions & 0 deletions docs/_build/html/doctrees/nbsphinx/nb/CLI Example 1.ipynb

Large diffs are not rendered by default.

30,733 changes: 30,733 additions & 0 deletions docs/_build/html/doctrees/nbsphinx/nb/Visualize pose-estimation.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "527ac24c",
"metadata": {},
"source": [
"# Advanced outlier correction"
]
},
{
"cell_type": "markdown",
"id": "ab923d86",
"metadata": {},
"source": [
"Here, we perform location- and movement-based outlier correction that allows different heuristic outlier criteria \n",
"for different animals or body-parts. For example, we will correct some outlier body-parts with a heuristic criteria of 4x above the mean movement, and other body-parts with a heuristic critera of 2x above the mean movement. For a scematic describing movement and location-based outlier correcttion, click [HERE](https://github.com/sgoldenlab/simba/blob/master/misc/Outlier_settings.pdf). Use SimBA version > 1.71.4."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "2737ca8c",
"metadata": {},
"outputs": [],
"source": [
"from simba.outlier_tools.outlier_corrector_movement_advanced import OutlierCorrecterMovementAdvanced\n",
"from simba.outlier_tools.outlier_corrector_location_advanced import OutlierCorrecterLocationAdvanced"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "558f834b",
"metadata": {},
"outputs": [],
"source": [
"# DEFINITIONS\n",
"\n",
"# The path to your SimBA project project_config.ini file.\n",
"CONFIG_PATH='/Users/simon/Desktop/envs/troubleshooting/two_black_animals_14bp/project_folder/project_config.ini'\n",
"\n",
"#The directory containing the pose-estimation data to detect outliers within.\n",
"INPUT_DIR='/Users/simon/Desktop/envs/troubleshooting/two_black_animals_14bp/project_folder/csv/input_csv'\n",
"\n",
"#If you provide one heuristic multiplier criterion per animal, set type to \"animal\". If you have \n",
"# one heuristic multiplier criterion per body part, set type to \"body-part\".\n",
"TYPE='animal'\n",
"\n",
"#If you want to calculate the aggregate animal sizes using the mean or median euclidean lengths in the video. \n",
"AGG_METHOD='mean'\n",
"\n",
"#The body-parts for each animals that you wish to use to calculate the aggregate size of the animals in the videos\n",
"CRITERION_BODY_PARTS={'Simon': ['Nose_1', 'Tail_base_1'], 'JJ': ['Nose_2', 'Tail_base_2']}\n",
"\n",
"# The multiplier criterion for animal. Here we use one multipler per animal. If you want to use different multiplers for each body-part\n",
"# then provide a nested dictyionary, e.g., below. If you are using a nested dictionary and provide different multiplier per body-part, \n",
"# remember to set type = 'body-part.'\n",
"#SETTINGS = {'Simon': {'Ear_left_1': 1.1, \n",
"# 'Ear_right_1': 5.1, \n",
"# 'Nose_1': 2.1, \n",
"# 'Center_1': 1.5, \n",
"# 'Lat_left_1': 3.1,\n",
"# 'Lat_right_1': 1.9, \n",
"# 'Tail_base_1': 2.3, \n",
"# 'Tail_end_1': 1.4},\n",
"# 'JJ': {'Ear_left_2': 1.2, \n",
"# 'Ear_right_2': 1.2, \n",
"# 'Nose_2': 2, \n",
"# 'Center_2': 4.1, \n",
"# 'Lat_left_2': 9,\n",
"# 'Lat_right_2': 1.2, \n",
"# 'Tail_base_2': 1.6, \n",
"# 'Tail_end_2': 2.2}}\n",
"SETTINGS={'Simon': 2.1, 'JJ': 3.2}"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "bd3325d4",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Processing video Together_1. Video 1/1...\n",
"SIMBA COMPLETE: Movement outliers complete for video Together_1. (elapsed time: 0.9181s) \tcomplete\n",
"SIMBA COMPLETE: Movement outlier log saved at /Users/simon/Desktop/envs/troubleshooting/two_black_animals_14bp/project_folder/logs/movement_outliers_20230811132623.csv \tcomplete\n",
"SIMBA COMPLETE: 1 video(s) corrected for movement outliers. Saved in /Users/simon/Desktop/envs/troubleshooting/two_black_animals_14bp/project_folder/csv/outlier_corrected_movement \tcomplete\n"
]
}
],
"source": [
"#We initialize the advanced outlier movement corrector and run it. The redults will be saved in the \n",
"# project_folder/csv/outlier_corrected_movement directory of the SimBA project.\n",
"movement_outlier_corrector = OutlierCorrecterMovementAdvanced(config_path=CONFIG_PATH,\n",
" input_dir=INPUT_DIR,\n",
" criterion_body_parts=CRITERION_BODY_PARTS,\n",
" type=TYPE,\n",
" agg_method=AGG_METHOD,\n",
" settings=SETTINGS)\n",
"movement_outlier_corrector.run()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "be82c93c",
"metadata": {},
"outputs": [],
"source": [
"#Next, we want to perform location outlier correction. We will perform location outlier correction on the files that \n",
"# was processed by the movement outlier corrector above, so we change the input directory to the folder that contains\n",
"# those files:\n",
"INPUT_DIR='/Users/simon/Desktop/envs/troubleshooting/two_black_animals_14bp/project_folder/csv/outlier_corrected_movement'\n",
"\n",
"# This time, we will also change the ``settings``, so rather than providing one multiplier per animal, we now provide \n",
"# one multiplier per body-part:\n",
"SETTINGS = {'Simon': {'Ear_left_1': 1.1, \n",
" 'Ear_right_1': 5.1, \n",
" 'Nose_1': 2.1, \n",
" 'Center_1': 1.5, \n",
" 'Lat_left_1': 3.1,\n",
" 'Lat_right_1': 1.9, \n",
" 'Tail_base_1': 2.3, \n",
" 'Tail_end_1': 1.4},\n",
" 'JJ': {'Ear_left_2': 1.2, \n",
" 'Ear_right_2': 1.2, \n",
" 'Nose_2': 2, \n",
" 'Center_2': 4.1, \n",
" 'Lat_left_2': 9,\n",
" 'Lat_right_2': 1.2, \n",
" 'Tail_base_2': 1.6, \n",
" 'Tail_end_2': 2.2}}\n",
"TYPE='body-parts'\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "ce9cf9b4",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Processing video Together_1. Video 1/1...\n",
"SIMBA COMPLETE: Location outliers complete for video Together_1. (elapsed time: 1.327s) \tcomplete\n",
"SIMBA COMPLETE: Location outlier log saved at /Users/simon/Desktop/envs/troubleshooting/two_black_animals_14bp/project_folder/logs/location_outliers_20230811132629.csv \tcomplete\n",
"SIMBA COMPLETE: 1 video(s) corrected for location outliers. Saved in /Users/simon/Desktop/envs/troubleshooting/two_black_animals_14bp/project_folder/csv/outlier_corrected_movement_location \tcomplete\n"
]
}
],
"source": [
"#We initialize the advanced outlier location corrector and run it. The redults will be saved in the \n",
"# project_folder/csv/outlier_corrected_movement directory of the SimBA project.\n",
"location_outlier_corrector = OutlierCorrecterLocationAdvanced(config_path=CONFIG_PATH,\n",
" input_dir=INPUT_DIR,\n",
" criterion_body_parts=CRITERION_BODY_PARTS,\n",
" type=TYPE,\n",
" agg_method=AGG_METHOD,\n",
" settings=SETTINGS)\n",
"location_outlier_corrector.run()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2793415d",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:simba_dev] *",
"language": "python",
"name": "conda-env-simba_dev-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading

0 comments on commit 2440082

Please sign in to comment.