sawabedarain/Lumina-IQA
πΌοΈ Image Quality Assessment β Deep Learning Pipeline
<p align="center"> <img src="assets\banner.jpeg" alt="Image Quality Assessment Banner" width="800"/> </p>
<p align="center"> <a href="https://fastapi.tiangolo.com/"><img src="https://img.shields.io/badge/API-FastAPI-009688?logo=fastapi" /></a> <a href="https://pytorch.org/"><img src="https://img.shields.io/badge/Framework-PyTorch-EE4C2C?logo=pytorch" /></a> <a href="https://www.docker.com/"><img src="https://img.shields.io/badge/Container-Docker-2496ED?logo=docker" /></a> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg" /></a> </p>
A full-stack project for No-Reference Image Quality Assessment (NR-IQA). Built with Python, PyTorch, FastAPI & Docker, this pipeline takes raw images, runs a trained deep-learning model, and predicts a quality score without needing the original reference image.
π Table of Contents
π About
Real-world images often suffer from compression, blur, noise, or artifacts. Traditional IQA metrics (PSNR, SSIM) need a βperfectβ reference image β which we rarely have. This project implements deep learning NR-IQA to:
- Predict perceptual quality from any image
- Enable automated QA in photo platforms, streaming, and dataset filtering
Dataset used: [KonIQ-10k](http://database.mmsp-kn.de/koniq-10k-database.html) (10,000 diverse images, 512Γ384 px)
β¨ Features
- π FastAPI REST endpoint for real-time scoring
- π§ PyTorch model with configurable backbone
- π¨ Modern UI for uploading images & visualizing scores
- π¦ Docker-ready for clean deployment
- βοΈ Render-friendly: automatic builds & deploys
- π Hooks for model retraining & logging
π₯οΈ UI Preview
<p align="center"> <img src="static\ui_preview.png" alt="UI Preview" width="700"/> </p>
The /ui endpoint serves a clean, user-friendly web interface for image uploads & quality scoring.
π Project Structure
ImageQualityAssessment/ β βββ artifacts/ # Saved models (model.pth etc.) βββ data/ # (ignored by git) dataset / images βββ src/ β βββ model.py # PyTorch model & loading utilities β βββ inference_api.py # FastAPI app exposing /predict + UI β βββ utils.py # Preprocessing & helpers β βββ static/ # HTML, CSS, JS for UI β βββ index.html β βββ requirements.txt # Python dependencies βββ Dockerfile # Build instructions for Docker βββ .dockerignore # Ignore unnecessary files for container βββ .gitignore # Ignore venv, data, logs etc. βββ README.md # Youβre reading it βββ LICENSE
βοΈ Installation
1. Clone the repo
<pre> ``bash git clone https://github.com/DarainHyder/Image_Quality_Assessment.git` </pre> <pre> `bash cd Image_Quality_Assessment `` </pre>
2. Create & activate virtualenv (optional but clean)
<pre> ``bash python -m venv venv ` </pre> <pre> `bash source venv/bin/activate # (Windows: venv\Scripts\activate) `` </pre>
3. Install dependencies
<pre> ``bash pip install -r requirements.txt ` </pre> π Usage Run API locally <pre> `bash uvicorn src.inference_api:app --host 0.0.0.0 --port 8000 --reload `` </pre>
API Docs β http://127.0.0.1:8000/docs
UI Page β http://127.0.0.1:8000/ui
π³ Docker Deployment
Build Docker image
docker build -t image-quality-assessment .
Run container
<pre> ``bash docker run -d -p 8000:8000 image-quality-assessment `` </pre> Visit:
API Docs β http://localhost:8000/docs
UI Page β http://localhost:8000/ui
π Tech Stack
Python 3.11
PyTorch β Deep learning framework
FastAPI β High-performance web API
Uvicorn β ASGI server
Docker β Containerization & cloud deployment
HTML/CSS β Custom UI frontend
π License
MIT β feel free to fork & remix. If you use this repo, star β it and tag me β love seeing real-world uses!
Clean code, reproducible pipelines, and a Docker-first mindset β ship models like products. π
