# szad670401/hyperlpr architecture

> Architecture diagram of the GitHub repository szad670401/hyperlpr, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/szad670401/hyperlpr
- Repository: https://github.com/szad670401/hyperlpr

## Overview

HyperLPR3 is a cross-platform license-plate recognition framework with separate Python and C++ implementations. The main workflow accepts an image, detects plate regions, recognizes characters, optionally classifies plate type, and returns results; the C++ SDK also exposes image-buffer and context operations. The README documents Python image and REST usage and C/C++ SDK usage. Some subsystem links are omitted or marked unverified where the sampled code does not show runtime calls.

Main entry points: [`Prj-Python/hyperlpr3/inference/pipeline.py`](https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/inference/pipeline.py) (Recognition Pipeline), [`cpp/src/context_module/hyper_lpr_context.cpp`](https://github.com/szad670401/hyperlpr/blob/master/cpp/src/context_module/hyper_lpr_context.cpp) (Recognition Context), [`Prj-Python/hyperlpr3/hyperlpr3.py`](https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/hyperlpr3.py) (Catcher API), [`cpp/c_api/hyper_lpr_sdk.cc`](https://github.com/szad670401/hyperlpr/blob/master/cpp/c_api/hyper_lpr_sdk.cc) (C API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_python["Python Recognition"]
  node_python_catcher["Catcher API<br/>[hyperlpr3.py]"]
  node_python_pipeline["Recognition Pipeline<br/>[pipeline.py]"]
  node_python_detector["Plate Detection"]
  node_python_recognizer["Text Recognition<br/>[recognition.py]"]
  node_python_classifier["Plate Classification<br/>[classification.py]"]
  node_python_processing["Image Processing<br/>[tools_process.py]"]
  node_python_config["Model Settings<br/>[settings.py]"]
  node_python_base["Inference Base<br/>[base.py]"]
  node_python_types["Result Types<br/>[typedef.py]"]
  node_python_serve["REST Service<br/>[serve.py]"]
end

subgraph group_cpp_api["C++ SDK"]
  node_cpp_sdk["C API<br/>[hyper_lpr_sdk.cc]"]
  node_cpp_buffer["Image Buffer<br/>[camera_buffer.cpp]"]
  node_cpp_context["Recognition Context"]
end

subgraph group_cpp_models["C++ Inference"]
  node_cpp_detector["Plate Detector<br/>[plate_detector.cpp]"]
  node_cpp_recognizer["Text Recognition"]
  node_cpp_rec_engine["Recognition Engine"]
  node_cpp_classifier["Plate Classification"]
  node_cpp_cls_engine["Classification Engine"]
  node_cpp_inference["MNN Inference"]
end

node_image_user(("Image User"))
node_rest_client(("REST Client"))
node_sdk_user(("SDK Caller"))

node_image_user -->|"submits image"| node_python_catcher
node_python_catcher -->|"runs pipeline"| node_python_pipeline
node_python_catcher -->|"loads settings"| node_python_config
node_python_pipeline -->|"detects plates"| node_python_detector
node_python_pipeline -->|"recognizes text"| node_python_recognizer
node_python_pipeline -->|"classifies plates"| node_python_classifier
node_python_pipeline -->|"processes crops"| node_python_processing
node_python_pipeline -->|"builds results"| node_python_types
node_python_detector -->|"uses base"| node_python_base
node_python_recognizer -->|"uses base"| node_python_base
node_python_classifier -->|"uses base"| node_python_base
node_rest_client -->|"calls service"| node_python_serve
node_python_serve -->|"uses recognition"| node_python_catcher
node_sdk_user -->|"uses SDK"| node_cpp_sdk
node_cpp_sdk -.->|"creates buffers"| node_cpp_buffer
node_cpp_sdk -->|"creates context"| node_cpp_context
node_cpp_context -.->|"dispatches detection"| node_cpp_detector
node_cpp_context -.->|"dispatches recognition"| node_cpp_recognizer
node_cpp_context -.->|"dispatches classification"| node_cpp_classifier
node_cpp_recognizer -.->|"runs engine"| node_cpp_rec_engine
node_cpp_classifier -.->|"runs engine"| node_cpp_cls_engine
node_cpp_rec_engine -->|"uses inference"| node_cpp_inference
node_cpp_cls_engine -->|"uses inference"| node_cpp_inference

click node_python_catcher "https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/hyperlpr3.py"
click node_python_pipeline "https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/inference/pipeline.py"
click node_python_detector "https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/inference/multitask_detect.py"
click node_python_recognizer "https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/inference/recognition.py"
click node_python_classifier "https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/inference/classification.py"
click node_python_processing "https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/common/tools_process.py"
click node_python_config "https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/config/settings.py"
click node_python_base "https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/inference/base/base.py"
click node_python_types "https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/common/typedef.py"
click node_python_serve "https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/command/serve.py"
click node_cpp_sdk "https://github.com/szad670401/hyperlpr/blob/master/cpp/c_api/hyper_lpr_sdk.cc"
click node_cpp_buffer "https://github.com/szad670401/hyperlpr/blob/master/cpp/src/buffer_module/camera_buffer.cpp"
click node_cpp_context "https://github.com/szad670401/hyperlpr/blob/master/cpp/src/context_module/hyper_lpr_context.cpp"
click node_cpp_detector "https://github.com/szad670401/hyperlpr/blob/master/cpp/src/nn_implementation_module/detect/plate_detector.cpp"
click node_cpp_recognizer "https://github.com/szad670401/hyperlpr/blob/master/cpp/src/nn_implementation_module/recognition/plate_recognition.cpp"
click node_cpp_rec_engine "https://github.com/szad670401/hyperlpr/blob/master/cpp/src/nn_implementation_module/recognition/recognition_engine.cpp"
click node_cpp_classifier "https://github.com/szad670401/hyperlpr/blob/master/cpp/src/nn_implementation_module/classification/plate_classification.cpp"
click node_cpp_cls_engine "https://github.com/szad670401/hyperlpr/blob/master/cpp/src/nn_implementation_module/classification/classification_engine.cpp"
click node_cpp_inference "https://github.com/szad670401/hyperlpr/blob/master/cpp/src/inference_helper_module/inference_helper_mnn.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_python_catcher,node_python_pipeline,node_python_detector,node_python_recognizer,node_python_classifier,node_python_processing,node_python_config,node_python_base,node_python_types,node_python_serve,node_image_user,node_rest_client toneBlue
class node_cpp_sdk,node_cpp_buffer,node_cpp_context toneAmber
class node_cpp_detector,node_cpp_recognizer,node_cpp_rec_engine,node_cpp_classifier,node_cpp_cls_engine,node_cpp_inference toneMint
class node_sdk_user toneIndigo
```

## Components

### Python Recognition

- [Catcher API](https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/hyperlpr3.py): `Prj-Python/hyperlpr3/hyperlpr3.py`
- [Recognition Pipeline](https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/inference/pipeline.py): `Prj-Python/hyperlpr3/inference/pipeline.py`
- [Plate Detection](https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/inference/multitask_detect.py): `Prj-Python/hyperlpr3/inference/multitask_detect.py`
- [Text Recognition](https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/inference/recognition.py): `Prj-Python/hyperlpr3/inference/recognition.py`
- [Plate Classification](https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/inference/classification.py): `Prj-Python/hyperlpr3/inference/classification.py`
- [Image Processing](https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/common/tools_process.py): `Prj-Python/hyperlpr3/common/tools_process.py`
- [Model Settings](https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/config/settings.py): `Prj-Python/hyperlpr3/config/settings.py`
- [Inference Base](https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/inference/base/base.py): `Prj-Python/hyperlpr3/inference/base/base.py`
- [Result Types](https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/common/typedef.py): `Prj-Python/hyperlpr3/common/typedef.py`
- [REST Service](https://github.com/szad670401/hyperlpr/blob/master/Prj-Python/hyperlpr3/command/serve.py): `Prj-Python/hyperlpr3/command/serve.py`

### C++ SDK

- [C API](https://github.com/szad670401/hyperlpr/blob/master/cpp/c_api/hyper_lpr_sdk.cc): `cpp/c_api/hyper_lpr_sdk.cc`
- [Image Buffer](https://github.com/szad670401/hyperlpr/blob/master/cpp/src/buffer_module/camera_buffer.cpp): `cpp/src/buffer_module/camera_buffer.cpp`
- [Recognition Context](https://github.com/szad670401/hyperlpr/blob/master/cpp/src/context_module/hyper_lpr_context.cpp): `cpp/src/context_module/hyper_lpr_context.cpp`

### C++ Inference

- [Plate Detector](https://github.com/szad670401/hyperlpr/blob/master/cpp/src/nn_implementation_module/detect/plate_detector.cpp): `cpp/src/nn_implementation_module/detect/plate_detector.cpp`
- [Text Recognition](https://github.com/szad670401/hyperlpr/blob/master/cpp/src/nn_implementation_module/recognition/plate_recognition.cpp): `cpp/src/nn_implementation_module/recognition/plate_recognition.cpp`
- [Recognition Engine](https://github.com/szad670401/hyperlpr/blob/master/cpp/src/nn_implementation_module/recognition/recognition_engine.cpp): `cpp/src/nn_implementation_module/recognition/recognition_engine.cpp`
- [Plate Classification](https://github.com/szad670401/hyperlpr/blob/master/cpp/src/nn_implementation_module/classification/plate_classification.cpp): `cpp/src/nn_implementation_module/classification/plate_classification.cpp`
- [Classification Engine](https://github.com/szad670401/hyperlpr/blob/master/cpp/src/nn_implementation_module/classification/classification_engine.cpp): `cpp/src/nn_implementation_module/classification/classification_engine.cpp`
- [MNN Inference](https://github.com/szad670401/hyperlpr/blob/master/cpp/src/inference_helper_module/inference_helper_mnn.cpp): `cpp/src/inference_helper_module/inference_helper_mnn.cpp`

### Other components

- **Image User**
- **REST Client**
- **SDK Caller**

## Connections

- Image User → Catcher API: submits image
- Catcher API → Recognition Pipeline: runs pipeline (evidence: `Prj-Python/hyperlpr3/hyperlpr3.py`)
- Catcher API → Model Settings: loads settings (evidence: `Prj-Python/hyperlpr3/hyperlpr3.py`)
- Recognition Pipeline → Plate Detection: detects plates (evidence: `Prj-Python/hyperlpr3/inference/pipeline.py`)
- Recognition Pipeline → Text Recognition: recognizes text (evidence: `Prj-Python/hyperlpr3/inference/pipeline.py`)
- Recognition Pipeline → Plate Classification: classifies plates (evidence: `Prj-Python/hyperlpr3/inference/pipeline.py`)
- Recognition Pipeline → Image Processing: processes crops (evidence: `Prj-Python/hyperlpr3/inference/pipeline.py`)
- Recognition Pipeline → Result Types: builds results (evidence: `Prj-Python/hyperlpr3/inference/pipeline.py`)
- Plate Detection → Inference Base: uses base (evidence: `Prj-Python/hyperlpr3/inference/multitask_detect.py`)
- Text Recognition → Inference Base: uses base (evidence: `Prj-Python/hyperlpr3/inference/recognition.py`)
- Plate Classification → Inference Base: uses base (evidence: `Prj-Python/hyperlpr3/inference/classification.py`)
- REST Client → REST Service: calls service
- REST Service → Catcher API: uses recognition (evidence: `Prj-Python/hyperlpr3/command/serve.py`)
- SDK Caller → C API: uses SDK
- C API → Image Buffer: creates buffers
- C API → Recognition Context: creates context (evidence: `cpp/c_api/hyper_lpr_sdk.cc`)
- Recognition Context → Plate Detector: dispatches detection
- Recognition Context → Text Recognition: dispatches recognition
- Recognition Context → Plate Classification: dispatches classification
- Text Recognition → Recognition Engine: runs engine
- Plate Classification → Classification Engine: runs engine
- Recognition Engine → MNN Inference: uses inference (evidence: `cpp/src/nn_implementation_module/recognition/recognition_engine.cpp`)
- Classification Engine → MNN Inference: uses inference (evidence: `cpp/src/nn_implementation_module/classification/classification_engine.cpp`)
