Greetings! First off this is great work and I'm happy to maybe finally find a solution to my problem.
Does your code work for own weights as well, which I've gained by training on a custom dataset with YOLOv5? I need to export the .pt to .onnx files, so I can use my own wiehgts with OpenCV DNN.