A web-based tool that detects faces and license plates in images, then automatically blurs them for privacy protection.
A468 is a privacy-focused image processing web application. Upload any image, select which objects to detect, and the system will automatically locate and blur them — protecting identities and sensitive information.
Currently supported detection targets:
- Faces — detected using MTCNN + FaceNet (InceptionResNetV1 pretrained on VGGFace2)
- License Plates (in development) — detected using a custom InceptionResNetV2 model trained on annotated plate data
| Feature | Description |
|---|---|
| Face Detection & Blurring | Detects all faces in an image using MTCNN and applies elliptical Gaussian blur |
| License Plate Blurring | Detects and blurs number plates using a custom-trained TF/Keras model (WIP) |
| User Authentication | Register/login system with bcrypt-hashed passwords stored in SQLite |
| Image History | Per-user gallery of all previously processed images with timestamps and applied filters |
| GPU Acceleration | Automatically uses CUDA if available, falls back to CPU |
| Layer | Technology |
|---|---|
| Backend | Python, Flask |
| ML — Face Detection | PyTorch, facenet-pytorch (MTCNN + InceptionResNetV1) |
| ML — Plate Detection | TensorFlow/Keras, InceptionResNetV2 |
| Image Processing | OpenCV, NumPy, Pillow |
| Database | SQLite (via Python sqlite3) |
| Auth | bcrypt |
| Frontend | HTML, CSS (Jinja2 templates) |
A468/
├── main.py # Flask app — routes, auth, upload, view
├── mtcnn.py # FaceModel class — MTCNN detection + blur logic
├── facecnn.py # Standalone CNN trained on CIFAR-10 (experimental)
├── numplate_model.py # NumplateModel class — plate detection + blur logic
├── numplate-model.py # Alternate plate model script
├── numplate-train.py # Training script for the license plate model
├── requirements.txt # Python dependencies
├── static/
│ ├── A468.png # Logo (full)
│ ├── A468_flat.png # Logo (flat)
│ ├── style.css # Main stylesheet
│ ├── style_new.css # Updated stylesheet
│ └── img/ # Sample/test images
└── templates/
├── landing.html # Public landing page
├── login.html # Login page
├── register.html # Registration page
├── main.html # Upload & result page (authenticated)
└── view.html # Image history gallery
- Python 3.8+
- pip
- (Optional) NVIDIA GPU with CUDA for faster inference
-
Clone the repository
git clone https://github.com/XynoxTheDev/A468.git cd A468 -
Create and activate a virtual environment (recommended)
python -m venv venv source venv/bin/activate # Linux/macOS venv\Scripts\activate # Windows
-
Install dependencies
pip install -r requirements.txt
Note:
torch,torchvision, and NVIDIA CUDA packages are included inrequirements.txt. If you are on CPU only, you can replace the CUDA torch packages with the CPU-only build from pytorch.org. -
Run the application
python main.py
-
Open your browser and navigate to
http://localhost:5000
Create an account on the registration page. Passwords are hashed with bcrypt before storage.
From the main dashboard, upload any image and select which filters to apply:
- Check Face to detect and blur all faces in the image.
- (License plate blurring is in development)
The processed image is displayed immediately and saved to your personal history.
Navigate to the View page to browse all images you have previously processed, along with timestamps and the filters that were applied.
- MTCNN detects all face bounding boxes in the image.
- Each bounding box is expanded (2x) to include surrounding context.
- A Gaussian blur (
kernel=99x99, sigma=15) is applied to the face region. - An elliptical mask blends the blurred face naturally back into the original image.
- The image is resized to
224x224and normalized. - A fine-tuned InceptionResNetV2 model predicts bounding box coordinates.
- Coordinates are denormalized back to original image dimensions.
- The detected region is blurred using Gaussian blur and composited back.
The number plate model was trained on a custom annotated dataset:
- XML annotations parsed to extract bounding box labels
- InceptionResNetV2 (ImageNet pretrained) used as the base
- Custom regression head:
Flatten → Dense(500) → Dense(250) → Dense(4, sigmoid) - Trained for 180 epochs with MSE loss and Adam optimizer
- Saved as
numplate_detection.h5
| Setting | Location | Default |
|---|---|---|
| Flask secret key | main.py:14 |
'a468' |
| Database file | main.py:26 |
database.db (auto-created) |
| Server port | main.py:148 |
5000 |
| Debug mode | main.py:148 |
True |
Production note: Change the secret key and disable debug mode before deploying.
This project is licensed under the MIT License. See LICENSE for details.