Wednesday, January 29, 2020

Eval:Plate Recognizer in Blue Iris 5

Cams used in the post:


The LPR partnered with Blue Iris 5 is cloud based meaning it uploads triggered pic to a server which is hampered by timing of triggers on top of the quality of  the image sent. Positioning of the cam, lighting and speed of the vehicle will of course factor in. More here. A better solution, if you have the cash, might be OpenLPR which works on streaming video to a local server. Prices range from $5/cam/month to $1995/cam/month. Though I'm thinking the best solution is a cam designed for player reading that has LPR in the cam. That will set you back at least $500 though. Still could be cheaper in the long run and more practical than sending video to a server to process.

Note I and many others have been seeing the web server crash a lot with Blue Iris 5 Going to be waiting to upgrade any more servers till that gets sorts. But till then I though I'd look at the new AI built-ins.

You should turn off any overlays from the camera so the it does not see them as the plate number. And even then there might be issues.

Note only one of these is a license plate. And looking at the uploaded images it appears to have completely missed me going and returning twice today though the config looks unchanged from the last time it worked.


BI5 plate recognizer setup instructions. Set up was quick and easy.

First look:

Given I'm just looking to log cars coming in my gate I figured their free tier might be enough. Gets a bit pricey for watching a neighborhood gate or parking lot.

Note the timestamps on the cam pics are UTC like the plate log.

The first thing that hit me was I need to dial my triggers way back so it will only be sending things that are probably cars to stay in the free range. Even though I thought I'd dialed it back pretty good I had 41 alerts in the first 2 1/2 hours I had it turned on. It did get the plate on my while I was pulling out with the trash but not when I pushed it back up the driveway.

First uploaded pic of me on the way out
Last uploaded pic of me with the cart

It did not get the one off a truck that pulled in to turn around after dark either. Though in that case it probably could not have been able to make out the plate since I could not. Should have uploaded a pic though. It think because it did not quite cross zones.
I think the dividing line was just this side of the tires.

So I adjusted the zones again (replaced right 1/3 of 2 full width zones with a third to trigger on people using the turnaround like the truck)  and turned it off for the night.
now with 3 zones. 2 on left 1 on right.
I might want to swap to the gate cam instead as it could see the plate on the truck well from its angle and distance. Though that also means it will be tough not to trip with passing traffic. Especially at night with headlights shining off the gate and trees.

Update 2/4/2020:

Totally missed a neighbor's visit both coming and going in the middle of the day. Plus even weirder it thinks it made out the cameras name as a plate on my work glove as I passed. Again times are UTC where local is UTC-6
Notice no car pics for 2/3 though it did see me.
Me carrying a chainsaw. I guess my movement triggered the LPR and the only text it found was the cameras name overlay.
The neighbor did trigger the BI motion detection 6 times. You can see the first image here along with the 6 clip blank clip icons o the left. (The blank icons is another random issue I've been seeing in BI5.)
Note I pixelated the plate here. It was perfectly clear.
It got me thinking the one trigger point might not be enough so I reduced the 3 zones I have and added 3 more to hopefully trigger earlier and more often in case they are getting dropped or something. Unfortunately all the zones you are not currently editing show up as the same color so they look like one but there are 6, A thru F.
Basically 4 strip zones to catch "vertical" movement and 2 block sections on right to catch going into turn around or on up drive.
With the crossings set up like this. (Note F was added between the road and A which starts at the gate.)

I also cranked the sensitivity a bit from min object size of 675 to 525 which should be about the size of a car at the gate.

One think I did not mention earlier is there is also a motion detector at the gate that triggers the driveway cams as well. It is a bit laggy but unaffected by the headlights going by. So at night I only use that to trigger the LPR by setting a separate profile and scheduling the switch.
Note no motion sensing selected but the LPR AI is configured for this profile as well.
Note the relative to sunrise/sunset option and you can click on "Days" button to select a group of days or a single day.

Update 2/7/2020:

Another gotcha. Not sure how but it appears my LPR config disappeared from both profiles. It posted a pic at 7:28 AM UTC (1:28 AM local the schedule is using) but when I looked to see how it did with today's FedEx delivery there was nothing. And when I checked my settings in BI5 I found the LPR disabled with no config info. The global profile override schedule was still in place. I then noticed the profile number was not in place on the frame as it had been when the schedule was working. Trying to go into the cameras motion detection config seemed to make the app unresponsive till I tried to close the app at which time the motion detection config dialog appeared.
Note blank clips and motion detection preview window
Restarting the console told me an update was ready so I let that install. After the profile indicator was back on the camera frame. The LPR config was still there. Makes me think a subsystem died or such. Note the clip images were still black so I did a DB repair which sorted that. However I found the active part of zone F was inverted. I'll have to keep a closer eye on this and see if there is some more monitoring I can setup.

Update 2/25/2020 New Issue.

Seem to have found a new issue with BI5. Looks like my motion detection quit working on all cams about 3 days ago. Not positive but I think a Blue Iris subsystem died without notification. This is VERY bad. Not only has no LPR posts been made for 3 days but no video was marked with motion events either from BI motion detection or by external triggers. Rebooted box and motion detection is working again but not sure how I can even monitor for this yet.

Update 3/13/2020 swapped out Reolink with Dahua

Moved the 2 Reolink to other locations / servers since BI5 does not seem to like them which seem to have sorted the corrupted and hung video issues. I also let me add trip line triggers from in cam detection to help reduce lag. Unfortunately it has not done much for improving detection as you can see here.
The shot on March 13, 2020, 12:03 a.m. UTC looks almost perfect those the plate was still not clear enough for it to work. 

I think that is about it for this LPR. There are some other options to try on my todo list.

Thursday, January 16, 2020

What size PC do I need for Blue Iris?

I would always suggest you get the fastest CPU and GPU you can afford with enough hard disk space to save about a week's worth of 24/7 video (you should always record 24/7). To figure the HD space is not that hard. Just use this tool. It will also tell you how much bandwidth you would need to get to the NVR or cloud storage.

You should also look at Optimizing Blue Iris's CPU Usage to get the most out of the hardware you have.

But if you are trying to sort the minimum CPU and GPU you can get away with or trying to justify the cost of an upgrade I should note it is almost impossible to get a definitive improvement number of X setup over Y unless you have both running side my side looking at the same cams. Things like the amount of motion the cams are seeing, overlays and other features in use factor in too. However this page Blue Iris Performance Statistics has a sortable and filterable table of config and load data collected from around 1400 user servers. But that still just gets you in the ballpark.

For instance I have this i7-4790 I bought used almost 5 years ago now with 10 outdoor cams  that was running 50-60% CPU when I looked at it the other day when it was relatively calm. Today it looks like this, maxing out about 72%
Iris2 load and config

I built a i7-8700 with those same 10 cams to replace the 4790 PC. Even after adding another 6MP cam it was running 20-30% CPU during the same period as the above. Today it is maxing about 21%
Iris6 load and config
While both have the same configs for the cams in common but even without the extra cam that is not definitive for the CPU because the newer machine also has a better GPU (730 vs 1050), twice the RAM and is running BI5 instead of 4. Though the newer system actually appears to be using the GPU where the older one does not.  (The 730 does not appear to be supported for much.) Below are my other 3 servers to give an idea how motion, CPU and GPU factor in. All use an SSD for the Blue Iris DB and close to the same HDs for recording so the storage should not be much of a factor between setups. Note you can look at the motion column in the cam listings to get an idea of the amount of motion each cam relative to others on that server is seeing though the numbers are not relative between servers / consoles since the counts all start at server reboot. Also in almost all cases other than cam 93 the ones showing NoSignal counts are WiFi cams.

This one is close to max with 9 outdoor and 3 indoor cams on it.
Iris3 load and config
This one pretty maxed at 15 outdoor cams on it. Note I noticed the next day, after rebooting for updates, it was using the GPU pretty heavy. Similar CPU load though.
Iris5 load and config

And just to show the diff motion can make, this one with 23 active and 1 offline indoor cams that could handle a few more.
Iris4 load and config.

Update time to shuffle cams again. Having 27 indoor cams pushing almost 1000 MP/s is maxing Iris4

Update 7/5/2021:
Wow you wonder how much diff an upgrade can make. I got a PC with a 10th Gen Intel Core i7-10700 8-Core Processor running at 2.8Ghz with just the onboard Intel 630 graphics to start with on Prime Day. Cost less than the last 8th gen i7 I bought with half the RAM. Installed latest BI 5.

It is replacing 6th gen i7 4-Core at 3.4Ghz with a Geforce 730 running BI 4 (Iris 4 above) with a bit more optimization and less cams from previous tests. 

Same RAM and SSD C drive with spinning for storage. 

I imported settings from the old to the new so they are identical and running side by side processing exactly the same streams from 22 active indoor cams.

Old system 13 to 34% CPU for Blue Iris
New system 3 to 4%!
Note the % reported by BI is lower than Task Manager by around 3% on both.
Iris7 load picture

I should be able to pull the other indoor cams back onto this server and even run DeepStack on it without maxing it out.

Saturday, January 11, 2020

Some quick thoughts on license plate reading.

Prob is, thanks to TV, movies and even media, people think they should be able to log plates passing with something like a Ring doorbell cam so more and more people seem to be wanting to do this like local governments are.  But that is probably out of your price range. If you just want to be able grab shots of plates coming through a gate or other narrow / slow moving space it is not that complicated. I've been able to pull plates of people coming up my driveway at 100 feet with fairly cheap cams.

When it comes to reading plates you need:

At least 7 pixels per inch at the target distance. (that is rez AND lens view angle)

In my post Doing the math on pixels per inch at a distance for your cam I pointed out the math involved in getting the min number of pixels to be able to make out a plate.

The camera focused for that distance

Most cams are fixed focus and have the lens glued in place so you can not adjust it much less swap it out. To give you and idea watch this video of a guy that swapping out the lens in a Wyze cam. Sadly higher priced brands do similar. You might want to look at my compare between static and auto focus versions of a some Reolink cams.

Enough contrast to make those pixels usable.

See this post on low light which helps get you a bit more.

And if the target is moving, a high enough frame rate and shutter speed to minimize motion blur and get a frame in the target range.

There is some good info here about frame rates and such needed.

And if you are looking to read them at night you need to think about reflections.

Nelly's Security has a nice post about this.

It should be obvious but no tracking or battery powered cams.

But if you need convincing read this.

Then there are plugin options

Like this one for Blue Iris that is on my eval to-do list. Though so far I'm not impressed.
OpenALPR which has and open API and cloud based services.
This post shows how to link Blue Iris and SmartThings through a learning AI system for alerts.

Keep in mind a system using triggered pics means you are betting the camera will trigger and send the best image of the video to send which gets iffier as vehicle speed increases. Better systems do recog in cam or stream or push video to a LPR system to let it grab the best image or use multiple images to increase accuracy.

Thursday, January 9, 2020

A quick compare of focus

Compared in this post
Reolink PoE IP Camera Outdoor (Pack of 2) 5MP HD Video Surveillance Work with Google Assistant, Security IR Night Vision Motion Detection Audio SD Card Slot RLC-420-5MP

Reolink PoE Camera 5MP Super HD 4X Optical Zoom Outdoor Indoor Video Surveillance Work with Google Assistant, IP Security IR Night Vision Motion Detection with Phone App RLC-511

Amcrest ProHD Fixed Outdoor 3-Megapixel (2304 x 1296P) Wi-Fi Vandal Dome IP Security Camera - IP3M-956W

I wanted to do a quick compare of auto focus vs fixed and highlight depth of field. I was upgrading the bird feeder cams from a Escam Q900 and Amcrest IP3M-956 to a Reolink 5MP. I wanted to see if the auto focus RLC-511 or the static focus RLC-420-5MP would work better. While the bird feeder is the primary thing I want to monitor having coverage of the yard beyond is a definite plus. So I replaced the Escam with the 2 Reolink models and stuck some wet floor signs in the yard to get a better idea of focus / detail, randomly placed at 26, 32 and 45 feet. There is also a license plate one the fence just beyond the barn in the shadows but that turned out to be irrelevant for this test.
The 4 cams pointed at the feeder.
Note there is a 4th cam, a Hikvision DS-2CD2142FWD-I , looking down though it is mainly to cover the north end of the walkway.

The Amcrest IP3M-956 was OK but was really too close to the feeder for good focus and too low rez for good detail of the yard. Plus being an outdoor dome it needed cleaning a lot.
Full Amcrest shot
For a better look here is a cropped version
Cropped shot from Amcrest
Oddly the flower pot seems close to the center of focus. This would tend to indicate that despite being and "outdoor camera" it is probably focused for indoors. Thinking I need to go back and test my cameras for center of focus. The outdoor models generally seemed focused around 30 feet but I had not done any real testing.

Now compare that to the view from the RLC-511 that zoomed out all the way has almost the same view angle as the Amcrest.
Full RLC-511 shot at widest view angle.
Obviously just going from 3MP to 5MP helps a lot.
RLC-511 cropped view of shot.
Cropped you can the feeder is in center focus but even the first sign looks pretty good.

Here is the same view from the RLC-420-5MP. It is running a 3.6 mm lens so it is not quites as wides as the others so you would expect it to be just a touch sharper.
RLC-420-5MP full shot
In the cropped version the signs look noticeably clearer while the feeder has lost just a bit. Obviously the depth of field on the static is the around 26 feet the first sign is setting at.

Since I set these up for monitoring the feeder it is in the center of the field and close enough to cause the auto focus to focus on it. Not to mention get in close like this.

Though obviously I need to up the shutter speed. Unfortunately The Reolink cams only allow for changing the frames/second. So I'm putting this back on 30 fps from the 15 fps in the above shot. See the matching video here showing the auto focus recovery times after various amounts of zoom.

Amcrest and the similarly functional Dahua definitely have Reolink beat when it comes to exposure options. Note the Amcrest and Dahua interfaces are almost identical.
Amcrest manual exposure settings

Amcrest auto and semi auto exposure settings.
Auto focus on zoom can be a bit laggy as in the video above and even sometimes get stuck out of focus when things pass in front of it. Generally though it is not too bad as this video shows. And just for compare here is the matching video from the static focus RLC-420-5MP,