[LEADERG AI ZOO] Jupyter-Image-Object-Detection-VGG16-SSD512-PyTorch

Language:

繁體中文

 

 

 

[Introduction]

 

 

This solution can be applied to factory defect detection, medical image analysis, biological image analysis, industrial safety image analysis, mask image analysis, etc. 

 

 

 

[Instructions]

 

 

1_annotation_pascal_voc_xml.ipynb

 

Open the marking software. Prepare a png or jpg image for annotation. It is recommended that the image has the same aspect ratio. 

 

 

 

2_delete_log.ipynb

 

Delete the log folder, which is the record read by tensorboard during training. 

 

 

 

3_prepare_train_txt.ipynb

 

Prepare a list of training images.

 

  • image_path = "data/train/images": Training image path.
  • txt = "data/train.txt": The output training image list.

 

 

 

4_prepare_val_txt.ipynb

 

To prepare the verification image list.

 

  • image_path = "data /val/images": verification image path.
  • txt = "data/val.txt": The output verification image list.   

 

 

5_train.ipynb

 

Before starting to train the model, please set the number of categories and the category name. 

 

Set the category name to data/labels.txt, the first category name should be fixed __background__, and the second and below are the category names of your samples. 

 

The category name must be exactly the same as the category name when labeling. 

 

Set NUM_CLASSES in data/vgg_ssd512.yaml, and set other training related parameters here. 

 

Execute this ipynb to train the model. 

 

 

 

6_kill_tensorboard.ipynb

 

Release the tensorboard that is not in this training.   

 

 

 

7_tensorboard.ipynb

 

Turn on tensorboard to display the loss curve and other related information during training. 

 

 

 

8_inference.ipynb

 

Infer a picture. 

 

--image_path "data/val/images/inclusion-2.jpg" : Inferred images. 

--ckpt model/model_007000.pth : Inferred model.

--score_threshold 0.3 : The threshold of inference. 

--debugImage 1 : Switch to display the image of the inference result. 

 

 

 

9_inference_folder.ipynb

 

Infer the images in the folder. 

 

--images_dir data/val/images/ : Inference folder. 

--ckpt model/model_007000.pth : Inferred model.

--score_threshold 0.3 : The threshold of inference. 

--debugImage 1 : Switch to display the image of the inference result. 

 

 

 

10_inference_api.ipynb

11_inference_api_browser.ipynb

 

Inference API, run 10_inference_api.ipynb to open the server, load model/model_007000.pth, and then run 11_inference_api_browser.ipynb, jump out of the browser, you can select the picture for inference. 

 

 

 

inference.png


Recommended Article

1.
LEADERG AOI VISION - AI Image Analysis Software (No Code, Windows User Interface, Deep Learning, Machine Learning)

2.
LEADERG AI ZOO - AI Sample Code Software (Save 90% of Development Time, Low Code, Jupyter Lab User Interface, Deep Learning, Machine Learning, Big Data)

3.
LEADERG AI Computer (Deep Learning, PC, workstation, server, NVIDIA GPU, TESLA A100, RTX-3090-24G, Intel VPU, GPU Server)

4.
LEADERG AI Education

Thanks for our customers

Taiwan University, Tsing Hua University, Yang Ming Chiao Tung University, Cheng Kung University, Taipei Medical University, Taipei University of Nursing and Health Sciences, National Chung Hsing University, Chi Nan University, Ilan University, United University, Defence University, Military Academy, Naval Academy, Feng Chia University, Chang Gung University, I-Shou University, Shih Chien University, Taiwan University of Science and Technology, Taichung University of Science and Technology, Yunlin University of Science and Technology, Chin-Yi University of Science, Formosa University, Pintung University of Science and Technology, Kaohsiung University of Science and Technology, Chaoyang University of Technology, Ming Chi University of Technology, Southern Taiwan University of Science and Technology, China University of Technology, Gushan Senior High School, Taipei Veterans General Hospital, Chang Gung Medical Foundation, Tzu Chi Medical Foundation, E-Da Hospital, Industry Technology Research Institute, Institute for Information Industry, Chung-Shan Institute of Science and Technology, Armaments Bureau, Ministry of Justice Investigation Bureau, Institute of Nuclear Energy Research, Endemic Species Research Institute, Institute of Labor, Occupational Safety And Health, Metal Industries Research & Development Centre, Taiwan Instrument Research Institute, Automotive Research & Testing Center, Taiwan Water Corporation, Taiwan Semiconductor Manufacturing Co., Ltd., United Microelectronics Corp., Nanya Technology, Winbond Electronics Corp., Xintec Inc., Arima Lasers Corporation, AU Optronics Corporation, Innolux Corporation, HannStar Display Corporation, Formosa Plastics Group., Formosa Technologies Corporation, Nan Ya Plastics Corp., Formosa Chemicals & Fibre Corporation, Chinese Petroleum Corporation, Logitech, ELAN Microelectronics Corp., Lextar Electronics Corporation, Darfon Electronics Corp., WPG Holdings, Mirle Automation Corporation, Symtek Automation Asia Co., Ltd, ChipMOS Technologies Inc., Dynapack International Technology Corporation, Primax Electronics Ltd., Feng Hsin Steel, China Ecotek, Grade Upon Technology Corp., AAEON Technology Inc., Stark Technology, Inc., Horng Terng Automation Co., Ltd., Zhen Ding Technology Holding Ltd, Boardtek Electronics Corporation, MiTAC International Corporation, Allion Labs, Inc., Sound Land Corp., Hong Hu Tech, etc.