Skip to content

Conversation

@nikhilchhokar
Copy link

@nikhilchhokar nikhilchhokar commented Jan 23, 2026

Context

Supports DEEPLENSE2 proposal: Unsupervised Super-Resolution and Analysis of Real Lensing Images.

This PR establishes a reproducible baseline for super-resolution experiments on gravitational lensing images.

What Changed

New Files Added:

  • train_srcnn_minimal.py - Standalone SRCNN training script with:

    • Configurable CLI arguments (no hardcoded paths)
    • Dummy data fallback for testing without datasets
    • CPU/GPU mode selection
    • Model saving and visualization
  • README_baseline.md - Documentation covering:

    • Quick start guide
    • All command-line arguments
    • Architecture details
    • Example outputs

Key Features:

  1. Configurable execution: All parameters via command-line args
   python train_srcnn_minimal.py --epochs 10 --batch-size 16 --img-size 64
  1. Dummy data generation: Synthetic Einstein ring patterns for testing

    • No external dataset dependencies (dummy data mode for rapid testing)
    • Synthetic Einstein-ring–style gravitational lensing patterns (for baseline validation)
    • Configurable sample count and image size
  2. Cross-platform compatibility:

    • CPU-only mode for development
    • Windows/Linux compatible paths
    • No hardcoded directory assumptions

What This Enables

  • Reproducible SR experiments on any machine
  • Baseline for future sim → real super-resolution experiments as outlined in the DEEPLENSE2 proposal.
  • Foundation for adding real lensing datasets
  • Easy iteration on model architectures

What's NOT Done (Intentional)

This PR focuses on infrastructure, not model improvements:

  • Not using real lensing datasets yet
  • Not implementing advanced unsupervised techniques
  • Not optimizing hyperparameters
  • Not comparing multiple architectures

These will come in follow-up PRs aligned with DEEPLENSE2 tasks.

Testing

Basic execution:

python train_srcnn_minimal.py --epochs 5 --save-model

Expected output:

  • Training completes without errors
  • Loss decreases over epochs (0.108 → 0.009 in 5 epochs)
  • Model saved to outputs/srcnn_deeplense.pth
  • Visualization saved to outputs/srcnn_result.png

Verified on:

  • Windows 11, Python 3.13, PyTorch 2.10
  • CPU mode (CUDA optional)

Next Steps

Follow-up PRs will:

  1. Integrate real simulated lensing datasets
  2. Implement unsupervised SR techniques (autoencoders, self-supervised)
  3. Add sim-to-real gap analysis (DEEPLENSE2 task Push DeepLeense Regression Code #1)

Note: This PR does not modify existing DeepLense pipelines and is fully additive.

Screenshot 2026-01-23 060335

Qualitative comparison on synthetic Einstein-ring lensing images:
Left: Low-resolution input, Middle: SRCNN super-resolved output, Right: High-resolution target.

@nikhilchhokar nikhilchhokar changed the title Make baseline unsupervised SR pipeline runnable on fresh setup (DeepLense) Add runnable baseline SRCNN super-resolution pipeline for DeepLense Jan 23, 2026
nikhilchhokar pushed a commit to nikhilchhokar/DeepLense that referenced this pull request Jan 30, 2026
- Add SuperResolutionAutoencoder (U-Net architecture)
- Implement perceptual loss (reconstruction + gradient)
- Add PSNR and SSIM evaluation metrics
- Support real DeepLense Model I/II/III data loading
- Include comprehensive training script with CLI args
- Add full documentation

Addresses DEEPLENSE2 Task ML4SCI#1: unsupervised SR on simulated images.
Builds on PR ML4SCI#109 (baseline infrastructure).
Tested on Windows 11, PyTorch 2.10, Python 3.13.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant