CN115937039A - Data expansion method and device, electronic equipment and readable storage medium - Google Patents

Data expansion method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN115937039A
CN115937039A CN202211685944.8A CN202211685944A CN115937039A CN 115937039 A CN115937039 A CN 115937039A CN 202211685944 A CN202211685944 A CN 202211685944A CN 115937039 A CN115937039 A CN 115937039A
Authority
CN
China
Prior art keywords
data
expansion
network model
data set
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211685944.8A
Other languages
Chinese (zh)
Inventor
殷晓婷
杜宇宁
李晨霞
杨烨华
刘毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202211685944.8A priority Critical patent/CN115937039A/en
Publication of CN115937039A publication Critical patent/CN115937039A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure provides a data expansion method and device, electronic equipment and a readable storage medium, and relates to the field of data processing, in particular to the technical field of artificial intelligence such as image processing and deep learning. The specific implementation scheme is as follows: acquiring an original data set comprising a plurality of original data; carrying out data transformation on the original data to obtain an expansion data set comprising a plurality of expansion data; inputting the expansion data into a pre-trained quality network model, and deleting the expansion data from an expansion data set under the condition that output data of the network model meets a preset condition; the quality network model and the task network model are network models with the same structure and different parameters, and the task network model is a network model obtained by training the original data set and the extended data set.

Description

Data expansion method and device, electronic equipment and readable storage medium
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to the field of artificial intelligence technologies such as image processing and deep learning, and more particularly, to a data expansion method and apparatus, an electronic device, and a readable storage medium.
Background
Scene data, such as data in images/videos, contains rich visual and semantic information and is widely used in multimedia applications.
In recent years, many visual tasks have been greatly developed, and excellent algorithms appear in visual fields such as text recognition, target detection, image classification and the like, and then the algorithms are highly dependent on the diversity of training data.
Disclosure of Invention
In order to solve at least one of the above drawbacks, the present disclosure provides a data expansion method, apparatus, electronic device and readable storage medium.
According to a first aspect of the present disclosure, there is provided a data expansion method, the method comprising:
acquiring an original data set comprising a plurality of original data;
carrying out data transformation on the original data to obtain an expansion data set comprising a plurality of expansion data;
inputting the expansion data into a pre-trained quality network model, and deleting the expansion data from an expansion data set under the condition that output data of the network model meets a preset condition; the quality network model and the task network model are network models with the same structure and different parameters, and the task network model is a network model obtained by training the original data set and the extended data set.
According to a second aspect of the present disclosure, there is provided a data expansion apparatus, the apparatus comprising:
a data acquisition module for acquiring an original data set comprising a plurality of original data;
the data expansion module is used for carrying out data transformation on the original data to obtain an expansion data set comprising a plurality of expansion data;
the data quality module is used for inputting the expansion data into a pre-trained quality network model and deleting the expansion data from the expansion data set under the condition that the output data of the network model meets a preset condition;
the quality network model and the task network model are network models with the same structure and different parameters, and the task network model is a network model obtained by training the original data set and the extended data set.
According to a third aspect of the present disclosure, there is provided an electronic apparatus comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the data augmentation method.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the above-described data expansion method.
According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the above-described data augmentation method.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a flow chart of a data expansion method provided by an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of original data and extended data corresponding to the original data obtained after data transformation of the original data;
FIG. 3 is a flow chart illustrating a portion of another data expansion method provided by the embodiment of the present disclosure;
FIG. 4 is a flow chart illustrating a portion of another data expansion method provided by the embodiment of the present disclosure;
FIG. 5 is a schematic structural diagram of a data expansion apparatus according to an embodiment of the present disclosure;
FIG. 6 is a block diagram of an electronic device for implementing a data augmentation method of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Because the acquisition of the real data requires labor and time costs, in some related technologies, data is automatically generated by using a computing device, for example, the real data is augmented by a data augmentation method, but these methods basically adopt a random generation method, do not consider data quality, have uncontrollable process, and easily cause data redundancy and inefficiency.
The data expansion method, device, electronic equipment and computer-readable storage medium provided by the embodiments of the present disclosure aim to solve at least one of the above technical problems in the prior art.
The data expansion method provided by the embodiment of the disclosure may be executed by an electronic device such as a terminal device or a server, where the terminal device may be a vehicle-mounted device, a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, and the like, and the method may be implemented by a processor calling a computer-readable program instruction stored in a memory. Alternatively, the method may be performed by a server.
Fig. 1 shows a schematic flowchart of a data expansion method provided by an embodiment of the present disclosure, as shown in fig. 1, the method may mainly include:
in step S110, an original data set including a plurality of original data is acquired;
in step S120, performing data transformation on the original data to obtain an extended data set including a plurality of extended data;
in step S130, the expansion data is input into a pre-trained quality network model, and the expansion data is deleted from the expansion data set when the output data of the network model satisfies a preset condition;
the quality network model and the task network model are network models with the same structure and different parameters, and the task network model is a network model obtained by training through an original data set and an extended data set.
For example, in step S110, the raw data is training data for training a network model, and the network model obtained by training the network model through the raw data can be used to complete the target task. If the original data is picture data and the target task is a visual task, the network model obtained by training the network model through the original data can be used for completing the visual task.
In some possible implementations, the data type of the raw data may be any data type that can be augmented using a computing device. Such as raw data, may be voice data, text data, picture data, etc.
In some possible implementations, the raw data may be picture data, and specifically may be video frame data obtained by framing a video.
In some possible implementations, in step S120, in the case that the original data is voice data, the expanded data corresponding to the original data may be generated by segmenting the voice data and synthesizing new voice data between the voice data and the noisy audio signal.
In some possible implementations, in the case that the original data is picture data, the expanded data corresponding to the original data may be obtained by performing one or more of image shape transformation (transformation that changes the shape of an object in an image, such as distortion transformation on the image), image size transformation (transformation that affects the size of the image, such as cropping on the image), and image pixel transformation (transformation that changes the pixel value of the image, such as modification and transformation on the pixel value of the image).
In some possible implementation manners, in the case that the original data is text data, the text data may be converted into picture data, and the picture data is expanded to obtain expanded data corresponding to the original data.
In some specific implementations, one original data is subjected to data transformation to generate expanded data corresponding to one original data, and one original data may correspond to multiple expanded data.
In some possible implementation manners, data transformation is performed on all original data in the original data set to obtain corresponding extended data, and the obtained extended data are combined into an extended data set.
In some possible implementations, deduplication may also be performed on the augmented data set.
In some possible implementation manners, the expanded data set may be subjected to deduplication processing in a manner of selecting one target expanded data from the expanded data set, calculating a similarity between the target expanded data and other expanded data, and deleting the target expanded data from the expanded data set in a case where the similarity is greater than a preset similarity threshold.
In some possible implementations, selecting one target expansion data from the expansion data set, and calculating a similarity between the target expansion data and other expansion data in the expansion data set includes: sequentially determining the expansion data in the expansion data set as target expansion data according to the index sequence of the expansion data in the expansion data set; according to the index sequence of the expansion data in the expansion data set, sequentially determining the expansion data with the index sequence behind the target data as comparison expansion data; and extracting the target data characteristics of the target expansion data and the comparison data characteristics of the comparison expansion data, and taking the similarity of the target data characteristics and the comparison data characteristics as the similarity of the target expansion data and the comparison expansion data.
In some possible implementations, in step S130, the pre-trained quality network model may be a large model that has been trained for the target task, for example, the quality network model may be a network model trained using raw data.
The quality network model may not perform well on the target task, and if the target task is a picture classification task, the accuracy and recall rate of the quality network model may not meet the requirement of landing the algorithm.
In some possible implementation manners, the quality network model may be a pre-training model corresponding to the task network model, and the task network model is a network model obtained by training the quality network model through the original data set and the extended data set.
That is to say, the quality network model may be an initial model trained through a large amount of public data, which may be used to complete a target task, but the accuracy rate, recall rate, etc. may not meet the requirements, and after the quality network model is fine-tuned through the original data and the extended data, the accuracy rate, recall rate of the network model may be improved.
In some possible implementation manners, when original data corresponding to the extended data is positive sample data, the extended data is input into a pre-trained quality network model, and when output data of the network model is smaller than a preset first threshold, the extended data is deleted from the extended data set.
In some possible implementation manners, when the original data corresponding to the extended data is negative sample data, the extended data is input into a pre-trained quality network model, and when the output data of the network model is greater than a preset second threshold, the extended data is deleted from the extended data set.
In some possible implementation manners, the original data is subjected to data transformation, which may cause damage to key information in the original data, and the expanded data with the damaged key information is obviously data with low quality, and inputting the data into the network model may cause that the network model may not learn the key information, which affects the training effect of the network model.
Although the quality network model may not be well-represented on a target task, the quality network model still has certain discrimination capability, and output data of expansion data with higher quality after being input into the quality network model is different from output data of expansion data with lower quality after being input into the quality network model in a high probability, so that the quality of the expansion data can be judged by using the quality network model, the low-quality expansion data is deleted, and the quality of an expansion data set is improved.
However, since the quality network model may not perform well on the target task, the output data thereof may only be used as a reference, the first threshold should be set to be smaller, and the second threshold should be set to be larger, so as to avoid that the extended data whose quality meets the requirement is deleted due to the low accuracy of the quality network model.
In the data expansion method of the embodiment of the disclosure, the expansion data is input into the quality network model, and the expansion data with too low quality is deleted on the basis of realizing data expansion, so that the quality of the expansion data is ensured, and the training effect of the task network model is improved.
The following is a description of the data expansion method according to the embodiment of the present disclosure.
In some specific implementations, the raw data is picture data. Fig. 2 is a schematic diagram of original data and extended data corresponding to the original data obtained after data transformation of the original data.
Referring to fig. 2, the original data may be subjected to contrast transformation, cropping, rotation, warping, random erasure, mask erasure, and the like.
The following table is an operator that may be used to perform a data transformation on the raw data.
Figure BDA0004021030670000061
/>
Figure BDA0004021030670000071
Referring to the table, tia series is an operator of image transformation class, which can be used for target tasks such as picture classification, picture recognition, OCR (optical Character recognition). Wherein, t ia _ distorrt is used for performing image deformation processing on original data (namely picture data); the tia _ perspective is used for carrying out image head perspective transformation processing on the picture data; t ia _ stretch is used to perform image stretch transform processing on picture data.
RandAugment is also an operator of image transformation class, which can also be used for target tasks such as picture classification, picture recognition, OCR, etc. Wherein, shearX is used for shearing the picture data along the X direction; shearY is used for shearing the picture data along the Y direction; trans lateX is used for carrying out warping transformation processing on the picture data along an X axis; trans lateY is used for carrying out warping transformation processing on the picture data along the Y axis; the Rotate is used for rotating the picture data; the Color is used for carrying out Color conversion processing on the picture data; pos terize: the system is used for carrying out tone conversion processing on the picture data; the Solarize is used for carrying out exposure transformation processing on the picture data; the Contrast is used for carrying out Contrast conversion processing on the picture data; sharpness is used for carrying out Sharpness transformation processing on picture data; brightness is used for performing luminance conversion processing on picture data; the Autocontras t is used for carrying out automatic contrast adjustment processing on the picture data; the Equal ize is used for carrying out histogram equalization on the picture data; invert is used to perform image reverse processing on picture data.
RandomCrop is an operator of image cropping, can be used for target tasks such as picture classification, picture recognition, OCR and the like, and can be used for randomly cropping picture data to generate extended data.
Randomaras (random erasure) and gridmask (grid mask) are operators of image erasure classes, and can also be used for target tasks such as picture classification, picture recognition, OCR and the like. The random eras ing is used for filling the same pixel value in a certain block area in the picture, so that the picture information of the area is covered, and the expansion data is generated; the Gr idMask is used for generating a mask with the same resolution as the original image, and then the mask and the original image are multiplied to obtain an image to generate the expanded data.
In some possible implementations, for each piece of original data, the original data may be subjected to data transformation using some or all of the above table operators to generate one or more pieces of extended data corresponding to the original data.
The original data is transformed through various operators, the expansion data can be guaranteed to comprise various different data, the diversity of the expansion data is enriched, the network model can learn the characteristics of the diverse data in the process of learning the expansion data, and the robustness of the network model is enhanced. Meanwhile, the operators can be used in different target tasks, and the application range of the data expansion method is enlarged.
Meanwhile, original data are transformed through a plurality of different operators, and some of the different operators are operators with similar effects, such as RandomCrop operator, shearX operator and shearY operator, so that the similarity between generated extended data is too high, the characteristics of network model learning are too repeated, and overfitting of a network is caused.
Therefore, the generated extension data needs to be subjected to deduplication processing.
In some possible implementations, the similarity between the target augmented data and other augmented data in the augmented data set may be calculated by selecting one target augmented data from the augmented data set including the augmented data, and deleting the target augmented data from the augmented data set in a case where the similarity is greater than a preset similarity threshold.
The selection of the target expansion data from the expansion data set may be a random selection or a selection in a certain order.
FIG. 3 is a flowchart illustrating a step of performing deduplication processing on the generated augmentation data. Referring to fig. 3, performing deduplication processing on the generated augmented data may include:
in step S310, sequentially determining the expansion data in the expansion data set as target expansion data according to the index sequence of the expansion data in the expansion data set;
in step S320, sequentially determining, according to the index sequence of the expansion data in the expansion data set, the expansion data whose index sequence is located behind the target data as comparison expansion data;
in step S330, a target data feature of the target expansion data and a comparison data feature of the comparison expansion data are extracted, and a similarity between the target data feature and the comparison data feature is used as a similarity between the target expansion data and the comparison expansion data.
In step S340, in the case that the similarity is greater than the preset similarity threshold, the target expanded data is deleted from the expanded data set.
In some possible implementations, the target augmented data and the comparison augmented data may be determined according to an index of the augmented data in the augmented data set. If the similarity between the extended data with the index of 1 and other extended data in the extended data set is smaller than the preset similarity threshold, the extended data with the index of 2 is determined as the target extended data, the similarity between the extended data and the target extended data is calculated, if the similarity between the extended data and the target extended data is smaller than the preset similarity threshold, the extended data with the index of 1 is continuously determined as the target extended data, the extended data with the index of 3 is determined as the comparison extended data, the similarity between the extended data and the target extended data is calculated, and so on, if the similarity between the extended data with the index of 1 and other extended data in the extended data set is smaller than the preset similarity threshold, the extended data with the index of 2 is determined as the target extended data, and the extended data with the index of 3 is determined as the comparison extended data; if the similarity between the target expansion data and the comparison expansion data is greater than the preset similarity threshold, the repeatability of the target expansion data and the comparison expansion data is higher, the target expansion data, namely the expansion data with the index of 1, is deleted from the expansion data set, the expansion data with the index of 2 is directly determined as the target expansion data, and the expansion data with the index of 3 is determined as the comparison expansion data.
And repeating the steps until the expansion data with the maximum index value in the expansion data set is determined as the target expansion data, and ending the process.
The method can ensure that the similarity between every two expansion data in the expansion data set is effectively and quickly obtained, and directly deletes the target expansion data after the comparison expansion data with the high similarity with the target expansion data is obtained, thereby avoiding the waste of calculation power caused by continuously calculating the similarity of the target expansion data and other expansion data.
In some possible implementations, calculating the similarity between the target augmented data and the comparison augmented data may be to extract a data feature of the target augmented data (i.e., a target data feature) through a feature extraction network, extract a data feature of the comparison augmented data (i.e., a comparison data feature) through the feature extraction network, and use the similarity between the target data feature and the comparison data feature as the similarity between the target augmented data and the comparison augmented data.
In some possible implementations, the cosine similarity of the target data feature and the comparison data feature may be used as the similarity between the target extended data and the comparison extended data.
In some possible implementations, PP-Shi tu (image recognition method) may also be used to extract data features of the target augmented data and compare the data features of the augmented data.
Through data deduplication processing, the quality of expansion data can be improved, learning of a network model on repetitive features is reduced, and the probability of overfitting of a network is reduced.
In some possible implementations, the quality network model may be a pre-training model corresponding to the task network model, which may be obtained by training a large amount of low-cost collected data (e.g., data of a public database), which is equivalent to learning a "commonality" feature of the large amount of data, and therefore, the pre-training model also has a certain "resolution" capability, and may be determined from the "commonality" of the data.
The task network model is a network model obtained by performing 'fine tuning' on a quality network model through an original data set and an extended data set, which is equivalent to migrating commonalities into a network model of a target task and then performing 'fine tuning' by using a small amount of labeled data strongly related to the target task. Therefore, the network model only needs to start from the commonalities and learn the special part of the target task, and the obtained task network model has the capacity of learning the commonalities and the capacity of paying attention to the special task and can better perform on the target task.
Because the pre-training model is necessary for completing the target task, the quality of the extended data is judged through the pre-training model, the times of model training can be reduced to the maximum extent, and the computing power occupation of the model training on equipment is reduced.
FIG. 4 is a flowchart illustrating the steps of determining the quality of the augmented data and processing the augmented data using the pre-trained model. Referring to fig. 4, the determining and processing the quality of the augmented data by the pre-training model may include:
in step S410, when the original data corresponding to the extended data is positive sample data, after the extended data is input into the pre-training model, and when the output data of the network model is smaller than a preset first threshold, the extended data is deleted from the extended data set;
in step S420, when the original data corresponding to the extended data is negative sample data, the extended data is input into the pre-training model, and when the output data of the network model is greater than the preset second threshold, the extended data is deleted from the extended data set.
In some possible implementations, the first threshold and the second threshold may be the same value or different values. In some specific implementations, the first threshold may be 0.2 and the second threshold may be 0.8.
Because the pre-training model is also a pre-training model of the target task and still has certain discrimination capability, when the original data corresponding to the extended data is positive sample data, the extended data should also be the positive sample data, and the extended data is input into the pre-training model, the output data (such as confidence data) output by the pre-training model still has a large probability of a larger value; under the condition that original data corresponding to the extended data is negative sample data, the extended data also needs to be the negative sample data, and the extended data is input into the pre-training model, so that output data (such as confidence data) output by the pre-training model still has a large probability of a smaller value.
Therefore, under the condition that the original data corresponding to the extended data is positive sample data, after the extended data is input into the pre-training model, the smaller the confidence data output by the network model is, the lower the quality of the extended data is, and the extended data needs to be deleted from the extended data set; conversely, when the original data corresponding to the extended data is negative sample data, the larger the confidence data output by the network model after the extended data is input to the pre-training model, the more likely it is that the extended data is positive sample data, and the lower the quality of the extended data as negative sample data, and therefore, the extended data needs to be deleted from the extended data set.
Through different processing of the positive sample data and the negative sample data, the quality of the positive sample expansion data and the quality of the negative sample expansion data are guaranteed, and therefore the training effect of the task network model is improved.
In some specific implementations, in order to test the practical effect of the data expansion method of the present disclosure, the data size of 10w is expanded on the three tasks of classification, image recognition and OCR respectively based on the original training set. As shown in the following table, compared with the original training set, the training set obtained by using the data expansion method disclosed by the present disclosure can improve the model accuracy by more than 2.6% in a typical task scene.
Description of the experiments Raw data set Extended training set
Classification task 80.1% 83.5%(+3.4%)
Picture recognition task 65.5% 68.1%(+2.6%)
OCR task 71.39% 75.18%(+3.8%)
Based on the same principle as the method shown in fig. 1, fig. 5 shows a schematic structural diagram of a data expansion apparatus provided by an embodiment of the present disclosure, and as shown in fig. 5, the data expansion apparatus 50 may include:
a data acquisition module 510 for acquiring a raw data set comprising a plurality of raw data;
a data expansion module 520, configured to perform data transformation on the original data to obtain an expansion data set including a plurality of expansion data;
a data quality module 530, configured to input the extension data into a pre-trained quality network model, and delete the extension data from the extension data set when output data of the network model meets a preset condition;
the quality network model and the task network model are network models with the same structure and different parameters, and the task network model is a network model obtained by training through an original data set and an extended data set.
In the data expansion device of the embodiment of the disclosure, the expansion data is input into the quality network model, and the expansion data with too low quality is deleted on the basis of realizing data expansion, so that the quality of the expansion data is ensured, and the training effect of the task network model is improved.
It is understood that the above modules of the data expansion apparatus in the embodiment of the present disclosure have functions of implementing the corresponding steps of the data expansion method in the embodiment shown in fig. 1. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the data expansion apparatus, reference may be specifically made to the corresponding description of the data expansion method in the embodiment shown in fig. 1, and details are not repeated here.
In some possible implementation manners, the quality network model is a pre-training model corresponding to the task network model, and the task network model is a network model obtained by training the quality network model through the original data set and the extended data set.
In some possible implementations, inputting the augmented data into a pre-trained quality network model, and in the case that output data of the network model satisfies a preset condition, deleting the augmented data from the augmented data set includes: under the condition that original data corresponding to the expansion data is positive sample data, inputting the expansion data into a pre-trained quality network model, and under the condition that output data of the network model is smaller than a preset first threshold value, deleting the expansion data from the expansion data set; and under the condition that original data corresponding to the extended data is negative sample data, inputting the extended data into a pre-trained quality network model, and under the condition that output data of the network model is larger than a preset second threshold value, deleting the extended data from the extended data set.
In some possible implementation manners, after performing data transformation on the original data and acquiring the extended data corresponding to the original data, the method further includes: and selecting one target expansion data from the expansion data set, calculating the similarity between the target expansion data and other expansion data, and deleting the target expansion data from the expansion data set under the condition that the similarity is greater than a preset similarity threshold.
In some possible implementations, selecting one target expansion data from the expansion data set, and calculating a similarity between the target expansion data and other expansion data in the expansion data set includes: sequentially determining the expansion data in the expansion data set as target expansion data according to the index sequence of the expansion data in the expansion data set; according to the index sequence of the expansion data in the expansion data set, sequentially determining the expansion data with the index sequence behind the target data as comparison expansion data; and extracting the target data characteristics of the target expansion data and the comparison data characteristics of the comparison expansion data, and taking the similarity of the target data characteristics and the comparison data characteristics as the similarity of the target expansion data and the comparison expansion data.
In some possible implementations, the raw data is picture data; the data transformation includes at least one of image shape transformation, image size transformation, and image pixel transformation.
In the technical scheme of the disclosure, the processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the related user all accord with the regulations of related laws and regulations, and do not violate the common customs of public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
The electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the data augmentation method as provided by the embodiments of the present disclosure.
Compared with the prior art, the electronic equipment has the advantages that the expansion data are input into the quality network model, the expansion data with low quality are deleted on the basis of realizing data expansion, the quality of the expansion data is ensured, and the training effect of the task network model is improved.
The readable storage medium is a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform a data expansion method as provided by the embodiments of the present disclosure.
Compared with the prior art, the readable storage medium has the advantages that the expansion data are input into the quality network model, the expansion data with low quality are deleted on the basis of realizing data expansion, the quality of the expansion data is ensured, and the training effect of the task network model is improved.
The computer program product comprises a computer program which, when executed by a processor, implements a data augmentation method as provided by embodiments of the present disclosure.
Compared with the prior art, the computer program product has the advantages that the expansion data are input into the quality network model, the expansion data with the low quality are deleted on the basis of realizing data expansion, the quality of the expansion data is ensured, and accordingly the training effect of the task network model is improved.
FIG. 6 illustrates a schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the electronic device 600 includes a computing unit 610 that may perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 620 or a computer program loaded from a storage unit 680 into a Random Access Memory (RAM) 630. In the RAM 630, various programs and data required for the operation of the device 600 can also be stored. The computing unit 610, the ROM 620, and the RAM 630 are connected to each other by a bus 640. An input/output (I/O) interface 650 is also connected to bus 640.
Various components in device 600 are connected to I/O interface 650, including: an input unit 660 such as a keyboard, a mouse, etc.; an output unit 670 such as various types of displays, speakers, and the like; a storage unit 680, such as a magnetic disk, optical disk, or the like; and a communication unit 690 such as a network card, modem, wireless communication transceiver, etc. The communication unit 690 allows the device 600 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Computing unit 610 may be a variety of general purpose and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 610 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 610 performs the data expansion method provided in the embodiments of the present disclosure. For example, in some embodiments, performing the data augmentation methods provided in embodiments of the present disclosure may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 680. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 620 and/or the communication unit 690. When loaded into RAM 630 and executed by computing unit 610, may perform one or more steps of the data augmentation methods provided in embodiments of the present disclosure. Alternatively, in other embodiments, the computing unit 610 may be configured by any other suitable means (e.g., by means of firmware) to perform the data expansion methods provided in embodiments of the present disclosure.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program code, when executed by the processor or controller, causes the functions/acts specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (10)

1. A method of data augmentation comprising:
acquiring an original data set comprising a plurality of original data;
carrying out data transformation on the original data to obtain an expansion data set comprising a plurality of expansion data;
inputting the expansion data into a pre-trained quality network model, and deleting the expansion data from an expansion data set under the condition that output data of the network model meets a preset condition; the quality network model and the task network model are network models with the same structure and different parameters, and the task network model is a network model obtained by training the original data set and the extended data set.
2. The method of claim 1, wherein the quality network model is a pre-trained model corresponding to the task network model, and the task network model is a network model obtained by training the quality network model through the original data set and the extended data set.
3. The method of claim 1, wherein the inputting the augmented data into a pre-trained quality network model, the deleting the augmented data from the augmented data set if output data of the network model satisfies a preset condition comprises:
under the condition that original data corresponding to the extended data is positive sample data, inputting the extended data into a pre-trained quality network model, and under the condition that output data of the network model is smaller than a preset first threshold value, deleting the extended data from an extended data set;
and under the condition that original data corresponding to the extended data is negative sample data, inputting the extended data into a pre-trained quality network model, and under the condition that output data of the network model is larger than a preset second threshold value, deleting the extended data from the extended data set.
4. The method of claim 1, wherein after performing data transformation on the original data and obtaining the augmented data corresponding to the original data, the method further comprises:
selecting a target expansion data from the expansion data set, calculating the similarity between the target expansion data and other expansion data, and deleting the target expansion data from the expansion data set under the condition that the similarity is greater than a preset similarity threshold.
5. The method of claim 4, wherein selecting a target augmented data from the augmented data set, calculating a similarity between the target augmented data and other augmented data in the augmented data set, comprises:
sequentially determining the expansion data in the expansion data set as target expansion data according to the index sequence of the expansion data in the expansion data set;
according to the index sequence of the expansion data in the expansion data set, sequentially determining the expansion data with the index sequence behind the target data as comparison expansion data;
extracting target data characteristics of the target expansion data and comparison data characteristics of the comparison expansion data, and taking the similarity of the target data characteristics and the comparison data characteristics as the similarity of the target expansion data and the comparison expansion data.
6. The method of claim 1, wherein the raw data is picture data; the data transformation comprises at least one of image shape transformation, image size transformation and image pixel transformation.
7. A data expansion apparatus comprising:
a data acquisition module for acquiring an original data set comprising a plurality of original data;
the data expansion module is used for carrying out data transformation on the original data to obtain an expansion data set comprising a plurality of expansion data;
the data quality module is used for inputting the expansion data into a pre-trained quality network model and deleting the expansion data from the expansion data set under the condition that the output data of the network model meets a preset condition;
the quality network model and the task network model are network models with the same structure and different parameters, and the task network model is a network model obtained by training the original data set and the extended data set.
8. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
9. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-6.
10. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-6.
CN202211685944.8A 2022-12-27 2022-12-27 Data expansion method and device, electronic equipment and readable storage medium Pending CN115937039A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211685944.8A CN115937039A (en) 2022-12-27 2022-12-27 Data expansion method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211685944.8A CN115937039A (en) 2022-12-27 2022-12-27 Data expansion method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN115937039A true CN115937039A (en) 2023-04-07

Family

ID=86555753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211685944.8A Pending CN115937039A (en) 2022-12-27 2022-12-27 Data expansion method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN115937039A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116151491A (en) * 2023-04-20 2023-05-23 天津港电力有限公司 Intelligent power failure prediction platform based on power data

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116151491A (en) * 2023-04-20 2023-05-23 天津港电力有限公司 Intelligent power failure prediction platform based on power data
CN116151491B (en) * 2023-04-20 2023-07-18 天津港电力有限公司 Intelligent power failure prediction platform based on power data

Similar Documents

Publication Publication Date Title
CN112597837B (en) Image detection method, apparatus, device, storage medium, and computer program product
CN112861885B (en) Image recognition method, device, electronic equipment and storage medium
CN113436100B (en) Method, apparatus, device, medium, and article for repairing video
CN112989995B (en) Text detection method and device and electronic equipment
JP2023531350A (en) A method for incrementing a sample image, a method for training an image detection model and a method for image detection
CN113239807B (en) Method and device for training bill identification model and bill identification
CN115861131A (en) Training method and device based on image generation video and model and electronic equipment
US20230005171A1 (en) Visual positioning method, related apparatus and computer program product
CN115937039A (en) Data expansion method and device, electronic equipment and readable storage medium
CN113486881B (en) Text recognition method, device, equipment and medium
CN115101069A (en) Voice control method, device, equipment, storage medium and program product
CN113902899A (en) Training method, target detection method, device, electronic device and storage medium
CN113326766A (en) Training method and device of text detection model and text detection method and device
CN114724144B (en) Text recognition method, training device, training equipment and training medium for model
CN115620321B (en) Table identification method and device, electronic equipment and storage medium
CN114708580B (en) Text recognition method, text recognition model training method, text recognition device, model training device, text recognition program, model training program, and computer-readable storage medium
CN114862720A (en) Canvas restoration method and device, electronic equipment and computer readable medium
CN115019057A (en) Image feature extraction model determining method and device and image identification method and device
CN111160265B (en) File conversion method and device, storage medium and electronic equipment
CN114187435A (en) Text recognition method, device, equipment and storage medium
CN114173158A (en) Face recognition method, cloud device, client device, electronic device and medium
CN113887435A (en) Face image processing method, device, equipment, storage medium and program product
CN114842485B (en) Subtitle removing method and device and electronic equipment
CN116168442B (en) Sample image generation method, model training method and target detection method
CN113360712B (en) Video representation generation method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination