Main content

Home

Menu

Loading wiki pages...

View
Wiki Version:
EDIT / Warning: It seems the models used by OpenPose can not be downloaded anymore directly, making the dockerfile not able to install openpose directly. Issues have been open on OpenPose's github since August 2023 and before, see: https://github.com/CMU-Perceptual-Computing-Lab/openpose/issues/ Some user apparently uploaded them to a google document. Changes needed to the Dockerfile: Probably add a few steps to download the models from alternate sources and move them in the correct folders separately before the build is done; or add them locally Use the existing container instead, while the dockerfile is being updated (ETA: unknown, not a priority since the docker image is working). # 1. Description of the Docker image Docker with OpenPose installed. Dockerfile and image based on the "kinematics extraction pipeline" docker from Khoury et al (2022) and [`esemeniuc/openpose-docker`](https://github.com/esemeniuc/openpose-docker) # 2. Build - From this folder: `sudo docker build -t openpose:paper .` # 2. Docker startup Default command, with gpu and access to external hard drives: `sudo docker run --rm --gpus all -it -e="DISPLAY" -v=/tmp/.X11-unix:/tmp/.X11-unix -v /home/$user:/home/$user openpose /bin/bash` Replace `$user` by the session's username. Add `-v /media:/media` to give access to external hard drives (if that's were the data is) Using `--gpus all` necessitate an available gpu. If needed, limit the amount of RAM shared with docker with the parameter: `--shm-size=8gb` # 3. Command for processing images using OpenPose in Docker without visualizating results Replace `$data_path` by the path to the data folder and `$result_path` by the path to the result folder. The individual images to process should be located in `$data_path/images/` Note that both folders should be created before the script is run. Memory profiling can be done by adding the following command before the processing commands described below: `sudo mprof run --include-children --multiprocess --output $result_path/openpose/mprofile.dat` From the working directory, run: `python3.6 main.py $data_path $result_path` Open the file and modify the OpenPose parameters as needed. If the gpu does not have enough VRAM, consider reducing the values for `--net_resolution` or `--scale_number` inside `main.py` # 3.1 Alternative for batch processing From the working directory, run: `sh batch_processing.sh $data_path` Needs a fixed folder structure, where the actual images are located 4 levels down. The images should be located in an `images/` folder at the lowest level: `$data_path/INFANT_ID/INFANT_SESSION/SESSION_TRIAL/images/`. The script will loop on and process all infants, sessions and trials; and will create the output folders at the same level as the images folder is located in the input data. # 3.2 Running Openpose on a video Modify `main.py` to use `--video $data_path/$video` instead of `--image_dir $result_path/images`, where `$video` should be the name of the video to process # 3.3 Running Openpose with visualisation (output images with keypoints) Using the main script, use `python3.6 main.py $data_path $result_path vis`
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.