CoolFace
Modelpublic

pika-2026/nppe3_final_best_model

sourceHugging Faceupdated 18d agoView on Hugging Face
0likes20downloads
Model Card

Workflow

  1. 1.Setup — loaded PyTorch, set random seed (19), selected device (cuda/cpu).
  1. 1.Data — competition dataset with paired low-res/high-res images:
  2. 2.train/train (LR) + train/gt (HR)
  3. 3.val/val (LR) + val/gt (HR)
  4. 4.test (LR only, for submission)
  1. 1.EDA — checked LR/HR image sizes and scale factor, visualized a few sample pairs.
  1. 1.Dataset/Dataloader — built LR-HR file pairs, created a Dataset that randomly crops HR patches (256x256) with the matching LR patch, applies random flip/rotation augmentation, and returns normalized tensors. Used a validation subset (every 4th pair) to speed up per-epoch evaluation.
  1. 1.Model — RRDBNet architecture (23 RRDB blocks, 64 features, growth channel 32, 4x upscaling), matching the Real-ESRGAN design. Initialized from the official pretrained weights (RealESRGAN_x4plus.pth) before fine-tuning.
  1. 1.Training — L1 loss, Adam optimizer, mixed-precision (torch.amp), EMA of model weights (decay 0.999). Ran epochs in a time-budgeted loop: timed the first few ("warmup") epochs to estimate how many epochs fit in the time budget, then used a cosine annealing LR schedule for the remaining planned epochs. Saved the EMA model's weights to best_model.pth whenever validation PSNR improved.
  1. 1.Inference — reloaded the best checkpoint, ran tiled super-resolution on the val set (PSNR check) and the test set, with optional test-time self-ensemble (flips/ rotations averaged).
  1. 1.Submission — converted predicted test images into the competition's flattened pixel-value CSV format matching sample_submission.csv.

Files in this repo

  • —best_model.pth — trained weights (state_dict)
  • —config.json — architecture hyperparameters used to build the model