Skip to content

Instantly share code, notes, and snippets.

@likholat
Created January 19, 2022 11:24
Show Gist options
  • Save likholat/5c7bc3287e924cb23215f2916b5be095 to your computer and use it in GitHub Desktop.
Save likholat/5c7bc3287e924cb23215f2916b5be095 to your computer and use it in GitHub Desktop.
OV release DeformableConvolution support for DEKR

OV release DeformableConvolution support for DEKR

Pytorch layer documentation

OpenVINO layer documentation

To get OpenVINO IR:

To get OV model and compare the results of OV and Torch models run:

python3 tools/convert.py --cfg path/to/file.yaml TEST.MODEL_FILE path/to/file.yaml
  • You can find all the changes needed to support the DeformableConvolution layer here.
  • Tested with OpenVINO 2021.4 release

Expected difference:

  1. For COCO:
python3 tools/convert.py \
    --cfg experiments/coco/inference_demo_coco.yaml \
    TEST.MODEL_FILE model/pose_coco/pose_dekr_hrnetw32_coco.pth

the result is:

Heatmap range: [-0.015603437, 0.036487162]
Offset range: [-44.577393, 42.865826]

Heatmap loss: 6.3575135e-07
Offset loss: 0.0032014847
  1. For CrowdPose:
python3 tools/convert.py \
    --cfg experiments/crowdpose/inference_demo_crowdpose.yaml \
    TEST.MODEL_FILE model/pose_crowdpose/pose_dekr_hrnetw32_crowdpose.pth

the result is:

Heatmap range: [-0.014327541, 0.02162216]
Offset range: [-76.367546, 55.62034]

Heatmap loss: 1.206994e-06
Offset loss: 0.0017137527
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment