Blog: We have ALPRs at Home
Can I build an ALPR using my dashcam? How good can it be?
So this Substack was originally intended to cover technology in addition to political issues, and if you know me, you know I’m not a big fan of all the cameras going up everywhere monitoring us around the clock. I understand that the First Amendment generally protects the right to record in places where there is no reasonable expectation of privacy, subject to reasonable restrictions, but I highly doubt the Founders would have viewed a system that catalogs everyone’s location and makes that information searchable without a warrant as constitutionally acceptable.
Rather than simply complain about it, I wanted to see what it would take to build a system that does this using my own dashcam footage. I have a VIOFO A229 front/rear dashcam that captures high-quality video and embeds the date, time, and GPS coordinates into each recording. Using a computer vision model to detect and extract license plates, an OCR model to read the text on each plate, and the embedded metadata from the video, it is possible to recreate much of the functionality of an automatic license plate reader (ALPR) using nothing more than a consumer dashcam.
As you can imagine, this raises privacy concerns when the same license plate is encountered in multiple locations. With enough data, it would be possible to reconstruct someone’s movements. However, because there is generally no expectation of privacy while driving on public roads, collecting this kind of information is generally lawful in the United States. Although, the legality of specific uses depends on the circumstances and applicable state and federal law. Different legal issues may arise if someone were to intentionally track a specific person, publish their movements, or use the information to harass someone.
I do not intend to release the source code, training data, videos, or collected data used for this project. The purpose is to demonstrate what is technically possible, not to build a searchable surveillance database. I spent a few weekends, probably about only 5-8 hours in total, developing this system.
As I mentioned, I’m using a VIOFO A229 camera. It is a 4K camera with a wide-angle lens, which is excellent for capturing the overall driving environment. However, that same wide field of view means individual license plates occupy only a small portion of each frame. Low resolution, compression artifacts, low light, and distance can therefore make many plates unreadable. VIOFO also sells a secondary camera with a much narrower field of view designed specifically for capturing license plates at greater distances, which would likely improve accuracy considerably.

As I drive, the camera records video in three-minute increments. I wrote a program in Python that opens each video, extracts every frame, and processes each frame individually. At 30 FPS, a three-minute clip contains approximately 5,400 frames.
For each frame, two models are run. First, a YOLOv8 computer vision model detects the location of any license plate. This produces only the bounding box around the plate, it does not read the text. In the image above, this bounding box is shown in green.
Next, the detected plate is passed to an OCR model. After testing several options, I settled on RapidOCR because it produced the most consistent results. Rather than crop only the exact plate, I include a slightly larger region around it, which noticeably improves OCR accuracy at the cost of somewhat slower processing. This area is shown above in red.
This process repeats for every frame. A three-minute video currently takes roughly five to ten minutes to process on my consumer-grade NVIDIA RTX 3070, so the system is not yet capable of real-time performance. Faster hardware, newer models, or processing fewer frames would all significantly improve throughput. I also only extract GPS coordinates every 200 frames because they change much more slowly than the video itself during normal city driving.
One of the biggest challenges is that OCR results vary slightly from frame to frame. A plate such as ABC-1234 may occasionally be read as ABC-l284 or even PlBC-1234 as viewing conditions change. Fortunately, consecutive frames provide temporal redundancy. Bounding boxes that significantly overlap are assumed to represent the same physical plate, and each OCR result becomes a vote toward the final value. Confidence scores from the OCR model can also be incorporated to further improve reliability. If ABC-1234 is detected correctly in 112 frames but incorrectly in only a handful, the correct reading overwhelmingly wins. This approach is especially effective because the software analyzes dozens or hundreds of observations of the same plate rather than relying on a single frame.
What I have built is only a hobby project running on consumer hardware. Organizations that deploy dedicated ALPR systems have access to purpose-built cameras, larger training datasets, and significantly greater computing resources. If this level of capability is possible with a single off-the-shelf dashcam and a gaming GPU, it is worth considering how much more sophisticated commercial systems are likely to be.
Large surveillance networks likely collect far more information than my prototype, including vehicle make, model, and color. Where they have lawful access, they may also compare detected license plates against vehicle registration records.
Perhaps it makes you a little uncomfortable that this can be done so easily with off-the-shelf equipment available to anyone. I think it should. These systems can make mistakes, and they can be misused. Just last week an automotive journalist was reportedly arrested at gunpoint after incorrect information was entered into an ALPR system. Another recent case involved an officer who allegedly used ALPR data to stalk a woman he had met. I do not believe the benefits of these systems outweigh the costs they impose on the privacy of the general public.
