Generate VOC format dataset from defective images in DAGM2007 dataset.
You can download the DAGM2007 dataset from:
Then the data directory should looks like:
-raw_dataset\
-Class1\
-Train\
-Test\
-Class2\
-Train\
-Test\
...
-Class10\
-Train\
-Test\
You can change the save_dir (line 9) to the fold name you like.
run main.py to make the conversion
Using labelImg, we can see that the format and annotation of the dataset are correct, but some bounding-boxes may be too large.
After getting the VOC format dataset in the save_dir, you can do defect detection.