Data processing method and apparatus and electronic device

By calculating the image morphology distribution and selecting the appropriate data processing type to divide and process the original data set, the problem of poor model training results caused by unified data processing was solved, and the model training effect was improved.

WO2025200321A1PCT designated stage Publication Date: 2025-10-02SHANGHAI SHIZHUANG INFORMATION TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/118367
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-29
Filing Date
2024-09-11
Publication Date
2025-10-02

AI Technical Summary

Technical Problem

In the prior art, a unified data processing type is used to process the original image, which may result in the generation of image training samples that are not conducive to model training, thereby reducing the model training effect.

Method used

By calculating the image morphology distribution of the original data set, dividing it into multiple data sets to be processed, and selecting a suitable set of data processing types based on the image morphology distribution, data processing is performed on each data set to be processed, thereby reducing the generation of image training samples that are not conducive to model training.

Benefits of technology

The effect of model training is improved, the final trained model is more in line with business requirements, and the number of image training samples that are not conducive to model training is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024118367_02102025_PF_FP_ABST
    Figure CN2024118367_02102025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a data processing method and apparatus and an electronic device, which are applied to the technical field of data processing. The data processing method comprises: acquiring an original data set, the original data set comprising an original image; calculating the image morphology distribution of the original data set, the image morphology distribution representing the distribution condition of image features that correspond to the original image in the original data set; on the basis of the image morphology distribution, dividing the original data set into a plurality of data sets to be processed; on the basis of the image morphology distribution, determining a data processing type set corresponding to the data sets to be processed, the data processing type set comprising at least one data processing type among target data processing types; and using the data processing type in the data processing type set to perform data processing on the data sets to be processed. Thus, image training samples which are not conducive to model training can be reduced, such that finally trained models better meet service requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Data processing method, device and electronic equipment

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese patent application CN202410379044.3, filed on March 29, 2024, entitled “A data processing method, device and electronic device”, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present application belongs to the field of data processing technology, and in particular relates to a data processing method, device and electronic equipment. Background Art

[0004] Amidst the rapid advancement of technology, artificial intelligence (AI) models have been widely applied in various fields, ranging from image recognition and natural language processing to autonomous driving. Training datasets play a crucial role in AI model training. Different training tasks require different training datasets, and the size and complexity of training datasets also affect the effectiveness of AI model training. Therefore, before training an AI model, data processing can be performed on the original images to enrich the images in the training dataset and generate more training data.

[0005] In existing technologies, various data processing types can be used to process original images, thereby generating transformed images corresponding to the original images. However, due to the varying image quality of different images, using a single data processing type may result in images that are not conducive to model training, thereby reducing the effectiveness of model training.

[0006] Summary of the Invention

[0007] The present application provides a data processing method, device and electronic device for solving the technical problem in the prior art that a unified data processing type is used to process original images, resulting in image training samples that are not conducive to model training.

[0008] In a first aspect, an embodiment of the present application provides a data processing method, comprising: obtaining an original data set; wherein the original data set includes an original image; calculating the image morphology distribution of the original data set; wherein the image morphology distribution characterizes the distribution of image features corresponding to the original image in the original data set; dividing the original data set according to the image morphology distribution to obtain multiple data sets to be processed; determining a data processing type set corresponding to the data set to be processed according to the image morphology distribution; wherein the data processing type set includes at least one data processing type of the target data processing type; and performing data processing on the data set to be processed using the data processing type in the data processing type set.

[0009] In the above scheme, first, the distribution of image features corresponding to the images in the original dataset (i.e., the image morphology distribution of the original dataset) can be calculated; then, based on the image morphology distribution, an appropriate data processing type can be selected for the images in the original dataset. Specifically, performing data processing on the original images in the original dataset based on the data processing type determined by the data processing method provided in the embodiment of the present application can reduce the generation of image training samples that are not conducive to model training, thereby making the ultimately trained model more consistent with business requirements.

[0010] In an optional embodiment, the method of dividing the original dataset according to the image morphology distribution to obtain multiple datasets to be processed includes: dividing the image features into multiple intervals according to a division threshold corresponding to the image morphology distribution, and determining the original image within an interval as a dataset to be processed. In the above scheme, a division threshold corresponding to the image morphology distribution can be pre-configured, so that after calculating the image morphology distribution of the original dataset, the original dataset can be divided into multiple datasets to be processed based on the division threshold, and an appropriate data processing type can be selected for each dataset to be processed, thereby reducing the generation of image training samples that are not conducive to model training and making the ultimately trained model more in line with business requirements.

[0011] In an optional embodiment, before determining the data processing type set corresponding to the dataset to be processed based on the image morphology distribution, the method further includes: generating multiple data processing type sets based on the degree of feature attenuation corresponding to the target data processing type. In the above scheme, the multiple target data processing types can be divided into multiple data processing type sets based on the degree of feature attenuation of the original image features, so that an appropriate data processing type set can be selected for each dataset to be processed based on the image morphology distribution. Therefore, the generation of image training samples that are not conducive to model training can be reduced, and the ultimately trained model can be more consistent with business requirements.

[0012] In an optional embodiment, the method generates multiple data processing type sets based on the degree of feature weakening corresponding to the target data processing type, including: filtering out the data processing types whose degree of feature weakening is lower than a preset threshold from the target data processing types, and determining them as the first data processing type set, and filtering out all data processing types from the target data processing types, and determining them as the second data processing type set. In the above scheme, multiple data processing types can be divided into multiple data processing type sets according to the degree of feature weakening of the original image features, wherein the data processing types with a lower degree of feature weakening are divided into the first data processing type set for data processing of the original image with weaker image features, thereby avoiding further degradation of the image features of the original image. Therefore, the generation of image training samples that are not conducive to model training can be reduced, so that the final trained model is more in line with business requirements.

[0013] In an optional embodiment, the data processing type includes a data enhancement type, and the image features include: image resolution and / or blur level; the calculation of the image morphological distribution of the original data set includes: calculating the image resolution and / or blur level corresponding to the original image in the original data set; and performing data processing on the original data set according to the image resolution and / or blur level, so that the original images in the original data set present a long-tail distribution. In the above scheme, the image resolution and blur level can be calculated using a long-tail distribution to calculate the corresponding image morphological distribution, so that the original images with low resolution or high blur level can be divided, and data processing types with lower feature weakening are used for data processing, thereby reducing the generation of image training samples that are not conducive to model training, so that the final trained model is more in line with business requirements.

[0014] In an optional embodiment, the data processing type includes a data enhancement type, and the image features include: target occlusion degree; the calculation of the image morphology distribution of the original data set includes: calculating the target occlusion degree corresponding to the original image in the original data set; and performing data processing on the original data set according to the target occlusion degree so that the original image in the original data set presents an interval distribution. In the above scheme, the target occlusion degree can be calculated using the interval distribution to calculate the corresponding image morphology distribution, so that the original images with high target occlusion degrees can be divided, and data processing types with lower feature weakening degrees are used for data processing, thereby reducing the generation of image training samples that are not conducive to model training, so that the final trained model is more in line with business requirements.

[0015] In an optional embodiment, the data processing type includes a data enhancement type, and the image features include transparency; the calculating the image morphology distribution of the original data set includes calculating the transparency corresponding to the original images in the original data set; and performing data processing on the original data set based on the transparency so that the original images in the original data set exhibit a Gaussian distribution. In the above scheme, the transparency can be calculated using a Gaussian distribution to calculate the corresponding image morphology distribution, thereby dividing the original images with relatively high transparency and relatively low transparency, and performing data processing using a data processing type with a lower degree of feature weakening, thereby reducing the generation of image training samples that are not conducive to model training, so that the final trained model is more in line with business requirements.

[0016] In an optional embodiment, the number of image features is greater than one; the calculating the image morphology distribution of the original data set includes: respectively calculating multiple image features corresponding to the original images in the original data set; and for one image feature among the multiple image features, performing data processing on the original data set according to the image feature, so that the original images in the original data set present the image morphology distribution corresponding to the image feature. In the above scheme, when the number of image features is greater than one, the corresponding image morphology distributions can be calculated respectively, so that the original images with lower image quality and higher image quality can be divided, and data processing types with lower feature weakening are used for data processing, thereby reducing the generation of image training samples that are not conducive to model training, so that the final trained model is more in line with business requirements.

[0017] In a second aspect, an embodiment of the present application provides a data processing device, comprising: an acquisition module for acquiring an original data set; wherein the original data set includes an original image; a calculation module for calculating the image morphology distribution of the original data set; wherein the image morphology distribution characterizes the distribution of image features corresponding to the original image in the original data set; a division module for dividing the original data set according to the image morphology distribution to obtain multiple data sets to be processed; a first determination module for determining a data processing type set corresponding to the data set to be processed according to the image morphology distribution; wherein the data processing type set includes at least one data processing type of the target data processing type; and a processing module for performing data processing on the data set to be processed using a data processing type in the data processing type set.

[0018] In the above scheme, first, the distribution of image features corresponding to the images in the original dataset (i.e., the image morphology distribution of the original dataset) can be calculated; then, based on the image morphology distribution, an appropriate data processing type can be selected for the images in the original dataset. Specifically, performing data processing on the original images in the original dataset based on the data processing type determined by the data processing method provided in the embodiment of the present application can reduce the generation of image training samples that are not conducive to model training, thereby making the ultimately trained model more consistent with business requirements.

[0019] In an optional embodiment, the partitioning module is specifically configured to: partition the image features into multiple intervals according to a partitioning threshold corresponding to the image morphology distribution, and determine the original image within an interval as a data set to be processed. In the above scheme, a partitioning threshold corresponding to the image morphology distribution can be pre-configured. Therefore, after calculating the image morphology distribution of the original data set, the original data set can be partitioned into multiple data sets to be processed based on the partitioning threshold, and an appropriate data processing type can be selected for each data set to be processed. This can reduce the generation of image training samples that are not conducive to model training, making the ultimately trained model more in line with business requirements.

[0020] In an optional embodiment, the data processing apparatus further includes a second determination module configured to generate multiple data processing type sets based on the degree of feature attenuation corresponding to the target data processing type. In the above scheme, the multiple target data processing types can be divided into multiple data processing type sets based on the degree of feature attenuation of the original image features, thereby selecting an appropriate data processing type set for each dataset to be processed based on the image morphology distribution. This reduces the generation of image training samples that are not conducive to model training, ensuring that the ultimately trained model better meets business requirements.

[0021] In an optional embodiment, the first determination module is specifically used to: filter out the data processing types whose feature weakening degree is lower than a preset threshold from the target data processing types, and determine them as the first data processing type set; and filter out all data processing types from the target data processing types, and determine them as the second data processing type set. In the above scheme, multiple data processing types can be divided into multiple data processing type sets according to the degree of feature weakening of the original image features, wherein the data processing types with a lower degree of feature weakening are divided into the first data processing type set for data processing of the original image with weaker image features, thereby avoiding further degradation of the image features of the original image. Therefore, the generation of image training samples that are not conducive to model training can be reduced, so that the final trained model is more in line with business requirements.

[0022] In an optional embodiment, the data processing type includes a data enhancement type, and the image features include: image resolution and / or blur level; the calculation module is specifically used to: calculate the image resolution and / or blur level corresponding to the original image in the original data set; and perform data processing on the original data set according to the image resolution and / or blur level, so that the original images in the original data set present a long-tail distribution. In the above scheme, the image resolution and blur level can be calculated using a long-tail distribution to calculate the corresponding image morphological distribution, so that the original images with low resolution or high blur level can be divided, and data processing types with lower feature weakening are used for data processing, thereby reducing the generation of image training samples that are not conducive to model training, so that the final trained model is more in line with business requirements.

[0023] In an optional embodiment, the data processing type includes a data enhancement type, and the image features include: target occlusion degree; the calculation module is specifically used to: calculate the target occlusion degree corresponding to the original image in the original data set; and perform data processing on the original data set according to the target occlusion degree, so that the original images in the original data set present an interval distribution. In the above scheme, the target occlusion degree can be calculated using the interval distribution to calculate the corresponding image morphological distribution, so that the original images with high target occlusion degrees can be divided, and data processing types with lower feature weakening are used for data processing, thereby reducing the generation of image training samples that are not conducive to model training, so that the final trained model is more in line with business requirements.

[0024] In an optional embodiment, the data processing type includes a data enhancement type, and the image features include transparency; the calculation module is specifically configured to calculate the transparency corresponding to the original images in the original data set; and perform data processing on the original data set based on the transparency so that the original images in the original data set exhibit a Gaussian distribution. In the above scheme, transparency can be calculated using a Gaussian distribution to obtain the corresponding image morphological distribution, thereby distinguishing original images with relatively high transparency and relatively low transparency. Data processing is then performed using a data processing type with a lower degree of feature attenuation, thereby reducing the generation of image training samples that are not conducive to model training and ensuring that the final trained model better meets business requirements.

[0025] In an optional embodiment, the number of image features is greater than one; the calculation module is specifically configured to: respectively calculate multiple image features corresponding to the original images in the original data set; and for one image feature among the multiple image features, perform data processing on the original data set based on the image feature, so that the original images in the original data set exhibit the image morphology distribution corresponding to the image feature. In the above scheme, when the number of image features is greater than one, the corresponding image morphology distributions can be calculated respectively, thereby distinguishing the original images with lower image quality and higher image quality, and performing data processing using a data processing type with a lower degree of feature weakening, thereby reducing the generation of image training samples that are not conducive to model training, so that the final trained model is more in line with business requirements.

[0026] In a third aspect, an embodiment of the present application provides an electronic device comprising: a processor, a memory, and a bus; the processor and the memory communicate with each other through the bus; the memory stores computer program instructions that can be executed by the processor, and the processor calls the computer program instructions to execute the data processing method described in the first aspect.

[0027] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer program instructions. When the computer program instructions are executed by a computer, the computer executes the data processing method as described in the first aspect.

[0028] Other features and advantages of the present application will be described in the following description and, in part, will become apparent from the description or be understood by practicing the embodiments of the present application. The objectives and other advantages of the present application can be achieved and obtained through the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0030] FIG1 is a flow chart of a data processing method provided in an embodiment of the present application;

[0031] FIG2 is a schematic diagram of a long-tail distribution provided in an embodiment of the present application;

[0032] FIG3 is a schematic diagram of an interval distribution provided in an embodiment of the present application;

[0033] FIG4 is a schematic diagram of a Gaussian distribution provided in an embodiment of the present application;

[0034] FIG5 is a structural block diagram of a data processing device provided in an embodiment of the present application;

[0035] FIG6 is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0036] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present application.

[0037] It should be noted that the term "plurality" in the embodiments of the present invention refers to two or more. Therefore, in the embodiments of the present invention, "plurality" can also be understood as "at least two." "And / or" describes the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / ," unless otherwise specified, generally indicates an "or" relationship between the associated objects.

[0038] As one of the methods for enriching training datasets, data processing methods play a significant role in improving the effectiveness of AI models. Especially when the initial training dataset is limited, processing the data within the training dataset to generate different types of samples can exponentially expand the size of the training dataset. Therefore, employing these data processing methods can improve the AI ​​model's effectiveness on the business by simply increasing the training cost of some parts of the AI ​​model.

[0039] However, in some business scenarios, the images that can be collected vary in form, and some have weak features, making them unsuitable for data processing. For example, if the original images collected are low-resolution, highly blurred, or severely obscured, uniformly applying data processing methods such as blurring and random cropping will further reduce the features of the original images, resulting in images that no longer retain training value or are not conducive to AI model training. When this data is used as part of the training dataset for AI model training, it will reduce the effectiveness of the AI ​​model.

[0040] Therefore, an embodiment of the present application provides a data processing method that helps the original image select a data processing type suitable for itself based on different image morphology distributions, or chooses to give up data processing, thereby reducing the generation of image training samples that are not conducive to model training, so that the final trained model is more in line with business requirements.

[0041] Please refer to FIG1 , which is a flow chart of a data processing method provided in an embodiment of the present application. The data processing method may include the following steps:

[0042] Step S101: Acquire an original data set; wherein the original data set includes an original image.

[0043] Step S102: Calculate the image morphology distribution of the original data set; wherein the image morphology distribution represents the distribution of image features corresponding to the original image in the original data set.

[0044] Step S103: Divide the original data set according to the image morphology distribution to obtain multiple data sets to be processed.

[0045] Step S104: determining a data processing type set corresponding to the data set to be processed according to the image morphology distribution; wherein the data processing type set includes at least one data processing type of the target data processing type.

[0046] Step S105: performing data processing on the data set to be processed using the data processing type in the data processing type set.

[0047] Specifically, in the above step S101, the original data set refers to a training data set that needs to be processed, wherein the original data set may include one or more original images.

[0048] It should be noted that the embodiments of this application do not specifically limit the specific source of the original image, and those skilled in the art may make appropriate adjustments based on actual circumstances. For example, the original image may be obtained by collecting business data; or the original data may be obtained by collecting network data, etc.

[0049] Furthermore, the embodiments of this application do not specifically limit the specific implementation methods for obtaining the original dataset, and those skilled in the art may make appropriate adjustments based on actual circumstances. For example, the original dataset may be received from an external device; or the original dataset may be read from a local or cloud storage.

[0050] In the above step S102 , the image morphology distribution represents the distribution of image features corresponding to the multiple original images in the original data set.

[0051] It should be noted that the embodiments of this application do not impose specific limitations on the specific implementation of image features and image distribution. Those skilled in the art may make appropriate adjustments based on actual circumstances. For example, image features may include image resolution, blur level, object occlusion level, or transparency; and image distribution may include long-tail distribution, interval distribution, or Gaussian distribution.

[0052] It is understandable that the specific implementation methods for calculating the image morphology distribution of the original data set may vary based on different image features and different distribution situations. The specific implementation methods for calculating the image morphology distribution of the original data set will be introduced with examples in subsequent embodiments.

[0053] In step S103, the original dataset may be divided according to the image morphology distribution calculated in step S102, thereby obtaining multiple datasets to be processed. It is understood that the original dataset may be divided in different ways based on different image features and distributions. As one embodiment, the original dataset may be divided in only one way to obtain multiple corresponding datasets to be processed. As another embodiment, the original dataset may be divided in multiple ways to obtain multiple datasets to be processed corresponding to each way.

[0054] It should be noted that the embodiment of the present application does not specifically limit the number of data sets to be processed obtained by dividing the original data set in one way, and those skilled in the art can make appropriate adjustments according to actual conditions, such as two, three or four.

[0055] Furthermore, the embodiments of the present application do not impose specific limitations on the specific implementation of the original dataset partitioning method, and those skilled in the art may make appropriate adjustments based on actual circumstances. For example, for a long-tail distribution, the original images at the tail can be partitioned into one dataset to be processed, while the remaining original images can be partitioned into another dataset to be processed. Alternatively, for a Gaussian distribution, the original images in the middle can be partitioned into one dataset to be processed, while the remaining original images can be partitioned into another dataset to be processed.

[0056] In step S104, a data processing type set corresponding to the dataset to be processed may be determined from the target data processing types based on the image morphology distribution calculated in step S102. The target data processing type refers to a data processing type that can be used to process the original dataset, and the data processing type set includes at least one of the target data processing types.

[0057] As one implementation method, a certain data set to be processed may be processed using one data processing type; as another implementation method, a certain data set to be processed may be processed using multiple data processing types; as yet another implementation method, a certain data set to be processed may not be processed.

[0058] It should be noted that the embodiments of this application do not specifically limit the specific implementation of the data processing type, and those skilled in the art may make appropriate adjustments based on actual conditions. For example, the data processing type may include Gaussian blur, sharpening, transparency change, mosaic, rotation, mirror flip, etc.

[0059] In the above step S105, after determining the data processing type set corresponding to the data set to be processed, multiple data processing types in the above data processing type set can be used to process the data set to be processed, so as to enrich the features of the training data set as much as possible.

[0060] In the above scheme, first, the distribution of image features corresponding to the images in the original dataset (i.e., the image morphology distribution of the original dataset) can be calculated; then, based on the image morphology distribution, an appropriate data processing type can be selected for the images in the original dataset. Specifically, performing data processing on the original images in the original dataset based on the data processing type determined by the data processing method provided in the embodiment of the present application can reduce the generation of image training samples that are not conducive to model training, thereby making the ultimately trained model more consistent with business requirements.

[0061] Furthermore, based on the above embodiment, the above step S103 may specifically include the following steps:

[0062] The image features are divided into multiple intervals according to the division threshold corresponding to the image morphological distribution, and the original image in one interval is determined as a data set to be processed.

[0063] Specifically, due to the different business forms, it is difficult to use fixed values ​​to determine which image form is not suitable for data processing. Therefore, the image features can be divided into multiple intervals according to the division threshold corresponding to the image form distribution, and the original image in each interval can be divided into a data set to be processed. Each data set to be processed uses a data processing type set for data processing.

[0064] In the above steps, the segmentation threshold is a threshold determined in advance based on image features and distribution.

[0065] For example, for a long-tail distribution, a partition threshold can be set to divide the image features into two intervals, where the images corresponding to the image features in one interval are normal images in the original data set, and the images corresponding to the image features in the other interval are abnormal images in the original data set.

[0066] Specifically, with respect to image resolution, if a long-tail distribution is used, it can be considered that a% of original images that tend to have low resolution in the distribution are not suitable for data processing that will weaken the features, where the above a% is the division threshold in the above step, and the a% of original images can be considered as abnormal images.

[0067] Regarding the degree of blur, if a long-tail distribution is used, it can be considered that the b% original images in the distribution that tend to have a high degree of blur are not suitable for data processing that will weaken the features, where the above b% is the division threshold in the above step, and the b% original images can be considered as abnormal images.

[0068] Regarding the target occlusion degree, if a long-tail distribution is used, it can be considered that the c% original images in the distribution that tend to have a high target occlusion degree are not suitable for data processing that will weaken the features, where the above c% is the division threshold in the above step, and the c% original images can be considered as abnormal images.

[0069] For example, for Gaussian distribution, two division thresholds can be set to divide the image features into two intervals, where the images corresponding to the image features in one interval are normal images in the original data set, and the images corresponding to the image features in the other two intervals are abnormal images in the original data set.

[0070] Regarding transparency, if a Gaussian distribution is used, it can be considered that d% of the original images at the two ends of the distribution with high transparency and low transparency are not suitable for data processing that will weaken the features, where the above d% is the division threshold in the above steps, and the d% of the original images can be considered as abnormal images.

[0071] It should be noted that the embodiment of the present application does not impose any specific limitation on the specific numerical value of the division threshold, and those skilled in the art may make appropriate adjustments according to actual conditions, for example, 5%, 10%, etc.

[0072] In the above scheme, a division threshold corresponding to the image morphology distribution can be pre-configured, so that after the image morphology distribution of the original data set is calculated, the original data set can be divided into multiple data sets to be processed based on the above division threshold, and a suitable data processing type can be selected for each data set to be processed, thereby reducing the generation of image training samples that are not conducive to model training, so that the final trained model is more in line with business requirements.

[0073] Furthermore, based on the above embodiment, before the above step S104, the data processing method provided in the embodiment of the present application may further include the following steps:

[0074] Multiple data processing type sets are generated according to the feature weakening degree corresponding to the target data processing type.

[0075] Specifically, according to the degree to which the target data processing type weakens the features of the original image, the target data processing type can be divided into multiple data processing type sets, such as two data processing type sets, or three data processing type sets.

[0076] For example, the target data processing type can be divided into two data processing type sets according to the degree of feature weakening, for selection by the original images in the subsequent original data set; among them, set A can include a series of data processing types with a higher degree of feature weakening, such as: Gaussian blur, sharpening, transparency change, mosaic, etc., and set B can include a series of data processing types with a lower degree of feature weakening, such as: rotation, mirror flip, etc.

[0077] In the above scheme, multiple target data processing types can be divided into multiple data processing type sets according to the degree of feature weakening of the original image features, so that a suitable data processing type set can be selected for each data set to be processed based on the image morphological distribution. Therefore, the generation of image training samples that are not conducive to model training can be reduced, so that the final trained model can be more in line with business requirements.

[0078] Furthermore, based on the above embodiment, the above step S104 may specifically include the following steps:

[0079] Data processing types with a feature weakening degree lower than a preset threshold are screened out from the target data processing types and determined as a first data processing type set; and all data processing types are screened out from the target data processing types and determined as a second data processing type set.

[0080] Specifically, the data processing types can be divided into two data processing type sets according to the degree of feature weakening, for selection by the original images in the subsequent original data set; wherein, the first data processing type set can include a series of data processing types with a low degree of feature weakening (that is, the degree of feature weakening is lower than a preset threshold), such as: rotation, mirror flip, etc., and the second data processing type set can include all target data processing types, such as: Gaussian blur, sharpening, transparency change, mosaic, rotation, mirror flip, etc.

[0081] In the above scheme, multiple data processing types can be divided into multiple data processing type sets according to the degree of feature weakening of the original image features, among which the data processing types with lower feature weakening degrees are divided into the first data processing type set for performing data processing on the original images with weaker image features, thereby avoiding further degradation of the image features of the original images. Therefore, the generation of image training samples that are not conducive to model training can be reduced, so that the final trained model can be more in line with business requirements.

[0082] Furthermore, based on the above embodiment, the data processing type may include a data enhancement type. In this case, the image feature may include image resolution. In this case, the above step S102 may specifically include the following steps:

[0083] Step 1) Calculate the image resolution corresponding to the original image in the original dataset.

[0084] Step 2) Data processing is performed on the original data set according to the image resolution so that the original images in the original data set present a long-tail distribution.

[0085] Specifically, for image resolution, the existing OpenCV image attribute method can be called to obtain the image resolution corresponding to the original image, and the original data set can be processed according to the numerical value of the image resolution so that multiple original images in the original data set present a long-tail distribution.

[0086] Among them, the long-tail distribution is a common distribution type in statistics. Its notable feature is that it has a long "tail" that slowly decreases towards the end of the distribution. Specifically, the long-tail distribution usually refers to a small number of labels in the data set (i.e., the head labels) having a large number of sample instances, while the majority of labels (i.e., the tail labels) have only very few sample instances. Please refer to Figure 2, which is a schematic diagram of a long-tail distribution provided in an embodiment of the present application.

[0087] For example, the original data set can be processed in the following way: construct a coordinate axis with image resolution as the horizontal axis, divide the original images into different positions on the coordinate axis according to the image resolution corresponding to the original images in the original data set, and finally the multiple original images on the coordinate axis present a long-tail distribution.

[0088] In the above scheme, the image resolution can use the long-tail distribution to calculate the corresponding image morphology distribution, so that the low-resolution original image can be divided, and the data processing type with a lower degree of feature weakening can be used for data processing, thereby reducing the generation of image training samples that are not conducive to model training, so that the final trained model is more in line with business requirements.

[0089] Furthermore, based on the above embodiment, the data processing type may include a data enhancement type. In this case, the image feature may include a blur level. In this case, the above step S102 may specifically include the following steps:

[0090] Step 1) Calculate the blur level corresponding to the original image in the original data set.

[0091] Step 2) Process the original data set according to the blur level so that the original images in the original data set present a long-tail distribution.

[0092] Specifically, for the degree of blur, we can use the gradient of the image edge to measure the blur of the original image based on the existing image gradient technology. The larger the gradient, the clearer the image. The original data set is processed according to the value so that the multiple original images in the original data set present a long-tail distribution.

[0093] For example, the original data set can be processed in the following way: construct a coordinate axis with the degree of blur as the horizontal axis, divide the original images into different positions on the coordinate axis according to the degree of blur corresponding to the original images in the original data set, and finally the multiple original images on the coordinate axis present a long-tail distribution.

[0094] In the above scheme, the blur degree can be calculated using the long-tail distribution to calculate the corresponding image morphology distribution, so that the original images with high blur degree can be divided, and data processing types with lower feature weakening degree can be used for data processing, thereby reducing the generation of image training samples that are not conducive to model training, so that the final trained model is more in line with business requirements.

[0095] Furthermore, based on the above embodiment, the data processing type may include a data enhancement type. In this case, the image feature may include: target occlusion degree. In this case, the above step S102 may specifically include the following steps:

[0096] Step 1) Calculate the target occlusion degree corresponding to the original image in the original data set.

[0097] Step 2) Processing the original data set according to the target occlusion degree so that the original images in the original data set present an interval distribution.

[0098] Specifically, the target occlusion degree can be obtained from the annotation stage and marked according to the interval [0.1, 0.25, 0.5, 0.75]. The original data set is processed according to the labeled data so that multiple original images in the original data set present an interval distribution.

[0099] Among them, interval distribution is an important concept in statistics, which is used to estimate the possible range of an unknown parameter. Unlike point estimation, point estimation accurately determines the value of an unknown parameter, while interval estimation gives the possible range of values ​​of this unknown parameter. In actual operation, we usually use sample data to infer the characteristics of the population. However, due to the existence of sampling error, we cannot obtain the exact value of the population parameter and can only give an interval that may contain the true parameter. This interval is usually obtained by adding or subtracting a certain error range from the sample statistic, and this error range is determined by the confidence level in statistics. Please refer to Figure 3, which is a schematic diagram of an interval distribution provided in an embodiment of the present application.

[0100] For example, the original data set can be processed in the following way: construct a coordinate axis with the target occlusion degree as the horizontal axis, divide the original image into different positions on the coordinate axis according to the target occlusion degree corresponding to the original image in the original data set, and finally the multiple original images on the coordinate axis are distributed in intervals.

[0101] In the above scheme, the target occlusion degree can be calculated using interval distribution to obtain the corresponding image morphology distribution, so that the original image with high target occlusion degree can be divided out, and data processing can be performed using a data processing type with a lower degree of feature weakening, thereby reducing the generation of image training samples that are not conducive to model training, so that the final trained model is more in line with business requirements.

[0102] Furthermore, based on the above embodiment, the data processing type may include a data enhancement type. In this case, the image feature may include transparency. In this case, the above step S102 may specifically include the following steps:

[0103] Step 1) Calculate the transparency corresponding to the original image in the original data set.

[0104] Step 2) Processing the original data set according to the transparency so that the original images in the original data set present a Gaussian distribution.

[0105] Specifically, with respect to transparency, the transparency of the original image can be calculated based on an existing AlphaBlend algorithm, and the original data set can be processed based on the value, so that multiple original images in the original data set present a Gaussian distribution.

[0106] Among them, Gaussian distribution, also known as normal distribution or normal distribution, is a common continuous probability distribution. The probability density function curve of the Gaussian distribution is bell-shaped, and the standard deviation determines the amplitude and position of the distribution. Its shape is determined by the mean and variance, reflecting the tightness of the distribution of data points around the mean. At the same time, the Gaussian distribution has the property of linear transformation, that is, by linearly transforming the original data, the distribution of the new data obtained is still a Gaussian distribution. Please refer to Figure 4, which is a schematic diagram of a Gaussian distribution provided in an embodiment of the present application.

[0107] For example, the original data set can be processed in the following way: construct a coordinate axis with transparency as the horizontal axis, divide the original images in the original data set into different positions on the coordinate axis according to the transparency corresponding to the original images, and finally the multiple original images on the coordinate axis are distributed in intervals.

[0108] In the above scheme, transparency can be calculated using Gaussian distribution to obtain the corresponding image morphology distribution, thereby dividing the original images with high transparency and low transparency, and using data processing types with lower feature weakening to process data, thereby reducing the generation of image training samples that are not conducive to model training, and making the final trained model more in line with business requirements.

[0109] Furthermore, based on the above embodiment, if the number of image features is greater than one, the above step S102 may specifically include the following steps:

[0110] Step 1) Calculate multiple image features corresponding to the original images in the original data set respectively.

[0111] Step 2) For one of the multiple image features, data processing is performed on the original data set according to the image feature, so that the original image in the original data set presents the image morphology distribution corresponding to the image feature.

[0112] Specifically, when the number of image features is greater than one, data processing can be performed on the original data set based on one of the multiple image features, so that the original image in the original data set presents the image morphology distribution corresponding to the image feature. Therefore, the data processing type set corresponding to the data set to be processed under this image feature can be determined based on the above-mentioned image morphology distribution.

[0113] By repeating the above process for each of the multiple image features, a set of data processing types corresponding to the dataset to be processed under the multiple image features can be obtained. As one embodiment, the dataset to be processed can be processed using the data processing types that are at the intersection of the sets of data processing types corresponding to the multiple image features. As another embodiment, the dataset to be processed can also be processed using the data processing types with a lower degree of feature weakening in the sets of data processing types corresponding to the multiple image features.

[0114] It can be understood that when the number of image features is greater than one, in addition to the above-mentioned implementation, the original data set can also be processed for multiple image features at the same time, so that the original image in the original data set presents image morphological distribution corresponding to multiple image features in different dimensions.

[0115] In the above scheme, when the number of image features is greater than one, the corresponding image morphology distribution can be calculated separately, so that the original images with lower image quality and higher image quality can be divided, and data processing can be performed using a data processing type with a lower degree of feature weakening, thereby reducing the generation of image training samples that are not conducive to model training, so that the final trained model is more in line with business requirements.

[0116] Please refer to Figure 5, which is a structural block diagram of a data processing device provided in an embodiment of the present application. The data processing device 500 includes: an acquisition module 501, used to acquire an original data set; wherein the original data set includes an original image; a calculation module 502, used to calculate the image morphology distribution of the original data set; wherein the image morphology distribution characterizes the distribution of image features corresponding to the original image in the original data set; a division module 503, used to divide the original data set according to the image morphology distribution to obtain multiple data sets to be processed; a first determination module 504, used to determine a data processing type set corresponding to the data set to be processed according to the image morphology distribution; wherein the data processing type set includes at least one data processing type in the target data processing type; and a processing module 505, used to perform data processing on the data set to be processed using a data processing type in the data processing type set.

[0117] In the above scheme, first, the distribution of image features corresponding to the images in the original dataset (i.e., the image morphology distribution of the original dataset) can be calculated; then, based on the image morphology distribution, an appropriate data processing type can be selected for the images in the original dataset. Specifically, performing data processing on the original images in the original dataset based on the data processing type determined by the data processing method provided in the embodiment of the present application can reduce the generation of image training samples that are not conducive to model training, thereby making the ultimately trained model more consistent with business requirements.

[0118] Furthermore, based on the above embodiment, the division module 503 is specifically configured to divide the image features into multiple intervals according to a division threshold corresponding to the image morphology distribution, and determine the original image within an interval as a data set to be processed.

[0119] In the above scheme, a division threshold corresponding to the image morphology distribution can be pre-configured, so that after the image morphology distribution of the original data set is calculated, the original data set can be divided into multiple data sets to be processed based on the above division threshold, and a suitable data processing type can be selected for each data set to be processed, thereby reducing the generation of image training samples that are not conducive to model training, so that the final trained model is more in line with business requirements.

[0120] Furthermore, based on the above embodiment, the data processing device 500 further includes: a second determining module, configured to generate a plurality of data processing type sets according to the feature weakening degrees corresponding to the target data processing types.

[0121] In the above scheme, multiple target data processing types can be divided into multiple data processing type sets according to the degree of feature weakening of the original image features, so that a suitable data processing type set can be selected for each data set to be processed based on the image morphological distribution. Therefore, the generation of image training samples that are not conducive to model training can be reduced, so that the final trained model can be more in line with business requirements.

[0122] Furthermore, based on the above embodiments, the first determination module 504 is specifically used to: filter out the data processing types whose feature weakening degree is lower than a preset threshold from the target data processing types, and determine them as the first data processing type set; and filter out all data processing types from the target data processing types, and determine them as the second data processing type set.

[0123] In the above scheme, multiple data processing types can be divided into multiple data processing type sets according to the degree of feature weakening of the original image features, among which the data processing types with lower feature weakening degrees are divided into the first data processing type set for performing data processing on the original images with weaker image features, thereby avoiding further degradation of the image features of the original images. Therefore, the generation of image training samples that are not conducive to model training can be reduced, so that the final trained model can be more in line with business requirements.

[0124] Furthermore, based on the above embodiment, the data processing type includes a data enhancement type, and the image features include: image resolution and / or blur degree; the calculation module 502 is specifically used to: calculate the image resolution and / or blur degree corresponding to the original image in the original data set; and perform data processing on the original data set according to the image resolution and / or blur degree so that the original images in the original data set present a long-tail distribution.

[0125] In the above scheme, the image resolution and blur degree can use the long-tail distribution to calculate the corresponding image morphological distribution, so that the original images with low resolution or high blur degree can be divided, and the data processing type with lower feature weakening degree can be used for data processing, thereby reducing the generation of image training samples that are not conducive to model training, so that the final trained model is more in line with business requirements.

[0126] Furthermore, based on the above embodiment, the data processing type includes a data enhancement type, and the image features include: target occlusion degree; the calculation module 502 is specifically used to: calculate the target occlusion degree corresponding to the original image in the original data set; and perform data processing on the original data set according to the target occlusion degree so that the original image in the original data set presents an interval distribution.

[0127] In the above scheme, the target occlusion degree can be calculated using interval distribution to obtain the corresponding image morphology distribution, so that the original image with high target occlusion degree can be divided out, and data processing can be performed using a data processing type with a lower degree of feature weakening, thereby reducing the generation of image training samples that are not conducive to model training, so that the final trained model is more in line with business requirements.

[0128] Furthermore, based on the above embodiment, the data processing type includes a data enhancement type, and the image features include: transparency; the calculation module 502 is specifically used to: calculate the transparency corresponding to the original image in the original data set; and perform data processing on the original data set according to the transparency so that the original image in the original data set presents a Gaussian distribution.

[0129] In the above scheme, transparency can be calculated using Gaussian distribution to obtain the corresponding image morphology distribution, thereby dividing the original images with high transparency and low transparency, and using data processing types with lower feature weakening to process data, thereby reducing the generation of image training samples that are not conducive to model training, and making the final trained model more in line with business requirements.

[0130] Furthermore, based on the above embodiment, the number of the image features is greater than one; the calculation module 502 is specifically used to: respectively calculate multiple image features corresponding to the original image in the original data set; for one image feature among the multiple image features, perform data processing on the original data set according to the image feature, so that the original image in the original data set presents the image morphological distribution corresponding to the image feature.

[0131] In the above scheme, when the number of image features is greater than one, the corresponding image morphology distribution can be calculated separately, so that the original images with lower image quality and higher image quality can be divided, and data processing can be performed using a data processing type with a lower degree of feature weakening, thereby reducing the generation of image training samples that are not conducive to model training, so that the final trained model is more in line with business requirements.

[0132] Please refer to Figure 6, which is a structural block diagram of an electronic device provided in an embodiment of the present application. The electronic device 600 includes: at least one processor 601, at least one communication interface 602, at least one memory 603 and at least one communication bus 604. Among them, the communication bus 604 is used to realize direct connection and communication between these components, the communication interface 602 is used to communicate signaling or data with other node devices, and the memory 603 stores machine-readable instructions executable by the processor 601. When the electronic device 600 is running, the processor 601 communicates with the memory 603 through the communication bus 604, and the above-mentioned data processing method is executed when the machine-readable instructions are called by the processor 601.

[0133] For example, the processor 601 of an embodiment of the present application reads a computer program from the memory 603 through the communication bus 604 and executes the computer program to implement the following method: Step S101: Acquire an original data set; wherein the original data set includes an original image. Step S102: Calculate the image morphology distribution of the original data set; wherein the image morphology distribution characterizes the distribution of image features corresponding to the original image in the original data set. Step S103: Divide the original data set according to the image morphology distribution to obtain multiple data sets to be processed. Step S104: Determine a data processing type set corresponding to the data set to be processed according to the image morphology distribution; wherein the data processing type set includes at least one data processing type of the target data processing type. Step S105: Use a data processing type in the data processing type set to perform data processing on the data set to be processed.

[0134] Among them, the processor 601 includes one or more, which can be an integrated circuit chip with signal processing capabilities. The above-mentioned processor 601 can be a general-purpose processor, including a central processing unit (CPU), a micro control unit (MCU), a network processor (NP) or other conventional processors; it can also be a special-purpose processor, including a neural network processor (NPU), a graphics processing unit (GPU), 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. Moreover, when there are multiple processors 601, some of them can be general-purpose processors and the other part can be special-purpose processors.

[0135] The memory 603 includes one or more, which may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0136] It will be understood that the structure shown in FIG3 is for illustration only, and the electronic device 600 may also include more or fewer components than those shown in FIG3 , or have a configuration different from that shown in FIG3 . The components shown in FIG3 may be implemented using hardware, software, or a combination thereof. In the embodiments of the present application, the electronic device 600 may be, but is not limited to, a physical device such as a desktop computer, a laptop computer, a smart phone, a smart wearable device, an in-vehicle device, and may also be a virtual device such as a virtual machine. In addition, the electronic device 600 is not necessarily a single device, but may also be a combination of multiple devices, such as a server cluster, and the like.

[0137] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer program instructions. When the computer program instructions are executed by a computer, the computer executes the data processing method described in the aforementioned method embodiment.

[0138] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interface, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0139] In addition, the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0140] Furthermore, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0141] It should be noted that if the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0142] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any actual relationship or order between these entities or operations.

[0143] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, various modifications and variations of the present application are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A data processing method, characterized in that: include: Acquire an original data set; wherein the original data set includes an original image; Calculating the image morphology distribution of the original data set; wherein the image morphology distribution represents the distribution of image features corresponding to the original image in the original data set; Dividing the original data set according to the image morphology distribution to obtain multiple data sets to be processed; Determining a data processing type set corresponding to the data set to be processed according to the image morphology distribution; wherein the data processing type set includes at least one data processing type of the target data processing type; The data set to be processed is processed using a data processing type in the data processing type set.

2. The data processing method according to claim 1, wherein: The original data set is divided according to the image morphology distribution to obtain multiple data sets to be processed, including: The image features are divided into a plurality of intervals according to a division threshold corresponding to the image morphology distribution, and the original image in one interval is determined as a data set to be processed.

3. The data processing method according to claim 1, wherein: Before determining a data processing type set corresponding to the data set to be processed according to the image morphology distribution, the method further includes: A plurality of data processing type sets are generated according to the feature weakening degree corresponding to the target data processing type.

4. The data processing method according to claim 3, characterized in that: The generating of multiple data processing type sets according to the feature weakening degree corresponding to the target data processing type includes: Data processing types whose feature weakening degree is lower than a preset threshold are screened out from the target data processing types and determined as a first data processing type set, and all data processing types are screened out from the target data processing types and determined as a second data processing type set.

5. The data processing method according to any one of claims 1 to 4, characterized in that: The data processing type includes a data enhancement type, the image features include: image resolution and / or blur level; and the calculating of the image morphology distribution of the original data set includes: Calculating the image resolution and / or blur level corresponding to the original image in the original data set; Data processing is performed on the original data set according to the image resolution and / or blur level, so that the original images in the original data set present a long-tail distribution.

6. The data processing method according to any one of claims 1 to 4, characterized in that: The data processing type includes a data enhancement type, the image features include: target occlusion degree; and the image morphology distribution of the original data set is calculated, including: Calculating the target occlusion degree corresponding to the original image in the original data set; Data processing is performed on the original data set according to the target occlusion degree, so that the original images in the original data set present an interval distribution.

7. The data processing method according to any one of claims 1 to 4, characterized in that: The data processing type includes a data enhancement type, the image feature includes transparency, and the calculating of the image morphology distribution of the original data set includes: Calculating the transparency of the original image in the original data set; Data processing is performed on the original data set according to the transparency, so that the original images in the original data set present a Gaussian distribution.

8. The data processing method according to any one of claims 1 to 4, characterized in that: The number of the image features is greater than one; and calculating the image morphology distribution of the original data set includes: Calculating a plurality of image features corresponding to the original images in the original data set respectively; For one image feature among the multiple image features, data processing is performed on the original data set according to the image feature, so that the original image in the original data set presents an image morphology distribution corresponding to the image feature.

9. A data processing device, characterized in that: include: An acquisition module, configured to acquire an original data set, wherein the original data set includes an original image; A calculation module, configured to calculate the image morphology distribution of the original data set; wherein the image morphology distribution represents the distribution of image features corresponding to the original image in the original data set; a partitioning module, configured to partition the original data set according to the image morphology distribution to obtain a plurality of data sets to be processed; A first determining module is configured to determine a data processing type set corresponding to the data set to be processed according to the image morphology distribution; wherein the data processing type set includes at least one data processing type of the target data processing type; A processing module is configured to perform data processing on the data set to be processed using a data processing type in the data processing type set.

10. An electronic device, characterized in that: include: processor, memory, and bus; The processor and the memory communicate with each other via the bus; The memory stores computer program instructions that can be executed by the processor, and the processor calls the computer program instructions to execute the data processing method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, which, when executed by a computer, enable the computer to execute the data processing method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Detection model training method and device, electronic equipment and readable storage medium

    CN111325107A

  • Small sample image expansion method, electronic equipment and storage medium

    CN111754494A

  • Data processing method and device and electronic equipment

    CN118196559A