Code for Making DensePose fast and light.
See Getting Started
- The project dependencies:
detectron2
Install it the following way:
git clone https://github.com/facebookresearch/detectron2.git && cd detectron2
git checkout b1fe5127e41b506cd3769180ad774dec0bfd56b0
pip install -e .
timm == 0.1.16
pytorch >= 1.4.0
- You can train a network from scratch using configs in
./configs
folder andtrain_net.py
script.
s0_bv2_bifpn_f64_s3x.yaml
config corresponds to theMobile-RCNN (B s3x)
model,s0_bv2_bifpn_f64.yaml
config corresponds to theMobile-RCNN (B s1x)
model,densepose_parsing_rcnn_spnasnet_100_FPN_s3x.yaml
config corresponds to theMobile-RCNN (A s3x)
model,densepose_parsing_rcnn_R_50_FPN_s1x.yaml
config corresponds to theParsing RCNN
model
Then evaluate the model with --eval_only
flag.
- You can run QAT of the
Mobile-RCNN (B s3x)
usingtrain_net.py
with--qat
flag then evaluate it with--quant-eval
flag. To use proposed hooks preserving mechanism it is needed to modify PyTorch source code according to files insidemodify_pytorch
directroy OR Use PyTorch nightly build (it is now containing the following commit https://github.com/pytorch/pytorch/pull/37233/commits/c8de10d2a394484ac58dd131878950b8ab7ac7a9)