Best option for YOLOv8 object detection?

Here are my install notes.

build hangs at

$ make install_raspi

....
make[3]: Entering directory '/tmp/opencv/opencv-4.10.0/build'
make[3]: Leaving directory '/tmp/opencv/opencv-4.10.0/build'
make[3]: Entering directory '/tmp/opencv/opencv-4.10.0/build'
[ 96%] Building CXX object modules/optflow/CMakeFiles/opencv_perf_optflow.dir/perf/opencl/perf_optflow_dualTVL1.cpp.o
[ 96%] Building CXX object modules/video/CMakeFiles/opencv_perf_video.dir/perf/opencl/perf_dis_optflow.cpp.o

It takes a while to build. How long have you waited? If you have waited more than 1 hour then it maybe due to being out of memory. How much RAM does your SBC have?

One way to get around small amount of RAM is to build in single thread mode by editing this line to $(MAKE) -j 1. I use to do that on a Raspberry Pi 4B, but the build took around 2 hours to complete.

Can you share the commands with camera video number. I’m trying examples/stream

Have you read the example docs?

Got apprx. 40fps with 2.2.0 rknn yolov8n

go run bytetrack.go -a :8080 -s 3 -v 11 -c 1280x720@60 -x person -m ../data/yolov8_2.3.0.rknn -t v8

I’m trying few things in go-rknnlite if you have any inputs please let me know.

  1. deepsort and this bytetrack are same purpose - which one give more performance. I used deepsort with ReID in rknn_threaded by got 9fps

  2. Also if you have bytetrack for rknn_threaded please share the same.

  3. I’m trying to preserve the ID of person: like if person in the camera frame then create ID and save and detect the same ID with the same person if he out of frame and come back - do we have any library for this to solve.

If you modify this line to 60 FPS then stream a 60 FPS 720p video you can get 60 FPS playback.

You can convert one of the videos supplied to 60 FPS using;

cd example/data/
ffmpeg -i palace.mp4 -r 60 -vf "fps=60" -c:v libx264 -preset fast -crf 23 -c:a copy palace_60fps.mp4

Then run with

go run bytetrack.go -v ../data/palace_60fps.mp4 -m ../data/yolov8s-640-640-rk3588.rknn -t v8 -a :8080 -s 6

As video playback can be done at 60 FPS and your only getting 40 FPS with go-rknnlite and the CPP code. That suggests the problem is actually with your camera so you should work with debugging that.

However what is your use case were 60 FPS is required versus the standard 30 FPS?

I haven’t done any work with ReID, however you may be able to use ResNet which has some reidentification models.