AmazonScience/RobustAD
RobustAD Dataset About the Dataset RobustAD, specifically designed to evaluate the robustness of anomaly detection models in real-world scenarios. RobustAD features a curated dataset of defect detection images with meticulously controlled distribution shifts across multiple dimensions relevant to practical applications and more closely mirrors real-world deployment scenarios. RobustAD is designed to cover inspection challenges across multiple industries to ensure… See the full description on the dataset page: https://huggingface.co/datasets/AmazonScience/RobustAD.
12.5k
1---2license: cc-by-4.03language:4- en5tags:6- computer-vision7- anomaly-detection8- industrial9- defect-detection10pretty_name: 'RobustAD: A Realworld Anomaly Detection Dataset for Robustness '11size_categories:12- 1K<n<10K13---14# RobustAD Dataset15## About the Dataset16 17RobustAD, specifically designed to evaluate the robustness of anomaly detection models in real-world scenarios. RobustAD features a curated dataset of defect detection images with meticulously controlled distribution shifts across multiple dimensions relevant to practical applications and more closely mirrors real-world deployment scenarios.18RobustAD is designed to cover inspection challenges across multiple industries to ensure the diversity of use cases and19encourage the development of generalizable methods. It is carefully curated to reflect the complexity of real-world20anomaly detection task in terms of both the defect variations and the domain shifts captured in the data. Robus-21tAD consists of 3 sub-datasets corresponding to 3 different objects of interest, each with a source domain data for22training and multiple target domains with different shifts for testing. 23The PCB sub-dataset captures the challenges24of finding subtle scratches, soldering melts, and missing parts which comprise of the most common defects encoun-25tered during inspection of Printed Circuit Boards in electronics and semiconductor manufacturing. The metal parts26sub-dataset reflects the challenges of inspecting metal automotive parts with reflective surfaces for possible chipping,27dents, or porosity (holes in metal) in the automotive industry. The pile of packets represents a common count-based28anomaly detection task performed by packaging machines in the pharmaceutical industry. We believe this broad cov-29erage of tasks and anomaly types across important sectors ensures a general model that is relevant for common in-30dustry inspection problems and serves as a good starting point. The PCB and metal parts datasets are defined for31localization and classification tasks where as piled packets subset is only defined for classification task. 32 33 34 35## Dataset Card for RobustAD36 37For more details, refer to this paper: COMING SOON!38 39 40 41 42## How to Use43 44To load the dataset,45 46```47from datasets import load_dataset48from datasets import Image49 50#For piled bags dataset (Classification only)51piled_bags_dataset = load_dataset("imagefolder", data_files={"train": 'PiledBags/piled_bags_data_dir_train/*', "test0": 'PiledBags/piled_bags_data_dir_test0/*' , "test1": 'PiledBags/piled_bags_data_dir_test1/*' , "test2": 'PiledBags/piled_bags_data_dir_test2/*' , "test3": 'PiledBags/piled_bags_data_dir_test3/*' ,"test4": 'PiledBags/piled_bags_data_dir_test4/*', "test5": 'PiledBags/piled_bags_data_dir_test5/*'})52 53#For PCB dataset54pcb_dataset = load_dataset("imagefolder", data_files={"train": 'PCB/pcb_data_dir_train/*', "test0": 'PCB/pcb_data_dir_test0/*', "test1": 'PCB/pcb_data_dir_test1/*' , "test2": 'PCB/pcb_data_dir_test2/*' , "test3": 'PCB/pcb_data_dir_test3/*' ,"test4": 'PCB/pcb_data_dir_test4/*', "test5": 'PCB/pcb_data_dir_test5/*'}).cast_column("mask", Image(decode=True))55 56#For Metal Parts dataset57metal_parts_dataset = load_dataset("imagefolder", data_files={"train": 'MetalParts/metal_parts_data_dir_train/*', "test0": 'MetalParts/metal_parts_data_dir_test0/*' , "test1": 'MetalParts/metal_parts_data_dir_test1/*' , "test2": 'MetalParts/metal_parts_data_dir_test2/*' , "test3": 'MetalParts/metal_parts_data_dir_test3/*' ,"test4": 'MetalParts/metal_parts_data_dir_test4/*', "test5": 'MetalParts/metal_parts_data_dir_test5/*', "test6": 'MetalParts/metal_parts_data_dir_test6/*'}).cast_column("mask", Image(decode=True))58 59#metal_parts_dataset['train'][0] - Normal sample does not have a mask60#{'image': <PIL.Image.Image image mode=RGB size=2681x1500 at 0x7F66A1BE46D0>, 'label': 0, 'mask': None}61 62#metal_parts_dataset['train'][0] - Anomaly samples have a mask63{'image': <PIL.Image.Image image mode=RGB size=2681x1500 at 0x7F66A1B1EBC0>, 'label': 1, 'mask': <PIL.PngImagePlugin.PngImageFile image mode=L size=2681x1500 at 0x7F66A1BE7040>}64 65```66 67## License Information68 69The RobustAD dataset is released under the Creative Commons license cc-by-4.0.70 71## Citation Information72 73COMING SOON!74 75 76## Contact77 78lppemula@amazon.com (Latha Pemula) | zdongqin@amazon.com (Dongqing Zhang) | onkardab@amazon.com (Onkar Dabeer)