How to select ROI within the code, without using Mouse?

I have noticed that my object tracking code detects the object of interest pretty accurately for a second and then it starts to loose track of the object. I want to experiment, if refreshing ROI every second helps or not!

But I could not selectROI without using mouse, please guide me on how to selectROI (the bounding box) without using mouse , so that I can run the code continuously…

I will really appreciate any help!

what are you trying to track ?
maybe there is a XXXX_detector for that, which can replace “human annotation” ?

yea, makes sense.