Welcome to my new project, HelmetAI.
HelmetAI is an intelligent system designed to monitor road users and detect riders without helmets. The system uses YOLOv8 for object detection and PaddleOCR for number plate recognition. It can detect four classes: rider, with helmet, without helmet, and number plate. When a rider without a helmet is detected, the system crops the corresponding number plate from the original image and performs OCR to retrieve the number plate text.
Getting Started Follow these steps to set up and run the HelmetAI project on your local machine.
Prerequisites
- Python 3.6 or higher
- pip (Python package installer) Installation
- Create a virtual environment (recommended):
python -m venv myenv
- Activate the virtual environment:
- On Windows:
myenv\Scripts\activate
- On Unix or macOS:
source myenv/bin/activate
- Install the required packages:
pip install -r requirements.txt
- Download the pre-trained YOLOv8 model weights (best.pt) for the custom dataset. You can find the model weights file here.
- Update the paths to the best.pt file in the project code.
- Running the Application
- Start the Django server:
python manage.py runserver
- Open your web browser and navigate to http://localhost:8000.
- Choose an image file containing riders and vehicles.
- The application will process the image, detect riders without helmets, and display the corresponding number plates. Output The application will display the processed image with bounding boxes around the detect#ed objects (riders, helmets, and number plates). For riders without helmets, the corresponding number plate text will be shown.
Contributing Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
License This project is licensed under the MIT License.
Acknowledgments:
- YOLOv8 for object detection
- PaddleOCR for optical character recognition
- https://www.kaggle.com/datasets/aneesarom/rider-with-helmet-without-helmet-number-plate