HiPredict_Diffusion / README.md
syding9's picture
Simplify model card
67d5851 verified
|
Raw History Blame Contribute Delete
1.77 kB
---
pipeline_tag: image-to-image
tags:
- pytorch
- hirise
- mars
- remote-sensing
- flow-matching
---
# HiPredict Diffusion
Bidirectional conditional flow-matching checkpoints for reconstructing HiRISE RED4 from IR10, or IR10 from RED4. Use these checkpoints with the [HiPredict Python package](https://github.com/EricKing22/HiPredict).
## Checkpoints
| File | Model | Training steps | Gradient-loss weight |
| --- | --- | --- | --- |
| `FM_Condition/latest.pt` | BidirectionalFM, Condition mode | 100,000 | 0.0 |
| `FM_Condition_gradient/latest.pt` | BidirectionalFM, Condition mode | 100,000 | 0.1 |
| `brightness/model.pt` | Auxiliary RED3 boundary-residual brightness head | — | — |
Choose either FM checkpoint as the main model. Both support `ir2red` and `red2ir`. The brightness head is optional: the default boundary-based correction does not need it.
Both main checkpoints include model weights, EMA weights, optimizer state, learning-rate scheduler state, and model/training settings. Each file is approximately 2.05 GB. The brightness head is approximately 32 KB.
## Installation
Use a HiPredict checkout containing `hipredict.diffusion` and install its diffusion dependencies from the checkout root:
```bash
pip install ".[diffusion]"
```
For evaluation with HiPredict's shared metrics, install `.[diffusion,postprocess]` instead.
## Download and load
```python
from huggingface_hub import hf_hub_download
from hipredict.diffusion import load_checkpoint
checkpoint = hf_hub_download(
repo_id="syding9/HiPredict_Diffusion",
filename="FM_Condition/latest.pt",
)
model, model_config, training_config, step = load_checkpoint(
checkpoint, device="cuda"
)
```
Select `FM_Condition_gradient/latest.pt` for the gradient-loss model.