pengchengs/SPARK-2022
SPARK 2022 — Stream 1 (Spacecraft Detection) Stream 1 of the SPARK 2022 dataset (SPAcecraft Recognition leveraging Knowledge of the space environment): space-borne imagery of 10 spacecraft plus a debris class, for object detection and classification. Each image contains exactly one target annotated with a single bounding box and class label. Dataset summary Images 110,000 JPEG, 1024 × 1024, RGB Annotations 1 bounding box + class per image Classes… See the full description on the dataset page: https://huggingface.co/datasets/pengchengs/SPARK-2022.
SPARK 2022 — Stream 1 (Spacecraft Detection)
Stream 1 of the SPARK 2022 dataset (SPAcecraft Recognition leveraging Knowledge of the space environment): space-borne imagery of 10 spacecraft plus a debris class, for object detection and classification. Each image contains exactly one target annotated with a single bounding box and class label.
Dataset summary
Dataset structure
├── labels/
│ ├── train.csv
│ ├── val.csv
│ └── test.csv
├── train/ # 66,000 .jpg images
├── val/ # 22,000 .jpg images
├── test/ # 22,000 .jpg images
└── visualize_labels.pyLabel format
Each CSV has the header filename,class,bbox:
filename,class,bbox
img057676.jpg,lisa_pathfinder,"[633, 120, 789, 279]"- filename matches the image file in the corresponding split folder.
- bbox is
[xmin, ymin, xmax, ymax]in absolute pixel coordinates, with the origin at the top-left corner of the image (x = column, y = row). - class is the class name; see the index mapping below.
Classes
Usage
import ast
from pathlib import Path
import pandas as pd
from PIL import Image
CLASS_TO_INDEX = {
"proba_2": 0, "cheops": 1, "debris": 2, "double_star": 3,
"earth_observation_sat_1": 4, "lisa_pathfinder": 5, "proba_3_csc": 6,
"proba_3_ocs": 7, "smart_1": 8, "soho": 9, "xmm_newton": 10,
}
root = Path(".")
split = "train"
df = pd.read_csv(root / "labels" / f"{split}.csv")
df["bbox"] = df["bbox"].apply(ast.literal_eval) # [xmin, ymin, xmax, ymax]
df["label"] = df["class"].map(CLASS_TO_INDEX)
row = df.iloc[0]
image = Image.open(root / split / row["filename"])
xmin, ymin, xmax, ymax = row["bbox"]For a PyTorch object-detection pipeline (e.g. torchvision), targets follow directly since the boxes are already in xyxy format:
import torch
target = {
"boxes": torch.tensor([row["bbox"]], dtype=torch.float32), # (1, 4) xyxy
"labels": torch.tensor([row["label"]], dtype=torch.int64),
}Visual inspection
The bundled script plots random or specific samples with their boxes drawn:
python3 visualize_labels.py val --num 6 --seed 42
python3 visualize_labels.py train --class debris
python3 visualize_labels.py test --filenames img057676.jpgDataset origin
The SPARK dataset was created by the CVI² group at SnT, University of Luxembourg, for the SPARK challenge on spacecraft detection and recognition.
Citation
If you use this dataset, please use the citation below:
@dataset{rathinam_2022,
author = {Rathinam, Arunkumar and
Gaudilliere, Vincent and
Mohamed Ali, Mohamed Adel and
Ortiz Del Castillo, Miguel and
Pauly, Leo and
Aouada, Djamila},
title = {SPARK 2022 Dataset : Spacecraft Detection and
Trajectory Estimation},
month = jun,
year = 2022,
publisher = {Zenodo},
doi = {10.5281/zenodo.6599762},
url = {https://doi.org/10.5281/zenodo.6599762},
}