I modified the webcam.py to detect object in the video, which is around 10 mins and 25FPS.
And it cost around 25 mins(0.1s/img with one V100 GPU) to generate a new video with bounding box and same FPS.
I would like to ask whether there is a way to speed up the detection, since I found that we detect each image at a time when I checked the code, is it possible to detect several images at a time?
It is possible to detect several images at a time, just pass a list of images to the model, this is supported. But you'll have to change the demo to support that.
I would like to ask another question.
When I apply the faster rcnn on video, how can I detect frame 1 and frame 4 and use interpolation method to predict object location in frame 2 and frame3, is there any algorithm for it ?
@xiaohai12 Hi, I also tested webcam.py to detect object in the video.
But i got 6 ~7 fps.
I tested using Titan Xp (Single GPU).
How did you modify the code for detecting accelerating?
Could you tell me which part should i modify for accelerating ?
@xiaohai12 Hi, I also tested webcam.py to detect object in the video.
But i got 2 ~5 fps.
I tested using Titan Xp (Single GPU).
How did you modify the code for detecting accelerating?
Could you tell me which part should i modify for accelerating ?
In the predictor.py file you need to modify function to detect several images at a time.
for me I got 10 fps at the begining and 15 fps after modification.
@xiaohai12 Thank you for comment.
Is Your modification code is in your repo ?
Could you tell me how to revise the code ?
Thank you for advise :)
@xiaohai12 Thank you for comment.
Is Your modification code is in your repo ?
Could you tell me how to revise the code ?
Thank you for advise :)
Not in my repo, I can't share it for some reasons.
just check the function in the predictor.py file
the model allows to input multiple images at a time.
@xiaohai12 Thank you for comment.
Is Your modification code is in your repo ?
Could you tell me how to revise the code ?
Thank you for advise :)
just modify function "run_on_opencv_img" and other functions related to this one.
@xiaohai12 Thanks for help.
I will try to this :)
Most helpful comment
In the predictor.py file you need to modify function to detect several images at a time.
for me I got 10 fps at the begining and 15 fps after modification.