Repository navigation
Bug - Inference on videos isn't working as expected? #944
anuragrawal2024
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi All / @fcakyon ,
I would like to bring something to your attention which I discovered during one of my experiments. I am working on detection of small objects. I tested SAHI with YOLOv8 on some of my test videos and noticed that results/detection were different, compared to YOLOv8 without SAHI results. I used get_prediction() first to ensure that results were consistent with my just YOLOv8 results but they were not.
To debug the issue, I extracted frames from a test video and used get_prediction() on these frames and results matched with just YOLOv8 results. I realized something was wrong with the reading videos part get_video_reader(). get_video_reader() uses opencv to read images/frames and they are in BGR format while get_prediction() expects input image in RGB format. I made this change and everything worked as expected.
Please let me know your opinion on this. Let me know if you have any questions. If you'd like me to open a PR to fix these issues, let me know. Thanks!
All reactions