MIRO X-ray Security Scans: Cargo
14,904 cargo X-ray scans with 14,797 bounding boxes, gathered from 3 public X-ray security datasets and relabelled into one taxonomy, in COCO format, with per-image provenance and licence. The baggage scans live in the sibling repository FrenchCastle/xray-baggages-customs, with the same layout and taxonomy.
The collection was built for MIRO-VLM, a project that evaluates vision-language models as
assistants to customs and security officers: reading a scan, finding threats and
checking the goods against the declaration. Each source keeps its own split and its
own terms; nothing is pooled across sources without a dataset field to tell them apart.
Licensing in one line. This is a redistribution of third-party data under their original terms, which differ per source; some carry no stated licence upstream. Read Licensing before use and cite the original authors.
Quick start
Download everything (metadata and all image zips), then unpack:
hf download FrenchCastle/miro-xray-cargo --repo-type dataset --local-dir xray_cargo
cd xray_cargo && for z in images_*.zip; do unzip -q "$z" && rm "$z"; done
Or only one source:
hf download FrenchCastle/miro-xray-cargo --repo-type dataset --local-dir xray_cargo \
--include "annotations/cargox_coco.json" "images_cargox.zip" MANIFEST.csv
Load it with pycocotools (any COCO reader works):
from pycocotools.coco import COCO
coco = COCO("xray_cargo/annotations/cargox_coco.json")
img = coco.loadImgs(coco.getImgIds()[0])[0] # file_name is relative to xray_cargo/
boxes = coco.loadAnns(coco.getAnnIds(imgIds=img["id"]))
print(img["file_name"], img["split"], [(coco.cats[b["category_id"]]["name"], b["bbox"]) for b in boxes])
The Hub dataset viewer is off: the images ship as zips so that each source can be fetched, cited and removed independently.
Dataset structure
Sources and splits
| source | images | splits | boxes | images without boxes | zip |
|---|---|---|---|---|---|
| CargoX | 12,400 | test 12,000, train 400 | 12,400 | 0 | 1.6 GB |
| CargoXray subset (Roboflow) | 659 | test 65, train 462, val 132 | 553 | 289 | 86.9 MB |
| X-ray cargo object detection (Roboflow) | 1,845 | test 184, train 1,292, val 369 | 1,844 | 1 | 92.2 MB |
Splits are the ones each source publishes (or, where a source has none, the one its distributor provides); they are not re-drawn. Use them per source. There is no cross-source test set, and no de-duplication across sources was attempted.
Files
| path | content |
|---|---|
annotations/<source>_coco.json |
COCO detection file per source, unified class names |
images_<source>.zip |
images of that source, stored (uncompressed); members are images/<source>/..., exactly the COCO file_name |
MANIFEST.csv |
one row per image: image_id, file_name, dataset, domain, split, license, width, height, n_boxes |
label_report.json |
per source, original label to unified class |
classes_mapping.json |
the normalisation table and the unified class ids |
COCO fields
Standard COCO detection, with extra keys:
images[]:id,file_name,width,height, plusdataset(source key),domain(cargo),split(train/val/test) andlicense(the source's terms).annotations[]:id,image_id,category_id,bbox([x, y, width, height], pixels),area,iscrowd,segmentationwhere the source provides masks or polygons, andattributes.original_label, the label as the source wrote it.categories[]: the full unified taxonomy, shared by both domain repositories, so class ids are stable across files. Classes absent from a file simply have no boxes.
Images without boxes are negatives (nothing of interest annotated), kept as the source ships them.
Taxonomy
Source labels are mapped to one taxonomy: threats and declarable items
(knife_cutter, firearm, battery_powerbank, liquid_container...) and, for cargo,
goods categories prefixed cargo_. The original label is always kept in
attributes.original_label, so any other grouping can be rebuilt.
Class counts in this repository
| class | boxes | images containing it |
|---|---|---|
knife_cutter |
13,400 | 13,400 |
cargo_normal |
844 | 844 |
cargo_fabrics |
349 | 267 |
cargo_shoes |
67 | 48 |
cargo_auto_parts |
65 | 47 |
cargo_household |
30 | 23 |
cargo_tools |
9 | 7 |
cargo_lamps |
8 | 5 |
cargo_bags |
7 | 3 |
cargo_office_supplies |
6 | 6 |
cargo_bicycle |
5 | 4 |
cargo_toys |
4 | 4 |
cargo_unknown |
2 | 2 |
cargo_wheels |
1 | 1 |
Label mapping
Original label to unified class, per source
| source | original label | unified class |
|---|---|---|
| CargoX | KNIFE_01_0045 |
knife_cutter |
| CargoX | KNIFE_01_4590 |
knife_cutter |
| CargoX | KNIFE_02_0045 |
knife_cutter |
| CargoX | KNIFE_02_4590 |
knife_cutter |
| CargoX | KNIFE_03_0045 |
knife_cutter |
| CargoX | KNIFE_03_4590 |
knife_cutter |
| CargoX | KNIFE_04_0045 |
knife_cutter |
| CargoX | KNIFE_04_4590 |
knife_cutter |
| CargoXray subset (Roboflow) | ---- ----- |
cargo_unknown |
| CargoXray subset (Roboflow) | auto parts |
cargo_auto_parts |
| CargoXray subset (Roboflow) | bags |
cargo_bags |
| CargoXray subset (Roboflow) | bicycle |
cargo_bicycle |
| CargoXray subset (Roboflow) | car weels |
cargo_wheels |
| CargoXray subset (Roboflow) | clohes |
cargo_fabrics |
| CargoXray subset (Roboflow) | clothes |
cargo_fabrics |
| CargoXray subset (Roboflow) | fabrics |
cargo_fabrics |
| CargoXray subset (Roboflow) | lamps |
cargo_lamps |
| CargoXray subset (Roboflow) | object |
cargo_unknown |
| CargoXray subset (Roboflow) | office supplies |
cargo_office_supplies |
| CargoXray subset (Roboflow) | shoes |
cargo_shoes |
| CargoXray subset (Roboflow) | spare parts |
cargo_auto_parts |
| CargoXray subset (Roboflow) | table ware |
cargo_household |
| CargoXray subset (Roboflow) | table warre |
cargo_household |
| CargoXray subset (Roboflow) | tableware |
cargo_household |
| CargoXray subset (Roboflow) | tablware |
cargo_household |
| CargoXray subset (Roboflow) | tetiles |
cargo_fabrics |
| CargoXray subset (Roboflow) | texstiles |
cargo_fabrics |
| CargoXray subset (Roboflow) | textile |
cargo_fabrics |
| CargoXray subset (Roboflow) | textiles |
cargo_fabrics |
| CargoXray subset (Roboflow) | tools |
cargo_tools |
| CargoXray subset (Roboflow) | toys |
cargo_toys |
| X-ray cargo object detection (Roboflow) | Normal-Case |
cargo_normal |
| X-ray cargo object detection (Roboflow) | Sharp Object |
knife_cutter |
Licensing
There is no single licence: each image keeps its source's terms, recorded in the
license field of the COCO image and in MANIFEST.csv. Source datasets
states the terms as each source publishes them. When in doubt, the upstream terms prevail, and
anything beyond non-commercial research needs the source authors' permission. The
annotation conversion and the label mapping added here are released under CC BY 4.0.
If you are an author of one of these datasets and want your data removed or its terms described differently, open a discussion on this repository and it will be handled promptly.
Source datasets
CargoX (cargox)
Synthetic cargo scans from Ewha Womans University: one of 8 knife types (4 shapes x 2 orientation ranges) composited into 768x768 crops of real container scans. One object per image, box and mask.
- Upstream: https://huggingface.co/datasets/Thanaporn09/CargoX
- Paper: https://doi.org/10.1371/journal.pone.0272961
- Terms: No licence stated on the upstream repo (gated, auto-approved); the PLOS ONE paper states the data are freely available. Cite Viriyasaranon et al. 2022.
- Caveats: Synthetic threat insertion; no negative images. This repo holds a class-balanced subset of the 64,000 upstream images, not the full set.
CargoXray subset (Roboflow) (roboflow_cargo_goods)
Real side-on scans of trucks and railcars with goods regions (textiles, shoes, auto parts, tableware...), a subset of ISSAI's CargoXray re-uploaded to Roboflow Universe.
- Upstream: https://universe.roboflow.com/lin-jhhi5/cargo-x-ray-images
- Terms: CC BY 4.0 as asserted by the Roboflow uploader. The upstream CargoXray release (ISSAI, Nazarbayev University) carries no licence.
- Caveats: Raw labels are noisy (typos such as 'clohes', 'table warre'); they are normalised to
cargo_*classes. Many images have no box.
X-ray cargo object detection (Roboflow) (roboflow_cargo_threat)
Cargo scans with two labels, Sharp Object and Normal-Case.
- Upstream: https://universe.roboflow.com/container-xray/x-ray-cargo-object-detection-lrynu
- Terms: CC BY 4.0 (Roboflow Universe).
- Caveats: Provenance undocumented, probably derived from CargoX; the Roboflow export includes augmented copies, so near-duplicates exist across its splits.
Dataset creation
Curation rationale. Public X-ray security datasets are scattered across Google Drive, Baidu, Kaggle, Roboflow and Hugging Face, in half a dozen annotation formats and label vocabularies. Evaluating a model across them first needs one format, one taxonomy and exact provenance for every image.
Processing. Each source was downloaded from its official or documented
distribution, converted to COCO (from VOC XML, YOLO txt, paired txt or COCO), and its
labels mapped to the unified taxonomy through a fixed table (classes_mapping.json).
Images are the downloaded files, byte for byte: this repository does not resize,
recompress or filter them (a distributor upstream may have, as the caveats note).
Large sources may be a class-balanced subset, as stated in their caveats. Splits are kept as distributed.
Annotations. All boxes come from the source datasets (see each paper for its annotation protocol). This repository adds no new manual annotation; it renames labels and records the original.
Personal and sensitive information. The images are X-ray transmission scans of bags and cargo; they contain no faces, names or documents. Some sources are real stream-of-commerce scans from airports or subway stations; none is known to include personal data.
Considerations for use
Intended use. Research on detection and understanding of objects in X-ray security imagery: benchmarking detectors and vision-language models, studying domain shift between scanners and between baggage and cargo, and building tools that assist human inspectors.
Out of scope. Certifying or operating a screening system; any use that would help conceal items from X-ray inspection; commercial use of sources whose terms forbid it.
Known biases and limitations.
- Scanners, colour palettes and resolutions differ per source, and a model can learn the source instead of the object. Evaluate per source, or across sources on purpose.
- Class balance follows the sources: some classes come from a single source (and therefore a single scanner).
- Some sources are staged (items packed for the dataset) or synthetic (threats composited into real scans); these are not stream-of-commerce distributions.
- Near-duplicates exist in some sources (augmented copies, dual views); see caveats.
- Label granularity is reduced by the mapping (for example, every blade type becomes
knife_cutter); useattributes.original_labelfor the finer label.
Citation
Cite the original datasets you use, and this consolidation if it helped:
@misc{chastel2026miroxray_cargo,
title = {MIRO X-ray Security Scans (Cargo): a unified COCO consolidation of public X-ray datasets},
author = {Chastel, Fran\c{c}ois},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/datasets/FrenchCastle/miro-xray-cargo}}
}
@article{viriyasaranon2022mfanet,
title = {{MFA-net}: Object detection for complex X-ray cargo and baggage security imagery},
author = {Viriyasaranon, Thanaporn and Chae, Seung-Hoon and Choi, Jang-Hwan},
journal = {PLOS ONE},
volume = {17},
number = {9},
pages = {e0272961},
year = {2022},
doi = {10.1371/journal.pone.0272961}
}
@misc{roboflow_cargo_xray_images,
title = {cargo x-ray images Dataset},
author = {Lin},
howpublished = {\url{https://universe.roboflow.com/lin-jhhi5/cargo-x-ray-images}},
note = {Roboflow Universe; subset of IS2AI CargoXray, https://github.com/IS2AI/cargoxray}
}
@misc{roboflow_xray_cargo_object_detection,
title = {X-ray cargo object detection Dataset},
author = {{Container Xray}},
howpublished = {\url{https://universe.roboflow.com/container-xray/x-ray-cargo-object-detection-lrynu}},
note = {Roboflow Universe}
}
Maintenance
Maintained by François Chastel (FrenchCastle). Report problems, missing credits or licence questions in the Community tab of this repository.
- Downloads last month
- 11