CoolFace
Apppublic

sawabedarain/Lumina-IQA

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
App README

πŸ–ΌοΈ 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. πŸš€