IRIS-CloudDeep / README.md
ASKabalan's picture
Cite the published AMT paper
cc1fe0c verified
|
Raw
History Blame Contribute Delete
13.1 kB
metadata
license: cc-by-4.0
task_categories:
  - image-segmentation
  - image-classification
tags:
  - astronomy
  - atmospheric-science
  - infrared
  - lwir
  - thermal-imaging
  - clouds
  - remote-sensing
  - fits
size_categories:
  - 10K<n<100K
pretty_name: IRIS-CloudDeep LWIR sky/cloud images

IRIS-CloudDeep

Ground-based long-wave infrared (LWIR) images of the night sky, with the binary ground-truth masks and clear/cloud labels behind Sommer, Kabalan and Brunet (2025), Atmos. Meas. Tech. 18, 2083–2101.

An uncooled FLIR Tau2 microbolometer (640×512, 17 μm pitch, 8–14 μm band, 9 Hz) recorded two night-time campaigns in early 2023 at Prades-le-Lez, France (43°41′51″ N, 3°51′53″ E). A 60 mm f/1.25 lens gives a narrow imaging area of 10.4° × 8.3°, about 58″ per pixel. The camera sits on the equatorial mount beside the StarDICE photometric telescope and watches the same line of sight, so the question the data answers is whether cloud is crossing the telescope's field.

The file counts match the published dataset: 4,445 segmentation images and 3,413 classification images, against the paper's 4445 and "3400".

Pixel values are raw 14-bit ADU with TLINEAR disabled, so they are uncalibrated detector counts rather than radiance or brightness temperature. Every loader in the reference code divides by 2**14. Warmer is brighter, and cloud is warmer than clear sky — the dark patches in the images below are clear sky, not cloud.

sample frames

31,352 FITS files, ~18 GB.

What is in it

Path Files Size Contents
raw/DATASET_1/ 18,748 12 GB Complete campaign of 2023-01-23, 640×512 int16
raw/DATASET_2/ 4,746 3.0 GB Complete campaign of 2023-03-30, same format
segmentation/DS1_MASKED_SUBSET/ 2,951 600 MB 160×128 image + ground-truth mask, from DATASET_1
segmentation/DS2_MASKED_SUBSET/ 1,494 304 MB Same, from DATASET_2
classification/CLOUD/ 1,413 889 MB Cloudy frames, label 1
classification/SIM_CLEAR/ 2,000 1.3 GB Synthetic clear-sky frames, label 0
manifests/ 3 CSV 1 MB Provenance: every derived file → its source raw frame

The two campaigns are not interchangeable

DATASET_1 DATASET_2
Date (UTC, from DATE-OBS) 2023-01-23 22:01:54 → 23:04:29 2023-03-30 21:27:43 → 21:51:18
Span / frames 62.8 min / 18,748 23.7 min / 4,746
Detector temperature (FPA-TEMP) −1.0 … −0.2 °C +11.2 … +11.5 °C
Ambient (AMB-TEMP) −1.26 … +0.01 °C +11.95 … +12.60 °C
Frame mean ADU 1001 ± 155 1135 ± 106
Within-frame σ (contrast) 74 ADU 25 ADU

The January night was ~12 °C colder, and its frames carry roughly three times the internal contrast. The two ADU distributions barely overlap (centre panel below), so a model fitted on one campaign will not transfer to the other without per-frame normalisation. DATASET_2's low contrast also means its Otsu-derived masks are separating a much weaker gradient than DATASET_1's.

Constant across both campaigns: GAIN='high', TLINEAR='disabled', SHU-MODE='user', FFCMODE='external', STACKED=1, XPMODE='CMOS 14 bits', CAMERA='FLIR TAU2', FOCAL=60, APERTURE=1.25, PXSIZE=17. Flat-field correction runs about every 30 s against an external calibration source.

File formats

raw/ and classification/ — one HDU:

HDU 0   640 × 512   int16 (big-endian)   raw ADU

Real-camera frames carry the full instrument state in the header: DATE-OBS, FPA-TEMP, AMB-TEMP, BB-TEMP, GAIN, TLINEAR, SHU-MODE, SHU-TEMP, FFCMODE, FFC-TIME, FFCFRAME, XPMODE, STACKED, CAMERA, LENS, FOCAL, APERTURE, PXSIZE, LATOBS, LONGOBS, TARGET, OBSERVER. Synthetic frames instead carry their generation parameters: IMGTYPE='SIMCLEAR', START, STOP, HORIZ, BIASLVL, READLVL, FPNLVL, SKYNOISE, BADPXCOL, NARCIS, NARINT, RADIUS, CENTER_X, CENTER_Y, SMOOTH, AUGMENT, INDEX.

segmentation/ — two HDUs:

HDU 0   160 × 128   float64   image, 4×4 block-averaged from the raw frame
HDU 1   160 × 128   int16     mask, values are exactly {0, 1}, header IMGTYPE = 'GROUND-TRUTH'

1 is cloud and 0 is clear sky. Verified rather than assumed: across 600 sampled frames containing both classes, the mean ADU under mask == 1 exceeds that under mask == 0 in 100 % of frames (DS1 1024 vs 901; DS2 1152 vs 1105).

image and mask pairs

Masks come from Otsu thresholding an astropy LogStretch(a=1e5) + ZScaleInterval(contrast=0.9) rendering of the frame (utilities/mask_generator.py), followed by visual inspection to discard frames with tree branches or buildings intruding at the corners. Treat them as an automatic baseline rather than human annotation.

Directory sharding on raw/

Both raw campaigns are split into per-minute subdirectories keyed on the timestamp already in each filename — 59 for DATASET_1, 24 for DATASET_2 — because 18,748 files in one folder is more than the Hub browses comfortably:

raw/DATASET_1/2023_01_23_22_01/2023_01_23_22_01_54_358322_flux.fits
raw/DATASET_2/2023-03-30T21_27/2023-03-30T21_27_43.435747.fits

No training code reads the raw pool, so nothing depends on this. Flatten with find raw/DATASET_1 -name '*.fits' -exec mv -t DATASET_1_flat/ {} +.

Read before you train

distributions

The masks are cloud-dominated, and every frame contains substantial cloud. Median cloud fraction is 0.92 in DS1 and 0.96 in DS2; the mean is 0.85 and 0.90. About 11 % of DS1 frames and 12 % of DS2 frames exceed 99 % cloud, and the lowest frame in either subset sits near 45 %. A model predicting cloud everywhere already scores ~0.87 pixel accuracy, so report IoU on the clear-sky class, or train against a class-balanced loss.

Consecutive frames sit a fraction of a second apart, so a random split leaks. The raw campaigns run at an effective 5.0 Hz (DATASET_1) and 3.3 Hz (DATASET_2). After subsetting, consecutive selected frames are 0.66 s apart in DS1 and 0.32 s in DS2 (median; minimum 0.16 s and 0.21 s), and 8 % of DS1 gaps and 4 % of DS2 gaps exceed 2 s. Clouds move imperceptibly in a third of a second, so an i.i.d. shuffle puts visually identical frames on both sides of the split. Hold out a contiguous block of minutes instead; manifests/ carries the timestamps needed to do it, and there is a snippet below.

The classification labels are separable from texture alone. SIM_CLEAR is synthetic, and its within-frame standard deviation clusters at 15–25 ADU while real cloudy frames span 20–280 ADU (right panel above). The synthetic frames also carry column-wise fixed-pattern noise and a central radial narcissus blob with a signature of their own. A classifier can therefore reach high accuracy by learning synthetic versus real in place of clear versus cloudy. The synthetic images exist because genuinely cloud-free frames were scarce across these two nights; read classification scores on this split as an upper bound, and validate on observed clear-sky frames.

Both tasks validate on the same 20 % they early-stop on. The reference notebooks split 80/20 at load time and report metrics on that validation subset, so a genuinely held-out test set has to be carved out before training.

Usage

The files are FITS, not a datasets-loadable format. Read them with astropy or fitsio.

Only what the models train on (~3 GB, skipping the raw campaigns):

hf download ASKabalan/IRIS-CloudDeep --type dataset --local-dir data/ \
  --include 'segmentation/*' --include 'classification/*' --include 'manifests/*'

Everything, raw campaigns included:

hf download ASKabalan/IRIS-CloudDeep --type dataset --local-dir data/
from huggingface_hub import snapshot_download

snapshot_download("ASKabalan/IRIS-CloudDeep", repo_type="dataset", local_dir="data",
                  allow_patterns=["segmentation/*", "classification/*", "manifests/*"])

A segmentation sample, the way the reference UNet reads it:

from astropy.io import fits

with fits.open("data/segmentation/DS1_MASKED_SUBSET/2023_01_23_22_01_54_569098_masked.fits") as hdul:
    image = hdul[0].data / 2**14   # (128, 160) float64, in [0, 1]
    mask  = hdul[1].data           # (128, 160), 1 = cloud

A classification sample. The raw 640×512 frame is block-averaged to 128×160 at load time; nothing is stored pre-binned:

import numpy as np
from astropy.io import fits

def rebin(arr, new_shape=(128, 160)):
    shape = (new_shape[0], arr.shape[0] // new_shape[0],
             new_shape[1], arr.shape[1] // new_shape[1])
    return arr.reshape(shape).mean(-1).mean(1)

image = rebin(fits.getdata("data/classification/CLOUD/2023_01_23_22_01_58_500596_flux.fits")) / 2**14

A time-aware split, which is what the leakage note above argues for:

import glob, re
from datetime import datetime

def stamp(path):                       # DS1 filenames: 2023_01_23_22_01_54_569098_masked.fits
    m = re.search(r"(\d{4})_(\d\d)_(\d\d)_(\d\d)_(\d\d)_(\d\d)_(\d{6})", path)
    return datetime(*map(int, m.groups()))

files = sorted(glob.glob("data/segmentation/DS1_MASKED_SUBSET/*.fits"), key=stamp)
cut = int(0.8 * len(files))
train, held_out = files[:cut], files[cut:]   # contiguous in time, no shared minute

Provenance

manifests/ds1_masked_subset.csv and ds2_masked_subset.csv map each processed file to the raw frame it came from; manifests/classification_labels.csv gives the label of every classification file and, for the cloudy ones, its path under raw/.

The segmentation subsets are 2,951 of 18,748 frames and 1,494 of 4,746, sampled without a recorded seed, so the selection cannot be regenerated — those CSVs are the only record of it.

classification/CLOUD duplicates 1,413 frames already present under raw/, byte for byte (938 from DATASET_1, 475 from DATASET_2). It is kept as its own directory because the reference classifier globs it directly.

classification/SIM_CLEAR was produced by utilities/synthetic_image.py, which models a 2D horizontal sky gradient (downwelling radiance rising toward high zenith angle) plus read noise, fixed-pattern noise, bad pixel columns, sky noise and the narcissus effect. Parameters are recorded per file in the header, but the random draws were unseeded, so these exact realisations cannot be reproduced.

Public sky-image datasets are not included

Sommer et al. (2025) also evaluate the segmentation model on four third-party RGB sky-image databases. Their licences reserve redistribution to their own hosts — SWIMSEG is CC BY-NC 4.0, and HYTA is republished under permission granted to its host rather than transferably — so this repository holds only the LWIR data. Get the rest from the original sources:

  • HYTA — Q. Li, W. Lu, J. Yang, A Hybrid Thresholding Algorithm for Cloud Detection on Ground-Based Color Images, J. Atmos. Oceanic Technol., 2011. The 3-level ground truth additionally requires S. Dev, Y. H. Lee, S. Winkler, Multi-level semantic labelling of sky/cloud images, IEEE ICIP, 2015.
  • SWIMSEG, SWINSEG, SWINYSEG — Vision and Interaction Group, NUS / ADSC (Soumyabrata Dev, Stefan Winkler et al.). SWIMSEG is CC BY-NC 4.0.
  • WSISEG — 400 whole-sky images labelled cloud / clear / undefined.

To rebuild the grayscale FITS the models consume, run notebooks/convert_rgb_datasets_to_grayscale.ipynb then utilities/public_ds_process.py from the code repository.

Citation

@article{Sommer2025,
  author  = {Sommer, K. and Kabalan, W. and Brunet, R.},
  title   = {Infrared radiometric image classification and segmentation of cloud
             structures using a deep-learning framework from ground-based infrared
             thermal camera observations},
  journal = {Atmospheric Measurement Techniques},
  volume  = {18},
  number  = {9},
  pages   = {2083--2101},
  year    = {2025},
  doi     = {10.5194/amt-18-2083-2025}
}

The paper's data availability statement offers these datasets from the corresponding authors on request; this repository is that data, published so it can be cited and downloaded directly.

Licence

CC BY 4.0, matching the paper. Please cite Sommer et al. (2025) if you use this data.