The Dataset Viewer has been disabled on this dataset.

MIRO X-ray Security Scans: Baggage

109,944 baggage X-ray scans with 170,827 bounding boxes, gathered from 5 public X-ray security datasets and relabelled into one taxonomy, in COCO format, with per-image provenance and licence. The cargo scans live in the sibling repository FrenchCastle/miro-xray-cargo, 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; several are academic, non-commercial use only. Read Licensing before use and cite the original authors.

Quick start

Download everything (metadata and all image zips), then unpack:

hf download FrenchCastle/xray-baggages-customs --repo-type dataset --local-dir xray_baggage
cd xray_baggage && for z in images_*.zip; do unzip -q "$z" && rm "$z"; done

Or only one source:

hf download FrenchCastle/xray-baggages-customs --repo-type dataset --local-dir xray_baggage \
  --include "annotations/clcxray_coco.json" "images_clcxray.zip" MANIFEST.csv

Load it with pycocotools (any COCO reader works):

from pycocotools.coco import COCO

coco = COCO("xray_baggage/annotations/clcxray_coco.json")
img = coco.loadImgs(coco.getImgIds()[0])[0]  # file_name is relative to xray_baggage/
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
CLCXray 9,564 test 956, train 7,652, val 956 22,111 0 6.4 GB
DvXray 32,000 test 3,180, train 25,612, val 3,208 10,583 22,400 7.2 GB
HiXray 45,364 test 9,069, train 36,295 102,928 0 6.8 GB
OPIXray 8,885 test 1,776, train 7,109 8,919 0 2.6 GB
SIXray (Kaggle YOLO subset) 14,131 test 831, train 11,638, val 1,662 26,286 119 909.4 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, plus dataset (source key), domain (baggage), split (train / val / test) and license (the source's terms).
  • annotations[]: id, image_id, category_id, bbox ([x, y, width, height], pixels), area, iscrowd, segmentation where the source provides masks or polygons, and attributes.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
phone 53,835 37,430
battery_powerbank 20,935 18,017
knife_cutter 18,900 14,774
liquid_container 15,366 10,750
laptop 10,042 9,602
cosmetic 9,949 7,662
pliers 9,625 7,290
firearm 8,062 5,417
scissors 6,913 6,360
wrench 5,385 4,092
tablet 4,918 4,719
sprayer 1,776 1,650
lighter 1,650 1,553
hammer 749 741
baton 714 714
screwdriver 690 682
dart 660 652
fireworks 658 649

Label mapping

Original label to unified class, per source
source original label unified class
CLCXray Cans liquid_container
CLCXray CartonDrinks liquid_container
CLCXray GlassBottle liquid_container
CLCXray PlasticBottle liquid_container
CLCXray SprayCans sprayer
CLCXray SwissArmyKnife knife_cutter
CLCXray Tin liquid_container
CLCXray VacuumCup liquid_container
CLCXray blade knife_cutter
CLCXray dagger knife_cutter
CLCXray knife knife_cutter
CLCXray scissors scissors
DvXray Bat baton
DvXray Battery battery_powerbank
DvXray Dart dart
DvXray Fireworks fireworks
DvXray Gun firearm
DvXray Hammer hammer
DvXray Knife knife_cutter
DvXray Lighter lighter
DvXray Pliers pliers
DvXray Pressure_vessel sprayer
DvXray Razor_blade knife_cutter
DvXray Saw_blade knife_cutter
DvXray Scissors scissors
DvXray Screwdriver screwdriver
DvXray Wrench wrench
HiXray Cosmetic cosmetic
HiXray Laptop laptop
HiXray Mobile_Phone phone
HiXray Nonmetallic_Lighter lighter
HiXray Portable_Charger_1 battery_powerbank
HiXray Portable_Charger_2 battery_powerbank
HiXray Tablet tablet
HiXray Water liquid_container
OPIXray Folding_Knife knife_cutter
OPIXray Multi-tool_Knife knife_cutter
OPIXray Scissor scissors
OPIXray Straight_Knife knife_cutter
OPIXray Utility_Knife knife_cutter
SIXray (Kaggle YOLO subset) Gun firearm
SIXray (Kaggle YOLO subset) Knife knife_cutter
SIXray (Kaggle YOLO subset) Pliers pliers
SIXray (Kaggle YOLO subset) Scissors scissors
SIXray (Kaggle YOLO subset) Wrench wrench

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

CLCXray (clcxray)

Cutters and liquid containers: subway-station scans plus scans of manually packed bags.

DvXray (dvxray)

Dual-view baggage scans: 16,000 pairs (two orthogonal views), 15 prohibited item classes, positives and negatives.

HiXray (hixray)

Real airport scans of passenger baggage with everyday items that must be declared (phones, laptops, power banks, cosmetics, liquids, lighters).

OPIXray (opixray)

Airport baggage scans with 5 kinds of cutters, many occluded.

SIXray (Kaggle YOLO subset) (sixray_yolo_subset)

A community YOLO-format subset of SIXray: subway baggage scans with guns, knives, wrenches, pliers and scissors.

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); use attributes.original_label for the finer label.

Citation

Cite the original datasets you use, and this consolidation if it helped:

@misc{chastel2026miroxray_baggage,
  title        = {MIRO X-ray Security Scans (Baggage): 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/xray-baggages-customs}}
}

@article{zhao2022clcxray,
  title   = {Detecting Overlapped Objects in X-Ray Security Imagery by a Label-Aware Mechanism},
  author  = {Zhao, Cairong and Zhu, Liang and Dou, Shuguang and Deng, Weihong and Wang, Liang},
  journal = {IEEE Transactions on Information Forensics and Security},
  volume  = {17},
  pages   = {998--1009},
  year    = {2022}
}

@article{ma2024dvxray,
  title   = {Toward Dual-View X-Ray Baggage Inspection: A Large-Scale Benchmark and Adaptive Hierarchical Cross Refinement for Prohibited Item Discovery},
  author  = {Ma, Bowen and Jia, Tong and Li, Mingyuan and Wu, Songsheng and Wang, Hao and Chen, Dongyue},
  journal = {IEEE Transactions on Information Forensics and Security},
  volume  = {19},
  year    = {2024}
}

@inproceedings{tao2021hixray,
  title     = {Towards Real-World X-ray Security Inspection: A High-Quality Benchmark and Lateral Inhibition Module for Prohibited Items Detection},
  author    = {Tao, Renshuai and Wei, Yanlu and Jiang, Xiangjian and Li, Hainan and Qin, Haotong and Wang, Jiakai and Ma, Yuqing and Zhang, Libo and Liu, Xianglong},
  booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
  pages     = {10923--10932},
  year      = {2021}
}

@inproceedings{wei2020opixray,
  title     = {Occluded Prohibited Items Detection: An X-ray Security Inspection Benchmark and De-occlusion Attention Module},
  author    = {Wei, Yanlu and Tao, Renshuai and Wu, Zhangjie and Ma, Yuqing and Zhang, Libo and Liu, Xianglong},
  booktitle = {Proceedings of the 28th ACM International Conference on Multimedia},
  pages     = {138--146},
  year      = {2020}
}

@inproceedings{miao2019sixray,
  title     = {{SIXray}: A Large-scale Security Inspection X-ray Benchmark for Prohibited Item Discovery in Overlapping Images},
  author    = {Miao, Caijing and Xie, Lingxi and Wan, Fang and Su, Chi and Liu, Hongye and Jiao, Jianbin and Ye, Qixiang},
  booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  pages     = {2119--2128},
  year      = {2019}
}

Maintenance

Maintained by François Chastel (FrenchCastle). Report problems, missing credits or licence questions in the Community tab of this repository.

Downloads last month
102

Paper for FrenchCastle/xray-baggages-customs