This image has been used for the paper: https://link.springer.com/article/10.3758/s13428-025-02816-x (free access to the pdf: https://rdcu.be/eFwac) The Dockerfile is available in the osf repository: https://osf.io/rswvn/
The host computer must have the appropriate packages installed to allow GPUs to be used by the Docker containers, e.g., for Nvidia GPUs, it requires to install the Nvidia container toolkit: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html
All ready-to-use Docker containers (including this one), are constrained to the dependencies software versions they had when built. The main cause for compatibility issues and the container not working properly comes from the graphic card and the versions of CUDA/cudnn/Pytorch. In particular, any recent enough GPU that is not handled by the pre-installed version would lead to errors, or the images/videos not being processed. In such a case, the fix is to use the Dockerfile shared on our osf and modify the appropriate lines to use versions of the software. For example, using an Nvidia GPU RTX A4000 or A5000 requires to modify the Dockerfile to use CUDA version 11.3, and cudnn 8; then to rebuild a docker container using the updated Dockerfile.
Dockerfile based on the official Dockerfile from ~July-August 2022 https://github.com/open-mmlab/mmpose/tree/master/docker with added MMDetection installation
Also see: https://mmdetection.readthedocs.io/en/stable/get_started.html https://mmpose.readthedocs.io/en/v0.28.0/install.html
docker build -t hrnet:paper .
Default command:
sudo docker run --rm --gpus all -it -e="DISPLAY" -v=/tmp/.X11-unix:/tmp/.X11-unix:rw -v /home/$user:/home/$user hrnet:paper /bin/bash
Replace $user by the session's username.
Add -v /media:/media to give access to external hard drives.
If needed, limit the amount of RAM shared with docker with the parameter:
--shm-size=8gb
Replace $data_path by the path to the data folder and $result_path by the path to the result folder. Note that both folders should created before the script is run.
Memory profiling can be done by adding the following command before the processing commands described below:
mprof run --include-children --multiprocess --output $result_path/mmpose_td/mprofile.dat
mprof run --include-children --multiprocess --output $result_path/mmpose_bu/mprofile.dat
Add the following to output images with keypoints and skeleton
--out-img-root $result_path/mmpose_td/vis
About script top_down_img_demo_with_mmdet.py:
python demo/top_down_img_demo_with_mmdet.py ../mmdetection/configs/faster_rcnn/faster_rcnn_r50_caffe_fpn_mstrain_1x_coco.py mmpose_topdown_configs/faster_rcnn_r50_caffe_fpn_mstrain_1x_coco-5324cff8.pth configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288_dark.py mmpose_topdown_configs/hrnet_w48_coco_384x288_dark-e881a4b6_20210203.pth --img-root $data_path/images/ --img "$i" --export $result_path/mmpose_td/keypoints_raw
About script top_down_video_demo_with_mmdet.py:
python demo/top_down_video_demo_with_mmdet.py ../mmdetection/configs/faster_rcnn/faster_rcnn_r50_caffe_fpn_mstrain_1x_coco.py mmpose_topdown_configs/faster_rcnn_r50_caffe_fpn_mstrain_1x_coco-5324cff8.pth configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288_dark.py mmpose_topdown_configs/hrnet_w48_coco_384x288_dark-e881a4b6_20210203.pth --video-path $data_path/$video --export $result_path/mmpose_td/keypoints_raw
$video should be the name of the video.
To avoid potential changes or unavailability of the files, and ensure reproduction of results, the configuration files were downloaded on 2023.01.11 from:
https://download.openmmlab.com/mmdetection/v2.0/benchmark/faster_rcnn_r50_caffe_fpn_mstrain_1x_coco/faster_rcnn_r50_caffe_fpn_mstrain_1x_coco-5324cff8.pthlas file mmpose_topdown_configs/faster_rcnn_r50_caffe_fpn_mstrain_1x_coco-5324cff8.pthhttps://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w48_coco_384x288_dark-e881a4b6_20210203.pthas file mmpose_topdown_configs/hrnet_w48_coco_384x288_dark-e881a4b6_20210203.pthAdd the following to output images with keypoints and skeleton:
--out-img-root $result_path/mmpose_bu/vis
About script bottom_up_img_demo.py:
python demo/bottom_up_img_demo.py configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512.py mmpose_bottomup_configs/hrnet_w32_coco_512x512-bcb8c247_20200816.pth --img-path $data_path/images/ --export $result_path/mmpose_bu/keypoints_raw
About script bottom_up_video_demo.py:
python demo/bottom_up_video_demo.py configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512.py mmpose_bottomup_configs/hrnet_w32_coco_512x512-bcb8c247_20200816.pth --video-path $data_path/$video --export $result_path/mmpose_bu/keypoints_raw
$video should be the name of the video.
To avoid potential changes or unavailability of the file, and ensure reproduction of results even without an internet connection, the model weights were downloaded on 2023.01.11 from
https://download.openmmlab.com/mmpose/bottom_up/hrnet_w32_coco_512x512-bcb8c247_20200816.pth as file mmpose_bottomup_configs/hrnet_w32_coco_512x512-bcb8c247_20200816.pth, added to the gitlab repository, and the local version is used to run MMPose Bottom Up, rather than being always downloaded from openmmlab servers.
Content type
Image
Digest
sha256:623f26a80…
Size
4.3 GB
Last updated
almost 3 years ago
docker pull humanoidsctu/hrnet:paper