Add LPIFM VIFB baseline checkpoint and model card
Browse files- README.md +98 -0
- inference_config.yaml +16 -0
- lpifm_vifb_baseline_v1.pt +3 -0
README.md
CHANGED
|
@@ -1,3 +1,101 @@
|
|
| 1 |
---
|
| 2 |
license: cc-by-nc-sa-4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: cc-by-nc-sa-4.0
|
| 3 |
+
library_name: pytorch
|
| 4 |
+
tags:
|
| 5 |
+
- image-fusion
|
| 6 |
+
- infrared-visible
|
| 7 |
+
- perceptual-quality
|
| 8 |
+
- pairwise-preference
|
| 9 |
+
- bradley-terry
|
| 10 |
+
pipeline_tag: image-classification
|
| 11 |
---
|
| 12 |
+
|
| 13 |
+
# LPIFM — Learned Perceptual Image Fusion Measure
|
| 14 |
+
|
| 15 |
+
Pairwise perceptual preference model for **infrared–visible image fusion (IVIF)** ranking.
|
| 16 |
+
|
| 17 |
+
Given an IR source, a VI source, and two fused candidates, LPIFM predicts **A better**, **B better**, or **Tie**. Pairwise decisions can be aggregated with tie-aware Bradley–Terry (T-BT) to rank a method pool.
|
| 18 |
+
|
| 19 |
+
Code and examples: [github.com/HaoranLiu507/LPIFM](https://github.com/HaoranLiu507/LPIFM)
|
| 20 |
+
|
| 21 |
+
## Files
|
| 22 |
+
|
| 23 |
+
| File | Role |
|
| 24 |
+
| --- | --- |
|
| 25 |
+
| `lpifm_vifb_baseline_v1.pt` | Main VIFB-trained public checkpoint |
|
| 26 |
+
| `inference_config.yaml` | Decode defaults (`t`, `T_cal`, image size) |
|
| 27 |
+
|
| 28 |
+
EVAFusion fine-tuned weights are **not** hosted here; see the Zenodo companion archive when published.
|
| 29 |
+
|
| 30 |
+
## Architecture
|
| 31 |
+
|
| 32 |
+
- Backbone: **ConvNeXt-V2** (`convnextv2_base.fcmae_ft_in22k_in1k_384` via `timm`)
|
| 33 |
+
- Input size: **384 × 384**
|
| 34 |
+
- Task: source-conditioned pairwise preference scoring (ternary A / B / Tie)
|
| 35 |
+
|
| 36 |
+
## Decode / inference defaults
|
| 37 |
+
|
| 38 |
+
| Parameter | Value |
|
| 39 |
+
| --- | --- |
|
| 40 |
+
| Tie threshold `t` | `0.3` |
|
| 41 |
+
| Calibration temperature `T_cal` | `1.0` |
|
| 42 |
+
| Image size | `384` |
|
| 43 |
+
|
| 44 |
+
```text
|
| 45 |
+
d_cal = d / T_cal
|
| 46 |
+
d_cal > 0.3 → A better (0)
|
| 47 |
+
d_cal < -0.3 → B better (1)
|
| 48 |
+
otherwise → Tie (2)
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
## Quick start
|
| 52 |
+
|
| 53 |
+
```bash
|
| 54 |
+
# from the GitHub repository
|
| 55 |
+
python scripts/download_assets.py --source hf
|
| 56 |
+
python predict.py \
|
| 57 |
+
--config configs/release_inference.yaml \
|
| 58 |
+
--dataset_root Dataset/VIFB \
|
| 59 |
+
--ckpt checkpoints/lpifm_vifb_baseline_v1.pt \
|
| 60 |
+
--image_name carLight.jpg \
|
| 61 |
+
--a_dir U2Fusion \
|
| 62 |
+
--b_dir SeAFusion
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
Or download this file directly:
|
| 66 |
+
|
| 67 |
+
```bash
|
| 68 |
+
huggingface-cli download FengShaner/LPIFM lpifm_vifb_baseline_v1.pt \
|
| 69 |
+
--local-dir checkpoints
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
## Intended use
|
| 73 |
+
|
| 74 |
+
- Pairwise **perceptual preference** for **IVIF method ranking**
|
| 75 |
+
- Research / offline evaluation under the LPIFM protocol
|
| 76 |
+
- Not a general-purpose IQA model for arbitrary natural-image aesthetics
|
| 77 |
+
|
| 78 |
+
## Limitations
|
| 79 |
+
|
| 80 |
+
- Trained and validated under a specific preference-collection and ranking protocol
|
| 81 |
+
- Protocol mismatch (new dataset, different rater instructions, different method pools) may reduce agreement; fine-tuning may be required
|
| 82 |
+
- Non-commercial weights license (see below)
|
| 83 |
+
|
| 84 |
+
## Licenses
|
| 85 |
+
|
| 86 |
+
| Artifact | License |
|
| 87 |
+
| --- | --- |
|
| 88 |
+
| Model weights on this Hub repo | [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/) |
|
| 89 |
+
| Source code on GitHub | [AGPL-3.0](https://github.com/HaoranLiu507/LPIFM/blob/main/LICENSE) |
|
| 90 |
+
|
| 91 |
+
Weights do **not** inherit AGPL; code does **not** inherit CC BY-NC-SA.
|
| 92 |
+
|
| 93 |
+
## Links
|
| 94 |
+
|
| 95 |
+
- GitHub: https://github.com/HaoranLiu507/LPIFM
|
| 96 |
+
- Hugging Face: https://huggingface.co/FengShaner/LPIFM
|
| 97 |
+
- Zenodo archival DOI: to be added after deposit publication
|
| 98 |
+
|
| 99 |
+
## Citation
|
| 100 |
+
|
| 101 |
+
See [`CITATION.cff`](https://github.com/HaoranLiu507/LPIFM/blob/main/CITATION.cff) in the GitHub repository.
|
inference_config.yaml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LPIFM VIFB baseline — inference defaults (Hub companion)
|
| 2 |
+
# Full training / architecture config lives on GitHub:
|
| 3 |
+
# https://github.com/HaoranLiu507/LPIFM/blob/main/configs/release_inference.yaml
|
| 4 |
+
|
| 5 |
+
model:
|
| 6 |
+
backbone: ConvNeXt-V2 # timm: convnextv2_base.fcmae_ft_in22k_in1k_384
|
| 7 |
+
|
| 8 |
+
image_size: 384
|
| 9 |
+
|
| 10 |
+
inference:
|
| 11 |
+
# Ternary decode: d_cal = d / T_cal
|
| 12 |
+
# d_cal > t → A better (0)
|
| 13 |
+
# d_cal < -t → B better (1)
|
| 14 |
+
# otherwise → Tie (2)
|
| 15 |
+
tie_threshold_t: 0.3
|
| 16 |
+
calibration_temperature_Tcal: 1.0
|
lpifm_vifb_baseline_v1.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:28c98f3fdb1da138c3bc7a0ea952b2707dd25a9ec1531fd6375064ed3349cd3a
|
| 3 |
+
size 2105942627
|