Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YOLOv5 & YOLOv8 support for the OpenVINO Detector #5523

Merged
merged 7 commits into from
Feb 19, 2023

Conversation

aeozyalcin
Copy link
Contributor

I have added OpenVINO support for both YOLOv5 and YOLOv8 models. This diff adds on top of the previous work where YOLOX support was added. These are state of the art YOLO models, and I have observed incredible performance with them. Looking forward to seeing others try them out.

@netlify
Copy link

netlify bot commented Feb 17, 2023

Deploy Preview for frigate-docs canceled.

Name Link
🔨 Latest commit 54fc0db
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/63f06e2fd1fbc20008920095

docs/docs/configuration/detectors.md Outdated Show resolved Hide resolved
@aeozyalcin
Copy link
Contributor Author

Thanks y'all. I am considering adding some Google Collab notebook links in the docs for people to be able to retrieve and supply their own YOLO models to Frigate. I suspect there will be lots of questions about that, so a ready-made notebook would alleviate lots of those questions. Any thoughts?

@NickM-27
Copy link
Collaborator

Thanks y'all. I am considering adding some Google Collab notebook links in the docs for people to be able to retrieve and supply their own YOLO models to Frigate. I suspect there will be lots of questions about that, so a ready-made notebook would alleviate lots of those questions. Any thoughts?

Could probably be written as a guide. I'd do that as a separate PR though

@NickM-27 NickM-27 self-requested a review February 17, 2023 21:17
Copy link
Contributor

@NateMeyer NateMeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's some duplicate code that could be refactored to make this more readable and maintainable.

Comment on lines 158 to 165
(object_detected[1] - (object_detected[3] / 2))
/ self.h, # y_min
(object_detected[0] - (object_detected[2] / 2))
/ self.w, # x_min
(object_detected[1] + (object_detected[3] / 2))
/ self.h, # y_max
(object_detected[0] + (object_detected[2] / 2))
/ self.w, # x_max
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This portion seems to be common with all three yolo models. Could refactor to a utility function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take a look at the latest commit.

When rethinking and going over the existing code, I found that the SSD post-processing might have a bug, where if a detection with less than 0.1 score is encountered before all 20 spots in the detections array is filled up, the for loop will exit prematurely without going through the rest of the inference results, even though there may still be other inference results with confidence scores higher than 0.1. FYI.

frigate/detectors/plugins/openvino.py Show resolved Hide resolved
@aeozyalcin
Copy link
Contributor Author

@NickM-27 the checks are stuck for some reason. Is there a way to kick them off again?

@blakeblackshear blakeblackshear merged commit 0592c8b into blakeblackshear:dev Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants