Skip to content

snacsnoc/deer_img_yolov8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

deer_img

Minimal CVITEK CV1812H/Milk‑V Duo S demo - runs a single‑class YOLOv8 model on the on‑chip TPU and prints every detected deer. This is largely a patch of the SDK-provided demos, refactoring from the default 80 class input to 1.

Deer don't belong in my garden (they eat my tomatoes!) so the use case of this tool is using an onboard camera (GC2083), run a custom YOLOv8 model trained on pictures of whitetail + mule deer, and print detection results on a schedule.

Setup

git clone https://github.com/milkv-duo/duo-tdl-examples.git
cd duo-tdl-examples/
source envsetup.sh

Select your platform + arm64/riscv64 :

script_dir: /home/easto/duo-tdl-examples
Select Product:
1. Duo (CV1800B)
2. Duo256M (SG2002) or DuoS (SG2000)
Which would you like: 2
Select Arch:
1. ARM64
2. RISCV64
Which would you like: 2
CHIP: CV181X
ARCH: riscv64
~/duo-tdl-examples ~/duo-tdl-examples
~/duo-tdl-examples
Environment is ready.

then compile deer_img:

make

Usage

./deer_img <model.cvimodel> <image>

Example

Image 1920×1080
Inference: 45 ms
[0] deer 0.92  (345,420)-(680,800)

Tweaking

Adjust confidence / NMS inside deer_img.c:

CVI_TDL_SetModelThreshold(h, 0.80f);   // 80 minimum, 82-85 seems to work reliably
CVI_TDL_SetModelNmsThreshold(h, 0.45f); // 0.45 minimum, 0.5-0.6 work best

SDK

Built and tested with the CV181x (duo-buildroot-sdk-v2) examples repo
https://github.com/milkv-duo/duo-tdl-examples/tree/master

Docs

About

Single class yolov8 object detection for Milk V Duo S SG2000/cv181

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published