Model training data processing method, system and server

Through the application of precise annotation and conversion strategies based on digital image labels, the complex problem of model training data preprocessing process in the prior art is solved, and the automated processing of data and compatibility improvement is achieved.

CN119251623BActive Publication Date: 2025-04-18FITOW (TIANJIN) DETECTION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411766044.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-04-18
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

In the prior art, the preprocessing process of model training data is complex, requiring tedious data collection, labeling and conversion, and the script usage is large, the compatibility is low, and the threshold for getting started is high.

Method used

Provide a model training data processing method, which accurately annotates through the label of digital images, generates annotation files, determines the conversion strategy, and converts the data set according to the strategy to realize automated preprocessing of the data.

Benefits of technology

It greatly reduces the usage of scripts, increases compatibility, lowers the threshold for use, and simplifies the preprocessing process of model training data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251623B_ABST
    Figure CN119251623B_ABST
Patent Text Reader

Abstract

The present invention provides a model training data processing method, system and server. In the field of data processing, the method can accurately annotate based on the label of a digital image, so as to quickly obtain a corresponding annotation file, and can accurately obtain the annotation box of the digital image based on the annotation file, so as to determine the corresponding conversion strategy, and then determine the data set corresponding to the digital image according to the conversion strategy, and finally obtain the training data required for model training, thereby realizing automated processing of the preprocessing process of the model training data, and can implement the preprocessing process of the model training data under a specific server, which greatly reduces the use of scripts, increases compatibility and lowers the entry threshold of the model training data processing process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a model training data processing method, system and server. Background Art

[0002] Deep learning technology is widely used in the field of industrial quality inspection, bringing significant efficiency improvements, but the model data needs to be preprocessed in the process of deep learning detection to enable better model training. Specifically, the existing technology requires tedious preprocessing of data during model training. First, it is necessary to collect diverse data, and then it is necessary to label these data in a tedious and complex way. In this process, it is necessary to label and check the digital images involved in model training, remove irrelevant or low-quality image data, and strengthen the digital images according to specific needs to increase the diversity of data.

[0003] In actual scenarios, the above process needs to be implemented using corresponding code scripts. There are many scripts involved, with low compatibility and a high entry threshold, which makes the preprocessing process of model training data more complicated. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a model training data processing method, system and server, which can accurately annotate based on the labels of digital images, so as to quickly obtain the corresponding annotation files, and can accurately obtain the annotation boxes of digital images based on the annotation files, so as to determine the corresponding conversion strategies, and then determine the data sets corresponding to the digital images according to the conversion strategies, and finally obtain the training data required for model training, thereby realizing automated processing of the preprocessing process of model training data, and can realize the preprocessing process of model training data under a specific server, which greatly reduces the use of scripts, increases compatibility and lowers the usage threshold, thereby solving the above-mentioned technical problems existing in the prior art.

[0005] In a first aspect, an embodiment of the present invention provides a method for processing model training data, the method comprising:

[0006] Data collection step, collecting and acquiring digital images to be processed;

[0007] The data labeling step is to obtain the label corresponding to the digital image, and use the label to label the digital image to obtain the label file corresponding to the digital image;

[0008] A data management step, determining a labeling frame of the digital image based on the labeling file, and determining a conversion strategy of the digital image using position data of the labeling frame;

[0009] In the data conversion step, the digital image is converted according to the attribute information, name information, annotation information and description information using the conversion strategy to obtain the data set corresponding to the digital image, and the data set is determined as the model training data.

[0010] In one embodiment, the data annotation step includes:

[0011] Determine the label that needs to be annotated for the digital image according to the attribute data of the digital image;

[0012] Obtaining marking parameters, segmentation parameters and classification parameters corresponding to the label, and obtaining category parameters of the digital image;

[0013] Based on the marking parameters, the segmentation parameters and the classification parameters, the digital image is annotated according to the category parameters to obtain an annotation file corresponding to the digital image.

[0014] In one embodiment, the data management step includes:

[0015] Obtain the completed preset database corresponding to the annotation file;

[0016] Determine the corresponding target field in the database based on the file name of the annotation file, and save the annotation file to the database according to the target field;

[0017] Read the digital image corresponding to the annotated file in the database, and obtain the annotated frame corresponding to the digital image;

[0018] Position data is determined based on the corresponding positional relationship between the annotation box and the digital image, and a conversion strategy corresponding to the digital image is determined using the position data.

[0019] In one embodiment, after reading the digital image corresponding to the annotated file in the database, the method further comprises: a data extraction step;

[0020] The data extraction steps include:

[0021] Determine a data partitioning strategy for the digital image according to attribute data corresponding to the digital image;

[0022] Generate a data extraction strategy corresponding to the digital image based on the data partitioning strategy;

[0023] The digital image is updated after being extracted using a data extraction strategy and according to attribute data.

[0024] In one embodiment, the data conversion step includes:

[0025] Determine the rectangular frame parameters and contour parameters involved in the digital image conversion process according to the conversion strategy;

[0026] Based on the rectangular frame parameters and the outline parameters, the corresponding attribute information, name information, annotation information and description information in the digital image conversion process are determined;

[0027] After controlling the digital image to be converted according to the attribute information, the name information, the annotation information and the description information, a data set corresponding to the digital image is obtained;

[0028] The data set is determined as model training data corresponding to the digital image.

[0029] In one embodiment, after the data management step, the method further includes: a data analysis step; wherein the data analysis step includes:

[0030] Traverse all the labels contained in the digital images in the database;

[0031] Based on all the labels corresponding to all the digital images contained in the database, an update strategy for the digital images is determined, and the conversion strategy is updated using the update strategy.

[0032] In one embodiment, before the data conversion step, the method further includes: a data enhancement step; wherein the data enhancement step includes:

[0033] Obtain the read address and data enhancement strategy corresponding to the digital image;

[0034] Traverse all digital images contained in the read address, and perform offset, brightness adjustment, and flip processing on the digital images according to the data enhancement strategy to obtain the enhancement processing results corresponding to the digital images;

[0035] The digital image is updated using the enhanced processing result.

[0036] In one embodiment, before the data conversion step, the method further includes: a tag extraction step; wherein the tag extraction step includes:

[0037] Determine position data corresponding to the label in the digital image based on the annotation file;

[0038] Determine the dictionary position corresponding to the tag according to the position data, and obtain the key-value pair corresponding to the dictionary position;

[0039] Update digital images using key-value pairs.

[0040] In a second aspect, an embodiment of the present invention provides a model training data processing system, the system comprising:

[0041] A data collection module, used for collecting and acquiring digital images to be processed;

[0042] A data annotation module is used to obtain labels corresponding to digital images, and annotate the digital images using the labels to obtain an annotation file corresponding to the digital images;

[0043] A data management module, used to determine a labeling frame of the digital image based on the labeling file, and determine a conversion strategy of the digital image using position data of the labeling frame;

[0044] The data conversion module is used to convert the digital image according to the attribute information, name information, annotation information and description information using the conversion strategy to obtain the data set corresponding to the digital image, and determine the data set as the model training data.

[0045] In a third aspect, an embodiment of the present invention further provides a server, comprising a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the steps of the model training data processing method provided in the first aspect.

[0046] In a fourth aspect, an embodiment of the present invention further provides a storage medium storing computer executable instructions. When the computer executable instructions are called and executed by a processor, the computer executable instructions prompt the processor to implement the steps of the model training data processing method provided in the first aspect.

[0047] A model training data processing method, system and server provided by the embodiment of the present invention, in the process of preprocessing the model training data, after collecting and obtaining the digital image to be processed, the method annotates the data, obtains the label corresponding to the digital image, and annotates the digital image using the label to obtain the annotated file corresponding to the digital image; then the annotated file is subjected to the data management process, and the annotated frame of the digital image is determined based on the annotated file, and the conversion strategy of the digital image is determined using the position data of the annotated frame; finally, the data conversion process is performed according to the conversion strategy, and the digital image is converted according to the attribute information, name information, annotation information and description information using the conversion strategy to obtain the data set corresponding to the digital image, and the data set is determined as the model training data. The method can accurately annotate based on the label of the digital image, so as to quickly obtain the corresponding annotated file, and can accurately obtain the annotated frame of the digital image based on the annotated file, so as to determine the corresponding conversion strategy, and then determine the data set corresponding to the digital image according to the conversion strategy, and finally obtain the training data required for model training, thereby realizing the automation of the preprocessing process of the model training data, and can realize the preprocessing process of the model training data under a specific server, greatly reducing the use of scripts, increasing compatibility and lowering the threshold for getting started with the model training data processing process.

[0048] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0049] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 A flowchart of a model training data processing method provided by an embodiment of the present invention;

[0052] Figure 2 A flowchart of a data labeling step in a model training data processing method provided by an embodiment of the present invention;

[0053] Figure 3 A flowchart of a data management step in a model training data processing method provided by an embodiment of the present invention;

[0054] Figure 4 A flowchart of a data extraction step in a model training data processing method provided by an embodiment of the present invention;

[0055] Figure 5 A flowchart of a data conversion step in a model training data processing method provided by an embodiment of the present invention;

[0056] Figure 6 A flowchart of a data analysis step in a model training data processing method provided by an embodiment of the present invention;

[0057] Figure 7 A flowchart of a data enhancement step in a model training data processing method provided by an embodiment of the present invention;

[0058] Figure 8 A flowchart of a label extraction step in a model training data processing method provided by an embodiment of the present invention;

[0059] Fig. 9 A flowchart of another model training data processing method provided by an embodiment of the present invention;

[0060] Fig.10 A schematic diagram of the structure of a model training data processing system provided by an embodiment of the present invention;

[0061] Fig.11 A schematic diagram of the structure of a server provided in an embodiment of the present invention.

[0062] icon:

[0063] 1010-data collection module; 1020-data annotation module; 1030-data management module; 1040-data conversion module;

[0064] 101 - processor; 102 - memory; 103 - bus; 104 - communication interface. DETAILED DESCRIPTION

[0065] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described in combination with the embodiments below. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0066] The application of deep learning technology in the field of industrial quality inspection (especially the detection of wrong or missing assembly of automobile assembly parts) is becoming more and more widespread, and has brought significant improvements in efficiency and accuracy. Compared with deep learning, traditional quality inspection methods mainly rely on manual inspection and simple automated equipment. These methods have many limitations and are inefficient. For example, manual inspection is slow and easily causes bottlenecks in the production line; human factors may lead to false detection and missed detection, which is costly; and a large amount of manpower is required, especially in large-scale production. The emergence of deep learning technology, especially convolutional neural networks (CNN), has brought new possibilities for industrial quality inspection through breakthroughs in computer vision. Through relevant automated visual inspection systems, quality inspection tasks can be completed in a shorter time with higher accuracy.

[0067] However, before this work, a lot of preparatory work needs to be done on the data. For example, the data collection process needs to collect diverse data and accurately control the data source. The data collection process needs to collect a large amount of image data to ensure that the data covers different product types, production batches, environmental conditions, etc., in order to improve the generalization ability of the model. The control of data sources can be achieved through shooting on the actual production line, shooting in the laboratory, using simulators to generate data, or obtaining from existing data sets.

[0068] Data labeling is the foundation of deep learning model training, and accurate and high-quality labeled data is crucial to model performance. Labelers use professional labeling tools to label images. These tools usually provide functions such as image labeling, box marking, segmentation, and multi-label classification. Label image classification labels to mark the category of each image, such as qualified or unqualified. Label target detection labels to mark the bounding box and category of the target, such as the color of the door interior and the category of the chassis screws.

[0069] During the annotation inspection process, the annotators conduct multiple rounds of inspection and correction of the images to remove irrelevant or low-quality image data, ensure the quality of the data set, and ensure the accuracy of the annotations.

[0070] During the data optimization and enhancement process, specific algorithm engineers are required to measure the balance of labels by counting the number of labeled labels. For missing label data, traditional methods such as rotation, scaling, flipping, and color adjustment can be used to increase data diversity.

[0071] It can be seen that the work before model training involves several important steps. The first is to plan the data reasonably and write code scripts to extract some data for labeling. After the labeling is completed, it is necessary to carefully check the accuracy of the labeling one by one to ensure the quality of the data. Then, the labeled data file is converted into a format using a code script, because the labeled data format cannot usually be used directly for training. Next, analyze the balance of the labeled content and use the script for statistics. If the data is found to be unbalanced, it is necessary to perform additional labeling or offline data enhancement processing to ensure the representativeness and effectiveness of the training data, which all need to be executed using code scripts.

[0072] In the above process, a large number of code scripts will be frequently written and used, and they need to be modified and adjusted according to the specific needs of each project. It can be seen that the above process needs to use the corresponding code script to be implemented, and the scripts involved are numerous, the compatibility is low, and the threshold for getting started is high, which leads to a relatively complicated preprocessing process of the model training data. Based on this, the present invention implements a model training data processing method, system and server, which can accurately annotate based on the label of the digital image, so as to quickly obtain the corresponding annotation file, and can accurately obtain the annotation box of the digital image based on the annotation file, so as to determine the corresponding conversion strategy, and then determine the data set corresponding to the digital image according to the conversion strategy, and finally obtain the training data required for model training, thereby realizing the automation of the preprocessing process of the model training data, and the preprocessing process of the model training data can be realized under a specific server, which greatly reduces the use of scripts, increases compatibility and lowers the threshold for use, thereby solving the above technical problems existing in the prior art.

[0073] To facilitate understanding of this embodiment, a model training data processing method disclosed in an embodiment of the present invention is first described in detail. Figure 1 As shown, the method includes:

[0074] Data collection step S101, collecting and acquiring the digital image to be processed;

[0075] Data labeling step S102, obtaining a label corresponding to the digital image, and labeling the digital image using the label to obtain a labeling file corresponding to the digital image;

[0076] Data management step S103, determining a labeling frame of the digital image based on the labeling file, and determining a conversion strategy of the digital image using position data of the labeling frame;

[0077] In the data conversion step S104, the digital image is converted according to the attribute information, name information, annotation information and description information by using the conversion strategy to obtain a data set corresponding to the digital image, and the data set is determined as the model training data.

[0078] Specifically, the method first performs a data collection step, collects and obtains the digital image to be processed and then annotates the data. After obtaining the digital image to be annotated, obtain the corresponding label and use the label to annotate the digital image, so as to obtain the corresponding annotation file of the digital image. After the annotation file is obtained, a data management process is performed on it. The annotation box corresponding to the digital image can be determined through the annotation file, and then the position data of the annotation box is used to determine its specific position in the digital image, and the final conversion strategy is determined in combination with the digital image at the position. After the conversion strategy is determined, the digital image is converted according to the attribute information, name information, annotation information and description information using the conversion strategy, so as to obtain the data set corresponding to the digital image, such as a data set in COCO format, and finally the data set is determined as the model training data.

[0079] In the process of converting digital images by conversion, the attribute information involved is mainly for the annotation box. In actual scenes, the digital image can be annotated according to the attribute information such as the position and size of the annotation box to obtain the data set of the digital image.

[0080] In one implementation, the data annotation step S102 is as follows: Figure 2 As shown, including:

[0081] Step S201, determining the label that needs to be annotated for the digital image according to the attribute data of the digital image;

[0082] Step S202, obtaining marking parameters, segmentation parameters and classification parameters corresponding to the label, and obtaining category parameters of the digital image;

[0083] Step S203 , annotating the digital image based on the marking parameter, the segmentation parameter and the classification parameter and according to the category parameter to obtain an annotation file corresponding to the digital image.

[0084] The data annotation step is the basic step of model training data processing. In the data annotation process, the corresponding labels need to be obtained first. The label acquisition process is based on the attribute data of the digital image. For example, the name attribute of the digital image can be intercepted accordingly to obtain the corresponding label from the image name. After determining the label required for the digital image, the labeling parameter, segmentation parameter and classification parameter corresponding to the label are obtained. In actual scenarios, the labeling parameter is used to define the way of labeling on the digital image; the segmentation parameter is used to obtain the parameters of the label box in the digital image; the classification parameter is used to characterize multiple types of label boxes; the obtained category parameter mainly characterizes the total number of categories involved in the digital image. In addition, by determining the categories involved in the digital image, the corresponding category parameters are obtained. In actual scenarios, relevant annotation tools can be used to annotate the labels in the digital image. These tools usually provide functions such as image annotation, label box, segmentation, and multi-label classification. After obtaining the label of the digital image, mark the category of each picture, such as qualified, unqualified, etc. Label the target detection label, mark the target's bounding box and category, such as the door interior color, chassis screw category, etc. Finally, based on the marking parameters, segmentation parameters, and classification parameters, and according to the category parameters, label the digital image to obtain the labeling file corresponding to the digital image.

[0085] In one embodiment, the data management step S103, such as Figure 3 As shown, including:

[0086] Step S301, obtaining a preset database corresponding to the annotation file;

[0087] Step S302, determining the corresponding target field in the database based on the file name of the annotated file, and saving the annotated file to the database according to the target field;

[0088] Step S303, reading the digital image corresponding to the annotated file in the database, and obtaining the annotated frame corresponding to the digital image;

[0089] Step S304: determining position data based on the corresponding positional relationship between the annotation frame and the digital image, and determining a conversion strategy corresponding to the digital image using the position data.

[0090] In the actual processing process, the data management step will be implemented through a preset database. This step achieves refined management of digital images by flexibly importing digital image data and related annotation boxes. First, obtain the preset database corresponding to the annotation file, and then determine the corresponding target field based on the file name of the file, and then save the annotation file to the database according to the target field. Specifically, the file name of the annotation file is: "115213908_LDP95G96XRE305959_HJK_XRVRLFSHJKAKD00000_XYH

[0091] _B_01_1.jpg", which can be divided according to the "_" rule, HJK is the vehicle model, XRVRLFSHJKAKD represents the tire configuration 1, and XYH is the interior color 1. The above fields have corresponding fields in the database, so the annotation file can be saved to the database according to the fields.

[0092] Then, by reading the digital image corresponding to the annotation file in the database, the annotation box corresponding to the digital image is obtained, and the position data is determined based on the corresponding positional relationship between the annotation box and the digital image, and the conversion strategy corresponding to the digital image is determined using the position data. In actual scenarios, the annotation file corresponding to the digital image can be imported, the annotation file can be read and parsed, and the relevant algorithm can be used to determine whether each digital image has an annotation box; if so, the digital image is classified as a valid image, otherwise it is an empty image.

[0093] For this database, it can support exporting the marked database, and there are multiple deletion modes, which can be adjusted according to different needs. Each data import can be saved and recorded by different database names, and can be exported in a common format for viewing, which is easy to trace. There are three deletion modes: "Contains", "Equals", and "All". Specifically, Contains: If the name entered by the user contains the character in the database name list, it will be deleted. Equals: If the name entered by the user is exactly the same as the database name, it will be deleted. All: No name needs to be entered, and all databases in the database name list will be deleted.

[0094] In one embodiment, after reading the digital image corresponding to the annotated file in the database, the method further includes: a data extraction step; wherein the data extraction step is as follows: Figure 4 As shown, including:

[0095] Step S401, determining a data division strategy for the digital image according to attribute data corresponding to the digital image;

[0096] Step S402, generating a data extraction strategy corresponding to the digital image based on the data partitioning strategy;

[0097] Step S403: extract the digital image using the data extraction strategy and in accordance with the attribute data, and then update the digital image.

[0098] The data extraction process is to reduce the amount of data of the digital image. Specifically, first determine the data partitioning strategy based on the attribute data corresponding to the digital image, then use the strategy to generate the data extraction strategy corresponding to the digital image, and finally use the data extraction strategy to extract the digital image according to the attribute data. In actual scenarios, after obtaining the digital image, you can get the regular assembly data, and then divide it according to the vehicle model, derivative, color, camera point and other information. For example, for the door handle data marked in red, you can select the corresponding vehicle model, color, camera point to filter out the corresponding digital image, thereby completing the data extraction process.

[0099] In one embodiment, the data conversion step S104, such as Figure 5 As shown, including:

[0100] Step S501, determining rectangular frame parameters and outline parameters involved in the conversion process of the digital image according to the conversion strategy;

[0101] Step S502, determining corresponding attribute information, name information, annotation information and description information in the digital image conversion process based on the rectangular frame parameters and the outline parameters;

[0102] Step S503, controlling the digital image to be converted according to the attribute information, name information, annotation information and description information to obtain a data set corresponding to the digital image;

[0103] Step S504: determine the data set as model training data corresponding to the digital image.

[0104] The data conversion process mainly uses the conversion strategy to convert the digital image according to the specific format of the model training data, so as to obtain the corresponding data set. In the actual scenario, the conversion strategy is used to determine the rectangular box parameter Bounding Box and contour parameter Mask involved in the conversion process of the digital image. The rectangular box parameter Bounding Box is a rectangular box used to describe the target position, usually expressed by four parameters: (x, y): the coordinates of the upper left corner of the rectangular box; width: the width of the rectangular box; height: the height of the rectangular box. The contour parameter Mask is a pixel-level annotation used to accurately describe the contour of the target. It contains two parameters: all_points_x: the position of all points on the X axis; all_points_y: the position of all points on the Y axis.

[0105] Based on the rectangular frame parameters and contour parameters, the corresponding attribute information, name information, annotation information and description information in the digital image conversion process are determined, and the digital image is controlled to be converted according to the above information, so that the conversion of BOX frame and MASK between VIA and COCO formats, as well as the conversion between VIA and YOLO formats can be realized. In the process of VIA and COCO conversion, invalid and empty images can be automatically filtered to ensure that the id value corresponding to the digital image is an integer type. Different templates can also be added to be compatible with different projects.

[0106] In one embodiment, after the data management step, the method further comprises: a data analysis step; wherein the data analysis step is as follows: Figure 6 As shown, including:

[0107] Step S601, traverse all tags contained in the digital images in the database;

[0108] Step S602: determining an update strategy for digital images based on all tags corresponding to all digital images contained in the database, and updating the conversion strategy using the update strategy.

[0109] The execution of the data analysis step mainly analyzes the COCO format text involved in the digital image, and obtains the corresponding update strategy by accurately counting the number and distribution of pictures and labels. The update strategy is used to update the conversion strategy, thereby providing support for obtaining the final model training data in the subsequent data conversion step.

[0110] In one embodiment, before the data conversion step, the method further includes: a data enhancement step; wherein the data enhancement step is as follows: Figure 7 As shown, including:

[0111] Step S701, obtaining a read address and a data enhancement strategy corresponding to a digital image;

[0112] Step S702, traversing all digital images contained in the read address, and performing offset, brightness adjustment, and flipping processing on the digital images according to the data enhancement strategy, to obtain the enhancement processing results corresponding to the digital images;

[0113] Step S703: updating the digital image using the enhancement processing result.

[0114] The data enhancement step mainly involves performing corresponding image enhancement on digital images, including offset, brightness adjustment, flipping, etc., and can flexibly enhance strategies from single to multiple images. In the process of technical implementation, the corresponding digital image algorithm can be combined to perform offset, brightness, and flip adjustments on digital images according to the set threshold. At the same time, the annotation box follows the offset adjustment of the digital image, and then it is randomly executed according to the number of digital images, so that each data-enhanced digital image is different, and finally the update process of the digital image is realized.

[0115] In one embodiment, before the data conversion step, the method further includes: a tag extraction step; wherein the tag extraction step is as follows: Figure 8 As shown, including:

[0116] Step S801, determining the position data corresponding to the label in the digital image based on the annotation file;

[0117] Step S802, determining the dictionary position corresponding to the tag according to the position data, and obtaining the key-value pair corresponding to the dictionary position;

[0118] Step S803: update the digital image using the key-value pair.

[0119] The label extraction process also precedes the data conversion step. In actual scenarios, the labeled digital images can be selectively extracted for offline data enhancement. You can choose to retain the existing labels in the digital images, or convert them. It supports one-click export to COCO format to meet different needs. The technical implementation is to parse the annotation file, determine the location of the dictionary where the label is located, obtain the key value (for example: picture name), extract the annotation information and the digital image data at the same time and store them in a specific dictionary location, and finally realize the update process of the digital image. It should be explained that the dictionary in this embodiment is a built-in data structure used to store key-value pairs, which can quickly find, add and update data.

[0120] Based on the model training data processing process in the above embodiments, Fig. 9 The flowchart of another model training data processing method is shown in FIG. The execution subject of the method is a specific server, which can first execute the data management process. After completing data collection, the server can extract data, annotate data, check the annotation labels, and perform data optimization and enhancement to obtain an annotation file. In this process, after data collection, relevant AI automatic annotation can be performed to obtain the corresponding annotation file.

[0121] In actual scenarios, it is necessary to conduct data statistical analysis on the labels, and analyze whether the data is balanced by counting the number of labeled labels. For data with a small amount of data, the label information can be obtained through the data label extraction process, and the digital image and the label information can be saved in the corresponding path. The offline data enhancement process requires the digital images in the relevant paths to be enhanced by flipping, brightness adjustment, offset adjustment and other enhancement methods.

[0122] After the annotation file is obtained, it can be converted to JSON format. After the annotation file format is converted, it is converted from the annotation format to the general format for model training, that is, VIA to COCO format. In the data management process, the annotation information is matched with the image data, and the subsequent processing strategy is determined by checking whether the annotation box is accurate, and finally a data-balanced COCO data set is obtained for the subsequent model training process.

[0123] It can be seen from the model training data processing method in the above embodiment that the method can accurately annotate based on the label of the digital image, so as to quickly obtain the corresponding annotation file, and can accurately obtain the annotation box of the digital image based on the annotation file, so as to determine the corresponding conversion strategy, and then determine the data set corresponding to the digital image according to the conversion strategy, and finally obtain the training data required for model training, thereby realizing automated processing of the preprocessing process of the model training data, and the preprocessing process of the model training data can be implemented under a specific server, which greatly reduces the use of scripts, increases compatibility and lowers the usage threshold.

[0124] For the model training data processing method provided in the above embodiment, the embodiment of the present invention provides a model training data processing system, such as Fig.10 As shown, the system includes:

[0125] The data collection module 1010 is used to collect and obtain the digital images to be processed;

[0126] The data annotation module 1020 is used to obtain the label corresponding to the digital image, and use the label to annotate the digital image to obtain the annotation file corresponding to the digital image;

[0127] The data management module 1030 is used to determine the annotation frame of the digital image based on the annotation file, and determine the conversion strategy of the digital image using the position data of the annotation frame;

[0128] The data conversion module 1040 is used to convert the digital image according to the attribute information, name information, annotation information and description information using the conversion strategy to obtain a data set corresponding to the digital image, and determine the data set as model training data.

[0129] From the model training data processing system mentioned in the above embodiment, it can be seen that the system can accurately annotate based on the labels of digital images, so as to quickly obtain the corresponding annotation files, and can accurately obtain the annotation boxes of digital images based on the annotation files, so as to determine the corresponding conversion strategies, and then determine the data sets corresponding to the digital images according to the conversion strategies, and finally obtain the training data required for model training, thereby realizing automated processing of the preprocessing process of model training data, and the preprocessing process of model training data can be realized under a specific server, which greatly reduces the use of scripts, increases compatibility and lowers the entry threshold of the model training data processing process.

[0130] The model training data processing system provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned model training data processing method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned model training data processing method embodiment.

[0131] This embodiment also provides a server, the structural diagram of which is as follows: Fig.11 As shown, the device includes a processor 101 and a memory 102; wherein the memory 102 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor to implement the steps of the above-mentioned model training data processing method.

[0132] Fig.11 The server shown further includes a bus 103 and a communication interface 104 , and the processor 101 , the communication interface 104 and the memory 102 are connected via the bus 103 .

[0133] The memory 102 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The bus 103 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0134] The communication interface 104 is used to connect to at least one user terminal and other network units through a network interface, and send the encapsulated IPv4 message or IPv4 message to the user terminal through the network interface.

[0135] The processor 101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 101. The above processor 101 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present disclosure can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 102, and the processor 101 reads the information in the memory 102 and completes the steps of the method of the above embodiment in combination with its hardware.

[0136] An embodiment of the present invention further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the model training data processing method in the aforementioned embodiment are executed.

[0137] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A model training data processing method, characterized in that: The method comprises: Data collection step, collecting and acquiring digital images to be processed; A data labeling step, obtaining a label corresponding to the digital image, and labeling the digital image using the label to obtain a labeling file corresponding to the digital image; A data management step, determining a labeling frame of the digital image based on the labeling file, and determining a conversion strategy of the digital image using position data of the labeling frame; a data conversion step, using the conversion strategy to convert the digital image according to the attribute information, name information, annotation information and description information, thereby obtaining a data set corresponding to the digital image, and determining the data set as model training data; The data management step comprises: Obtaining a preset database corresponding to the annotation file; Determine the corresponding target field in the database based on the file name of the annotation file, and save the annotation file to the database according to the target field; Reading the digital image corresponding to the annotation file in the database, and obtaining the annotation box corresponding to the digital image; Determining the position data based on the corresponding positional relationship between the annotation frame and the digital image, and determining the conversion strategy corresponding to the digital image using the position data; The data conversion step comprises: Determining rectangular frame parameters and contour parameters involved in the conversion process of the digital image according to the conversion strategy; Based on the rectangular frame parameters and the outline parameters, determining the attribute information, the name information, the annotation information and the description information corresponding to the digital image conversion process; Controlling the digital image to be converted according to the attribute information, the name information, the annotation information and the description information to obtain the data set corresponding to the digital image; The data set is determined as the model training data corresponding to the digital image.

2. The model training data processing method according to claim 1, characterized in that: The data labeling step includes: Determining the label that needs to be marked on the digital image according to the attribute data of the digital image; Obtaining marking parameters, segmentation parameters and classification parameters corresponding to the label, and obtaining category parameters of the digital image; Based on the marking parameter, the segmentation parameter and the classification parameter, and in accordance with the category parameter, the digital image is annotated to obtain an annotation file corresponding to the digital image.

3. The model training data processing method according to claim 1, characterized in that: After reading the digital image corresponding to the annotated file in the database, the method further comprises: a data extraction step; Wherein, the data extraction step includes: Determining a data partitioning strategy for the digital image according to attribute data corresponding to the digital image; Generating a data extraction strategy corresponding to the digital image based on the data partitioning strategy; The digital image is updated after the digital image is extracted using the data extraction strategy and according to the attribute data.

4. The model training data processing method according to claim 1, characterized in that: After the data management step, the method further includes: a data analysis step; wherein the data analysis step includes: Traversing all the tags contained in the digital image in the database; Based on all the tags corresponding to all the digital images contained in the database, an update strategy for the digital image is determined, and the conversion strategy is updated using the update strategy.

5. The model training data processing method according to claim 1, characterized in that: Before the data conversion step, the method further includes: a data enhancement step; wherein the data enhancement step includes: Obtaining a read address and a data enhancement strategy corresponding to the digital image; Traversing all the digital images contained in the read address, and performing offset, brightness adjustment, and flipping processing on the digital images according to the data enhancement strategy, to obtain enhancement processing results corresponding to the digital images; The digital image is updated using the enhancement processing result.

6. The model training data processing method according to claim 1, characterized in that: Before the data conversion step, the method further includes: a tag extraction step; wherein the tag extraction step includes: Determining, based on the annotation file, position data corresponding to the label in the digital image; Determine the dictionary position corresponding to the tag according to the position data, and obtain the key-value pair corresponding to the dictionary position; The digital image is updated using the key-value pair.

7. A model training data processing system, characterized in that: The system comprises: A data collection module, used for collecting and acquiring digital images to be processed; A data annotation module, used to obtain a label corresponding to the digital image, and annotate the digital image using the label to obtain an annotation file corresponding to the digital image; A data management module, used to determine a marking frame of the digital image based on the marking file, and determine a conversion strategy of the digital image using position data of the marking frame; A data conversion module, configured to convert the digital image according to the attribute information, name information, annotation information and description information using the conversion strategy to obtain a data set corresponding to the digital image, and determine the data set as model training data; The data management module is further used to: obtain a preset database corresponding to the annotation file; determine a corresponding target field in the database based on the file name of the annotation file, and save the annotation file to the database according to the target field; read the digital image corresponding to the annotation file in the database, and obtain the annotation box corresponding to the digital image; determine the position data based on the corresponding positional relationship between the annotation box and the digital image, and determine the conversion strategy corresponding to the digital image using the position data; The data conversion module is further used to: determine the rectangular frame parameters and contour parameters involved in the conversion process of the digital image according to the conversion strategy; determine the attribute information, the name information, the annotation information and the description information corresponding to the digital image conversion process based on the rectangular frame parameters and the contour parameters; control the digital image to be converted according to the attribute information, the name information, the annotation information and the description information to obtain the data set corresponding to the digital image; and determine the data set as the model training data corresponding to the digital image.

8. A server, characterized in that: It includes a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the steps of the model training data processing method described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Semantic representation of the content of an image

    CN107430604A

  • Railway roadbed disease intelligent identification method based on radar data

    CN110717464A