Prediction only works on first frame of video
Opened this issue · 3 comments
Hi,
I had problems with your DeepSORT repo : https://github.com/anushkadhiman/ObjectTracking-DeepSORT-YOLOv3-TF2
and while searching for the problem I saw that the problem came from the Yolo code.
If I run the detect_video
function instead of detect_image
(with the following parameter: detect_video(yolo, 'test.mp4', 'test_2.mp4', show=True, input_size=YOLO_INPUT_SIZE, rectangle_colors=(255,0,0))
The bounding boxes only have values for the first frame of the video, after that all bounding boxes have NaN values and don't appear on the output video.
I'll try to look more into the problem to see if I can find the solution, but it's pretty weird.
I've made a test where I call Yolo = Load_Yolo_model()
before every prediction and it works (although it's very slow).
So I think there might be a state change when the model is called for the first time and it makes it not work for all subsequent calls.
Hi, How can I solve this problem? (Without this method -call the model every prediction.)
I think our best bet is to use another repo.