Patch Quality Scanner

A deep learning model that scans a camera image in small patches and gives each patch an overall quality score plus a severity score for five distortion families: geometry, color, light, contrast and focus.

Credit
7 points
Team
Up to 3 students
Partners
HIT and Samsung
Area
Computer vision, image quality

A research project for an industry customer. There is no ready recipe: the team defines the details of the method, reads the literature, tries ideas, measures, and learns from what does not work. The project requires independent work, proactive exploration and a lot of trial and error, with regular meetings with the supervisor and periodic meetings with the Samsung team.

Description

Students build a model that takes an image, cuts it into overlapping patches (for example 128×128 pixels), and returns for every patch a vector of six numbers. The result is a set of quality maps over the image: where it is sharp or blurry, where the color is off, where it is over or under exposed, where contrast is flat, and where the geometry is bent.

Input: an RGB image (smartphone photo, any resolution).

Output per patch: [quality, geometry, color, light, contrast, focus], each in 0 to 1, where 0 means no distortion of that family.

Output per image: six heat maps and an overall score pooled from the patches.

The model is trained and tested on three sources of data:

The five distortion families

FamilyDistortions to synthesizeExample implementations
GeometryBarrel and pincushion lens distortion, perspective tilt, local warping, rolling shutter skewcv2.initUndistortRectifyMap + cv2.remap, cv2.warpPerspective, kornia RandomFisheye, RandomPerspective, albumentations OpticalDistortion
ColorWhite balance shift, color cast, saturation change, color quantization, chromatic aberrationkornia RandomPlanckianJitter, RandomSaturation; ARNIQA color_shift, quantization; Unprocessing random_gains
LightUnder and over exposure, uneven illumination, vignetting, lens flareARNIQA brighten, darken; kornia RandomLinearCornerIllumination; albumentations Vignetting, LensFlare; Google flare dataset
ContrastLow and high contrast, gamma and tone curve changes, mean shiftkornia RandomGamma; ARNIQA non_linear_contrast_change, mean_shift; torchvision adjust_gamma
FocusDefocus (lens) blur, motion blur, Gaussian blurARNIQA lens_blur, motion_blur; imagecorruptions defocus_blur; kornia RandomMotionBlur

Hard part: geometry is not visible inside a flat, textureless patch. No public dataset labels geometric distortion, so students generate it themselves and should study how much image context the model needs (patch size, neighbor patches, straight line cues) to detect it.

Motivation

Camera teams test new sensors, lenses and image processing pipelines on thousands of photos. A single quality number per image does not say what went wrong or where. A per patch, per distortion map points engineers directly at the problem: soft corners from the lens, a color cast in shadows, clipped highlights in one region. The same model can serve as an automatic judge in regression tests, a filter for training data, and a feedback signal for tuning the camera pipeline.

Recent research is moving in the same direction (models that locate a distortion, name its type and rate its severity), which makes this a current topic with room for a publishable result.

Goals and deliverables

  1. A distortion synthesis library in Python: one function per distortion, each with a strength parameter mapped to a 0 to 1 severity, able to mix several distortions and apply them locally (to a region) as well as globally.
  2. A training set generated from clean images, with per patch labels.
  3. A multi-head model that outputs the six scores per patch, and a script that produces heat maps for a full image.
  4. An evaluation report: accuracy on synthetic test data, correlation with human scores on public datasets, and results on the proprietary Samsung dataset.
  5. Optional: an on-device version (ONNX or TFLite) with measured run time on a phone.

Suggested approach

What students will need

A map of the concepts, methods and tools this project touches. Students are not expected to know all of it at the start; the first weeks are for learning the essentials.

Concepts

Algorithms and techniques

Models

Evaluation

  • SRCC and PLCC (rank and linear correlation)
  • MAE of predicted severity
  • Type classification accuracy, confusion matrix
  • Cross-dataset generalization tests
  • Run time and model size on device

Tools and frameworks

Datasets

Synthetic distortions with type labels

DatasetContentLabelsUse here
KADID-10k81 reference, 10,125 distorted; 25 types × 5 levelsDMOS, distortion type and levelMain human-labeled set; its type groups match four of the five families
KADIS-700k140k reference, 700k distorted; MATLAB codeDistortion type and parameters (no MOS)Large scale pretraining for type and severity
TID201325 reference, 3,000 distorted; 24 types × 5 levelsMOSContrast, saturation, color quantization, chromatic aberration
PIPAL250 reference, ~29k distorted; 40 typesElo scores from pairwise votesIncludes spatial warping and restoration artifacts
LIVE IQA, CSIQClassic small sets (blur, noise, compression, contrast)DMOSStandard baselines
Diag-Bench (2026)~21k samples; 12 types × 5 levelsRegion box + type + severityClosest match to per-region output; release announced

Patch-level and smartphone photos

DatasetContentLabelsUse here
PaQ-2-PiQ (LIVE-FB)~40k images, ~120k patchesMOS per image and per patchThe only large human patch-score set
SPAQ11,125 photos from 66 smartphonesMOS + brightness, colorfulness, contrast, noisiness, sharpness + EXIFReal-world test for light, color, contrast, focus heads
KonIQ-10k10,073 imagesMOS + brightness, colorfulness, contrast, sharpnessLarge in-the-wild set with attributes
KonIQ++Same imagesDefect scores: blur, artifacts, color, contrastReal defect-type labels
LIVE Challenge1,162 mobile photosMOSStandard in-the-wild test set
SQAD3,017 images from 29 phonesLab measurements + quality attributesSmartphone camera benchmarking

Focus, exposure, and clean source images

DatasetContentUse here
DPDD500 scenes with real defocus and all-in-focus pairsReal defocus test data
CUHK blur detection1,000 images with hand-drawn blur masksTests whether focus maps find the blurred regions
Afifi exposure setFiveK RAW photos rendered at several exposuresReal exposure errors
DIV2K, LSDIR1,000 and ~85,000 high-quality imagesClean source images for synthesis
Waterloo Exploration4,744 clean imagesClean source pool
Google flare set5,001 flare-only images (CC BY 4.0)Realistic lens flare overlays

Libraries for creating distortions

LibraryFamiliesStatus and license
korniaAll five, differentiable, runs on GPUApache-2.0 active
ARNIQA distortionsPython port of KADID distortions (focus, color, light, contrast)Apache-2.0
OpenCVGeometry: lens distortion, perspective, remapApache-2.0 active
torchvision v2Geometry, color, contrast, blurBSD active
imagecorruptionsImageNet-C corruptions: blur, brightness, contrast, saturationApache-2.0
BSRGAN degradationsRealistic blur, noise and compression chainsApache-2.0
UnprocessingColor via a simple camera pipeline model (white balance and color matrix)research code
albumentations / AlbumentationsXAll five, very richoriginal archived 2025; successor AGPL or commercial
pyiqaReady IQA models and metrics for baselinesnon-commercial license
imgaugAll fiveunmaintained since 2020

License check: several datasets are "research only" and some libraries have non-commercial or copyleft licenses. Agree with Samsung early which ones may be used.

Relevant papers

Patch-based quality

  1. Kang, Ye, Li, Doermann. Convolutional Neural Networks for No-Reference Image Quality Assessment. CVPR 2014. First patch-input CNN for IQA.
  2. Bosse et al. Deep Neural Networks for No-Reference and Full-Reference Image Quality Assessment (WaDIQaM). IEEE TIP 2018. Weighted pooling of patch scores.
  3. Ying et al. From Patches to Pictures (PaQ-2-PiQ). CVPR 2020. Human patch scores and local quality maps.

No-reference quality models

  1. Su et al. HyperIQA: Blindly Assess Image Quality in the Wild. CVPR 2020.
  2. Zhang et al. DBCNN: Blind IQA Using a Deep Bilinear CNN. Pretrained on distortion type and level.
  3. Ke et al. MUSIQ: Multi-scale Image Quality Transformer. ICCV 2021.
  4. Yang et al. MANIQA. Multi-dimension attention for IQA.
  5. Madhusudana et al. CONTRIQUE: Image Quality Assessment using Contrastive Learning. IEEE TIP 2022.
  6. Saha et al. Re-IQA. CVPR 2023.
  7. Agnolucci et al. ARNIQA: Learning Distortion Manifold for Image Quality Assessment. WACV 2024. Reusable distortion code.
  8. Chen et al. TOPIQ: A Top-down Approach from Semantics to Distortions.
  9. Zhang et al. LIQE: Blind IQA via Vision-Language Correspondence, a Multitask Approach. CVPR 2023. Joint quality, scene and distortion type.
  10. Wang et al. CLIP-IQA: Exploring CLIP for Assessing the Look and Feel of Images. AAAI 2023.
  11. Wu et al. Q-Align. ICML 2024. Large multimodal model as quality judge.
  12. You et al. DepictQA: Depicting Beyond Scores. ECCV 2024.
  13. Li et al. Q-Insight. NeurIPS 2025. Reinforcement learning with score and degradation labels.

Distortion type and severity

  1. Moorthy, Bovik. DIIVINE: Blind Image Quality Assessment, From Natural Scene Statistics to Perceptual Quality. IEEE TIP 2011. Identify the distortion first, then score it.
  2. Zhai et al. PrISM-IQA. arXiv 2026. Severity level for 53 ISP-related smartphone issues.
  3. Zhang et al. From Glance to Scrutiny (GS-IQA). arXiv 2026. Locate, classify and rate each distortion; introduces Diag-Bench.
  4. Nguyen. A Distortion Aware Image Quality Assessment Model. WACV Workshops 2025.
  5. Kim et al. pMOS: per-pixel quality prediction. arXiv 2022.

Datasets and robustness

  1. Lin, Hosu, Saupe. KADID-10k: A Large-scale Artificially Distorted IQA Database. QoMEX 2019.
  2. Fang et al. Perceptual Quality Assessment of Smartphone Photography (SPAQ). CVPR 2020.
  3. Hendrycks, Dietterich. Benchmarking Neural Network Robustness to Common Corruptions and Perturbations (ImageNet-C). ICLR 2019.
  4. Brooks et al. Unprocessing Images for Learned Raw Denoising. CVPR 2019. Camera-pipeline-aware color distortions.

Prerequisites