Language:
[Introduction]
The YOLOv4 solution can be applied to factory defect detection, medical image analysis, biological image analysis, industrial safety image analysis, mask image analysis, etc.
[Instruction]
The main process is:
Annotate images -> Generate files needed for training -> Training -> Inference
1. 1_annotation_pascal_voc_xml.ipynb
Open the webpage for image annotation.
parameter:
--port 8801 is the port used by the webpage. If the port is occupied by the user, please change another port value by yourself.
2. 2_convert_yolo_format.ipynb
Convert the voc xml tag file to the yolo format. Before running, please confirm label.names under the label_file path in #parameters and whether the content filled in the category is correct.
supplement:
The content of label.names is the category name without background.
3. 3_prepare_train_txt.ipynb
Generate training image path files for training.
4. 4_prepare_val_txt.ipynb
Generate verification image path files for training.
5. 5_prepare_config_file.ipynb
Generate training files.
If the number of categories is not 4, please be sure to modify the #parameters classes. If there are 5 categories, fill in 5 (not counting background), and so on.
6. 6_train_GPU.ipynb or 6_train_CPU.ipynb
Use GPU or CPU for training.
Before training, please make sure that the yolov4.cfg settings are correct. See the yolov4.cfg setting at the end for details.
7. 7_inference_GPU.ipynb or 7_inference_CPU.ipynb
Use GPU or CPU to infer a single image.
8. 8_inference_webcam_GPU.ipynb or 8_inference_webcam_CPU.ipynb
Use GPU or CPU to infer webcam images.
9. 9_inference_folder_1_GPU.ipynb or 9_inference_folder_1_CPU.ipynb
Use GPU or CPU to infer the images in the folder.
10. 10_inference_api_GPU.ipynb or 10_inference_api_CPU.ipynb
Use the web page to select the image to be inferred, and choose whether to run the GPU or CPU version.
If the port value is not changed, you can run 11_inference_api_browser.ipynb to open the web page.
11. 12_inference_folder_demo_GPU.ipynb or 12_inference_folder_demo_CPU.ipynb
Cycle inferences on the data/plate/test folder images.
Other functions:
99_calculate_anchors.ipynb
Calculate anchor points.
99_YOLOv4_auto_labeling_GPU.ipynb
Automatically annotate test images.
yolov4.cfg settings:
If you have to modify the number of categories, please modify the classes and filters in the three positions in yolov4.cfg.
Recommended Article
How to Buy
Welcome to contact us for quotation. We will help you buy right products.Email: leaderg@leaderg.com