Close

Enclosure 2

A project log for Raspberry pi tracking cam

Tracking animals on lower speed boards to replace jetson & coral

lion-mclionheadlion mclionhead 04/22/2024 at 00:460 Comments

A new bolt-on enclosure for just the confuser & not the servo controller. Still don't have a buck converter for it.

The new twist with this is the fan is part of the enclosure so it needs a plug.  It was easiest to plug it into USB.

Noted improved tracking with 300 epochs.  Both models were prone to an invalid hit box in the same place but it was rarer with 300 epochs. 

More importantly, the VIDIOC_S_CTRL ioctl stalls randomly for 5 seconds.  If it isn't called for every frame, saturation reverts when the camera experiences a loss of brightness & the tracking degrades.  When this happens, VIDIOC_G_CTRL doesn't read back the new value.  Saturation may not be an option with this camera.  Another option might be saturation in software.

Kind of frustrating how many invalid hit boxes it gets.

Lite0 seems to get less invalid hit boxes.  The rasp 4 algorithm centered 1 tile on the hit box so the animal was always
in the center, but it was more prone to tracking the wrong animal.  The rasp 5 algorithm usually has a hit on the edge of the 2 side tiles, so this is believed to be causing invalid hit boxes.  Efficiendet is better at classifying objects than determining their position.  It could go to lite2 & go back to the rasp 4 algorithm.

Because the servo is also tracking, the servo is trying to push the lone tile off the subject.  The rasp 5 algorithm should be more robust by not fighting the servo.

A few more stills of lite 1 with color coded tiles showed it getting invalid hits regardless of the position inside a tile.  .64 1 was in the middle of tile 1.

There's also going to a single fixed tile or 2 tiles * 2 cores. 

-----------------------------------------------------------------------------------------------------------------------------------

Lite4 needs 12 minutes per epoch & goes at 4.4fps on 1 tile with 4 threads.  Input resolution is 640x640. 
Lite3 needs 6 minutes per epoch & runs at 9.2fps on 1 tile, 4 threads.  5.3fps on 2 tiles * 2 threads.  Resolution is 512x512

Lite2 needs 4 minutes per epoch & runs at 15.3fps on 1 tile, 4 threads.  9.3fps on 2 tiles * 2 threads.  6fps on 3 tiles * 1 thread.  Resolution is 448x448

Lite 1 goes at 20.7fps on 1 tile * 4 threads, 13.5fps on 2 tiles * 2 threads, 8.8fps on 3 tiles * 1 thread. Resolution is 384x384

Lite0 goes at >30fps on 1 tile * 4 threads, 21fps on 2 tiles * 2 threads, 14.6fps on 3 tiles * 1 thread.  Resolution is 320x320

The highest pixel throughput is usually happening at 2 tiles * 2 threads.  Other users have discovered the 4 gig rasp is faster than the 8 gig rasp.  Stepping it up to 2.666 Ghz gets lite2 to to an erratic 9.3-9.9 fps on 2 tiles * 2 threads & sucks another 200mA it seems.  It might thermally limit the speed.

Seem to recall efficientdet can't handle letterboxing.  It definitely can't handle any animorphic modes.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Well, it was 7 years of battling the $30 keychain cam but the saturation issue was the last straw.  The ELP fisheye cam strangely existed at the same time but it wasn't the gopro replacement lions were looking for & $45 was too expensive.  Lions preferred to wait for sales tax to grow from 7.25 to 8.75.  Just 1 year earlier, any USB fisheye camera was $300.  Strangely, no USB fisheye cameras showed on the goog in 2019 so lions burned money on an Escam Q8.

It's hard to believe anything could be worse than that keychain cam.  Mounting it, cable routing, turning it on, the lack of any configurability, the 16:9 aspect ratio were heavy prices to pay for a slightly wider field of view than a logitech.

Discussions