Metadata-Version: 2.4
Name: srforge
Version: 0.8.0
Summary: Super‑resolution research framework for PyTorch with a focus on simplicity and flexibility using config files.
Author-email: Tomasz Tarasiewicz <tomasz.tarasiewicz@polsl.pl>
Project-URL: Homepage, https://gitlab.com/tarasiewicztomasz/sr-forge
Project-URL: Source, https://gitlab.com/tarasiewicztomasz/sr-forge/-/tree/main
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: torch>=2.7
Requires-Dist: torchvision>=0.22
Requires-Dist: torchaudio>=2.7
Requires-Dist: torchmetrics>=1.7
Requires-Dist: hydra-core>=1.3
Requires-Dist: einops>=0.8
Requires-Dist: wandb>=0.21
Requires-Dist: matplotlib>=3.10
Requires-Dist: scikit-image>=0.25
Requires-Dist: opencv-python>=4.12
Requires-Dist: pandas>=2.3
Requires-Dist: colorlog>=6.9
Requires-Dist: exifread==3.0.0
Requires-Dist: tomli
Requires-Dist: openpyxl
Requires-Dist: lpips
Provides-Extra: graph
Requires-Dist: torch-geometric>=2.6; extra == "graph"
Requires-Dist: pyg-lib>=0.4; extra == "graph"
Requires-Dist: torch-scatter>=2.1; extra == "graph"
Requires-Dist: torch-sparse>=0.6; extra == "graph"
Requires-Dist: torch-cluster>=1.6; extra == "graph"
Requires-Dist: torch-spline-conv>=1.2; extra == "graph"
Provides-Extra: dev
Requires-Dist: pytest>=9.0; extra == "dev"
Requires-Dist: mkdocs>=1.6; extra == "dev"
Requires-Dist: mkdocs-material>=9.5; extra == "dev"
Requires-Dist: mkdocstrings[python]>=0.27; extra == "dev"

# SR FORGE
**Super-Resolution Framework for Oriented Restoration and Guided Enhancement**

---

SR FORGE (**S**uper-**R**esolution **F**ramework for **O**riented **R**estoration & **G**uided **E**nhancement) is a unified, modular, and task-driven framework for training and evaluating deep learning models in the field of super-resolution.

## Key Features

- **Structured Workflow**  
  SR FORGE provides an **organized** approach to super resolution. Every step—from data loading to final evaluation—follows a clear, modular structure.

- **Task-driven restoration**  
  Built-in utilities to help fine-tune models for specific tasks or objectives (e.g., OCR, remote sensing, medical imaging, etc.).

- **Config-Driven Experiments**  
  Simple YAML/JSON configuration files let you customize your pipeline without modifying code directly.

- **Flexible Model Plug-In**  
  Includes SISR baselines (FSRCNN, DSen2) and MISR models (RAMS, TR-MISR, MagNAt), plus a registry for custom architectures.

- **Unified Metrics**  
  Evaluate your models with a suite of standard metrics (PSNR, SSIM, LPIPS) and straightforward logging.

- **Visualization Tools**  
  Quickly visualize results (side-by-side comparisons, zoom-ins, or overlays) for interpretability and debugging.

## Installation

1. **Clone the Repository**
   ```bash
   git clone https://github.com/your-username/sr-forge.git
   cd sr-forge
   ```

2. **Install**
   ```bash
   pip install -e .
   ```

## Testing

SR FORGE uses **pytest** (industry standard for Python) for unit tests. Tests run to completion and provide a summary of passes/failures by default (similar to GoogleTest in C++).

### Run transform tests
```bash
python -m pytest -q tests/transform/test_entry_transforms.py
```

### Run dataset tests
```bash
python -m pytest -q tests/dataset
```

### Run model tests
```bash
python -m pytest -q tests/models
```

### Useful pytest configurations
- **Verbose per-test output**
  ```bash
  python -m pytest -v
  ```
- **Full summary of passes/failures**
  ```bash
  python -m pytest -rA
  ```
- **Never stop early**
  ```bash
  python -m pytest --maxfail=0
  ```
- **Common "gtest-like" summary**
  ```bash
  python -m pytest -v -rA --maxfail=0
  ```

### Optional dependencies and skips
Some tests require optional dependencies (e.g., `torch_geometric`). These tests are automatically skipped if the dependency is missing, and pytest will report them as **skipped** in the summary.

