Skip to content

Repository files navigation

[TIFS 2026] Taming Generative Synthetic Data for X-ray Prohibited Item Detection

[Arxiv] [HF]

Analysis of existing X-ray image synthesis methods

  • We propose Xsyn, a simple and effective one-stage synthesis pipeline in the X-ray security domain. To the best of our knowledge, Xsyn is the first to achieve high quality X-ray security image synthesis without incurring additional labor-intensive foreground preparation.

Requirements

Download Xsyn models

We will provide checkpoints for different datasets. All models here are based on GLIGEN.

Dataset Mode Download
PIDray text-grounded inpainting HF Hub
OPIXray text-grounded inpainting HF Hub
HiXray text-grounded inpainting HF Hub

Training

Please follow the instruction of text-grounded inpainting training in GLIGEN.

Inference

We provide one script to generate x-ray security images and construct their annotations. First download models and put them in --ckpt_path. Then run

python gligen_inference.py

Details of some important args:

  • --output_path: the path to save your generated x-ray security images
  • --annotation_path: the path to save the refined annotation(stored in txt format)
  • --vis_path: the path to save visualization compared with gt
  • --ca_vis_path: the path to save cross-attention maps
  • --image_path: the path to load images you want to inpaint
  • --ckpt_path: the generation model checkpoint path
  • --gligen_caption_pt: the file to prepare your training/test data in GLIGEN format
  • --gen_method: set to 1 for Xsyn-M and 3 for Xsyn-A
  • --refine_anno: set to True for CAR
  • --latent_redist: set to True for BOM

After inference, we use downstream_test.sh to test the performance of our sythetic data. Our downstream detection environment is mmdetection.

Citation

If this codebase is useful to you, please consider citing:

@article{sun2026Xsyn,
  title={Taming Generative Synthetic Data for X-ray Prohibited Item Detection},
  author={Sun, Jialong and Zhu, Hongguang and Liu, Weizhe and Sun, Yunda and Tao, Renshuai and Wei, Yunchao},
  journal={IEEE Transactions on Information Forensics & Security},
  year={2026},
  publisher={IEEE}
}

🙏 Acknowledgment

This work is implemented based on GLIGEN. We greatly appreciate their valuable contributions to the community.

About

Taming Generative Synthetic Data for X-ray Prohibited Item Detection (IEEE TIFS 2026)

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages