Close

Optimization

A project log for Raspberry pi tracking cam

Tracking animals on lower speed boards to replace jetson & coral

lion-mclionheadlion mclionhead 05/05/2024 at 02:330 Comments

Full tracking with efficientlion-lite1 was going at 11fps & recording the raw video brought it down to 9fps.  It was a mystery why the webcam would be 11fps while reading from a file would be 12fps.  The webcam reads at 15fps.  It could get up to a hair below 12fps by decoding all the JPEG's in the video capture thread.  It means a lot of decoding is thrown away.  It's faster if the defishing is done in the mane thread.  It seems to be an optimum balance between the 2 threads.  It was a shocker to find JPEG decompression being a bottleneck on the rasp 5.

The traditional way to beat JPEG is to keep it in YUV, then convert to RGB only when copying to the input layer.  If only lions knew this in 1999.  That got efficientlion-lite1 up to 14.8 fps.  Recording drops it to 11fps.

Got a production video with the new tracker.

It's incredibly noisy with the fan on & uses 15W.  There are dreams of underclocking it to run it without the fan & burn less power, but it's near sighted with the fisheye lens. It needs a higher resolution detector or maybe smarter tiling with a lower resolution detector.


The 1st output from the new system revealed lots of invalid hit boxes which were being masked by the color histogram feature extraction. It could probably work with good old body_25 & its preference for trees but it would be slow.


Discussions