python apply_net.py show configs/densepose_rcnn_R_50_FPN_s1x.yaml densepose_rcnn_R_50_FPN_s1x.pkl image.jpg dp_contour,bbox --output image_densepose_contour.png
Please see Apply Net for more details on the tool.
To train a model one can use the train_net.py script.
This script was used to train all DensePose models in Model Zoo.
For example, to launch end-to-end DensePose-RCNN training with ResNet-50 FPN backbone
on 8 GPUs following the s1x schedule, one can run
python train_net.py --config-file configs/densepose_rcnn_R_50_FPN_s1x.yaml --num-gpus 8
The configs are made for 8-GPU training. To train on 1 GPU, one can apply the
linear learning rate scaling rule:
python train_net.py --config-file configs/densepose_rcnn_R_50_FPN_s1x.yaml \
SOLVER.IMS_PER_BATCH 2 SOLVER.BASE_LR 0.0025
Model testing can be done in the same way as training, except for an additional flag --eval-only and
model location specification through MODEL.WEIGHTS model.pth in the command line
python train_net.py --config-file configs/densepose_rcnn_R_50_FPN_s1x.yaml \
--eval-only MODEL.WEIGHTS model.pth
We provide tools which allow one to:
query_db is a tool to print or visualize DensePose data in a dataset.
Please refer to Query DB for more details on this tool
apply_net is a tool to print or visualize DensePose results.
Please refer to Apply Net for more details on this tool