SWETANK KUMAR 8b5e51541d dnn: add the ONNX DeformConv operator (#31214)
* dnn: add the ONNX DeformConv operator

Adds a CPU DeformConv layer for the new engine (2D, opsets 19-22). Each
kernel tap samples the input bilinearly at its offset position (corners
outside the image count as zero, like the ONNX reference), the optional
mask scales the samples, and each group is then one fastGemm. group,
offset_group, strides, dilations, pads and the optional B and mask
inputs are supported.

Enables the 4 DeformConv conformance tests and adds two tests for groups,
strides, dilations, asymmetric pads, batch 2, and a mask without a bias.

* dnn: DeformConv review fixes

- compute the 4 corner indices and weights once per (offset group, k, i, j)
  and reuse them for all channels of the offset group (branch-free inner loop)
- read kernel_size/stride/dilation/pad with params.getVector<int>()
- take the output size from convInferShape()

* dnn: DeformConv: keep the im2col buffer in the engine scratch pool, use cvFloor, parallel bias
2026-12-02 11:50:49 +05:30
2018-10-11 17:57:51 +00:00
2026-11-18 19:15:21 +03:00
2026-11-18 19:15:21 +03:00
2025-08-07 10:35:20 +03:00

OpenCV: Open Source Computer Vision Library

Resources

Contributing

Please read the contribution guidelines before starting work on a pull request.

Summary of the guidelines:

  • One pull request per issue;
  • Choose the right base branch;
  • Include tests and documentation;
  • Clean up "oops" commits before submitting;
  • Follow the coding style guide.

Additional Resources

Description
Languages
C++ 87.7%
C 3.1%
Python 2.9%
CMake 2%
Java 1.5%
Other 2.6%