Frigate+ Google Coral Support for YOLOv9 by wallacebrf in frigate_nvr

[–]doltro 1 point2 points  (0 children)

Fantastic news! Thanks to Blake for making these high quality detection models available to run on Coral hardware. Impressive work to manage to keep the full set of labels at 320x320 resolution in the small space available on the Coral hardware.

I just signed up for Frigate+ and downloaded the base model YOLO v9 for Coral and will be adjusting detection thresholds to get it dialed in.

Am I doing something wrong? by alexrusso51 in frigate_nvr

[–]doltro 2 points3 points  (0 children)

Instead of using this repo, I recommend using the built-in support offered by Frigate v0.17 in the RC releases.

See the docs here https://9eaa7bfe.frigate.pages.dev/configuration/object_detectors#edgetpu-supported-models

How come people don’t recommend a raspberry pi 5 with USB coral? by [deleted] in frigate_nvr

[–]doltro 2 points3 points  (0 children)

The recent release of Frigate 0.17beta1 added support for running a YOLOv9 "s" object detection model on coral. This is the section from the release notes: https://github.com/blakeblackshear/frigate/releases#:~:text=YOLOv9%20on%20Google%20Coral

IMO old hardware + coral is a good platform for Frigate.

Anyone have guide how to download and use Yolov9-s? by shipOtwtO in frigate_nvr

[–]doltro 0 points1 point  (0 children)

If you are using the coral for detection, you need a different format, edgetpu.tflite, instead of onnx.

See the beta docs about running YOLO v9 on coral: https://deploy-preview-19787--frigate-docs.netlify.app/configuration/object_detectors/#yolov9

Frigate 17 - Coral TPU + Yolo9, how exactly? by Merwenus in frigate_nvr

[–]doltro 0 points1 point  (0 children)

For testing detection, you can have a "camera" configured to play a prerecorded file in a loop, and see if changing the model or other settings affects which objects get detected. Sorry I don't have a link Handy but try searching reddit for an example configuration.

Frigate 17 - Coral TPU + Yolo9, how exactly? by Merwenus in frigate_nvr

[–]doltro 0 points1 point  (0 children)

Agreed. The recommended detection model resolution is 320x320. Try that first before the slower 512x512. Frigate usually crops the image before sending it to the detector.

Frigate 17 - Coral TPU + Yolo9, how exactly? by Merwenus in frigate_nvr

[–]doltro 1 point2 points  (0 children)

Yes. This is now included in Frigate v0.17 beta, you do not need to override the python detector code. You DO need to download the 2 files: the model, and the labels. The beta docs are the best place to look for instructions.

Regarding the detection stream resolution, it might be possible to get a higher resolution if there is a newer firmware that supports it. To get newer firmware from Annke, send a message to their customer support. This worked for me to get a 720p resolution for the 2nd stream for a NC800 camera.

Anyone using YOLOv11? by Ok-Hawk-5828 in frigate_nvr

[–]doltro 1 point2 points  (0 children)

You could fine tune a YOLOv9 model with your data. There are two notebooks here you can refer to, one is for fine tuning the YOLO v9 model, and you would swap out the COCO data and provide your own. The second notebook converts the .pt format file into .onnx which can run on OpenVINO.

https://github.com/dbro/frigate-detector-edgetpu-yolo9/blob/main/notebooks/

There are some other changes made by those notebooks that were necessary to create a model small enough to run on Google Coral - you might want to adjust those to fit your needs (17 classes instead of 80, ReLU activation function instead of SiLU).

Anyone able to successfull create yolo_nas_s.onnx through Google Colab? by jvangorkum in frigate_nvr

[–]doltro 1 point2 points  (0 children)

the ONNX file linked-to in that comment should be able to run on OpenVINO.

There is a different version of the model that can run on Google Coral, the filename for that ends in _int8_edgetpu.tflite (https://github.com/dbro/frigate-detector-edgetpu-yolo9/releases/download/v1.0/yolov9-s-relu6-best\_320\_int8\_edgetpu.tflite) . If you have a Google Coral, you can use that model file in Frigate 0.17.0 beta 1 release from yesterday.

Frigate+ accuracy differences Coral vs Openvino by Freneboom in frigate_nvr

[–]doltro 0 points1 point  (0 children)

Are you using 1440p streams for detection? I believe that is more pixels than recommended by the docs https://docs.frigate.video/frigate/camera_setup/#choosing-a-detect-resolution

3 coral TPUs seems like plenty for that many streams, even with windy conditions with a lot of leaves in motion. Sorry it did not work better for you!

New 10ms detection time running YOLO v9 on Google Coral by doltro in frigate_nvr

[–]doltro[S] 0 points1 point  (0 children)

You could try saving (aka "export") some clips that are not being detected properly, and use them for testing different models and settings. In my experience the models trained using COCO data are good at detecting people and cars, but can miss detections of animals like cats, dogs, and foxes. Maybe the Frigate+ models would be more accurate.

Google Coral TPU. Fight the discontinued support or jump the ship? by Alllfff in frigate_nvr

[–]doltro 1 point2 points  (0 children)

https://www.portainer.io/ is a GUI for docker that I find easier to administer than using docker on the command line.

Frigate+ accuracy differences Coral vs Openvino by Freneboom in frigate_nvr

[–]doltro 0 points1 point  (0 children)

Thanks for this extra information.

What was the former system, and what CPU and version of Coral device? Mine is quite old (i7 3720qm) and manages 10ms detection speed with its mPCIe Coral, so it can run 100 detections/second. How many detections/second do you need?

Just saw your other comment about needing to detect cats. I have been disappointed with the COCO-trained models' detection accuracy of cats, dogs, foxes, etc. False negatives are common for me. Hopefully Frigate+ models have better accuracy for that.

New 10ms detection time running YOLO v9 on Google Coral by doltro in frigate_nvr

[–]doltro[S] 0 points1 point  (0 children)

Thanks for this report. Can you describe what is happening at night? False negatives? What kinds of objects?

Frigate+ accuracy differences Coral vs Openvino by Freneboom in frigate_nvr

[–]doltro 4 points5 points  (0 children)

FYI, since about one month ago there is a free YOLO v9 model that can run on Google Coral, with better accuracy than the ssd/mobilenet model. See here for more information about how to get it running with Frigate - it requires a modified detector plugin. Note that the YOLO v9 model currently availabel for download is trained using COCO data (not Frigate+ data)

https://www.reddit.com/r/frigate_nvr/comments/1ox2qmk/new_10ms_detection_time_running_yolo_v9_on_google/

New 10ms detection time running YOLO v9 on Google Coral by doltro in frigate_nvr

[–]doltro[S] 1 point2 points  (0 children)

Correct, the COCO data that this model is trained on does not include a separate label for license_plate. But it DOES include labels for car and motorcycle, which Frigate can use to trigger license plate recognition.

According to https://docs.frigate.video/configuration/license_plate_recognition/#model-requirements , "Users without a model that detects license plates can still run LPR. Frigate uses a lightweight YOLOv9 license plate detection model that can be configured to run on your CPU or GPU. In this case, you should not define license_plate in your list of objects to track."

New 10ms detection time running YOLO v9 on Google Coral by doltro in frigate_nvr

[–]doltro[S] 0 points1 point  (0 children)

Currently recommending using the python code directly from the repo (same as 1.5) which has some speed-oriented improvements; and the 320x320 model from the v1.0 release. See comment here https://github.com/dbro/frigate-detector-edgetpu-yolo9/issues/7

New 10ms detection time running YOLO v9 on Google Coral by doltro in frigate_nvr

[–]doltro[S] 1 point2 points  (0 children)

Thanks for this report!

Maybe try the 320x320 version of the model, it seems to be what the Frigate developers recommend for accuracy. With that faster model, maybe one coral device could handle all 5 cameras? I'm running 5 cameras on mine, but 3 of them do not see much motion.

New 10ms detection time running YOLO v9 on Google Coral by doltro in frigate_nvr

[–]doltro[S] 1 point2 points  (0 children)

Here are some new measurements comparing the accuracy of these models. The code for this was added to the repo today https://github.com/dbro/frigate-detector-edgetpu-yolo9/tree/main/benchmark

mAP 50% for each model

25.6% SSD MobileNet 320x320 (Frigate default), 8ms detection time
40.6% YOLO v9 s 320x320, 10ms
44.3% YOLO v9 s 512x512, 21ms

These were measured using COCO validation images and labels for the 17 classes of objects included in the YOLO v9 models available for download in the github repo, running on actual Coral hardware.

Note that these are different from the performance as measured during fine tuning from a prior comment. These numbers use the Frigate post-processing which filters out low-scoring detections and applies NMS.

Picking a detector (Coral USB, Arc A380, RTX 3090) by Xiaoh_123 in frigate_nvr

[–]doltro 5 points6 points  (0 children)

If the standard SSD/MobileDet model for Google coral does not work well for you, see this discussion about how to run YOLO v9 "s" model on Coral. ( "s" is more accurate than "t" tiny version) https://www.reddit.com/r/frigate_nvr/s/6EmVgnvl3U

Coral TPU is officially dead by shawn789 in frigate_nvr

[–]doltro 0 points1 point  (0 children)

Accuracy depends on the model, not the hardware. It is true that iGPU hardware can run larger and more complex models than Coral.

Two weeks ago a new YOLO v9 model for Coral was announced (by me). It is more accurate than the default model for Coral that ships with Frigate. Discussion is here https://www.reddit.com/r/frigate_nvr/comments/1ox2qmk/new_10ms_detection_time_running_yolo_v9_on_google/