How idkiro/dehazeformer works
Project type and purpose
• This is a research‐oriented deep learning codebase for single‐image dehazing using Vision Transformers (DehazeFormer).
• It provides end‐to‐end training, evaluation, and demo setups for different datasets (indoor, outdoor, RESIDE, RS‐Haze).
File structure
• Top‐level scripts:
• train.py – orchestrates the training loop (data loading → model → loss → optimizer → logging).
• test.py – runs evaluation/inference on a trained model.
• run.sh – convenience wrapper for common training/testing commands.
• configs/… – per‐dataset and per‐model JSON definitions of hyperparameters, paths, logging settings.
• datasets/loader.py – dataset abstraction layer that reads hazy/ground‐truth image pairs.
• models/dehazeformer.py – core Vision Transformer architecture and its variants (B, M, S, T).
• utils/ – supporting modules: common utilities (logging, checkpoint I/O), data_parallel wrapper for multi‐GPU training.
• save_models/ & data/ – expected runtime directory layout for model checkpoints and datasets (not in repo but described in README).
• requirements.txt, .gitignore, LICENSE, README.md – project metadata.
Extract additional insights from the README
• Core pipeline: load config → instantiate dataset and dataloader → build DehazeFormer variant → train with TensorBoard logging → save best checkpoints.
• Testing/inference loads a checkpoint, runs on test split, computes PSNR/SSIM.
• External services: Hugging Face demo for live inference, Google Drive/BaiduPan for downloading pretrained weights and datasets.
Diagramming conventions
• Components must be clearly labeled (e.g., “DehazeFormer Model”).
• Red or purple for external services (Google Drive, Hugging Face).
• Rectangles with rounded corners for code modules.