MIT License

项目介绍

parkpow/deep-license-plate-recognition 是一个托管在 GitHub 上的开源项目,主要使用 C++ 编写,采用 MIT License 许可证,目前获得 672 个 Star、135 次 Fork。

仓库全名
parkpow/deep-license-plate-recognition
开源许可证
MIT License
Star 数
672
Fork 数
135
未关闭 Issue
1

README 摘要

Plate Recognizer examples and utilities This repository contains example clients, integrations, and operational utilities for Plate Recognizer Snapshot, Stream, Blur, and ParkPow. It does not contain the recognition models themselves. Use the quickstart below to recognize a plate in an image, or jump to the repository map to find a tool for another workflow. Image recognition quickstart Prerequisites Python 3.10 or…

完整内容见 GitHub 原始 README 或本页 。

常见问题

deep-license-plate-recognition 用什么语言开发?

主要使用 C++ 编写,采用 MIT License 许可证,目前有 672 个 Star。

deep-license-plate-recognition 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 deep-license-plate-recognition 的源码?

可以直接克隆仓库:git clone https://github.com/parkpow/deep-license-plate-recognition.git,默认分支为 master;安装与运行步骤见仓库 README。

deep-license-plate-recognition 最近还在维护吗?

仓库最近一次更新为 9月4日,当前有 1 个未关闭 Issue;Star 数为 672,可作为社区活跃度的参考。

关于

Automatic License Plate Recognition (ALPR) or Automatic Number Plate Recognition (ANPR) software that works with any camera.

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

语言占比

Batchfile
C
C#
C++
CSS
Dockerfile
HTML
Java
JavaScript
Jinja
Makefile
Python
Rust
Shell
TypeScript

README

Plate Recognizer examples and utilities

This repository contains example clients, integrations, and operational utilities for Plate Recognizer Snapshot, Stream, Blur, and ParkPow. It does not contain the recognition models themselves.

Use the quickstart below to recognize a plate in an image, or jump to the repository map to find a tool for another workflow.

Examples of recognized license plates

Image recognition quickstart

Prerequisites

Clone the repository and install the two dependencies required by the image client:

git clone https://github.com/parkpow/deep-license-plate-recognition.git
cd deep-license-plate-recognition
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
python -m pip install requests pillow

Run recognition against the cloud API:

python plate_recognition.py --api-key MY_API_KEY /path/to/vehicle.jpg

Replace MY_API_KEY locally and do not commit your token. To use a running self-hosted Snapshot SDK instead:

python plate_recognition.py --sdk-url http://localhost:8080 /path/to/vehicle.jpg

The command returns JSON containing the recognized plate, confidence scores, and bounding box. The complete response schema is in the Snapshot API reference.

[
  {
    "version": 1,
    "results": [
      {
        "box": {"xmin": 85, "ymin": 85, "ymax": 211, "xmax": 331},
        "plate": "ABC123",
        "score": 0.904,
        "dscore": 0.92
      }
    ],
    "filename": "car.jpg"
  }
]

Common image workflows

Limit recognition to one or more regions:

python plate_recognition.py --api-key MY_API_KEY --regions fr --regions it /path/to/car.jpg

Process several files or a shell glob:

python plate_recognition.py --api-key MY_API_KEY /path/to/car1.jpg /path/to/car2.jpg /path/to/trucks*.jpg

Run python plate_recognition.py --help for all available output, annotation, cropping, and engine options. See the bulk-processing guide for a longer walkthrough.

Repository map

Goal Tool or directory Documentation
Recognize plates in images plate_recognition.py Quickstart
Redact plates in images number_plate_redaction.py Redaction
Process an FTP or SFTP server ftp_and_sftp_processor.py FTP and SFTP
Monitor and transfer new images transfer.py Automatic image transfer
Operate on Stream videos and images stream/ Stream utilities
Integrate webhook consumers webhooks/ Webhook integrations
Integrate ParkPow and camera systems parkpow/ Per-integration READMEs
Run Blur or edit video blur/, video-editor/ Blur, video editor
Install or manage an on-premise SDK docker/ On-premise tools
Run performance benchmarks benchmark/ Benchmarks
Use another language cpp/, csharp/, java/ Language examples
Control a gate relay gate-controller/ GateController

Each subproject has its own dependencies. Follow its README or requirements file instead of assuming the image-client installation covers the entire repository. The root pyproject.toml contains the shared Python development environment, managed with uv.

Development setup

Install uv, then create the root development environment from uv.lock:

uv sync --locked

The root is a collection of scripts rather than an installable package. Run tools in its environment with uv run, for example:

uv run pre-commit install
uv run pre-commit run --all-files

The first command installs the repository’s Git hooks; the second runs every configured hook against the repository.

Plate redaction

number_plate_redaction.py detects plates—including small or barely readable ones—and can save a blurred copy of an image.

python number_plate_redaction.py --api-key MY_API_KEY vehicle.jpg --save-blurred

Useful options include:

  • --split-image for high-resolution images; this uses three API lookups.
  • --ignore-regexp REGEX to leave matching plates unblurred. Repeat the option to provide more than one expression.
  • --ignore-no-bb to ignore results without a vehicle bounding box.
python number_plate_redaction.py \
  --sdk-url http://localhost:8080 \
  --split-image \
  --save-blurred \
  vehicle.jpg

Run python number_plate_redaction.py --help for the complete CLI reference.

FTP and SFTP processing

Use ftp_and_sftp_processor.py to fetch images from your own FTP or SFTP server and recognize them with the cloud API or a self-hosted SDK.

python -m pip install requests pillow paramiko
python ftp_and_sftp_processor.py \
  --api-key MY_API_KEY \
  --hostname FTP_HOST_NAME \
  --ftp-user FTP_USER \
  --ftp-password FTP_PASSWORD \
  --folder /path/to/server_folder

Add --protocol sftp for SFTP. Authentication can use --ftp-password or --pkey. The --delete option removes processed remote files, so test without it first. Run python ftp_and_sftp_processor.py --help for camera, polling, output format, and SDK options.

See the FTP/SFTP bulk-processing guide for setup details. Plate Recognizer also provides a hosted FTP integration.

Automatic image transfer

transfer.py watches a directory, recognizes new images, and moves processed images into an archive. It can optionally forward results to ParkPow.

python -m pip install requests watchdog jsonlines
python transfer.py --help

The help output includes examples for the cloud API and a self-hosted SDK, as well as the required source, archive, and camera-path options.

Language examples

For other languages, start with the API documentation or convert the API’s curl examples with curlconverter.

Support and license

For product questions, contact Plate Recognizer. This repository is provided under the terms in LICENSE.

Plate Recognizer is a subsidiary of ParkPow.

评论

暂无评论