Terrible photovision performence on Limelight 2+

We are currently seeing about 15 fps while running 2d mode detecting Apriltags on the lowest resolution. when we increase the resolution the fps drops to less than 1 fps.
The CPU usage is about 60% and it says that GPU acceleration is not supported.

What resolution are you at when you drop to 1 fps?

1 Like

Is this with the RPi camera interface - the LL’s camera? Have you tried other cameras?

Keep in mind that AprilTag tracking/detection is far more resource intensive than tracking retroreflective tape. Don’t be expecting 90+ fps with the AprilTags on a limelight.

From the current photonvision beta thread, I’d say 15-30fps isn’t terrible performance for a Pi.

1 Like

I would expect 15fps on 240p, about 10 on 480p. I don’t know how one gets 1fps.

1 Like

GPU acceleration is coming but is not currently supported

Is there an eta for this?

Apologies. I missed the part about dropping to 1fps. You’re right, that doesn’t sound right.

I am not one of the developers but they have mostly said before Kickoff, so it’s pretty up in the air. I know for now the best way to get high performance is a Pi4 that is overclocked.

1 Like

The second lowest, I think it is 640*480

Only the built-in camera, we can try using a different one today.

I don know the others but others have been testing with LL2+ and have had better numbers. Anyone want to share fps ?

I thought I could come close to your configuration but my RPi 3b goes into a reboot loop after doing the Avahi mDNS/DNS-SD Stack. Unplugging the Ethernet cable allows it to boot but that’s a useless RPi.
I’ll try a real LL2+ in a few days; I don’t have one at home.

my RPi 4b performance

RPi 4b (not sure about a +)
Arducam B00350 sensor OV5647 on the RPI camera interface configured at 640x480 @15 FPS, BGR
blur 0
decimate 1
threads 3 (best performance setting)
refine edges
pose iterations 200 (less goes faster but below 80 not as good results with my targets)
results in 16 fps 40ms latency for one tag and slightly higher latency for two tags and 47% CPU

This camera goes to 90 FPS but if I select any camera mode above 15 FPS the latency increases and the fps stays at 16 so pick camera 15 FPS for best performance.

Just for fun I tried camera mode 1929x1080 @ 20FPS, BGR.
The result was 2 fps and 390ms latency.

1 Like

Just to confirm, is this with 480p?

Does anyone know if the onboard camera in a LL2+ is red as a v4l2 or as a pi camera?
Either, way you should be able to get 40-50 fps. Well, that is based off of the results I get with a Raspberry Pi 4.

As far as I am aware it’s literally a pi camera

The image sent from the camera to the computer is 640 color pixels wide and 480 color pixels high.
How the much larger number of sensors is decimated in the camera (somehow scanned and averaged) I do not know but this is not a global shutter. Also, I don’t know if the camera sends the data in a burst for the image or as the data are created.

Got my RPi 3b+ to work and performance is 8 fps 80ms latency for the same
conditions in the Rpi 4b performance.

I have found no explanation for why there is a factor of 2 difference. Everything I find says the 3 is a little slower than 4 but not half as fast.

1 Like

Actually the Pi4 is easily 2x or more faster than the 3B. The Phoronix test suite says it is up to 4x faster.

1 Like

if you run it just the camera, you will get 40-50fps, but in general vision processing is very resource-intensive because it has to review every pixel on the screen. Tbh I haven’t really had the ability to mess around with apriltags yet, but if the thresholding and processing is the same as normal photonvision or limelight, then maybe the problem is with your filtering? Last year (running photonvision on a LL1) I found that I could run the camera with a fairly high resolution and get good performance as long as I turned the dilate setting up pretty far. It essentially groups pixels together to make them “bigger”, so the software doesn’t have to review nearly as much content. Remember, even when using 640x480, the camera has to review over 300,000 pixels, so no mater what your processing speed is, that’s a significant task.

1 Like

Couldn’t you use the threading module to increase performance? Also, you could compile your Python code (I’m assuming you’re using Python) to a .pyc file by using “python -m py_compile filename.py”. It too, might be beneficial to overclock your pi’s CPU to get more performance out of it.