Main content

Home

Menu

Loading wiki pages...

View
Wiki Version:
# 1. Install deeplabcut Install from the github, through an anaconda virtual environment https://github.com/DeepLabCut/DeepLabCut # 2. About Deeplabcut's models # 2.1 Installation Note that at the time of writing this file, the full_human model can not be created automatically from deeplabcut's create project function. Instead, it has to be downloaded from here: https://huggingface.co/mwmathis/DeepLabCutModelZoo-DLC_human_fullbody_resnet_101/commit/6cea8ddb300d103da378a5b993255c5005295c67 Then the config files have to be configured properly, both at the root of the project, and within the sub-folders, for example under the name `full_human`. # 2.2 Configuration The paths to the config and weight files of the project have to be updated properly, in particular (to use them to process videos): - `config.yaml` - `dlc_models/iteration-0/full_human-trainset95shuffle1/test/pose_cfg.yaml` # 3. Run deeplabcut: Open a new terminal window, from deeplabcut's root folder, then use the commands: `conda activate deeplabcut` # 3.1 Using the GUI: Run the following commands on the terminal: `ipython` `import deeplabcut` `deeplabcut.launch_dlc()` # 3.1.1 Label images - Go to the tab `Manage Project` - Load existing project; select the config file by opening the `config.yaml` in your project folder (e.g. where you put the `full_huma` folder, and select the file `config.yaml`) - Click the `OK` button, then `OK` again on the pop-up. - Go to the tab `Label Data` and select the corresponding folder containing the images to label (e.g. `/home/icub/human_pose_estimation/2d_methods/DLC_models/full_human/labeled-data/`) - Proceed to label the images, click the `Save` button when finished. - If the images contain identifiable information (the images) that should not be left on the machine (maybe because the machine is accessible to other persons): - One solution is either to move DeeplabCut's model (e.g. full_human) folder to the secured hard disk and update the links on all the config `.yaml` files in the folder and its sub-folders - Another solution is to use a secure way to delete the images from the disk. For example, on a hard disk using ubuntu, open a terminal from the folder containing the images, and run the command: `shred -uvz ./*.png`. You'll then need to re-copy the images from the hard disk to the folder labeling within the project next time you continue labeling the image set. Note: When picking up a folder that was partially labeled previously; there seems to be a bug and it doesn't show the already labeled data from the start, you have to press the `Next image` button a few times, then come back to the first to properly see the labeled data on the images that were already labeled. # 3.1.2 Create a video with keypoints visualisation - Go to the tab `Create Videos` - Use the `Select Videos` button to chose which video(s) to add visualisation to Note: The video must have been processed (`Analyze Video`) first, and unfortunately, the outputs from DeepLabCut (.csv, etc.) should be in the same folder as the videos to add visualisation to. - Use the button `RUN`, and wait for it to finish. # 3.2 Using the command line interface Replace `$data_path` by the path to the data folder and `$result_path` by the path to the result folder Memory profiling can be done by adding the following command before the processing command described below: `mprof run --include-children --multiprocess --output $result_path/mprofile.dat` From the terminal with the activated anaconda environment, run: `python main.py $data_path $result_path` Note1: You need to copy the script `main.py` from this gitlab deeplabcut's folder to the root of deeplabcut's installation folder. Note2: When using the memory profiler for the first time, install its library on the conda environment, with `pip install memory_profiler`. Do not use `sudo`.
OSF does not support the use of Internet Explorer. For optimal performance, please switch to another browser.
Accept
This website relies on cookies to help provide a better user experience. By clicking Accept or continuing to use the site, you agree. For more information, see our Privacy Policy and information on cookie use.
Accept
×

Start managing your projects on the OSF today.

Free and easy to use, the Open Science Framework supports the entire research lifecycle: planning, execution, reporting, archiving, and discovery.