Put the .py files with your detectron installation.
python2 tools/infer_vid.py
--cfg configs/DensePose_ResNet101_FPN_s1x-e2e.yaml
--output-dir DensePoseData/infer_out/
--wts https://s3.amazonaws.com/densepose/DensePose_ResNet101_FPN_s1x-e2e.pkl
--input-file filename
Note: Requires about 4GB VRAM.
If you use ResNet101_FPN_s1x model, you need more than 4GB of memory. If you have only 4GB use ResNet50_FPN_s1x.
You can get configs and models from here.
Additional requirement - ffmpeg