An open API service indexing awesome lists of open source software.

https://github.com/tristan296/deepplate

A custom-trained YOLOv11-based license plate detection with PaddleOCR for accurate ANPR.
https://github.com/tristan296/deepplate

cv2 numpy paddleocr sqlite3 ultralytics yolov11

Last synced: 6 months ago
JSON representation

A custom-trained YOLOv11-based license plate detection with PaddleOCR for accurate ANPR.

Awesome Lists containing this project

README

          

# Image Detection

> A project that utilizes machine learning to detect and classify objects in images.
> Live demo [_here_](https://www.example.com).

## Table of Contents

* [General Info](#general-information)
* [Technologies Used](#technologies-used)
* [Features](#features)
* [Screenshots](#screenshots)
* [Setup](#setup)
* [Usage](#usage)
* [Project Status](#project-status)
* [Model Training Summary](#model-training-summary)
* [Room for Improvement](#room-for-improvement)
* [Acknowledgements](#acknowledgements)
* [Contact](#contact)

## General Information

- This project aims to simplify the process of detecting and classifying objects in images using advanced machine learning techniques.
- It solves the problem of manual image classification by automating the process.
- The purpose of this project is to provide an easy-to-use tool for developers and researchers working with image data.

## Technologies Used

- Python - version 3.9
- TensorFlow - version 2.10
- OpenCV - version 4.5

## Features

List the ready features here:

- Object detection in real-time
- Classification of detected objects
- Support for multiple image formats

## Screenshots

![Example screenshot](./img/screenshot.png)

## Setup

- Install the required dependencies listed in `requirements.txt`.
- Clone the repository and navigate to the project directory.
- Run the following command to install dependencies:
```
pip install -r requirements.txt
```

## Usage

- To detect objects in an image, run the following command:
```
python detect.py --image path/to/image.jpg
```
- For real-time detection using a webcam:
```
python detect.py --webcam
```

## Project Status

Project is: _in progress_. Further improvements and optimizations are being worked on.

## Room for Improvement

Room for improvement:

- Enhance the accuracy of object detection.
- Add support for additional machine learning models.

To do:

- Implement a user-friendly GUI.
- Add functionality for batch image processing.

# Model Training Summary

## General Information
The model was trained using the YOLO framework with the following configuration:
- **Task**: Object Detection
- **Model**: YOLO (yolo11n.pt)
- **Dataset**: COCO8
- **Epochs**: 100
- **Batch Size**: 16
- **Image Size**: 640x640
- **Device**: MPS (Metal Performance Shaders)

## Training Results
The training process generated the following key results:
- **Final Model**: Saved as `last.pt` in the `weights/` directory.
- **Metrics**:
- **Precision**: Improved steadily, reaching a maximum of ~0.00367.
- **Recall**: Peaked at 0.66667 during early epochs.
- **mAP@50**: Reached a maximum of 0.28376.
- **mAP@50-95**: Reached a maximum of 0.13616.

## Loss Trends
- **Box Loss**: Decreased significantly over epochs, indicating better localization.
- **Classification Loss**: Reduced steadily, showing improved classification accuracy.
- **DFL Loss**: Gradually decreased, reflecting better distribution-focused learning.

## Visualizations
- **Confusion Matrices**: `confusion_matrix.png` and `confusion_matrix_normalized.png` provide insights into class-wise performance.
- **Curves**:
- `F1_curve.png`: Shows the F1-score progression.
- `P_curve.png`: Precision curve.
- `R_curve.png`: Recall curve.
- `PR_curve.png`: Precision-Recall curve.

## Training Batches
- Sample training images are available (`train_batch0.jpg`, `train_batch1.jpg`, etc.), showing the model's predictions during training.

## Validation Results
- Validation images (`val_batch0_labels.jpg`, `val_batch0_pred.jpg`) demonstrate the model's performance on unseen data.

## Observations
- The model shows steady improvement in metrics over epochs.
- The mAP values suggest room for improvement in detection accuracy.
- The training process was well-documented with visualizations and logs.

## Next Steps
- Fine-tune the model to improve mAP and precision.
- Experiment with different hyperparameters or augmentations.
- Test the model on real-world data to evaluate its generalization.

## Acknowledgements

### YOLO by Ultralytics

```bibtex
@misc{yolo2023,
author = {Jocher, Glenn and Chaurasia, Ayush and Qiu, Jing},
title = {YOLO by Ultralytics},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/ultralytics/yolov5}}
}
```

### PaddleOCR

```bibtex
@article{paddleocr2021,
author = {PaddleOCR Contributors},
title = {PaddleOCR: An Open-Source Optical Character Recognition Tool Based on PaddlePaddle},
year = {2021},
journal = {GitHub repository},
howpublished = {\url{https://github.com/PaddlePaddle/PaddleOCR}}
}
```

## Contact

Created by [@tristan](https://github.com/tristan296) - feel free to contact me!