Spaces:
Paused
Paused
Delete README.md
Browse files
README.md
DELETED
|
@@ -1,102 +0,0 @@
|
|
| 1 |
-
# SafeLicensing
|
| 2 |
-
|
| 3 |
-
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.
|
| 4 |
-
|
| 5 |
-
>[!TIP]
|
| 6 |
-
> You can directly test the application on the web using the following link: [](https://share.streamlit.io/fahimfba/safelicensing/main/app.py)
|
| 7 |
-
|
| 8 |
-
## Features
|
| 9 |
-
|
| 10 |
-
- **License Plate Detection**: Uses the YOLOv8 model to detect license plates in uploaded images.
|
| 11 |
-
- **Chaotic Encryption**: Encrypts the detected license plate regions using a two-layer XOR-based chaotic logistic map algorithm.
|
| 12 |
-
- **Streamlit Web App**: A simple interface to upload images, detect license plates, encrypt them, and download the results.
|
| 13 |
-
|
| 14 |
-
## Installation
|
| 15 |
-
|
| 16 |
-
1. Clone the repository:
|
| 17 |
-
```bash
|
| 18 |
-
git clone https://github.com/FahimFBA/SafeLicensing.git
|
| 19 |
-
cd SafeLicensing
|
| 20 |
-
```
|
| 21 |
-
|
| 22 |
-
2. Install `ffmpeg` for video processing (Linux):
|
| 23 |
-
```bash
|
| 24 |
-
sudo apt-get install ffmpeg
|
| 25 |
-
```
|
| 26 |
-
|
| 27 |
-
or, for macOS:
|
| 28 |
-
```bash
|
| 29 |
-
brew install ffmpeg
|
| 30 |
-
```
|
| 31 |
-
|
| 32 |
-
3. Install the required dependencies:
|
| 33 |
-
```bash
|
| 34 |
-
pip install -r requirements.txt
|
| 35 |
-
```
|
| 36 |
-
|
| 37 |
-
4. 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](https://github.com/IsratIJK/SEncrypt) located in [best.pt](./best.pt) file.
|
| 38 |
-
|
| 39 |
-
## Usage
|
| 40 |
-
|
| 41 |
-
1. Run the Streamlit app:
|
| 42 |
-
```bash
|
| 43 |
-
streamlit run app.py
|
| 44 |
-
```
|
| 45 |
-
|
| 46 |
-
2. Open the app in your browser (typically at `http://localhost:8501`).
|
| 47 |
-
|
| 48 |
-
3. Follow the steps:
|
| 49 |
-
- Upload an image or provide a URL.
|
| 50 |
-
- Adjust the encryption key seed using the slider.
|
| 51 |
-
- Click the "Detect & Encrypt" button to process the image.
|
| 52 |
-
|
| 53 |
-
4. Download the encrypted image directly from the app.
|
| 54 |
-
|
| 55 |
-
## Workflow
|
| 56 |
-
|
| 57 |
-
1. **License Plate Detection**:
|
| 58 |
-
- The YOLOv8 model is used to detect license plates in the input image. The model has been taken from [SEncrypt](https://github.com/IsratIJK/SEncrypt).
|
| 59 |
-
- Detected regions are highlighted with bounding boxes.
|
| 60 |
-
|
| 61 |
-
2. **Chaotic Logistic Map Encryption**:
|
| 62 |
-
- A chaotic logistic map generates two XOR-based encryption keys.
|
| 63 |
-
- Pixels in the license plate regions are shuffled and encrypted in two stages.
|
| 64 |
-
- The encrypted region replaces the original plate in the image.
|
| 65 |
-
|
| 66 |
-
3. **Visualization and Download**:
|
| 67 |
-
- The original, detected, and encrypted images are displayed in the app.
|
| 68 |
-
- Encrypted images can be downloaded as PNG files.
|
| 69 |
-
|
| 70 |
-
## Files
|
| 71 |
-
|
| 72 |
-
- `app.py`: The main Streamlit app file.
|
| 73 |
-
- `requirements.txt`: Python dependencies for the project.
|
| 74 |
-
- `best.pt`: YOLOv8 weights file (not included, add your own).
|
| 75 |
-
|
| 76 |
-
## Key Parameters
|
| 77 |
-
|
| 78 |
-
- **Encryption Key Seed**: A slider in the app adjusts the seed value for the chaotic logistic map, affecting the encryption's randomness.
|
| 79 |
-
|
| 80 |
-
## Example Screenshots
|
| 81 |
-
|
| 82 |
-
### Original Image
|
| 83 |
-
|
| 84 |
-

|
| 85 |
-
|
| 86 |
-
### Encrypted Image
|
| 87 |
-
|
| 88 |
-

|
| 89 |
-
|
| 90 |
-
## License
|
| 91 |
-
|
| 92 |
-
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.
|
| 93 |
-
|
| 94 |
-
## Contact
|
| 95 |
-
|
| 96 |
-
For any queries, feel free to reach out:
|
| 97 |
-
|
| 98 |
-
- **Author**: Md. Fahim Bin Amin
|
| 99 |
-
- **GitHub**: [FahimFBA](https://github.com/FahimFBA)
|
| 100 |
-
|
| 101 |
-
- **Other Authors**: [Rafid Mehda](https://github.com/rafid29mehda), [Israt Jahan Khan](https://github.com/IsratIJK)
|
| 102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|