DeepHS Fruit: hyperspectral fruit ripeness (avocado, kaki, kiwi, mango, papaya)
- Provider
- Universität Tübingen, Cognitive Systems Group
- License
- No license file published by the source. Distributed openly via direct HTTP + a BitTorrent mirror for research use; cite Varga et al., "Measuring the Ripeness of Fruit with Hyperspectral Imaging and Deep Learning" (IJCNN 2021) and the GitHub repo. Confirm terms with the authors before any commercial use.
- Records
- annotations/*_v2.json (use these, not the unsuffixed 2021 files)
- Stored at
- cogsys.cs.uni-tuebingen.de
- Access
- Free and public. No account with the data provider is needed.
- Category
- Agriculture & Environment
- Source
- https://github.com/cogsys-tuebingen/deephs_fruit
About DeepHS Fruit: hyperspectral fruit ripeness (avocado, kaki, kiwi, mango, papaya)
DeepHS Fruit is the University of Tübingen Cognitive Systems group's hyperspectral fruit-ripeness dataset: 5,307 hyperspectral recordings of individual avocado, kaki, kiwi, mango and papaya specimens, captured over multi-day post-harvest storage with three registered camera systems (Specim FX10 VIS, INNOSPEC RedEye NIR, Corning microHSI 410 VIS-NIR) so every specimen has up to three co-registered spectral cubes. 1,018 of the recordings carry destructive ground truth (initial/end weight, firmness, storage days, a 3-class ripeness_state plus a finer-grained ripeness_state_fine) from val/test/train_only_labeled; the remaining ~4,300 train_all recordings are unlabeled and intended for self-supervised pretraining. This entry mounts the publisher's own HTTP tree read-only via rclone (lazy HTTP range reads, nothing copied) rather than a Scigantic-managed mirror, so the archive always reflects the upstream release, including the 2024-01-09 corrected annotation set. Each fruit's cubes ship as one ENVI .hdr/.bin pair per capture, inside a per-fruit zip (Avocado.zip 72G, Kiwi.zip 44G, Papaya.zip 22G, Mango.zip 2.7G, Kaki.zip 2.2G); rclone's HTTP mount + Python's zipfile support lazy range reads into individual members without extracting the whole zip. See the schema card for the exact records/annotations JSON join and camera band tables.
How to load this dataset in Python
import io, json, os, zipfile
import numpy as np
import pandas as pd
root = os.path.expanduser("~/archive")
# 1) Build a records+annotations dataframe from the CORRECTED (v2) val split.
with zipfile.ZipFile(f"{root}/annotations-upd-2024-01-09.zip") as zf:
d = json.load(zf.open("annotations/val_v2.json"))
records = pd.DataFrame(d["records"])
annotations = pd.DataFrame(d["annotations"])
df = records.merge(annotations, left_on="id", right_on="record_id", suffixes=("_rec", "_ann"))
print(df[["fruit", "camera_type", "day", "ripeness_state", "firmness"]].head())
# 2) Lazily read ONE hyperspectral cube out of a 72GB fruit zip (no full download —
# the rclone http mount serves range reads, zipfile only fetches this member).
row = records[(records.fruit == "Avocado") & (records.camera_type == "VIS")].iloc[0]
with zipfile.ZipFile(f"{root}/Avocado.zip") as zf:
hdr_bytes = zf.read(row["files"]["header_file"])
bin_bytes = zf.read(row["files"]["data_file"])
# hdr_bytes is the ENVI header (ASCII, key=value); parse with `spectral.io.envi` or by hand
# to get samples/lines/bands, then np.frombuffer(bin_bytes, dtype=...).reshape(...).Written for a Scigantic notebook, where /mnt/archive is the mounted dataset.
Data structure
Fields
cameras[].id | string — "VIS" | "NIR" | "VIS_COR" |
cameras[].name | string — "Specim FX10" (VIS) | "INNOSPEC RedEye" (NIR) | "Corning microHSI 410 Vis-NIR Hyperspectral Sensor" (VIS_COR) |
cameras[].wavelengths | float[] — per-band center wavelength in nm. VIS: 224 bands, 397.66-1003.81nm. NIR: 252 bands, 919.68-1727.04nm.… |
records[].id | int — join key to annotations[].record_id |
records[].fruit | string — "Avocado" | "Kaki" | "Kiwi" | "Mango" | "Papaya" |
records[].side | string — which face of the specimen was imaged, e.g. "front" | "back" |
records[].day | string — post-harvest storage day folder id; naming convention varies by fruit, do not parse, use verbatim |
records[].camera_type | string — "VIS" | "NIR" | "VIS_COR", matches cameras[].id |
records[].files.header_file | string — relative path to the ENVI .hdr sidecar inside the fruit zip |
records[].files.data_file | string — relative path to the ENVI .bin cube inside the fruit zip |
annotations[].record_id | int — FK to records[].id. NOTE: destructive measurements are physically per-SPECIMEN, but this table has one row per… |
annotations[].init_weight / end_weight | number, grams — specimen weight at day 0 and at the annotated day |
annotations[].storage_days | int — days elapsed since harvest/day 0 at the time of this measurement |
annotations[].firmness | number — penetrometer-style firmness reading (higher = firmer; units/instrument not stated by the source, treat as… |
annotations[].ripeness_state | string — 3-class label: "unripe" | "perfect" | "overripe". THE primary classification target. |
annotations[].ripeness_state_fine | string — finer-grained ripeness label alongside ripeness_state |
annotations[].comment | string | null — free-text annotator note, usually null |
Files
Two layers. Top level (rclone-mounted at ~/archive and $SCIGANTIC_MOUNT_PATH) is 5 per-fruit
zips plus 2 annotation zips, served straight from the university HTTP server — nothing pre-extracted:
Avocado.zip (72G) Kiwi.zip (44G) Papaya.zip (22G) Mango.zip (2.7G) Kaki.zip (2.2G)
annotations.zip (166K, 2021 labels) annotations-upd-2024-01-09.zip (166K, corrected labels — USE THIS ONE)
Inside each fruit zip, already rooted at "<Fruit>/" (no manual renaming needed):
<Fruit>/<camera_type>/<day_folder>/<fruit>_<day_folder>_<idx>_<side>.hdr
<Fruit>/<camera_type>/<day_folder>/<fruit>_<day_folder>_<idx>_<side>.bin
camera_type is one of VIS | NIR | VIS_COR (3 separate co-registered camera systems, see columns).
day_folder naming is NOT uniform across fruits — Kaki verified as "day_9_m3" (batch-suffixed),
other fruits use plain "day_03" style. Always resolve the real relative path from the JSON
records[].files object (below), never assume the naming convention.
Inside each annotation zip: 4 splits x 2 schema versions = 8 JSON files
annotations/{train_all,train_only_labeled,val,test}.json (2021 schema, v1)
annotations/{train_all,train_only_labeled,val,test}_v2.json (2022 schema, v2 — corrected)
Each JSON is one dict with 4 top-level keys: info, cameras (3 camera specs incl. per-band
wavelengths), records (one row per capture, id/fruit/side/day/camera_type/files), and
annotations (one row per record_id, the destructive ripeness measurements).Example file: Kaki/VIS/day_9_m3/kaki_day_9_m3_25_back.bin (verified via a 184,840-byte Range-read central-directory scan of the 2.2GB Kaki.zip, not a download) — sibling .hdr is the ENVI header.
Analyze this dataset without downloading it
On Scigantic, DeepHS Fruit: hyperspectral fruit ripeness (avocado, kaki, kiwi, mango, papaya) opens in a hosted JupyterLab notebook with the data already mounted, so you can read files where they are stored instead of copying them first. Each notebook includes an AI assistant that can see the mounted files and write and run analysis code. Open the dataset page to launch a notebook, or browse the full catalog.
This page is also available as Markdown.
Topics
Related datasets
- QuinceSet: Japanese Quince (Chaenomeles japonica) Fruit Images with 17,171 Ripe and Unripe Bounding Boxes, Latvia (Institute of Horticulture, AgML Mirror)
- Litchi-UAV: Drone Images of Litchi Fruit in Dense Canopies with 39,415 Bounding Boxes, Guangzhou, China (AgML Mirror)
- Calcium imaging of odor responses in the fruit fly mushroom body
- RaspberrySet: Raspberry (Rubus idaeus) Bud, Flower and Berry Ripeness Bounding Boxes in 2,039 iPhone Images, Latvia (Institute of Horticulture, AgML Mirror)
- Salmonella Serovar Hyperspectral Microscopy: 500 Hypercube Images of Five Serovars for AI Classification
- Greenhouse Strawberry Phenological Stage Detection: 1,477 Images with Seven Growth-Stage Classes and Fruit Size Ground Truth (University of Minnesota, AgML Mirror)
- PApple_RGB-D-Size: Fuji Apple Tree RGB-D Images with Modal and Amodal Fruit Masks and Diameter Ground Truth, 3,925 Images (Universitat de Lleida, AgML Mirror)
- SEN2NEON: Sentinel-2 to NEON Hyperspectral Multispectral Super-Resolution Benchmark