You need to agree to share your Hugging Face information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

This repository accompanies a paper under review. Access is granted for research and reproduction purposes. Please do not redistribute the weights.

Log in or Sign Up to review the conditions and access this model content.

FlowSAT-C (step 35k): reproduction package

This repository contains the FlowSAT-C checkpoint at training step 35,000, our captions for the fMoW test split and for RSICD, the fMoW data manifests, and everything needed to reproduce our fMoW test-set image-quality numbers (FID 11.06) by re-scoring the images we generated.

The paper is under review. Code (model, training, image generation, the fMoW / RSICD evaluation and MetaCF) with full reproduction guides: github.com/dsp81/FlowSAT-C. The data files (captions, manifests, generated images, scorer) are also in a public, ungated dataset: Djisgod/flowsat-c-data.

Contents

path what it is
flowsat_c_35k.safetensors model weights, step 35,000 (bf16, 4.2B parameters, 8.4 GB). Load with the code in the GitHub repository.
p1pb_config.json model configuration read by the loader (keep it next to the weights).
captions/fmow_test_captions.jsonl our captions for 53,161 fMoW test images, one JSON object per line: {"id": "<sequence>/<sequence>_<n>_rgb", "caption": "..."}. Ids follow the fMoW-full test naming.
captions/rsicd_captions.jsonl our captions for the 10,921 RSICD images: {"id", "v1_pos", "caption"}, in evaluation order.
manifests/{train,val,test}_cov.jsonl one record per fMoW-RGB image used for training (354,292 / 6,989) and testing (52,806): image path relative to the fMoW-RGB root, our caption, and the metadata. Used by the GitHub code.
generated/fmow_test/<sequence>/<stem>.png the 9,614 images (512 x 512, lossless PNG) generated for the evaluation, one per reference id that has a caption.
eval/reference_ids.txt the 10,000 fMoW-full test images of the reference set, in scoring order.
eval/score_fmow.py self-contained scoring script (FID, CLIP score, SSIM, LPIPS, IS).
eval/requirements.txt the pinned Python environment.
eval/expected_metrics.json the numbers you should get.
SHA256SUMS checksums of every file.

Reproduce the fMoW test numbers, step by step

1. Get this repository

Request access on this page, then:

pip install -U "huggingface_hub[cli]"
huggingface-cli login
huggingface-cli download Djisgod/flowsat-c-35k --local-dir flowsat-c-35k
cd flowsat-c-35k
sha256sum -c SHA256SUMS          # optional integrity check

For scoring alone you can skip the 8.4 GB weights file: add --exclude "*.safetensors" to the download command.

2. Create the environment

Python 3.10 with CUDA 12.1 wheels. A GPU is recommended; the script also runs on CPU (slower).

python3.10 -m venv venv && source venv/bin/activate
pip install -r eval/requirements.txt --extra-index-url https://download.pytorch.org/whl/cu121

Use these exact versions. FID depends on the library versions, and other torchmetrics versions give a different number on identical images.

3. Download the real fMoW test images

The reference images are the public fMoW-full test split (no AWS account needed). The 10,000 reference images all lie in the first 2,300 test sequences, so only those are needed (about 63 GB; the full split is 411 GB):

aws s3 sync s3://spacenet-dataset/Hosted-Datasets/fmow/fmow-full/test/ fmow-full/test/ \
    --no-sign-request --exclude "*" \
    --include "000[01]*/*_rgb.tif" --include "000[01]*/*_rgb.json" \
    --include "0002[0-2]*/*_rgb.tif" --include "0002[0-2]*/*_rgb.json"

If the sync stops part-way, run it again; it resumes. fmow-full/test should then hold folders 0000000, 0000001, ...

4. Score

cd eval
python score_fmow.py \
    --fmow-test-root /path/to/fmow-full/test \
    --reference-ids  reference_ids.txt \
    --generated-dir  ../generated/fmow_test \
    --captions       ../captions/fmow_test_captions.jsonl \
    --out            metrics.json

CLIP (openai/clip-vit-base-patch16) and the Inception / AlexNet weights download automatically on first use.

5. Compare with the expected numbers

metric expected
FID (all reference images vs all generated images) 11.06
FID, matched ids only 11.21
CLIP score, generated images (real images, same captions) 30.17 (30.00)
SSIM, paired with the real image of the same id 0.170
LPIPS, paired with the real image of the same id 0.596
Inception Score 6.65 ยฑ 0.18
real images scored / generated images scored 9,999 / 9,613

The script prints FINAL {...} and writes metrics.json. Its reference_set_sha256_12 field should read 6b2615222b9f; if it does not, the reference list was changed.

Expect agreement to the precision shown above. Our own re-run of this script on these files gave FID 11.0616 (matched 11.2158), CLIP 30.167 (real 29.995), SSIM 0.1700, LPIPS 0.5958, with the same 9,999 / 9,613 images; the last digits move with GPU floating-point order. The Inception Score varies slightly between runs because torchmetrics shuffles the images before splitting them.

Notes on the evaluation protocol

  • Reference set. The 10,000 images in eval/reference_ids.txt are read in that order. Each GeoTIFF gets a 2-98 percentile stretch per band, a centre square crop, and a bilinear resize to 512 x 512. The preprocessing and metric code are those of the public FlowSat evaluation (MIT licence), included in score_fmow.py.
  • Why 9,999 real and 9,613 generated images.
    • One reference GeoTIFF (241 megapixels) cannot be decoded and is skipped, as in the original FlowSat evaluation.
    • 386 reference ids have no generated image: 312 have no caption, and 74 have a short side below 384 px. These are counted as missing, never substituted.
    • Of the 9,614 generated images, the one whose real image is unreadable is not scored.
    • FID compares all readable real images with all generated images. FID on the matched ids only is reported alongside.
  • Captions. CLIP score uses our captions, truncated to CLIP's 77 tokens. clip_real scores the real images against the same captions as a reference point.
  • Paired metrics. SSIM and LPIPS compare each generated image with the real image of the same id. They measure correspondence to that specific image, not image quality.

Citation and licence

To be announced with the paper. Please do not redistribute the weights before then.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support