I’m currently running Home Assistant Container on an Odroid N2 and running Frigate for object detection with a couple WiFi cameras. Frigate works okay for a single camera using the CPU, but I’m interested in configuring hardware acceleration or running it on a dedicated machine with hardware acceleration. I have a spare Odroid XU4 (HC1) that I think would be perfect for a dedicated Frigate NVR.
Has anyone set up Frigate with hardware acceleration on an Odroid N2 or XU4? If so, do you have any advice for how to set up hardware acceleration (e.g., what OS image to use for XU4 or what gpu drivers to install, how to configure in the frigate configuration)?
Thanks for your advice! If this is the wrong forum, please let me know. Since Frigate has great integration with Home Assistant, I thought this is a great place to ask.
I set up my HC1 as a dedicate Frigate box and it works well. Object classification is performed using the CPU, but video transcoding is hardware accelerated. Setup details are below in case it’s helpful for others.
You’ll need:
Odroid HC1 (but HC2 or XU4 would work too)
Power supply and Ethernet cable
8-16 GB micro SD card
2.5" SSD
Instructions:
Download and flash the latest XU4 Ubuntu minimal image from the Odroid wiki to the SD card.
Follow the Odroid installation instructions to run from SSD. Note: I did not install linux-image-xu3. An 8-16 GB root partition on the SSD is sufficient.
Set the locale. An example for the US is below.
sudo dpkg-reconfigure tzdata
# Set locale
sudo locale-gen "en_US.UTF-8"
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
sudo dpkg-reconfigure locales
# Select "en_US.UTF-8" for all of the steps.
sudo apt-get install docker docker-compose
Run Frigate using docker-compose up -d. Example docker-compose.yml and Frigate config.yml files are below. Replace any <> text with your specifics.
Set up Frigate and use the UI to configure masks. Motion masks greatly reduce CPU and power usage by ensuring irrelevant motion like video timestamps doesn’t trigger object classification to start. For my setup, I found objects masks unnecessary.