A web-based photo editing application built with Django that allows users to upload images and apply a wide range of filters, adjustments, and AI-powered effects directly in the browser.
- Blur – Gaussian blur with adjustable radius
- Sharpen – Sharpness enhancement with adjustable intensity
- Brightness – Brighten or darken the image
- Contrast – Increase or decrease contrast
- Rotate – Rotate the image by any angle
- Crop – Interactively crop a region of the image
- Black & White
- Invert Colors
- Sepia
- Vintage
- Noir
- Polaroid
- Neon
- Watercolor
- Lomography
- Black & Gold
- Cool Tone
- Warm Tone
- Vibrant
- Red Highlight
- Face Detection – Detects and highlights faces using OpenCV's Haar Cascade classifier
- Portrait Mode – Blurs the background while keeping the subject sharp, powered by MediaPipe selfie segmentation
- Object Detection – Detects and labels objects in an image using YOLOv8 (Ultralytics)
| Layer | Technology |
|---|---|
| Backend | Django 5.1 |
| Image Processing | Pillow, OpenCV (cv2), NumPy |
| AI / ML | MediaPipe, Ultralytics YOLOv8 |
| Frontend | Bootstrap 5, HTML/CSS/JavaScript |
| Database | SQLite (default Django DB) |
SmartPhotoEditor/
├── manage.py
├── photoeditor/ # Django project configuration
│ ├── settings.py
│ ├── urls.py
│ ├── wsgi.py
│ └── asgi.py
└── editor/ # Main application
├── models.py # Photo model (original, edited, preview fields)
├── views.py # All image processing logic
├── forms.py # Photo upload form
├── urls.py # App URL routing
├── templates/
│ └── editor/
│ └── index.html # Single-page UI
└── migrations/
- Python 3.10+
- pip
-
Clone the repository
git clone https://github.com/Shammo07/SmartPhotoEditor.git cd SmartPhotoEditor -
Create and activate a virtual environment
python -m venv venv source venv/bin/activate -
Install dependencies
pip install -r requirements.txt
-
Apply migrations
python manage.py migrate
-
Run the development server
python manage.py runserver
-
Open in browser
http://127.0.0.1:8000/
Note: The YOLOv8 model (
yolov8n.pt) will be downloaded automatically on first use.
- Click Upload Image and select a photo from your device.
- Use the Apply Filter dropdown to choose an artistic filter or AI effect.
- Use the Adjustments section (blur, sharpen, brightness, contrast, rotate, crop) with the real-time preview slider to fine-tune your edits.
- Click Reset to Original at any time to undo all changes.
- Uploaded and processed images are stored in the
media/directory (uploads/,edited/,previews/sub-folders). - This project is configured for development only (
DEBUG = True). Do not deploy as-is to production. - The secret key in
settings.pyshould be changed and kept secret before any production deployment.