diff --git a/docs/nb/geometry_example_1.ipynb b/docs/nb/geometry_example_1.ipynb index 6515ee4f6..642f02afc 100644 --- a/docs/nb/geometry_example_1.ipynb +++ b/docs/nb/geometry_example_1.ipynb @@ -5,7 +5,7 @@ "id": "6e7961f8", "metadata": {}, "source": [ - "# Geometry computations: Example 1" + "# Geometry computations Example 1: Movement key-point statistics in grid-system" ] }, { @@ -13,12 +13,12 @@ "id": "85aedd1a", "metadata": {}, "source": [ - "\n", + "In this notebook, we:\n", "\n", - "Here we\n", - "* (1) Divide the experimental arena into geometries, and \n", - "* (2) Compute and visualize the time that the animal spends in the different arena geometries.\n", - " " + "* (1) Divide the experimental arena into distinct geometrical regions.\n", + "* (2) Compute and visualize the time the animal spends in each region of the arena.\n", + "\n", + "This analysis can be used to study spatial preferences in the experimental arena. This analysis is based on the location of a pose-estimated key-point. To perform the analysis using the animal hull, see [THIS](https://simba-uw-tf-dev.readthedocs.io/en/latest/nb/geometry_example_2.html) notebook. " ] }, { @@ -48,7 +48,8 @@ "outputs": [], "source": [ "# DEFINE PROJECT AND VIDEO NAME\n", - "PROJECT_PATH = r'/Users/simon/Desktop/envs/troubleshooting/Rat_NOR/project_folder/project_config.ini'\n", + "\n", + "PROJECT_PATH = r'/Users/simon/Desktop/envs/troubleshooting/Rat_NOR/project_folder/project_config.ini' \n", "VIDEO_NAME = '2022-06-20_NOB_DOT_4'\n", "BP = 'Nose' # THE BODY-PART WE WILL USE TO INFER POSITION OF ANIMAL" ] diff --git a/docs/nb/geometry_example_2.ipynb b/docs/nb/geometry_example_2.ipynb index ac59a3d78..93f365cae 100644 --- a/docs/nb/geometry_example_2.ipynb +++ b/docs/nb/geometry_example_2.ipynb @@ -5,20 +5,21 @@ "id": "6b33d53a", "metadata": {}, "source": [ - "# Geometry computations: Example 2" + "# Geometry computations Example 2: Movement hull statistics in grid-system" ] }, { - "attachments": {}, "cell_type": "markdown", "id": "39874072", "metadata": {}, "source": [ - "Here we \n", + "In this notebook, we:\n", "\n", "* (1) Represent animals as polygonal shapes created from pose-estimation data, and \n", - "* (2) We divide the experimental arena into geometries, and \n", - "* (3) compute and visualize the time that the animal geometry spends in the different arena geometries" + "* (1) Divide the experimental arena into distinct geometrical regions, and\n", + "* (2) Compute and visualize the time the animal spends in each region of the arena.\n", + "\n", + "This analysis can be used to study spatial preferences in the experimental arena. This analysis is based on the location of a entire animal hull. To perform the analysis using pose-estimated key-points, see [THIS](https://simba-uw-tf-dev.readthedocs.io/en/latest/nb/geometry_example_1.html) notebook. " ] }, { diff --git a/docs/nb/geometry_example_3.ipynb b/docs/nb/geometry_example_3.ipynb index 92c25ddd3..f4785be1f 100644 --- a/docs/nb/geometry_example_3.ipynb +++ b/docs/nb/geometry_example_3.ipynb @@ -5,7 +5,7 @@ "id": "536d575d", "metadata": {}, "source": [ - "# Geometry computations: Example 4" + "# Geometry computations Example 3: Slice animal videos on CPU" ] }, { @@ -13,12 +13,12 @@ "id": "43fcbf77", "metadata": {}, "source": [ - "In this short notebook, we extract bounding boxes (cropped images of the animal) representing from the pose-estimation data " + "In this short notebook, we extract bounding boxes (cropped images of the animal) representing from the pose-estimation data. " ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "9785b81f", "metadata": {}, "outputs": [], @@ -29,7 +29,8 @@ "from simba.mixins.image_mixin import ImageMixin\n", "from simba.plotting.geometry_plotter import GeometryPlotter\n", "from simba.utils.read_write import (get_video_meta_data, read_df)\n", - "from IPython.display import Video\n", + "from ipywidgets import Video\n", + "from IPython.display import HTML, Image\n", "import matplotlib.pyplot as plt\n", "import matplotlib \n", "dpi = matplotlib.rcParams['figure.dpi']\n", @@ -133,29 +134,29 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 3, "id": "47fc513d", "metadata": {}, "outputs": [ { "data": { "text/html": [ - "" + " \n" ], "text/plain": [ - "" + "" ] }, - "execution_count": 21, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#TO VIEW THE VIDEO (NOT SURE HOW WELL THIS WORKS IN SPHINX/READTHEDOCS)\n", - "Video('https://github.com/sgoldenlab/simba/blob/master/misc/stack_example.mp4')" + "video_url = 'https://raw.githubusercontent.com/sgoldenlab/simba/master/misc/stack_example.mp4'\n", + "HTML(f''' \n", + "''')" ] }, { @@ -202,9 +203,9 @@ ], "metadata": { "kernelspec": { - "display_name": "simba_dev", + "display_name": "simba", "language": "python", - "name": "simba_dev" + "name": "simba" }, "language_info": { "codemirror_mode": { diff --git a/docs/nb/geometry_example_5.ipynb b/docs/nb/geometry_example_5.ipynb index d256459a1..dce685318 100644 --- a/docs/nb/geometry_example_5.ipynb +++ b/docs/nb/geometry_example_5.ipynb @@ -5,7 +5,7 @@ "id": "e33548d8", "metadata": {}, "source": [ - "# Geometry computations: Example 5" + "# Geometry computations Example 5: Slice animal shapes" ] }, { @@ -13,9 +13,11 @@ "id": "e941fd05", "metadata": {}, "source": [ - "Here we compute some simple geometries based on keypoints in a single image. \n", + "Here we compute some simple geometries based on keypoints in a single image.\n", "\n", - "IMPORTANT Use multiprocessing function to perform these and many other operations in whole videos. " + "This includes slicing out animals, body-parts, and surrounding regions based on polygons, circles, and rectangles from pose-estimated data.\n", + "\n", + "Note: Use SimBA multiprocessing and GPU function to perform these and similar operations in whole videos. " ] }, { diff --git a/docs/nb/geometry_example_6.ipynb b/docs/nb/geometry_example_6.ipynb index 21be1b74a..3fdc54c85 100644 --- a/docs/nb/geometry_example_6.ipynb +++ b/docs/nb/geometry_example_6.ipynb @@ -5,7 +5,15 @@ "id": "b66da18f", "metadata": {}, "source": [ - "# Geometry computations: Example 6" + "# Geometry computations Example 6: ROI and path statistics" + ] + }, + { + "cell_type": "markdown", + "id": "baed07e9", + "metadata": {}, + "source": [ + "Here we use [ROIs drawn in SimBA](https://github.com/sgoldenlab/simba/blob/master/docs/ROI_tutorial_new.md), we manipulate and visualize those ROIs, and compute how the animal moves in realtion to those ROIs." ] }, {