Install the CrowdPose API: run sh install.sh under CrowdPose/crowdpose-api/PythonAPI/
Training
Convert train annotations in internal format. Run python scripts/prepare_cp_train_labels.py --labels <CP_HOME>/json/crowdpose_train.json. It will produce prepared_cp_train_annotation.pkl with converted in internal format annotations.
To train from MobileNet weights, run python train_cp.py --train-images-folder <CP_HOME>/images/ --prepared-train-labels prepared_cp_train_annotation.pkl --checkpoint-path <path_to>/mobilenet_sgd_68.848.pth.tar --from-mobilenet
Next, to train from checkpoint from previous step, run python train_cp.py --train-images-folder <CP_HOME>/images/ --prepared-train-labels prepared_cp_train_annotation.pkl --checkpoint-path <path_to>/checkpoint_iter_420000.pth.tar --weights-only
Finally, to train from checkpoint from previous step and 3 refinement stages in network, run python train_cp.py --train-images-folder <CP_HOME>/images/ --prepared-train-labels prepared_cp_train_annotation.pkl --checkpoint-path <path_to>/checkpoint_iter_280000.pth.tar --weights-only --num-refinement-stages 3. We took checkpoint after 370000 iterations as the final one.