OpenALPR on a Raspberry Pi 4 and the Jetson Nano

Joined
Nov 25, 2016
Messages
462
Reaction score
1,018
UPDATE: I've updated the title of this thread to better reflect the direction it has gone, as the Jetson Nano SBC has turned out to be a much more workable solution.

___

Has anyone tried installing the latest Rekor Scout (OpenALPR) client on a Raspberry Pi 4 running Ubuntu? I am toying with the idea of creating a dedicated single-camera LPR system based around a headless Linux box. My plan would be to use one RPi board per camera, processing a 2 MP video feed at whatever maximum frame rate the RPi can provide; in effect, a "roll your own" dedicated LPR camera with an algorithm that can be maintained and updated, as opposed to being at the mercy of the camera manufacturer.

My question is whether an RPi 4 with 8 GB of RAM would have the horsepower to process frames at a usable rate. An FPS > 20 would be ideal, an FPS of 10 would still be usable, but an FPS of 1 would not be. So has anyone tried this?
 
Last edited:

biggen

Known around here
Joined
May 6, 2018
Messages
1,820
Reaction score
1,719
My gut is the Pi won't have enough horsepower. I run the Watchman agent in an Ubuntu VM with 4 cores assigned (Ryzen 1600AF) to that VM. My 15 minute load average during the day in that VM is 25% total usage of 4 cores or, to look at it another way, 100% usage of a single core. This is at 2MP resolution at 20fps. Load is lower at night since the image is pitch black with no movement though the scene except when a car drives through.

Even the single core core of the 1600AF will run circles around a modern day RPi4b. So if a single core from the 1600 is basically being maxed out I can only imagine a RPi won't be able to keep up at all.
 
Joined
Nov 25, 2016
Messages
462
Reaction score
1,018
My gut is the Pi won't have enough horsepower. I run the Watchman agent in an Ubuntu VM with 4 cores assigned (Ryzen 1600AF) to that VM. My 15 minute load average during the day in that VM is 25% total usage of 4 cores or, to look at it another way, 100% usage of a single core. This is at 2MP resolution at 20fps. Load is lower at night since the image is pitch black with no movement though the scene except when a car drives through.

Even the single core core of the 1600AF will run circles around a modern day RPi4b. So if a single core from the 1600 is basically being maxed out I can only imagine a RPi won't be able to keep up at all.
You may very well be right. On the other hand, there is some overhead involved with a VM that may be skewing your numbers somewhat, so the RPi 4 may perform better than expected.

I'm tempted to try it regardless: first just to see if it works, and second to determine what the limits of the RPi 4 may be (i.e. resolution vs. FPS). If I get it to work, I'll report my results here.
 

biggen

Known around here
Joined
May 6, 2018
Messages
1,820
Reaction score
1,719
You may very well be right. On the other hand, there is some overhead involved with a VM that may be skewing your numbers somewhat, so the RPi 4 may perform better than expected.

I'm tempted to try it regardless: first just to see if it works, and second to determine what the limits of the RPi 4 may be (i.e. resolution vs. FPS). If I get it to work, I'll report my results here.
Let us know what you find. I'm leery because the cell phone in your pocket is more powerful than a RPI. But I've been surprised before...
 

Teken

Getting comfortable
Joined
Aug 11, 2020
Messages
457
Reaction score
604
Location
Canada
I’d consider a few other options in case the RPI-4 doesn’t pan out. There are quite a few RPI clones out now that offer more powerful processors and memory.

If that route doesn’t pan out you may consider one of a dozen mini PC clones that use anything from a intel i3 - i7.

I absolutely get the whole RPI as it’s cheap, small form factor, and well supported by the community at large. Very interested to see your personal results and take away’s!
 

Robert G.

Getting comfortable
Joined
Oct 6, 2018
Messages
201
Reaction score
301
Location
North America
I would suggest (after you find RPi 4 is too slow) that you look into buying a used Intel NUC. I have OpenALPR running two cameras @ 30fps with no issues, I think I paid $250 for the machines years ago - the same model must be worth just about nothing by now. Blows the pants of RPi.
 
Joined
Nov 25, 2016
Messages
462
Reaction score
1,018
I’d consider a few other options in case the RPI-4 doesn’t pan out. There are quite a few RPI clones out now that offer more powerful processors and memory.

If that route doesn’t pan out you may consider one of a dozen mini PC clones that use anything from a intel i3 - i7.

I absolutely get the whole RPI as it’s cheap, small form factor, and well supported by the community at large. Very interested to see your personal results and take away’s!
Yes, I've also been looking at various NUCs and mini-PCs. You can certainly get more processing power in a small form factor, but the low-end PC market is a constantly shifting platform, and I want to find a hardware solution that will not be obsolete and unsupported in six months. Intel NUCs are nice, but they're not cheap.

As you said, the RPi is (very) cheap and well supported both by the community and by Ubuntu, hence the appeal. But if it doesn't work, then "appeal" doesn't mean much. :)
 

catcamstar

Known around here
Joined
Jan 28, 2018
Messages
1,626
Reaction score
1,133
The question that arises in my mind: what-if you don't feed the 2MP/4MP 15fps feed to the PI, but single pics (eg from snapshot IVS from camera) and let the PI digest those...
 

biggen

Known around here
Joined
May 6, 2018
Messages
1,820
Reaction score
1,719
The question that arises in my mind: what-if you don't feed the 2MP/4MP 15fps feed to the PI, but single pics (eg from snapshot IVS from camera) and let the PI digest those...
You have to pay for a higher plan to have access to the OpenALPR API in order to do that. You also need to make sure that your cameras are configured and tweaked really well since you are now dependent on external IVS to get the appropriate snapshot. If the camera triggers too early and no plate is scene, you miss the car. If the camera fires too late and the car moves out of the frame, you miss the car.

If you are feeding custom snapshots to the OpenALPR, then you probably are doing some coding on the back end to make sure what you are feeding OpenALPR is valid.
 

catcamstar

Known around here
Joined
Jan 28, 2018
Messages
1,626
Reaction score
1,133
You have to pay for a higher plan to have access to the OpenALPR API in order to do that. You also need to make sure that your cameras are configured and tweaked really well since you are now dependent on external IVS to get the appropriate snapshot. If the camera triggers too early and no plate is scene, you miss the car. If the camera fires too late and the car moves out of the frame, you miss the car.

If you are feeding custom snapshots to the OpenALPR, then you probably are doing some coding on the back end to make sure what you are feeding OpenALPR is valid.
Okay got it. New to this ALPR scene, hence my stooopid question ;-) My IVS snaps of license plates are good enough for human readability, so I am still satisfied with my setup.
 

Robert G.

Getting comfortable
Joined
Oct 6, 2018
Messages
201
Reaction score
301
Location
North America
Intel NUCs are nice, but they're not cheap.
If you are willing to buy used, they are cheap. I have many (like 50+) of the model Intel NUC NUC5i5MYBE - they have vPro so you can remotely manage them. Power them on/off, remote install OS etc. I use them as little servers.

It is one of these machines I run dual cameras at 30fps, no problems.

Looking on eBay's completed auction pages they are going anywhere from $90 - $150, with hard drive and RAM. Makes your RPi very expensive for the amount of processing power you get.

Just something to consider after you try the RPi.
 
Joined
Nov 25, 2016
Messages
462
Reaction score
1,018
If you are willing to buy used, they are cheap. I have many (like 50+) of the model Intel NUC NUC5i5MYBE - they have vPro so you can remotely manage them. Power them on/off, remote install OS etc. I use them as little servers.

It is one of these machines I run dual cameras at 30fps, no problems.

Looking on eBay's completed auction pages they are going anywhere from $90 - $150, with hard drive and RAM. Makes your RPi very expensive for the amount of processing power you get.

Just something to consider after you try the RPi.
That's an excellent recommendation. The used Intel NUC market on eBay seems pretty robust. At these prices, I'll definitely give a used NUC a try.

The remote management aspect would be particularly useful. Are you running Linux natively on any of these, or strictly Windows 10? Do you run any of them headless?
 

biggen

Known around here
Joined
May 6, 2018
Messages
1,820
Reaction score
1,719
I run my NUC headless with Debian. I use it for Frigate. No remote management on mine other than standard SSH once the OS is installed.
 

Robert G.

Getting comfortable
Joined
Oct 6, 2018
Messages
201
Reaction score
301
Location
North America
The remote management aspect would be particularly useful. Are you running Linux natively on any of these, or strictly Windows 10? Do you run any of them headless?
I run both Linux & Windows 10 - I actually run VMWare on some of them. All of them are headless, I do not have a single unit with a monitor. I do use a display plug on all mine which can help with the vPro remote management features sometimes.
 

brianegge

Pulling my weight
Joined
Apr 27, 2020
Messages
153
Reaction score
186
Location
Ridgefield, CT
I’d suggest using a Jetson Nano instead of the pi. It’s really a much more capable SBC with a lower power gpu it will cost less than a NUC after you pay for the electricity. Only downside to the nano is the arm cores are slower than the rpi4. This is usually fine as you will be doing gpu tasks and don’t need as much cpu power. If you have the pi, set it up for your web server and NAS and let the Jetson do just the computer vision tasks. OpenALPR Watchman — openalpr 2.8.101 documentation

BTW, I have one Jetson nano and five raspberry pi’s.
 

brianegge

Pulling my weight
Joined
Apr 27, 2020
Messages
153
Reaction score
186
Location
Ridgefield, CT
Are you running the opensource edition of OpenALPR on the Jetson?
No, sorry. If I was I would post some stats. I am using the Jetson for computer vision. When it sees a vehicle in my driveway it sends the image to SightHound api. It then announces the arrival on my Alexa and opens the garage door if needed.
 
Joined
Nov 25, 2016
Messages
462
Reaction score
1,018
I’d suggest using a Jetson Nano instead of the pi. It’s really a much more capable SBC with a lower power gpu it will cost less than a NUC after you pay for the electricity. Only downside to the nano is the arm cores are slower than the rpi4. This is usually fine as you will be doing gpu tasks and don’t need as much cpu power. If you have the pi, set it up for your web server and NAS and let the Jetson do just the computer vision tasks. OpenALPR Watchman — openalpr 2.8.101 documentation

BTW, I have one Jetson nano and five raspberry pi’s.
Until I read your post, I had no clue that Nvidia sells a Jetson Nano SBC that runs Ubuntu 18.04 LTS. I was aware of the Jetson (and in fact run I the Rekor client in Ubuntu on an Nvidia GPU at my own home), but did not realize it was available in this form factor.

I had borrowed an i3 NUC and an RPi4, and planned to do some experimentation over the next few weeks, but my plans just changed. The Jetson Nano SBC is available on Amazon for $85. My wife is going to hate that I spent more money on another gadget. :)
 

brianegge

Pulling my weight
Joined
Apr 27, 2020
Messages
153
Reaction score
186
Location
Ridgefield, CT
Nvidia sells a Jetson Nano SBC that runs Ubuntu 18.04 LTS
If you find it doesn't run OpenALPR as well as you want, you can install DeepStack on the Jetson quite easily for other tasks. They write
We are super excited to finally bring a stable version of DeepStack that runs on ARM64. We strongly recommend using this over the Raspberry + NCS version, as it is faster, more stable and the Jetson Nano is also less costly than the RPI + NCS combination.
 
Top