OV DeformableConvolution support for DEKR
Pytorch layer documentation
OpenVINO layer documentation
- You can find all the changes needed to support the DeformableConvolution layer here.
- Create .onnx model with
python3 tools/convert.py --cfg path/to/file.yaml TEST.MODEL_FILE path/to/file.yaml
: - Create OpenVINO IR with OpenVINO master branch:
python3 <INSTALL_DIR>/openvino/tools/mo/openvino/tools/mo/mo.py --input_model model.onnx
- Open
model.xml
file and replace all the values ofbilinear_interpolation_pad
parameter with true:
<layer id="..." name="..." type="DeformableConvolution" ...>
<data auto_pad="explicit" bilinear_interpolation_pad="true" ...>
- Check the result with
python3 compare.py
.
- 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 reference range: [-0.016255718, 0.047695834]
Offset reference range: [-50.128445, 53.03814]
Heatmap diff: 8.2841143e-07
Offset diff: 0.0043911934
- 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 reference range: [-0.0047741896, 0.028738622]
Offset reference range: [-70.21522, 52.001522]
Heatmap diff: 7.105991e-07
Offset diff: 0.0013594627