October 21, 20205 yr IMPORTANT PLEASE UPDATE V0.15.0 IS A BREAKING CHANGE: PLEASE READ THE CHANGELOG TO UPDATE YOUR CONFIG FILE Support for Frigate docker container. Uses OpenCV and Tensorflow to perform realtime object detection locally for IP cameras. Designed for integration with HomeAssistant or others via MQTT. Application Name: Frigate Application Site: https://github.com/blakeblackshear/frigate Docker Hub: https://hub.docker.com/r/blakeblackshear/frigate/ Github: https://github.com/blakeblackshear/frigate Documentation: https://docs.frigate.video/ This container is only for AMD64 architecture CPUs (Intel/AMD) and its intended use is with a Coral Edge TPU accelerator to reduce de CPU usage. Make sure to look at the complete documentation available on Github! Any question about the usage of the app and runtime errors please use the github issue page. Post any questions or issues relating to this docker in this thread. PD: To use a M.2 or PCI CORAL instead of a USB Edge TPU install the drivers easily thanks to @ich777 by going to CA Apps and installing the 'Coral Accelerator Module Driver' app. To use a Nvidia dedicate graphics card install the 'Nvidia-Driver' plugin from CA Apps. Edited February 8, 20251 yr by yayitazale
October 27, 20205 yr Author On 10/22/2020 at 3:36 AM, corgan said: thanks a lot! runs fine with google coral You are welcome. You can limit the FPS to 5 with almost no difference in the results and you will decrease the CPU usage.
November 4, 20205 yr Seems config.yml file is no more on github. Anyone? Don't mind is in the main githut page... Edited November 4, 20205 yr by Kanashii
November 11, 20205 yr Anyone get this working with the cheaper Mini PCIE Accelerator instead of the USB Accelerator? A bit worried about figuring out PCIe passthrough to docker container. I checked and my cpu does support VT-d
November 15, 20205 yr On 11/11/2020 at 5:07 PM, whoisdecoy said: Anyone get this working with the cheaper Mini PCIE Accelerator instead of the USB Accelerator? A bit worried about figuring out PCIe passthrough to docker container. I checked and my cpu does support VT-d @yayitazale I'd like to know this as well, I'm keen to set this up for use with home assistant but I'd much rather spend £20 on the M.2 Card, Any thoughts? Edited November 15, 20205 yr by Tungmeister
November 17, 20205 yr On 11/15/2020 at 9:24 AM, Tungmeister said: @yayitazale I'd like to know this as well, I'm keen to set this up for use with home assistant but I'd much rather spend £20 on the M.2 Card, Any thoughts? mine arrives tomorrow and will report back with results!
November 18, 20205 yr Had to order a mini-pci to pci-e 'cause I didn't even realize that mini pci was a thing...
November 20, 20205 yr Alright, so i’ve received the mini PCIe card and since I don’t have a mini slot, i’m using a mini PCIe to PCIe adapter. I have it showing up in my PCIe devices: IOMMU group 8: [1ac1:089a] 01:00.0 Non-VGA unclassified device: Global Unichip Corp. Coral Edge TPU Does not show up in VM device options: Also not seeing anything useful in /dev/: Perhaps a custom kernel with drivers? https://coral.ai/docs/m2/get-started#2a-on-linux Getting cheaper in terms of time to return and get the USB version. Anyone have ideas?
November 30, 20205 yr Author As I reed here, you can try to run the docker on privileged mode, is just a workaround... https://github.com/blakeblackshear/frigate/issues/165 Edited November 30, 20205 yr by yayitazale
December 1, 20205 yr 19 hours ago, yayitazale said: As I reed here, you can try to run the docker on privileged mode, is just a workaround... https://github.com/blakeblackshear/frigate/issues/165 I did try this with no luck
December 1, 20205 yr Author 4 hours ago, whoisdecoy said: I did try this with no luck You can ask directly on the projects github, maybe there is someone can help you. I don't have a m2 to try... I'm sorry.
December 19, 20205 yr Hi Did order a USB coral. Today i run shinobi in docker with 6 cams. Is this instead of Shinobi I mean use Shinobi for recording and this for detection or shall I use this and don’t use shinobi. My goal here is to record 24/7 and also get object detection with Home Assistant mqtt. Like not home and camera detects person —> send notification and picture.
December 19, 20205 yr Author 7 hours ago, KaptenMicro said: Hi Did order a USB coral. Today i run shinobi in docker with 6 cams. Is this instead of Shinobi I mean use Shinobi for recording and this for detection or shall I use this and don’t use shinobi. My goal here is to record 24/7 and also get object detection with Home Assistant mqtt. Like not home and camera detects person —> send notification and picture. Home Assistant is not intended to record 24/7. For that goal, as you said, Shinobi or Zoneminder are the best options. As far as I know, Shinobi doesn't have any pluging that supporst Coral and TFlite (There is a TF pluging but not a TFlite one). Zoneminder does support CoralEdge TPU, but is not so easy to install and configure all the system. So, at this point, I think you just can use one of them as pure NVR recording 24/7 and then using the same RSTP streams of the cameras run this docker using CoralEdge TPU to achieve the notification automations on HA vía MQTT sensors. Anyway, if you only need to record clips for the detection events and not 24/7, you can achieve that using only this docker by two ways: You can use the integrated clip recording of frigate as you can read here: https://github.com/blakeblackshear/frigate#recording-clips You can activate the record at HA using the detection binary sensor for each element (car, person, cat...) and for each camera In my case, I'm using HA to pull telegram messages with attached images of the events as you can see here, I'm detecting birds at my balcony when they are close to the feeder I placed there and my cat's movements when I'm not at home. Edited December 19, 20205 yr by yayitazale
January 24, 20215 yr Not sure if anyone is still interested, but I have the Coral mini PCIE card working in the frigate docker. I had to compile the gasket and apex drivers. It’s far from elegant but I was able to run an insmod on boot in order to load the drivers. So far, so good.
January 26, 20215 yr On 1/23/2021 at 8:43 PM, pgbtech said: Not sure if anyone is still interested, but I have the Coral mini PCIE card working in the frigate docker. I had to compile the gasket and apex drivers. It’s far from elegant but I was able to run an insmod on boot in order to load the drivers. So far, so good. Just received my m.2 coral device and struggling to get it working with the frigate docker. Would you mind sharing the steps to compile and load the driver? Thank you!
January 27, 20215 yr Author Just updated the template to match with the new v0.8.0 realease. This is a breaking change so please follow the steps that you can find on the docs: https://blakeblackshear.github.io/frigate/ I recomend you to create a new config file from scratch. Edited January 27, 20215 yr by yayitazale
January 27, 20215 yr 17 hours ago, DiabloXP said: Just received my m.2 coral device and struggling to get it working with the frigate docker. Would you mind sharing the steps to compile and load the driver? Thank you! I followed a bunch of different guides, but am terrible about documenting. I do have my bash history, so I'll put that below and try and explain. I installed all of the dev-tools plugin options and any other missing dependencies should be in the NerdTools plugin. The only one I manually installed below is bison. You may have to update the linux kernel version in the commands if you aren't on 6.8.3 (kernel 4.19.107) and then the bison package if you aren't on amd64 (note I did have to use the version of bison shown below, the newest version did not work). Worth noting that some of the make commands in there might be unnecessary (again, sorry for my shitty documentation). If you have the apex and gasket modules reporting in the 'lsmod' command, you should be go to go. To fully verify, just check and see if you have the /dev/apex_0 device showing up. First, grab the source from google: mkdir /root/apex/ wget https://coral.googlesource.com/linux-imx/+archive/refs/heads/dkms/drivers/staging/gasket.tar.gz tar zxvf gasket.tar.gz With the source extracted to /root/apex/, my bash_history mess is below: 302 uname -a 303 mkdir packages 304 cd packages/ 305 wget https://mirrors.edge.kernel.org/pub/linux/kernel/v4.x/linux-4.19.107.tar.gz 306 ls 307 mv linux-4.19.107.tar.gz linux-4.19.107.tgz 310 cd /usr/src/ 311 mv linux-4.19.107-Unraid/ linux-4.19.107-Unraid_orig 313 tar zxvf ~/packages/linux-4.19.107.tgz 314 ln -s linux-4.19.107 linux 315 cp -rf linux-4.19.107-Unraid_orig/* linux 316 cp -f linux-4.19.107-Unraid_orig/.config linux 317 ln -sf /usr/src/linux/include/asm-generic /usr/include/asm-generic 319 ln -sf /usr/src/linux/arch/x86/include/asm /usr/include/asm 320 ln -sf /usr/src/linux/include/linux /usr/include/linux 331 cd /root/ 361 wget http://slackware.cs.utah.edu/pub/slackware/slackware64-14.2/slackware64/d/bison-3.0.4-x86_64-1.txz 362 installpkg bison-3.0.4-x86_64-1.txz 377 cd /usr/src/linux 380 make modules_prepare 381 make modules_prepare M=/root/apex/ 382 export CONFIG_STAGING_APEX_DRIVER=m 383 export CONFIG_STAGING_GASKET_FRAMEWORK=m 384 make M=/root/apex/ 394 insmod gasket.ko 397 insmod apex.ko 398 lsmod|grep apex 402 mkdir /boot/config/drivers 405 cp /root/apex/gasket.ko /boot/config/drivers/ 406 cp /root/apex/apex.ko /boot/config/drivers/ To get it loaded on boot, I just added the below to my /boot/config/go file: insmod /boot/config/drivers/gasket.ko insmod /boot/config/drivers/apex.ko I'm sure there are better, more proper ways to get these drivers loaded, but I didn't really want to compile my own entire kernel to do it. With 6.9, I know they're planning to make driver loading easier via an overlayfs, but I'm not running that OS yet to try it out. If you're running v6.8.3 on a 64-bit system, I can send you the drivers to make it super simple for you. Edited January 27, 20215 yr by pgbtech typo
January 27, 20215 yr Author On 12/19/2020 at 9:03 AM, KaptenMicro said: Hi Did order a USB coral. Today i run shinobi in docker with 6 cams. Is this instead of Shinobi I mean use Shinobi for recording and this for detection or shall I use this and don’t use shinobi. My goal here is to record 24/7 and also get object detection with Home Assistant mqtt. Like not home and camera detects person —> send notification and picture. Updated to v0.8.0 now you can easily use this to detect and record 24/7. See https://blakeblackshear.github.io/frigate/configuration/cameras#247-recordings
January 27, 20215 yr 4 hours ago, pgbtech said: I followed a bunch of different guides, but am terrible about documenting. I do have my bash history, so I'll put that below and try and explain. I installed all of the dev-tools plugin options and any other missing dependencies should be in the NerdTools plugin. The only one I manually installed below is bison. You may have to update the linux kernel version in the commands if you aren't on 6.8.3 (kernel 4.19.107) and then the bison package if you aren't on amd64 (note I did have to use the version of bison shown below, the newest version did not work). Worth noting that some of the make commands in there might be unnecessary (again, sorry for my shitty documentation). If you have the apex and gasket modules reporting in the 'lsmod' command, you should be go to go. To fully verify, just check and see if you have the /dev/apex_0 device showing up. First, grab the source from google: mkdir /root/apex/ wget https://coral.googlesource.com/linux-imx/+archive/refs/heads/dkms/drivers/staging/gasket.tar.gz tar zxvf gasket.tar.gz With the source extracted to /root/apex/, my bash_history mess is below: 302 uname -a 303 mkdir packages 304 cd packages/ 305 wget https://mirrors.edge.kernel.org/pub/linux/kernel/v4.x/linux-4.19.107.tar.gz 306 ls 307 mv linux-4.19.107.tar.gz linux-4.19.107.tgz 310 cd /usr/src/ 311 mv linux-4.19.107-Unraid/ linux-4.19.107-Unraid_orig 313 tar zxvf ~/packages/linux-4.19.107.tgz 314 ln -s linux-4.19.107 linux 315 cp -rf linux-4.19.107-Unraid_orig/* linux 316 cp -f linux-4.19.107-Unraid_orig/.config linux 317 ln -sf /usr/src/linux/include/asm-generic /usr/include/asm-generic 319 ln -sf /usr/src/linux/arch/x86/include/asm /usr/include/asm 320 ln -sf /usr/src/linux/include/linux /usr/include/linux 331 cd /root/ 361 wget http://slackware.cs.utah.edu/pub/slackware/slackware64-14.2/slackware64/d/bison-3.0.4-x86_64-1.txz 362 installpkg bison-3.0.4-x86_64-1.txz 377 cd /usr/src/linux 380 make modules_prepare 381 make modules_prepare M=/root/apex/ 382 export CONFIG_STAGING_APEX_DRIVER=m 383 export CONFIG_STAGING_GASKET_FRAMEWORK=m 384 make M=/root/apex/ 394 insmod gasket.ko 397 insmod apex.ko 398 lsmod|grep apex 402 mkdir /boot/config/drivers 405 cp /root/apex/gasket.ko /boot/config/drivers/ 406 cp /root/apex/apex.ko /boot/config/drivers/ To get it loaded on boot, I just added the below to my /boot/config/go file: insmod /boot/config/drivers/gasket.ko insmod /boot/config/drivers/apex.ko I'm sure there are better, more proper ways to get these drivers loaded, but I didn't really want to compile my own entire kernel to do it. With 6.9, I know they're planning to make driver loading easier via an overlayfs, but I'm not running that OS yet to try it out. If you're running v6.8.3 on a 64-bit system, I can send you the drivers to make it super simple for you. Awesome, I used these steps to get my m.2 coral running on 6.9.0. Thank you very much!!!
January 28, 20215 yr 7 hours ago, DiabloXP said: Awesome, I used these steps to get my m.2 coral running on 6.9.0. Thank you very much!!! Glad it worked out for you!
January 28, 20215 yr Ive got it installed on unraid but when i try to open the web ui it says connection refused cant connect. Ive already added the port 5000 to my firewall
January 28, 20215 yr Author 1 hour ago, Andrew1 said: Ive got it installed on unraid but when i try to open the web ui it says connection refused cant connect. Ive already added the port 5000 to my firewall You don't need to add the port to the firewall if you are only going to connet to the ui on your local lan. The UI doesn't have any kind of security or login so opening the port to the world is a really bad idea. Anyway: Did you create a config file before running the container? Is the docker running? Can you post your configuration of your container and the logs?
January 28, 20215 yr I got it to open the web ui, there was an extra line next to the web port. i now get this error in the log * Starting nginx nginx ...done. Error parsing config: expected '<document start>', but found '<block mapping start>' in "<unicode string>", line 5, column 1: detectors: ^ config.yml
January 28, 20215 yr 14 minutes ago, Andrew1 said: I got it to open the web ui, there was an extra line next to the web port. i now get this error in the log * Starting nginx nginx ...done. Error parsing config: expected '<document start>', but found '<block mapping start>' in "<unicode string>", line 5, column 1: detectors: ^ config.yml 7.22 kB · 0 downloads Some of those items in the config look like they are from the older version config and will not work. Try starting with the minimal config from here: https://blakeblackshear.github.io/frigate/configuration/index Once you get it running start adding in the cameras and object tracking one by one.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.