OPENALPR - Cloud config question..

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,472
Reaction score
2,125
Location
SF BayArea, USA
2019-06-04 05_51_38-Window.jpg So, I am using openalpr on my pC right now the agent is configured to do 3 camera streams all are 1920x1080 15 fps..

my processor is i7-4770k. No graphic card just onboard...

I notice that the prcess that open alpr is using is about 80 % on the processor.. What is the best way to offload this intense processing power from CPU ?


Add a GPU ? IF yes which one is best bang for the buck .. also how will we configure it for openalpr.. once the GPU is in.. to do the heavy lifting.
 

DLONG2

Known around here
Joined
May 17, 2017
Messages
763
Reaction score
454
My HP PC has an i7-6700 CPU, running one LPR camera on the OpenALPR cloud, and the alprd process is operating at about 15%.
 
Joined
Nov 25, 2016
Messages
839
Reaction score
2,280
If you want the best possible performance for your OpenALPR agent, you need to run it on an Nvidia graphics card. I use an Nvidia GTX745 OEM card that came bundled with my Dell Optiplex 9020. It runs at about 70% capacity according to the Nvidia utility, and it processes three 2MP camera streams simultaneously, one at 30 fps, and the other two at 40 fps. An agent running on a CPU can't match that performance.

The GTX745 is several years old, so I would instead recommend buying a GTX 1050Ti, or some similar card with 4 GB of memory installed. You should be able to find a card for under $200 that will be more than sufficient for your needs.

The drawback is that you have to install and run Ubuntu. There are no Windows CUDA drivers for the Nvidia cards. So either you need a separate computer to run Blue Iris, or you need to use Linux-based recording utilities (e.g. bluecherrydvr.com), or you need to figure out how to do some virtualization to run both on the same hardware (beyond my desire to deal with).
 

mech

Getting comfortable
Joined
May 18, 2019
Messages
326
Reaction score
427
Location
United States
One easy win is to add exclusion masks to prevent the ALPR agent from processing parts of the scene that couldn't contain license plates. For example, if I don't add a mask to block out the camera's timestamp, ALPR will have to process the timestamp as a potential license plate. Areas that would contain moving tree branches or shadows, but could not contain a vehicle plate, will eat up CPU power too. In the cloud site, you can add masks by going to Configuration > Agents, click Configure on the Agent, then Configure on each camera, and add exclusion masks in the Detection Zones panel. Click the corners of the area you want to exclude, then press the ENTER key to complete the mask.

OpenALPR did get nVidia acceleration working on Windows recently. If you want to go that route, you'll need 64-bit Win10, an nVidia card, recent/current nVidia drivers, and follow the routine below.

My LPR system is processing a 30FPS stream from a 3000 x 1680 camera, on an i5-2500 assisted by a GTX1050 (vanilla). CPU usage is 50-60%, GPU is loafing around 10%. As you can see from the attached screenshot, the CPU still has plenty of work to do even with a GTX1050 helping, but without the GPU, the CPU is completely swamped.

So for three 1080p cameras, I think a 1050 would be ample power, and if your CPU usage drops radically, you could try higher framerates for more samples per vehicle. I'm assuming your system's power supply can tolerate a GTX1050, otherwise that'll be a consideration.

Instructions below are from their beta 2.7.x release, but the stock 2.6 family supports nVidia acceleration on 64-bit Win10.



Windows GPU Support:

Prerequisites:

  • Windows 10 64-bit
    Nvidia GPU driver >= 417.22
Install:

 

Attachments

Last edited:
Joined
Nov 25, 2016
Messages
839
Reaction score
2,280
OpenALPR did get nVidia acceleration working on Windows recently. If you want to go that route, you'll need 64-bit Win10, an nVidia card, recent/current nVidia drivers, and follow the routine below.
I wasn't aware that Nvidia GPU acceleration was now available with Windows 10. Thank you for pointing that out! Although the OpenALPR agent is rock-solid with Ubuntu, I'd much rather work with Blue Iris to handle the video recording on the same box.

My project for next weekend awaits .... :)
 

mech

Getting comfortable
Joined
May 18, 2019
Messages
326
Reaction score
427
Location
United States
I hope it works out OK! I used to use a single i7 system for my surveillance and the LPR agent, and I found that the ALPR agent made the system somewhat sluggish, no matter what I tried with the thread priority settings and stuff. This is one reason I ended up moving OpenALPR to a separate computer, then consolidating all my surveillance cameras onto a new system with BlueIris.

The 2.7 beta of OpenALPR is supposed to reduce CPU usage about 50% but I'm not seeing any such thing on my old i5-2500, so maybe it's too old to have the necessary magics. I'd stick with the 2.6 for now, it's been out long enough to call it stable IMHO. The same prerequisites listed above would also be necessary to enable nVidia acceleration on 2.6.
 
Joined
Nov 25, 2016
Messages
839
Reaction score
2,280
I hope it works out OK! I used to use a single i7 system for my surveillance and the LPR agent, and I found that the ALPR agent made the system somewhat sluggish, no matter what I tried with the thread priority settings and stuff. This is one reason I ended up moving OpenALPR to a separate computer, then consolidating all my surveillance cameras onto a new system with BlueIris.

The 2.7 beta of OpenALPR is supposed to reduce CPU usage about 50% but I'm not seeing any such thing on my old i5-2500, so maybe it's too old to have the necessary magics. I'd stick with the 2.6 for now, it's been out long enough to call it stable IMHO. The same prerequisites listed above would also be necessary to enable nVidia acceleration on 2.6.
I'm running a Dell with a 4th generation i7, so I'll see how it works. My interest is in showing people how to set up an ALPR system independent of any other surveillance system. Running it on Windows 10 as opposed to Ubuntu makes that task a bit easier for the layman.

What I've found is that many people seem perfectly happy with a Ring or Nest or Wyze camera for general-purpose surveillance, because they're easy to use. But some of them express a desire to record license plates for vehicles that pass by their homes (or businesses). So my thought is to determine a minimum (i.e. least expensive) configuration that can record two or three LPR streams while simultaneously running the ALPR agent on a GPU, and then show them how to replicate it for themselves.

The fact that you're processing a 5MP image at 30 fps with a GTX 1050 at only 11% load is quite impressive. How much memory does the card have? 2 GB or 4 GB?
 

mech

Getting comfortable
Joined
May 18, 2019
Messages
326
Reaction score
427
Location
United States
06-23-2019@19_39_39.jpg alert.jpg where I live.jpg 06-23-2019@20_03_48.jpg 06-23-2019@20_16_27.jpg 06-23-2019@20_22_59.jpg

That card has 2GB, I'll attach a screenshot from its section of Task Manager.

What I find tricky about LPR is the very small "sweet spot" in camera and illuminator setup to get usable results, plus other complications like keeping a IPC-HFW5231E-Z12 from losing focus in the dark. Setting up OpenALPR itself is a cakewalk compared to dialing in the cameras for night capture.

On that subject, if anyone wants a camera suggestion besides the popular Dahuas and their focus-loss issue, the Bosch Starlight 7000 is worth a look if you can accommodate a non-weather-resistant box camera. I have mine indoors, with a couple of powerful IRs on the outside of the building just above them. Otherwise I'd be putting it into an external housing with a chin-mounted long-range IR illuminator.

The 7000 Starlight is a 720P camera, maxes out at 60fps, and it can be dialed down dark enough to capture reflective plates while still giving you a fighting chance at ID'ing the vehicle visually (1/1000th sample attached). For a lens, I recommend the Tamron 1/3" CS-mount varifocal 50mm IR-corrected model if you can find one: 1/3 8-50MM F/1.6 Aspherical with connector This is sufficient for 120ft+ if your IR will reach that far. Since the Bosch cameras have a Lens Wizard that can optionally compensate for a non-IR-corrected lens (by adjusting the backfocus any time the IR filter engages or disengages), the non-IR-corrected variant of that lens would also be worth a try. Watch Ebay for these goodies if interested.

For the bonus points, I've uploaded a good starting point for a Bosch camera (this screenshot's from my current 5MP model): turn off backlight compensation / IntelligentAE and bottom out the two ALC sliders to keep the plates from getting overexposed. Take temporal noise filtering down about halfway to bottom in the Enhance panel, to reduce ghosting. Lock in 1/1000th shutter for night use. If your images look jagged, try reducing sharpness a little... remember, it's OCR work for the ALPR agent, so softer images may actually be better for reading plates.

Sensitivity on the Bosch Starlight models is good enough that I've equipped one on the rack with a linear polarizer, which cuts through windshield glare for vehicles heading toward the camera (random sample attached).
 
Last edited:
Joined
May 25, 2019
Messages
14
Reaction score
2
Location
United States
What I find tricky about LPR is the very small "sweet spot" in camera and illuminator setup to get usable results, plus other complications like keeping a IPC-HFW5231E-Z12 from losing focus in the dark. Setting up OpenALPR itself is a cakewalk compared to dialing in the cameras for night capture.
@mech do you think that having the cameras inside and through the glass at night affects the ability to catch license plates? I'm debating on putting mine outside.

What illuminator are you using outside?
 

mech

Getting comfortable
Joined
May 18, 2019
Messages
326
Reaction score
427
Location
United States
@highsecurity I have a pair of CMVision IR200 illuminators just above the window that the cameras are looking through. The window is a single pane of actual glass, with no storm window, which prevents internal reflections that would occur with a double-pane window. Because of the value of the cameras, I'm planning to replace the glass with a sheet of polycarbonate from these guys: Huge Selection of Clear Polycarbonate Sheets In Stock & Cut-to-Size at ePlastics

Behind the cameras, I have a midnight-blue curtain to prevent reflections from the interior. This is probably not an easy arrangement to sell to your spouse :)

Anyway, I did a three-way runoff between my Dahua 5231E-Z12, the Bosch 7000 Starlight, and the Bosch 8000 Starlight, and it came out as follows. In the end I went from my 7000 to my 8000 and the Dahua got repurposed to watch the far end of our apartment parking lot, which it's doing well at.


Dahua pros: affordable. Self-contained, including IR. Weatherproof, so it can be mounted outside and higher up where it is above the headlight beams. When it's in focus, it reads plates well for LPR analysis. Medium resolution allows a wider scope and more frames per vehicle for the LPR to read. H265 option.

Dahua cons: the focus is a serious chore, requiring some trickery with AutoHotKey to check the camera every 1-2 minutes for focus drift. Resolution's not high enough to catch the north-south cross traffic. Night photos will be too dark to ID a vehicle visually.


Bosch 7000 pros: Excellent night and day capture. Focus WILL stay exactly how you set it. Capable of up to 60fps to get lots of samples from its limited field of view. You can see enough detail of the vehicle (at night) to have a good idea what it is.

Bosch 7000 cons: hard to find, a bit expensive, not weatherproof, and requires an IR emitter and a mount. When fully scoped in on the target area for plates at a readable pixel size, the field of view is relatively small. Night images can be noisy.


Bosch 8000 pros: Very good night and day capture. Focus stays where you put it. High resolution can either capture plates across a much wider scene, or be zoomed in for extra detail and a chance to catch traffic at very severe cross-angles when conditions are good. You can see enough detail of the vehicle (at night) to have a good idea what it is.

Bosch 8000 cons: expensive, not weatherproof, needs an IR source and a mount. Night images can be noisy.
 
Last edited:

Laserray

Pulling my weight
Joined
Sep 14, 2018
Messages
113
Reaction score
113
Location
Cookeville, TN
View attachment 43965 View attachment 43966 View attachment 43967 View attachment 43968 View attachment 43969 View attachment 43970

That card has 2GB, I'll attach a screenshot from its section of Task Manager.

What I find tricky about LPR is the very small "sweet spot" in camera and illuminator setup to get usable results, plus other complications like keeping a IPC-HFW5231E-Z12 from losing focus in the dark. Setting up OpenALPR itself is a cakewalk compared to dialing in the cameras for night capture.

On that subject, if anyone wants a camera suggestion besides the popular Dahuas and their focus-loss issue, the Bosch Starlight 7000 is worth a look if you can accommodate a non-weather-resistant box camera. I have mine indoors, with a couple of powerful IRs on the outside of the building just above them. Otherwise I'd be putting it into an external housing with a chin-mounted long-range IR illuminator.

The 7000 Starlight is a 720P camera, maxes out at 60fps, and it can be dialed down dark enough to capture reflective plates while still giving you a fighting chance at ID'ing the vehicle visually (1/1000th sample attached). For a lens, I recommend the Tamron 1/3" CS-mount varifocal 50mm IR-corrected model if you can find one: 1/3 8-50MM F/1.6 Aspherical with connector This is sufficient for 120ft+ if your IR will reach that far. Since the Bosch cameras have a Lens Wizard that can optionally compensate for a non-IR-corrected lens (by adjusting the backfocus any time the IR filter engages or disengages), the non-IR-corrected variant of that lens would also be worth a try. Watch Ebay for these goodies if interested.

For the bonus points, I've uploaded a good starting point for a Bosch camera (this screenshot's from my current 5MP model): turn off backlight compensation / IntelligentAE and bottom out the two ALC sliders to keep the plates from getting overexposed. Take temporal noise filtering down about halfway to bottom in the Enhance panel, to reduce ghosting. Lock in 1/1000th shutter for night use. If your images look jagged, try reducing sharpness a little... remember, it's OCR work for the ALPR agent, so softer images may actually be better for reading plates.

Sensitivity on the Bosch Starlight models is good enough that I've equipped one on the rack with a linear polarizer, which cuts through windshield glare for vehicles heading toward the camera (random sample attached).
I can confirm the night time focus loss is due the Dahua camera being in "auto-focus" instead of manual. The auto focus positions are inaccurate at night. I can tune much better manually. The servo positioning sucks too. Still a great camera.
Does the Bosch have a 10-60mm lens for zooming?
 
Joined
May 25, 2019
Messages
14
Reaction score
2
Location
United States
I have Dahua camera too. It's shocking how good it is during the day for getting the tag but comes dusk and then until the sun is up in the morning about 9am I get nothing either. Even under a streetlight on "auto focus".
 

mech

Getting comfortable
Joined
May 18, 2019
Messages
326
Reaction score
427
Location
United States
Does the Bosch have a 10-60mm lens for zooming?
upload_2019-10-1_8-4-57.png
On the 5MP Bosch Starlight 8000, I had been using a varifocal Tamron P-Iris lens, zoomed in to its maximum 50mm maximum focal length, but then changed to a Bosch fixed 50mm lens with manual iris which they produce to go with their 12MP box camera (so very good optics). The Bosch lens is definitely producing better-quality photos than the Tamron, which was an under-achiever. Sample below from the Bosch-on-Bosch combo in overcast daylight conditions at 1/1000th shutter. This car would've been going 20-25mph, it's my neighbor pulling out to head to the store so he's not up to full cruise yet (30mph zone). I've got the iris cranked down to f3.5 or so to get good depth of field and avoid overexposure at night from IR blowback on the plates.

snap_c1_190930_155912.jpg
 
Last edited:
Top