keypoint-detection icon indicating copy to clipboard operation
keypoint-detection copied to clipboard

ONNX conversion does not support `same` padding in Conv2D

Open lucasvandijck opened this issue 2 years ago • 1 comments

Using the option padding='same' throws an error when trying to convert a PyTorch model to ONNX (needed for TensorRT support). This can be changed by manually performing the padding as noted here.

To support ONNX conversions, many of the current backends would have to be changed, as well as the head defined in detector.py.

lucasvandijck avatar Jan 10 '23 10:01 lucasvandijck

@lucasvandijck, we've had this issue in the past with the drive kit, but I never bothered to change all occurances of the 'same' padding.

I'm not entirely sure if creating a custom conv2d class is the best way to go forward, I think I would prefer a factory method for the original Conv2d class.

Feel free to make a PR for this, I can do it but then it won't be for this week.

tlpss avatar Jan 11 '23 07:01 tlpss