└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # IFDD 2 | Few-shot NEU-DET (FS-ND) 3 | This is the dataset used in our paper Few-Shot Steel Surface Defect Detection (will be published soon). The dataset is reconstructed from the famous [NEU-DET](https://ieeexplore.ieee.org/abstract/document/8709818) dataset and designed specially for few-shot defect detection. 4 | The FS-ND can be downloaded [here](https://drive.google.com/drive/folders/1Somtykp_DwqGTe5by9PEfPDxPqYRFu-L) 5 | If you use the FS-ND, please cite our paper: 6 | @article{wang2021few, 7 | title={Few-Shot Steel Surface Defect Detection}, 8 | author={Wang, Haohan and Li, Zhuoling and Wang, Haoqian}, 9 | journal={IEEE Transactions on Instrumentation and Measurement}, 10 | year={2021}, 11 | publisher={IEEE} 12 | } 13 | 14 | ## How to use FS-ND? 15 | There are 4 zip files in the link above: **NEU-DET-METATRAIN**, which is used for meta-training (base training), and **5shot1-100**, **10shot1-100** and **30shot1-100**, which are used for meta-testing (few-shot fine-tuning). For k-shot experiment, you should first train your model with **NEU-DET-METATRAIN**, then evaluate it with the corresponding **kshot1-100**, where k=5,10,30. 16 | There are 100 data folder in the **kshot1-100.zip**: **kshot1**, **kshot2**...**kshot100**. Each **kshoti** (k=5,10,30 and i = 1,2,3...100) folder has the same structure: 17 | 18 | **kshoti 19 | ├── annotations   # two json files, the annoations for train2017 and val2017 20 | ├── train2017       # support examples (3*k images) 21 | ├── val2017          # query images, this folder stays same when k or i changes 22 | ├── trainval.txt    # intermediate result when constructing data, no attention needed 23 | ├── test.txt          # intermediate result when constructing data, no attention needed** 24 | The **kshoti** has the same structure as the famous **COCO** dataset, so you can use the same dataloader with minor adjustments. The two txt file can also be useful if you would like to further analysis the data. 25 | The **NEU-DET-METATRAIN** shares the same structure with **kshoti**, where its **train2017** contains more images and its **val2017** can be utilized to evaluate the pre-trained model. However, the results on **NEU-DET-METATRAIN/val2017** are just intermediate results and do not reflect the few-shot performance. 26 | 27 | ## Why we reconstruct NEU-DET? 28 | Although few-shot defect detection technique is quite valuable due to the scarcity of industrial data, there is no publicly available few-shot defect detection dataset. We can utilize the existing NEU-DET to evaluate few-shot detection tasks, but it actually introduces much randomness. 29 | First, the different training and testing split has an unpredictable effect, even the same model can perform differently in different works. 30 | Second, the sample of support examples makes the results unstable, as the quality of each training image differs a lot. 31 | To bridge this gap, we reconstruct NEU-DET into the few-shot form, namely few-shot NEU-DET (FS-ND). 32 | 33 | ## How we make FS-ND? 34 | we fix the partition of training and testing data, and for each k-shot setting (k=5,10,30), we sample 100 groups support examples to reduce the randomness. 35 | Specifially, three types of defects (inclusion, rolled-in scales and scratches) are utilized as the base data for training, and the others (crazing, patches and pitted surface) are reserved for testing. 36 | For more details about how the NEU-DET is reconstructed, please refer to our paper (coming soon) 37 | --------------------------------------------------------------------------------