Image recognition data efficient training method and system based on YOLOv5 model network

By constructing a full sample dataset and using multiple inheritance network iterative training methods, the problems of weak overfitting, non-convergence and generalization capabilities during the training of YOLOv5 model are solved, efficient and accurate model training is achieved, the application scenarios of the model are expanded and its performance is improved.

CN119919752APending Publication Date: 2025-05-02SHANGHAI SATELLITE ENG INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411809894.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

During the training process, the YOLOv5 model is prone to problems such as overfitting, non-convergence and weak generalization capabilities, and the sample data set is complex, which affects the accuracy and recall of the model weights.

Method used

By constructing a full sample dataset and dividing it into a training dataset, a test dataset and a verification dataset, a multiple-inherited network iterative training method is adopted, and the training process of the YOLOv5 model is optimized by using gradient decreasing.

Benefits of technology

The complexity of obtaining specific samples is reduced, the number of samples and generalization is enhanced, the orderliness of the model training process is improved, the risks of overfitting and non-convergence are reduced, the application scenarios of the YOLOv5 model are expanded, and its economic value and application performance are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919752A_ABST
    Figure CN119919752A_ABST
Patent Text Reader

Abstract

The invention provides an image recognition data efficient training method and system based on a YOLOv5 model network. The method comprises the steps of selecting image data information containing multiple types of targets and different scenes; extracting each type of target and scene information to form independent image data; performing automatic labeling and association on the single image data; performing random recombination and reconstruction on different targets and different scenes to form a full sample data set; combining a plurality of groups of different training data sets, test data sets and verification data sets based on a full sample data set; according to different training hardware system performances, adjusting a training kernel usage amount and a training scale of the YOLOV5 model network; setting and adjusting the round number of each training and a learning rate parameter by using a gradient decreasing method; and carrying out multiple inheritance type network iteration training based on a YOLOV5 model by utilizing different data set combinations and different parameter designs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent deep learning and image recognition technology, and in particular to an efficient training method for image recognition data based on a YOLOv5 model network. Background Art

[0002] Image recognition technology is an important research branch in the field of computer vision. It uses computers to preprocess, extract features, analyze and understand images, so as to identify various potential objects in the image. Traditional image recognition models can be divided into two parts: feature extractor and classifier: excellent feature extraction methods have good robustness in various complex environments, while classifiers are mainly composed of some shallow machine learning algorithms, which are used to predict the category to which the features obtained by the extractor belong. Computer vision technology has become one of the most important artificial intelligence technologies. Neural networks began to become popular in the 1980s. Unlike traditional feature extraction methods, deep neural networks usually complete knowledge extraction and learning in an end-to-end manner. With the rapid development of artificial intelligence technology and computer performance, image recognition technology based on deep convolutional neural networks has rapidly expanded from targeted application scenarios to a standard scientific tool and has been applied to all natural science and technology application fields.

[0003] The YOLO target detection framework was proposed in 2016. It uses the idea of ​​regression and treats target detection as a regression problem in a one-stage target detection task framework. It is a typical end-to-end target detection algorithm. The model directly completes the three stages of feature extraction, bounding box regression and classification in the same branchless convolutional neural network. The detection model structure is simple and direct, and the detection speed is greatly improved, making the target detection technology based on deep learning meet the real-time target detection tasks.

[0004] So far, the widely used target detection algorithm based on the YOLO model is version v5. The YOLOv5 module network algorithm has a deep and adjustable size, and is flexible in multiple parameters such as learning rate and segmentation form. At the same time, after large sample training, the detection performance of the obtained weights is excellent. However, the YOLOv5 model also has some common problems and challenges. First, the quality of samples of different classification targets and the richness of background environment information will have a great impact on the final accuracy and recall rate of the model weights. Secondly, the sample data set preparation and acquisition process for specific target classification detection is complicated, resulting in frequent problems of small number and type of samples, which ultimately affects the generalization ability of the model weights and is not very applicable. Finally, with the development of deep learning image recognition technology, the model network is becoming more and more complex, and it is very easy to have overfitting risks during model training, especially when the sample coverage is insufficient. At the same time, when the samples are abundant, the model training process will face the problem of slow convergence, non-convergence, or even only local optimality. Therefore, how to use fast, effective, and optimized standard methods to complete the training of the YOLOv5 model network is a major challenge that needs to be solved urgently. Summary of the invention

[0005] In view of the defects in the prior art, the purpose of the present invention is to provide an image recognition data training method and system based on the YOLOv5 model network.

[0006] According to the present invention, an image recognition data training method based on a YOLOv5 model network includes:

[0007] Step S1: construct a full sample data set and divide the full sample data set into a training data set, a test data set and a validation data set;

[0008] Step S2: Use the training data set to perform multiple inheritance network iterative training on the YOLOV5 model, use the test data set and the verification data set to test and verify the current YOLOV5 model, and obtain the trained YOLOV5 model;

[0009] In the multiple successive network iterative training, the number of rounds of each training and the learning rate parameters are set and adjusted by the gradient decreasing method.

[0010] Preferably, the step S1 comprises:

[0011] Step S1.1: Acquire image data information including multiple categories of targets and different scenes;

[0012] Step S1.2: extracting each category of target and scene information to obtain separate image data;

[0013] Step S1.3: Automatically label and associate individual image data;

[0014] Step S1.4: Randomly reorganize and reconstruct different targets and different scenes to form a full sample data set;

[0015] Step S1.5: Based on the full sample data set, randomly allocate in different proportions to construct multiple sets of different training data sets, test data sets, and validation data sets.

[0016] Preferably, the method further comprises: adjusting the training core usage and training scale of the YOLOV5 model according to different training hardware system performances;

[0017] When the number of CPU cores in the training hardware system is x, the number of GPUs is y, the GPU memory is zGB, and the size of each image is pGB, set the relevant parameters in the YOLOv5 model to x for workers, y for devices, and round down the batch-size to z / p;

[0018] Trigger YOLOv5 model training. If the current YOLOv5 model cannot run, the current YOLOv5 model training exceeds the GPU memory. Then adjust the workers gradient decrease a and the batch-size gradient decrease y. Repeat the triggering of the YOLOv5 model for training until the YOLOv5 model starts normal training and prompts that the GPU usage rate is between 85% and 96%.

[0019] Preferably, step S1.2 comprises: performing target extraction, target and scene fusion extraction, and separate extraction of scenes without targets or targets based on each image in the image data information to obtain a target image set, a scene image set, and a target scene fusion set.

[0020] Preferably, the step S1.4 comprises: randomly combining the automatically labeled target image set, the scene image set and the target scene fusion set to form a full sample data set.

[0021] Preferably, the method further comprises: using the precision and recall curve PR as evaluation indicators of target recognition and classification performance; when both P and R are above preset values ​​and the trend has converged, training is no longer continued to obtain the final weight.

[0022] An image recognition data training system based on a YOLOv5 model network provided by the present invention includes:

[0023] Module M1: Construct a full sample data set and divide the full sample data set into a training data set, a test data set, and a validation data set;

[0024] Module M2: Use the training data set to perform multiple inheritance network iterative training on the YOLOV5 model, use the test data set and verification data set to test and verify the current YOLOV5 model, and obtain the trained YOLOV5 model;

[0025] In the multiple successive network iterative training, the number of rounds of each training and the learning rate parameters are set and adjusted by the gradient decreasing method.

[0026] Preferably, the module M1 comprises:

[0027] Module M1.1: Acquire image data information including multiple categories of targets and different scenes;

[0028] Module M1.2: Extract each category of target and scene information to obtain separate image data;

[0029] Module M1.3: Automatically label and associate individual image data;

[0030] Module M1.4: Randomly reorganize and reconstruct different targets and scenarios to form a full sample data set;

[0031] Module M1.5: Based on the full sample data set, randomly allocate in different proportions to construct multiple sets of different training data sets, test data sets, and validation data sets.

[0032] Preferably, the system further comprises: adjusting the training core usage and training scale of the YOLOV5 model according to different training hardware system performances;

[0033] When the number of CPU cores in the training hardware system is x, the number of GPUs is y, the GPU memory is zGB, and the size of each image is pGB, set the relevant parameters in the YOLOv5 model to x for workers, y for devices, and round down the batch-size to z / p;

[0034] Trigger YOLOv5 model training. If the current YOLOv5 model cannot run, the current YOLOv5 model training exceeds the GPU memory. Then adjust the workers gradient decrease a and the batch-size gradient decrease y. Repeat the triggering of the YOLOv5 model for training until the YOLOv5 model starts normal training and prompts that the GPU usage rate is between 85% and 96%.

[0035] Preferably, the module M1.2 comprises: performing target extraction, target and scene fusion extraction, and scene extraction without the target or without the target based on each image in the image data information, to obtain a target image set, a scene image set, and a target scene fusion set;

[0036] The module M1.4 includes: randomly combining the automatically labeled target image set, the scene image set and the target scene fusion set to form a full sample data set.

[0037] Compared with the prior art, the present invention has the following beneficial effects:

[0038] 1. The present invention reduces the complexity of obtaining specific samples, greatly increases the number of samples and generalization, and effectively improves the orderliness of the model training process, improves efficiency and significantly reduces the risk of overfitting and non-convergence in training;

[0039] 2. The present invention expands the application scenarios of the YOLOv5 intelligent algorithm model, reduces development costs, and improves its economic value and application performance;

[0040] 3. The present invention solves the problems of low efficiency in adjusting network training parameters of intelligent detection models and easy overfitting of sample training under the conditions of limited computing resources, limited number of samples and limited time nodes. Through a high-efficiency and high-precision model sample training method, the application scenarios of the YOLOv5 intelligent algorithm model are expanded, development costs are reduced, and economic value and application performance are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0042] Figure 1 Flow chart of the method steps in an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0044] Example 1

[0045] According to the present invention, an efficient training method for image recognition data based on a YOLOv5 model network is provided, comprising:

[0046] Step S1: construct a full sample data set and divide the full sample data set into a training data set, a test data set and a validation data set;

[0047] In this embodiment, as much image data information as possible including multiple categories of targets and different scenes is selected; each category of target and scene information is extracted to form separate image data; the single image data is automatically labeled and associated; different targets and different scenes are randomly reorganized and reconstructed to form a full sample data set; based on the full sample data set, multiple sets of different training data sets, test data sets and verification data sets are constructed in different proportions and random allocations;

[0048] Step S2: Use the training data set to perform multiple inheritance network iterative training on the YOLOV5 model, use the test data set and the verification data set to test and verify the current YOLOV5 model, and obtain the trained YOLOV5 model;

[0049] In this embodiment, according to the performance of different training hardware systems, the training core usage and training scale of the YOLOV5 model network are adjusted to fully utilize the hardware such as GPU; the number of rounds of each training and the learning rate parameters are set and adjusted by the gradient decreasing method; using different data set combinations and different parameter designs, multiple inheritance network iterative training is performed based on the YOLOV5 model, and the precision and recall rate curves (PR) are used as evaluation indicators of target recognition and classification performance, and finally the trained high-performance network model weights are efficiently obtained for applications such as high-precision image recognition.

[0050] Example 2

[0051] Embodiment 2 is a preferred embodiment of Embodiment 1

[0052] According to the present invention, an image recognition data training method based on a YOLOv5 model network includes:

[0053] Step 1: Select as much image data information as possible containing multiple categories of targets and different scenes;

[0054] Specifically, the step 1 includes:

[0055] Step 1.1: There are m categories of detection classification targets and n scenes. The selected image data information set should generally cover each category of targets, various forms, and appear in each scene. The image set S should satisfy S≥20×m×n and S≥1000; among them, 20 is the morphological bottom line, that is, each category of targets has at least 20 different pictures in each scene.

[0056] Step 2: Extract the target and scene information of each category to form separate image data;

[0057] Specifically, the step 2 includes:

[0058] Step 2.1: For each image in the image data information set, target extraction, target and scene fusion extraction, and scene extraction without target or without target are performed to form a target image set, a scene image set, and a target scene fusion set.

[0059] Step 3: Automatically label and associate single image data;

[0060] Specifically, the step 3 includes:

[0061] Step 3.1: Automatically label the target image set, scene image set and target scene fusion set with target categories 0 to m-1, and do not label scenes without targets.

[0062] Step 4: Randomly reorganize and reconstruct different targets and different scenarios to form a full sample data set;

[0063] Specifically, step 4 includes:

[0064] Step 4.1: Randomly combine the automatically labeled target image set, scene image set and target scene fusion set to form a full sample data set with different target locations, comprehensive scene features, target coexistence coverage and automatically generated labels. The number of samples in the full sample data set is SS ≥ 10000 or SS ≥ 200 × m × n, whichever is greater;

[0065] Step 5: Based on the full sample data set, construct multiple sets of different training data sets, test data sets, and validation data sets in different proportions and random allocations;

[0066] Specifically, the step 5 includes:

[0067] Step 5.1: Randomly construct 5 sets of training sets, test sets, and validation sets according to the ratio of 7:2:1 for the full sample data set; randomly construct 5 sets of training sets, test sets, and validation sets according to the ratio of 6:2:2; randomly construct 5 sets of training sets, test sets, and validation sets according to the ratio of 8:1:1;

[0068] Step 6: According to the performance of different training hardware systems, adjust the training core usage and training scale of the YOLOv5 model network to fully utilize the GPU and other hardware;

[0069] Specifically, the step 6 includes:

[0070] Step 6.1: The number of CPU cores in the training hardware system is x, the number of GPUs is y, the GPU memory is z GB, the size of each image is p GB, and the relevant parameters in YOLOv5 are set to workers x, devices y, and batch-size rounded down to z / p;

[0071] Step 6.2: Start YOLOv5 training. If it exceeds the GPU memory and cannot run, adjust the workers gradient decrease by 2 and the batch-size gradient decrease by y, and start the training in sequence until YOLOv5 can be trained normally and the GPU usage rate is between 85% and 96%.

[0072] Step 7: Use the gradient descent method to set and adjust the number of training rounds and learning rate parameters for each training;

[0073] Specifically, the step 7 includes:

[0074] Step 7.1: Set the initial training round number epochs and the initial value of the learning rate lr;

[0075] Step 7.2: Set 5 groups of epochs with a gradient decrease of 50, set 5 groups of lr with a gradient decrease of 0.02; continue to set 5 groups of epochs with a gradient decrease of 20, set 5 groups of lr with a gradient decrease of 0.01; continue to set 5 groups of epochs with a gradient decrease of 10, set 5 groups of lr with a gradient decrease of 0.005. Thus, 15 groups of epochs and lr parameter combinations are obtained.

[0076] Step 8: Using different data set combinations and different parameter designs, multiple inherited network iteration training is performed based on the YOLOV5 model, and the PR curve is used as the evaluation index of the target recognition and classification performance to efficiently obtain the trained high-performance network model weights for high-precision image recognition;

[0077] Specifically, the step 8 includes:

[0078] Step 8.1: Use the 15 sets of training sets, test sets, and validation sets described in the above scheme, match the 15 sets of parameter setting combinations described in the above scheme, and perform 15 YOLOv5 weight inheritance training;

[0079] Step 8.2: During the 15 weight training processes, according to the PR curve value obtained each time, when both P and R are above 0.8 and the trend has converged, training can be stopped and the final weight can be obtained.

[0080] Example 3

[0081] Embodiment 3 is a preferred embodiment of Embodiment 1

[0082] According to the present invention, an efficient training method for image recognition data based on the YOLOv5 model network is provided. Figure 1 As shown, the following steps are included:

[0083] Step 1: Select as much image data information as possible including multiple categories of targets and different scenes;

[0084] Step 1.1: Select m = 5 categories of detection classification targets, n = 10 scenes, and the selected image data information set should generally cover each category of targets, various forms, and appear in each scene. The image set S = 1000;

[0085] Step 2: extracting each category of target and scene information to form separate image data;

[0086] Step 2.1: In the above scheme, each image in the image data set is subjected to target extraction, target and scene fusion extraction, and scene extraction to form a target image set, a scene image set, and a target scene fusion set.

[0087] Step 3: Automatically label and associate single image data;

[0088] Step 3.1: Automatically label the target image set, scene image set and target scene fusion set described in the above scheme with labels of target categories 0 to 4, and do not label scenes without targets.

[0089] Step 4: Randomly reorganize and reconstruct different targets and scenarios;

[0090] Step 4.1: Randomly combine the automatically labeled target image set, scene image set and target scene fusion set described in the above scheme to form a full sample data set with different target locations, comprehensive scene features, target coexistence coverage and automatically generated labels. The number of samples in the full sample data set is SS = 10000;

[0091] Step 5: Based on the full sample data set, construct multiple sets of different training data sets, test data sets, and validation data sets in different proportions and random allocations;

[0092] Step 5.1: For the full sample data set described in the above scheme, randomly construct 5 sets of training sets, test sets, and validation sets in a ratio of 7:2:1; randomly construct 5 sets of training sets, test sets, and validation sets in a ratio of 6:2:2; and randomly construct 5 sets of training sets, test sets, and validation sets in a ratio of 8:1:1.

[0093] Step 6: According to the performance of different training hardware systems, adjust the training core usage and training scale of the YOLOv5 model network to fully utilize the GPU and other hardware;

[0094] Step 6.1: The number of CPU cores in the training hardware system is 64, the number of GPUs is 2, the GPU memory is 64GB, the size of each image is 0.5GB, and the relevant parameters in YOLOv5 are set as workers=64, device=0,1, batch-size=128;

[0095] Step 6.2: Start YOLOv5 training, and it prompts that the GPU memory is exceeded and cannot run. Adjust the workers gradient decrease by 2 and the batch-size gradient decrease by 2, and start training in sequence until workers = 16 and batch-size = 16. YOLOv5 can be trained normally and prompts that the GPU usage rate is 94%.

[0096] Step 7: Use the gradient decreasing method to adjust the number of training rounds and learning rate parameters.

[0097] Step 7.1: Set the initial training round number epochs = 400 and the learning rate lr = 0.2;

[0098] Step 7.2: Set 5 groups of epochs with a gradient decrease of 50, set 5 groups of lr with a gradient decrease of 0.02; continue to set 5 groups of epochs with a gradient decrease of 20, set 5 groups of lr with a gradient decrease of 0.01; continue to set 5 groups of epochs with a gradient decrease of 10, set 5 groups of lr with a gradient decrease of 0.005. Thus, 15 groups of epochs and lr parameter combinations are obtained.

[0099] Step 8: Using different data set combinations and different parameter designs, multiple inherited network iteration training is performed based on the YOLOV5 model, and the PR curve is used as the evaluation index of the target recognition and classification performance to efficiently obtain the trained high-performance network model weights;

[0100] Step 8.1: Use the 15 sets of training sets, test sets, and validation sets described in the above scheme, match the 15 sets of parameter setting combinations, and perform 15 YOLOv5 weight inheritance training;

[0101] Step 8.2: During the 12th weight training, P = 0.885 and R = 0.801, and the trend has converged during each round of training. At this time, no further training is carried out, and the weight obtained this time is used as the final weight.

[0102] In order to illustrate the practicality of the method in the present invention, an existing method is selected as a comparison method. The existing technology generally directly uses the selected unreconstructed sample data set, sets the YOLOv5 model parameters according to different operator experiences during the model training process, and uses the same set of training sets, test sets, and validation sets for inherited training. Finally, after 1 to 3 large rounds of training, the final weights P = 0.623, R = 0.487 are obtained.

[0103] The above analysis shows that the model network training using traditional methods has the problems of limited number of high-quality samples, single data set, no dynamic matching of inherited training characteristics in training parameter settings, and model weights easily converging to local minimum values ​​and overfitting after large rounds of training, which ultimately makes it difficult to improve the PR curve of model weights and the accuracy of target classification detection cannot be improved.

[0104] The efficient training method for image recognition data based on the YOLOv5 model network provided by the present invention reduces the complexity of obtaining specific samples under the conditions of limited computing resources, limited sample quantity, and limited time nodes, greatly enhances the number of samples and generalization, and effectively improves the orderliness of the model training process, improves efficiency, and greatly reduces the risk of low efficiency, overfitting, and non-convergence in the adjustment of intelligent detection model network training parameters. Through the high-efficiency and high-precision model sample training method, the method expands the application scenarios of the YOLOv5 intelligent algorithm model, reduces development costs, and improves its economic value and application performance.

[0105] The present invention also provides an efficient training system for image recognition data based on the YOLOv5 model network. The efficient training system for image recognition data based on the YOLOv5 model network can be realized by executing the process steps of the efficient training method for image recognition data based on the YOLOv5 model network, that is, those skilled in the art can understand the efficient training method for image recognition data based on the YOLOv5 model network as a preferred implementation of the efficient training system for image recognition data based on the YOLOv5 model network.

[0106] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, the system and its various devices, modules, and units provided by the present invention can be completely realized in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps to realize the same functions. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.

[0107] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. A method for training image recognition data based on a YOLOv5 model network, characterized in that: include: Step S1: construct a full sample data set and divide the full sample data set into a training data set, a test data set and a validation data set; Step S2: Use the training data set to perform multiple inheritance network iterative training on the YOLOV5 model, use the test data set and the verification data set to test and verify the current YOLOV5 model, and obtain the trained YOLOV5 model; In the multiple successive network iterative training, the number of rounds of each training and the learning rate parameters are set and adjusted by the gradient decreasing method.

2. The image recognition data training method based on the YOLOv5 model network according to claim 1, characterized in that: The step S1 comprises: Step S1.1: Acquire image data information including multiple categories of targets and different scenes; Step S1.2: extracting each category of target and scene information to obtain separate image data; Step S1.3: Automatically label and associate individual image data; Step S1.4: Randomly reorganize and reconstruct different targets and different scenes to form a full sample data set; Step S1.5: Based on the full sample data set, randomly allocate in different proportions to construct multiple sets of different training data sets, test data sets, and validation data sets.

3. The image recognition data training method based on the YOLOv5 model network according to claim 1, characterized in that: The method further includes: adjusting the training core usage and training scale of the YOLOV5 model according to different training hardware system performances; When the number of CPU cores in the training hardware system is x, the number of GPUs is y, the GPU memory is zGB, and the size of each image is pGB, set the relevant parameters in the YOLOv5 model to x for workers, y for devices, and round down the batch-size to z / p; Trigger YOLOv5 model training. If the current YOLOv5 model cannot run, the current YOLOv5 model training exceeds the GPU memory. Then adjust the workers gradient decrease a and the batch-size gradient decrease y. Repeat the triggering of the YOLOv5 model for training until the YOLOv5 model starts normal training and prompts that the GPU usage rate is between 85% and 96%.

4. The image recognition data training method based on the YOLOv5 model network according to claim 2, characterized in that: The step S1.2 includes: performing target extraction, target and scene fusion extraction, and separate extraction of scenes without targets or without targets based on each image in the image data information to obtain a target image set, a scene image set, and a target scene fusion set.

5. The image recognition data training method based on the YOLOv5 model network according to claim 4, characterized in that: The step S1.4 includes: randomly combining the automatically labeled target image set, the scene image set and the target scene fusion set to form a full sample data set.

6. The image recognition data training method based on the YOLOv5 model network according to claim 1, characterized in that: The method also includes: using the precision and recall rate curve PR as an evaluation index of the target recognition classification performance; when both P and R are above the preset value and the trend has completed convergence, the training is no longer continued to obtain the final weight.

7. An image recognition data training system based on a YOLOv5 model network, characterized in that: include: Module M1: Construct a full sample data set and divide the full sample data set into a training data set, a test data set, and a validation data set; Module M2: Use the training data set to perform multiple inheritance network iterative training on the YOLOV5 model, use the test data set and verification data set to test and verify the current YOLOV5 model, and obtain the trained YOLOV5 model; In the multiple successive network iterative training, the number of rounds of each training and the learning rate parameters are set and adjusted by the gradient decreasing method.

8. The image recognition data training system based on the YOLOv5 model network according to claim 7, characterized in that: The module M1 comprises: Module M1.1: Acquire image data information including multiple categories of targets and different scenes; Module M1.2: Extract each category of target and scene information to obtain separate image data; Module M1.3: Automatically label and associate individual image data; Module M1.4: Randomly reorganize and reconstruct different targets and scenarios to form a full sample data set; Module M1.5: Based on the full sample data set, randomly allocate in different proportions to construct multiple sets of different training data sets, test data sets, and validation data sets.

9. The image recognition data training system based on the YOLOv5 model network according to claim 7, characterized in that: The system further includes: adjusting the training core usage and training scale of the YOLOV5 model according to different training hardware system performances; When the number of CPU cores in the training hardware system is x, the number of GPUs is y, the GPU memory is zGB, and the size of each image is pGB, set the relevant parameters in the YOLOv5 model to x for workers, y for devices, and round down the batch-size to z / p; Trigger YOLOv5 model training. If the current YOLOv5 model cannot run, the current YOLOv5 model training exceeds the GPU memory. Then adjust the workers gradient decrease a and the batch-size gradient decrease y. Repeat the triggering of the YOLOv5 model for training until the YOLOv5 model starts normal training and prompts that the GPU usage rate is between 85% and 96%.

10. The image recognition data training system based on the YOLOv5 model network according to claim 8, characterized in that: The module M1.2 includes: performing target extraction, target and scene fusion extraction, and scene extraction without the target or without the target based on each image in the image data information, to obtain a target image set, a scene image set, and a target scene fusion set; The module M1.4 includes: randomly combining the automatically labeled target image set, the scene image set and the target scene fusion set to form a full sample data set.