Skip to content

Repository files navigation

Blind Face Super-Resolution using MSRResNet

A lightweight blind face super-resolution model developed for the AI6126 Advanced Computer Vision Blind Face Super-Resolution Challenge.

🔍 Sample Results

Low-Quality Input Super-Resolved Output

Low-quality Input Image (left) and Super-resolved Output generated by the MSRResNet model (right).

📖 Overview

Blind Face Super-Resolution (BFSR) aims to reconstruct high-quality face images from degraded low-quality inputs without prior knowledge of the degradation process. This project implements an MSRResNet-based super-resolution model trained from scratch using the BasicSR framework and the FFHQ dataset.

The model adheres to the challenge constraints, including parameter limits, no use of external pre-trained weights, and a fixed second-order degradation pipeline.

🧠 Model Architecture

The proposed solution uses MSRResNet, a lightweight super-resolution network derived from SRResNet.

Key Features

  • 26 Residual Blocks without Batch Normalisation
  • PixelShuffle-based 4× upsampling
  • ReLU and LeakyReLU activations
  • Trained entirely from scratch
  • Approximately 2.26 million trainable parameters
  • Built using the BasicSR framework

📊 Results

Metric Score
Validation PSNR 25.4661 dB
Hidden Test PSNR 26.6135 dB

📈 Training Curves

Training Loss

Training Loss Curve

Validation PSNR

Validation PSNR Curve

📂 Repository Structure

.
├── checkpoints/
│   ├── net_g_latest.pth
│   └── 150000.state
├── results/
│   └── test_results/
├── test/
├── basicsr/
├── ACV_Project_2_Code.ipynb
├── evaluate.py
├── infer.py
├── loss_curve.py
├── psnr_curve.py
├── psnr_curve.png
├── Training Curve.png
├── Training Output Log.txt
├── train_SRResNet_x4_FFHQ_300k.yml
├── requirements.txt
└── README.md

🚀 Usage

Installation

Install the required dependencies:

pip install -r requirements.txt

Inference

Generate super-resolved face images:

python infer.py

Generated outputs will be saved in:

results/test_results/

Evaluation

Compute PSNR on generated outputs:

python evaluate.py

🏋️ Training

The model was trained using the BasicSR framework with the configuration file:

train_SRResNet_x4_FFHQ_300k.yml

Training Configuration

  • Framework: BasicSR
  • GPU: NVIDIA A100 (40 GB)
  • Training Duration: ~23.6 hours
  • Epochs: 600
  • Batch Size: 24
  • Optimizer: Adam
  • Learning Rate: 1e-4
  • Scheduler: Cosine Annealing with Warm Restarts
  • Loss Function: Mean Squared Error (MSE)

Training was performed from scratch without the use of external pre-trained weights, in accordance with the challenge requirements.

📦 Third-Party Libraries

  • PyTorch
  • TorchVision
  • NumPy
  • OpenCV
  • Matplotlib
  • Pandas
  • PyYAML
  • tqdm
  • BasicSR

📚 Acknowledgements

This project builds upon the BasicSR framework:

https://github.com/XPixelGroup/BasicSR

👩‍💻 Author

Anamika Martin Kolady

M.Sc. Artificial Intelligence, Nanyang Technological University (NTU)

⚠️ Academic Integrity Notice

This repository is shared for educational, research, and portfolio purposes. Students may use it as a reference to understand the concepts, methodology, and implementation details presented.

Any use of material from this repository should be appropriately cited in accordance with the academic integrity policies of your institution. Copying or submitting any part of this work as your own may constitute academic misconduct.

The author does not grant permission for plagiarism or unauthorized academic submissions and assumes no responsibility for any misuse of the contents of this repository.

About

Lightweight MSRResNet-based blind face super-resolution model trained on FFHQ using the BasicSR framework.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages