This project code is forked from https://github.com/DetectionTeamUCAS/FPN_Tensorflow. I have only made minor changes on this wonderful and clear project. Thanks for their perfect code. I can learn and apply it to a new problem.
The Open Lab on Human Robot Interaction of Peking University has released the PCB defect dataset.
You can download at http://robotics.pkusz.edu.cn/resources/dataset/.
And another student has published his paper "A PCB Dataset for Defects Detection and Classification" on arxiv. More datails about this dataset: https://arxiv.org/pdf/1901.08204.pdf.
6 types of defects are made by photoshop, a graphics editor published by Adobe Systems. The defects defined in the dataset are: missing hole, mouse bite, open circuit, short, spur, spurious copper.
For example:
Please download resnet50_v1、resnet101_v1 pre-trained models on Imagenet, put it to $PATH_ROOT/data/pretrained_weights.
1、python2.7 (anaconda recommend)
2、CUDA Version 8.0.44 , CUDNN=5.1.10
3、opencv(cv2)
4、tfplot
5、tensorflow == 1.121
Select a configuration file in the folder ($PATH_ROOT/libs/configs/) and copy its contents into cfgs.py, then download the corresponding weights.
cd $PATH_ROOT/tools
python inference.py --data_dir='/PATH/TO/IMAGES/'
--save_dir='/PATH/TO/SAVE/RESULTS/'
--GPU='0'
cd $PATH_ROOT/tools
python eval.py --eval_imgs='/PATH/TO/IMAGES/'
--annotation_dir='/PATH/TO/TEST/ANNOTATION/'
--GPU='0'