FlexICM / checkpoints /README.md
tianma
Add task-metric eval path and Cascade Mask R-CNN + Swin-B for det/instance.
5c11913
|
Raw History Blame
3.17 kB
# Checkpoints Layout (Placeholders)
Put pretrained / trained weights here before running **test / eval**.
Training still writes to `logs/` by default; after training, copy (or symlink) best
checkpoints into this tree so eval configs have a stable path.
> Files named `PLACEHOLDER` are not real weights. Replace each with the matching
> `.pth.tar` checkpoint, then update or keep the path expected by eval scripts.
## Directory map
```text
checkpoints/
β”œβ”€β”€ base_codec/ # frozen TIC (TransTIC / AdaptiveICMH)
β”‚ β”œβ”€β”€ base_codec_1.pth.tar # Ξ» = 0.0035
β”‚ β”œβ”€β”€ base_codec_2.pth.tar # Ξ» = 0.0067
β”‚ β”œβ”€β”€ base_codec_3.pth.tar # Ξ» = 0.0130
β”‚ └── base_codec_4.pth.tar # Ξ» = 0.0250
β”‚
β”œβ”€β”€ taic/ # five single-task TAIC codecs
β”‚ β”œβ”€β”€ detection/{1,2,3,4}/checkpoint_best_loss.pth.tar
β”‚ β”œβ”€β”€ semantic/{1,2,3,4}/checkpoint_best_loss.pth.tar
β”‚ β”œβ”€β”€ instance/{1,2,3,4}/checkpoint_best_loss.pth.tar
β”‚ β”œβ”€β”€ panoptic/{1,2,3,4}/checkpoint_best_loss.pth.tar
β”‚ └── pose/{1,2,3,4}/checkpoint_best_loss.pth.tar
β”‚
└── ctaic/ # three multi-task scenarios
β”œβ”€β”€ s1_det_instance/
β”‚ β”œβ”€β”€ stage1/{1,2,3,4}/checkpoint_best_loss.pth.tar
β”‚ └── stage2/{1,2,3,4}/checkpoint_best_loss.pth.tar
β”œβ”€β”€ s2_sem_panoptic/
β”‚ β”œβ”€β”€ stage1/{1,2,3,4}/checkpoint_best_loss.pth.tar
β”‚ └── stage2/{1,2,3,4}/checkpoint_best_loss.pth.tar
└── s3_det_pose/
β”œβ”€β”€ stage1/{1,2,3,4}/checkpoint_best_loss.pth.tar
└── stage2/{1,2,3,4}/checkpoint_best_loss.pth.tar
```
Quality folders `{1,2,3,4}` match paper Ξ» / TIC quality levels.
## Download base TIC codecs
```bash
bash scripts/download_base_codecs.sh
# downloads into checkpoints/base_codec/
```
## After training: copy into placeholders
```bash
# example: TAIC detection, quality 1
cp logs/taic_detection/1/checkpoint_best_loss.pth.tar \
checkpoints/taic/detection/1/checkpoint_best_loss.pth.tar
# example: C-TAIC s1 stage2, quality 1
cp logs/ctaic_s1_stage2/1/checkpoint_best_loss.pth.tar \
checkpoints/ctaic/s1_det_instance/stage2/1/checkpoint_best_loss.pth.tar
```
## Eval configs
See `configs/eval/` β€” they point to these placeholder paths.
Codec test (bpp / feature distortion):
```bash
python scripts/eval_taic.py -c configs/eval/taic_detection.yaml
python scripts/eval_ctaic.py -c configs/eval/ctaic_s1.yaml
```
Scripts refuse to run if a `PLACEHOLDER` file is still present or if the `.pth.tar` is missing.
Task rate–accuracy metrics are not implemented in these scripts yet.
## Task networks (for metric evaluation)
```text
checkpoints/task_networks/
β”œβ”€β”€ detection/model.pth
β”œβ”€β”€ instance/model.pth
β”œβ”€β”€ semantic/model.pth
β”œβ”€β”€ panoptic/model.pth
└── pose/model.pth
```
These are **official pretrained task networks** (not codec weights).
Required when running:
```bash
python scripts/eval_taic.py -c configs/eval/taic_detection.yaml --with-metrics
```
See `configs/task_networks/README.md` for config/checkpoint pairing.