So far, I am using detect.py with appropiate arguments for the object detection tasks, using a custom trained model. How can I call the detect method with the parameters(weights, source, conf, and img_size) from a python program, instead of using CLI script?
I am unable to do so.