Having fun with license plate recognitions

Hi folks,

Some community members are currently very busy to help us building our own video surveillance system. Their enthousiasm has triggered me to demonstrate how license plate recognition can easily be integrated into your Node-RED flow.

The experiment shows how an IP camera on your driveway can be used to execute actions in your Node-RED flow, based on which cars are arriving and leaving the driveway of your house.

Some basic information about the experiment:

  1. To simplify the test flow, I don't use camera images. Instead images are injected (base64 encoded manually via base64-image.de. All images are used from commons.wikimedia.org.

  2. When I arrive (license plate MSWL525) then my garage door should be opened automatically. When I leave, then my garage door should be closed again.

  3. When my mother in law arrives (license plate COEPP66H), then all roller should be closed immediately. When she leaves, the roller shutters should be opened again :shushing_face:

  4. When an unknown license plate (JYU6020) arrives, then an alarm should be triggered.

Of course this is all pure hypothetical, but you get the idea ...

A small demonstration of my test flow:


Here is the example flow being used:

Some explanation:

  1. Inject a (base64 encoded) image of a car. Normally this will be images captured from a camera periodically.

  2. Show the image in a preview window.

  3. Use the node-red-contrib-tfjs-coco-ssd from our friend @dceejay to count the number of cars in the image.

  4. In this case we only continue if the number of cars have changed, i.e. when a car leaves or arrives. You could also choose here e.g. to continue only when car arrives... I do this because (in step 5) I can only send 2500 images per month for free to the license plate recognition service. By doing only recgnitions when the number of cars changes in the image, the 2500 images per month should be sufficient. But if that is not sufficient for your use case, they also have affordable pricing plans.

  5. We use my node-red-contrib-plate-recognizer node to send the image to the platerecognizer service. That can be their cloud service or a local installed Docker container. Note that you need to create a free account, and then you get a token on your dashboard that you need to paste in this node!

  6. We determine which plates have arrived, and which plates have left.

  7. Then an action will be executed, based on the number plate and whether it has arrived or left. In this demo the action will be simply sending a particular text to the Debug sidebar.

  8. Show the action in the sidebar.

As usual all 'constructive' feedback is very welcome. That can go from flow optimizations, other use cases, ideas, and so on ...

Have fun with it !!!


My flow was a bit too big to upload, because it contains the base64 encoded images. But here it is:

license_recognition_flow.json (497.0 KB)

...and if you feed that into a node-red-contrib-google-smarthome device node (doorbell), you should then get a Google Home announcement;

"Ding Dong, the mother-in-law is in the driveway"

which would give you just enough time to lock the doors & hide behind the sofa....
...just saying


My main complaint is that plate-recognizer uses a cloud service to run the recognition algorithm. Many people are fine with that, but I'm not.

I've played with OpenLPR python API for plate reading and MobilenetSSDV2_coco for vehicle detection. My goal was more ambitious, I live on the corner and our neighborhood is seeing a large uptick in "poach pirates" following delivery trucks and others cruising the neighborhood looking garage doors left open, cars in the driveway with expensive new wheels to steal, etc. Getting a plate from a moving vehicle ups the ante. It actually worked quite well in daylight, but its been hopeless at night. So its on the back-burner, I'm hoping a firmware update can improve the night vision performance, but so far none has come forward -- it has various license plate settings (1-4) but they seem to crash the camera setup.

The other annoyance, which may not apply elsewhere, is that enforcement of the requirement for a front plate is lacking so a large portion of frontal views have nothing to recognize!

:rofl: I'm sure many recognise this scenario all too well.

1 Like

Don't know if you have overlooked it in my first post above, but they also offer a docker container. You can run that locally, withour having to go through complex installation procedures or trainings or whatever. Just start the container.

Have not tested that. If you have time, it would be nice if you could try it and let us know.
The guys from platerecognizer have a good support: they have a mailbox where you can send images that where not properly recognized, and they will use that to retrain their system. Because it is based on AI, not on OCR (like in OpenLPR)...


As you can see in their documentation, the Docker container doesn't need an internet connection (after it has been installed):


So you can use this offline in your home...


This is gold, very cool. I’ll be trying it out.

1 Like

I will add this to my list of things to investigate and try when I get back to the plate recognition project. Not familiar with Docker, so its another learning curve obstacle.

I also have this one:

On my list ahead of it. I'm a lot better with Python or C/C++ that I am with JavaScript or nodejs.

1 Like