yayitazale Posted October 21, 2020 Posted October 21, 2020 (edited) IMPORTANT PLEASE UPDATE V0.14.0 IS A BREAKING CHANGE: It is recommended to uninstall the current app and reinstall it to meet the needs of the new template. 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 August 9, 2024 by yayitazale 5 Quote
corgan Posted October 22, 2020 Posted October 22, 2020 thanks a lot! runs fine with google coral Quote
yayitazale Posted October 27, 2020 Author Posted October 27, 2020 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. 1 Quote
Kanashii Posted November 4, 2020 Posted November 4, 2020 (edited) Seems config.yml file is no more on github. Anyone? Don't mind is in the main githut page... Edited November 4, 2020 by Kanashii Quote
whoisdecoy Posted November 11, 2020 Posted November 11, 2020 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 Quote
Tungmeister Posted November 15, 2020 Posted November 15, 2020 (edited) 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, 2020 by Tungmeister Quote
whoisdecoy Posted November 17, 2020 Posted November 17, 2020 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! Quote
whoisdecoy Posted November 18, 2020 Posted November 18, 2020 Had to order a mini-pci to pci-e 'cause I didn't even realize that mini pci was a thing... 1 Quote
whoisdecoy Posted November 20, 2020 Posted November 20, 2020 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? Quote
yayitazale Posted November 30, 2020 Author Posted November 30, 2020 (edited) 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, 2020 by yayitazale Quote
whoisdecoy Posted December 1, 2020 Posted December 1, 2020 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 Quote
yayitazale Posted December 1, 2020 Author Posted December 1, 2020 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. Quote
KaptenMicro Posted December 19, 2020 Posted December 19, 2020 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. Quote
yayitazale Posted December 19, 2020 Author Posted December 19, 2020 (edited) 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, 2020 by yayitazale Quote
pgbtech Posted January 24, 2021 Posted January 24, 2021 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. Quote
DiabloXP Posted January 26, 2021 Posted January 26, 2021 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! Quote
yayitazale Posted January 27, 2021 Author Posted January 27, 2021 (edited) 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, 2021 by yayitazale Quote
pgbtech Posted January 27, 2021 Posted January 27, 2021 (edited) 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, 2021 by pgbtech typo Quote
yayitazale Posted January 27, 2021 Author Posted January 27, 2021 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 Quote
DiabloXP Posted January 27, 2021 Posted January 27, 2021 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!!! Quote
pgbtech Posted January 28, 2021 Posted January 28, 2021 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! Quote
Andrew1 Posted January 28, 2021 Posted January 28, 2021 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 1 Quote
yayitazale Posted January 28, 2021 Author Posted January 28, 2021 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? Quote
Andrew1 Posted January 28, 2021 Posted January 28, 2021 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 Quote
DiabloXP Posted January 28, 2021 Posted January 28, 2021 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. Quote
Recommended Posts
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.