This project demonstrates a pipeline for detecting license plates in images using YOLOv8 and encrypting the detected regions with a Chaotic Logistic Map encryption algorithm. It provides a user-friendly interface built with Streamlit.
- License Plate Detection: Uses the YOLOv8 model to detect license plates in uploaded images.
- Chaotic Encryption: Encrypts the detected license plate regions using a two-layer XOR-based chaotic logistic map algorithm.
- Streamlit Web App: A simple interface to upload images, detect license plates, encrypt them, and download the results.
-
Clone the repository:
git clone https://github.com/FahimFBA/SafeLicensing.git cd SafeLicensing
-
Install
ffmpeg
for video processing (Linux):sudo apt-get install ffmpeg
or, for macOS:
brew install ffmpeg
-
Install the required dependencies:
pip install -r requirements.txt
-
Download the YOLOv8 weights file (
best.pt
) and place it in the root directory of the project. You can train your own model or use a pre-trained one. This repository already have our model from SEncrypt located in best.pt file.
-
Run the Streamlit app:
streamlit run app.py
-
Open the app in your browser (typically at
http://localhost:8501
). -
Follow the steps:
- Upload an image or provide a URL.
- Adjust the encryption key seed using the slider.
- Click the "Detect & Encrypt" button to process the image.
-
Download the encrypted image directly from the app.
-
License Plate Detection:
- The YOLOv8 model is used to detect license plates in the input image. The model has been taken from SEncrypt.
- Detected regions are highlighted with bounding boxes.
-
Chaotic Logistic Map Encryption:
- A chaotic logistic map generates two XOR-based encryption keys.
- Pixels in the license plate regions are shuffled and encrypted in two stages.
- The encrypted region replaces the original plate in the image.
-
Visualization and Download:
- The original, detected, and encrypted images are displayed in the app.
- Encrypted images can be downloaded as PNG files.
app.py
: The main Streamlit app file.requirements.txt
: Python dependencies for the project.best.pt
: YOLOv8 weights file (not included, add your own).
- Encryption Key Seed: A slider in the app adjusts the seed value for the chaotic logistic map, affecting the encryption's randomness.
This project is licensed under the MIT License. See the LICENSE file for more details.
For any queries, feel free to reach out:
-
Author: Md. Fahim Bin Amin
-
GitHub: FahimFBA
-
Other Authors: Rafid Mehda, Israt Jahan Khan