Skip to content

As an Object Detector of Frigate on Ubuntu

This guide helps you run Frigate (open-source NVR) using a KNEO Pi for fast AI object detection.

Follow step-by-step — no deep Linux knowledge needed!


Prerequisites

  • Ubuntu PC (verifed version: 20.04)
  • KNEO Pi in device mode
  • Internet connection
  • VS Code installed (sudo snap install code --classic)

Step 1: Clone Frigate Repository

git clone https://github.com/blakeblackshear/frigate.git
cd frigate/
git checkout v0.16.1
cd ..

Step 2: Download Required Files

Download and un-compress our prepared files (include 7 files) from this link , and save them in a folder (e.g., Downloads/frigate_kneron/):

File Purpose
kneron_npu.py Frigate detector plugin for Kneron
models_730.nef AI model for KL730
kp_firmware.tar Software need to upload to KL730
kneronplus_yolo-2.1.0-py3-none-any.whl YOLO python api for Kneron YOLO app
docker-compose.yml Docker setup (modified for Kneron)
config.yml Frigate config with Kneron detector
people-detection.mp4 Test video

Step 3: Copy Files into Frigate Folder

From your download folder, copy:

cp kneron_npu.py                 frigate/frigate/detectors/plugins/
cp docker-compose.yml config.yml kp_firmware.tar models_730.nef *.whl people-detection.mp4 frigate/

Now all files are in the right places.


Step 4: Open Frigate in VS Code (Dev Container)

Open frigate/ folder using VS Code, or run this command inside the frigate/ folder:

sudo code . --user-data-dir="~/.vscode-root" --no-sandbox
A popup says 'Folder contains a Dev Container configuration file. Reopen in Container?'
  • Click "Reopen in Container"
  • If popup disappears → close and reopen VS Code with same command

This sets up a clean Docker environment for Frigate.


Step 5: Open Terminal in VS Code

Click TerminalNew Terminal


Step 6: Install Kneron PLUS modules & Tools

In the VS Code terminal:

pip install kneronplus_yolo-2.1.0-py3-none-any.whl --break-system-packages
sudo apt-get update
sudo apt install usbutils

Connect KNEO Pi as an external device to your host PC (Ubuntu) via USB 3.0 cable

Check if KNEO Pi is connected

lsusb | grep Kneron
Should show: Kneron KL730

Config to Allow USB Access Without sudo

  1. Open terminal and run:

    sudo nano /etc/udev/rules.d/10-local.rules
    

  2. Paste this line:

    SUBSYSTEM=="usb",ATTRS{product}=="Kneron KL730",ATTRS{idVendor}=="3231",ATTRS{idProduct}=="0732",MODE="0666"
    

  3. Press Ctrl+O → Enter → Ctrl+X to save and exit.

  4. Reboot or run:

    sudo udevadm control --reload-rules && sudo udevadm trigger
    


Step 7: Fix Known Frigate Issue (Intel GPU Error)

Prevents error: "Unable to poll Intel GPU stats"

More information about this error

Refer to here

Run this once:

sudo sysctl kernel.perf_event_paranoid=0

Step 8: Start Frigate

In the same terminal:

python3 -m frigate
You’ll see log message on terminal.


Step 9: Open Frigate Web UI

On your PC’s browser, go to: http://localhost:5000

You should see:

  • Live view of people-detection.mp4
  • Objects detected using KNEO Pi Detector (check bounding boxes in debug view with Bounding Box toggle on)

Troubleshooting Tips

Issue Fix
USB not found Replug KNEO Pi → run lsusb
ModuleNotFoundError: kp_yolo Reinstall .whl files
Web UI blank Wait 1–2 mins or check terminal logs
No detection Check config.ymldetectors: kneron: section

Done!

You now have Frigate + Custom Detector running locally with KNEO Pi AI detection.


Useful Links