1+ SIPEC
2+ =====
3+
4+ |Code style: black |
5+
6+ SIPEC: the deep-learning Swiss knife for behavioral data analysis
7+
8+ This is the repository accompanying the `SIPEC
9+ publication\* <https://doi.org/10.1101/2020.10.26.355115> `__, which is a
10+ pipeline that enables all-round behavioral analysis through the usage of
11+ state-of-the-art neural networks. You can use SIPEC by either combining
12+ its modules in your own workflow, or using template workflows, that have
13+ been used in the paper, which can be accessed via command line. We will
14+ be providing more detailed and illustrated instructions soon. Moreover,
15+ extensive documentation and more exemplary data will be made available.
16+
17+ We welcome feedback via GitHub issues.
18+
19+ - Markus Marks, Jin Qiuhan, Oliver Sturman, Lukas von Ziegler, Sepp
20+ Kollmorgen, Wolfger von der Behrens, Valerio Mante, Johannes Bohacek,
21+ Mehmet Fatih Yanik bioRxiv 2020.10.26.355115; doi:
22+ https://doi.org/10.1101/2020.10.26.355115
23+
24+ |image1 |
25+
126Usage/Installation
227------------------
328
4- **For really making use of SIPEC, your machine should have a powerful
5- GPU. We have tested the scripts with NVIDIA GTX 1080, NVIDIA GTX 2080 Ti
6- and V100 GPUs. **
29+ **For using SIPEC, your machine should have a powerful GPU. We have
30+ tested the scripts with NVIDIA GTX 1080, NVIDIA GTX 2080 Ti and V100
31+ GPUs. **
732
833Docker
934~~~~~~
@@ -21,26 +46,28 @@ SIPEC image by executing:
2146
2247::
2348
24- docker pull chadhat /sipec:tf2
49+ docker pull sipec /sipec:latest
2550
2651**Note: ** In order to run docker without ``sudo `` you would need to
2752create a docker group and add your user to it. Please follow the
2853instructions on:
2954https://docs.docker.com/engine/install/linux-postinstall/
3055
31- The docker image contains the environment and SIPEC scripts.
56+ The docker image contains the environment, sample data and SIPEC
57+ scripts.
3258
3359Environment installation
3460~~~~~~~~~~~~~~~~~~~~~~~~
3561
3662If you do not want to use the docker container you can follow these
3763installation instructions for **Linux **. These instructions have been
38- tested on Ubuntu 18 and 20.04.
64+ tested on Ubuntu 20.04 but would most likely also work on Ubuntu 18 .
3965
4066Step 1: Install Cuda 11.0.3
4167^^^^^^^^^^^^^^^^^^^^^^^^^^^
4268
43- Download and install Cuda 11. We have tested the setup with cuda 11.0.3.
69+ Download and install Cuda 11.0.3 (We have tested the setup with this
70+ cuda version).
4471
4572After the installation is finised run ``nvcc --version `` to check the
4673installed cuda version.
@@ -67,6 +94,26 @@ repository \* open a terminal and go to the cloned SIPEC directory:
6794
6895The script will ask you for the root password.
6996
97+ Step 4:
98+ ^^^^^^^
99+
100+ The script ``setup.sh `` has created a virtual environment named ``env ``
101+ in the repository folder. Activate the environment by executing:
102+
103+ ::
104+
105+ source ./env/bin/activate
106+
107+ Step 5:
108+ ^^^^^^^
109+
110+ To test your setup run one of the scripts in the folder ``SwissKnife ``,
111+ e.g.,
112+
113+ ::
114+
115+ python segmentation.py --help
116+
70117Usage
71118-----
72119
@@ -85,20 +132,20 @@ Here are some example command line usages of the pipeline
85132.. raw :: html
86133
87134 <pre ><code >
88- docker container run -v "<b >RESULTS_PATH</b >:/home/user/results" --runtime=nvidia --rm sipec:main_tf2
135+ docker run -v "<b >RESULTS_PATH</b >:/home/user/results" --runtime=nvidia --rm sipec/sipec
136+ segmentation.py --cv_folds 0 --gpu 0 --frames /home/user/data/mouse_segmentation_4plex_merged/frames --annotations /home/user/data/mouse_segmentation_4plex_merged/merged.json
137+
138+ docker run -v "<b >RESULTS_PATH</b >:/home/user/results" --runtime=nvidia --rm sipec/sipec
89139 classification_comparison.py --gpu 0 --config_name behavior_config_final --random_seed 1 --output_path=/home/user/results
90140
91- docker container run -v "<b >RESULTS_PATH</b >:/home/user/results" --runtime=nvidia --rm sipec:main_tf2
92- poseestimation.py --gpu 0 --operation train_mouse --output_path= /home/user/results/
141+ docker run -v "<b >RESULTS_PATH</b >:/home/user/results" --runtime=nvidia --rm sipec/sipec
142+ poseestimation.py --gpu 0 --results_sink /home/user/results --dlc_path /home/user/data/mouse_pose/OFT/labeled-data/ --segnet_path /home/user/data/pretrained_networks/mask_rcnn_mouse_0095.h5 --config poseestimation_config_test
93143
94- docker container run -v "<b >RESULTS_PATH</b >:/home/user/results" --runtime=nvidia --rm sipec:main_tf2
95- behavior .py --gpu 0 --annotations /home/user/data/20180124T113800-20180124T115800_0.csv --video /home/user/data/fullvids_20180124T113800-20180124T115800_%T1_0.mp4 --output_path /home/user/results
144+ docker run -v "<b >RESULTS_PATH</b >:/home/user/results" --runtime=nvidia --rm sipec/sipec
145+ full_inference .py --gpu 0 --species mouse --video /home/user/data/full_inference_posenet_25_June/animal1234_day1.avi --posenet_path /home/user/data/pretrained_networks/posenet_mouse.h5 --segnet_path /home/user/data/pretrained_networks/mask_rcnn_mouse_0095.h5 --max_ids 4 --results_sink /home/user/results/full_inference
96146
97- docker container run -v "<b >RESULTS_PATH</b >:/home/user/results" --runtime=nvidia --rm sipec:main_tf2
98- full_inference.py --gpu 0 --species mouse --video /home/user/data/full_inference_and_vis_data/animal5678_day2.avi --segnet_path "/home/user/data/full_inference_and_vis_data/mask_rcnn_mouse_0095.h5" --max_ids 4 --results_sink /home/user/results/full_inference
147+ <b >Coming soon</b >: behavior.py
99148
100- docker container run -v "<b >RESULTS_PATH</b >:/home/user/results" --runtime=nvidia --rm sipec:main_tf2
101- segmentation.py --cv_folds 0 --gpu 0 --frames /home/user/data/mouse_segmentation_single/annotated_frames --annotations /home/user/data/mouse_segmentation_single/mouse_top_segmentation.json
102149 </pre >
103150
104151Where, **RESULTS_PATH ** is the path on your machine where you would like
@@ -114,7 +161,7 @@ the flag ``--help``, e.g.,
114161
115162::
116163
117- docker container run --runtime=nvidia --rm sipec:main_tf2 segmentation.py --help
164+ docker container run --runtime=nvidia --rm sipec/sipec segmentation.py --help
118165
119166own pipline
120167~~~~~~~~~~~
@@ -138,14 +185,24 @@ Example Data
138185------------
139186
140187Mouse OFT behavioral videos
141- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
188+ '''''''''''''''''''''''''''
142189
143190For open field (OFT) mouse behavioral analysis, you can use the
144191exemplary data from Sturman et al. from zenedo.
145192https://zenodo.org/record/3608658 The corresponding labels can be
146193accessed here.
147194https://github.com/ETHZ-INS/DLCAnalyzer/tree/master/data/OFT/Labels
148195
196+ Primate, Mouse data for different SIPEC modules (incomplete, being updated at the moment)
197+ '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
198+
199+ https://www.dropbox.com/sh/dpkswv0j3l3j38r/AABwHUdL6XYvrhDLDSlyPFzZa?dl=0
200+
201+ Pretrained Networks
202+ '''''''''''''''''''
203+
204+ https://www.dropbox.com/sh/y387kik9mwuszl3/AABBVWALEimW-hrbXvdfjHQSa?dl=0
205+
149206Cite
150207----
151208
@@ -157,3 +214,8 @@ following:
157214 SIPEC: the deep-learning Swiss knife for behavioral data analysis
158215 Markus Marks, Jin Qiuhan, Oliver Sturman, Lukas von Ziegler, Sepp Kollmorgen, Wolfger von der Behrens, Valerio Mante, Johannes Bohacek, Mehmet Fatih Yanik
159216 bioRxiv 2020.10.26.355115; doi: https://doi.org/10.1101/2020.10.26.355115
217+
218+ .. |Code style: black | image :: https://img.shields.io/badge/code%20style-black-000000.svg
219+ :target: https://github.com/psf/black
220+ .. |image1 | image :: supp_files/Supplementary%20Video%201.gif
221+
0 commit comments