Image data set construction method and device for data diversity enhancement

By introducing category diversity, prompt diversity and generative model diversity enhancement modules in the construction of image data sets, combined with image mutual similarity screening and copy-paste data enhancement technology, the problems of difficulty in data crawling and insufficient diversity are solved. Efficient and diverse image data set construction and model performance improvement are achieved.

CN118675009APending Publication Date: 2024-09-20ZHEJIANG UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410593305.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-14
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

Existing technologies cannot effectively utilize the full potential of generative models, especially in data amplification and image dataset construction. Data crawling is difficult and uncontrollable, and the diversity of images output by generative models is limited by manual design. Prompt language.

Method used

By constructing a data generation module that includes category diversity, prompt diversity, and generative model diversity enhancement modules, combined with a data annotation module based on background point prompts, an image mutual similarity screening module, and a copy-paste data enhancement module, high-quality, Diverse image data sets reduce dependence on web crawling data and improve the diversity and quality of data sets.

Benefits of technology

It achieves the efficient construction of large-scale image data sets, improves model performance and learning efficiency, reduces the difficulty of data set construction, fully releases the potential capabilities of the generated model, and improves data quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118675009A
    Figure CN118675009A
Patent Text Reader

Abstract

The invention discloses a data diversity enhancement-oriented image data set construction method and device, and belongs to the technical field of data set construction, and the method comprises the steps: constructing a data generation module comprising category diversity, prompt word diversity and generation model diversity, appointing an original category and an auxiliary additional category, and generating image data; constructing a data annotation module including image annotation and image processing, and obtaining annotation data from the image data through the data annotation module; constructing a data screening module based on the mutual similarity of the images, calculating the mutual similarity of the annotation data and the real data in the data screening module, and screening the annotation data higher than a threshold value as screened data; and constructing a data enhancement module based on copying and pasting, and copying and pasting the screened data and the real data to obtain a target image data set. According to the method, diversity is enhanced in the data generation stage, and generated image data which has diversity and large-scale expandability and keeps the capability of improving the model performance is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data set construction, and in particular relates to a method and device for constructing an image data set for data diversity enhancement. Background Art

[0002] Deep learning network is a machine learning technology based on artificial neural network. Through multi-level data processing and learning, it can achieve high-level feature extraction and abstract expression of large amounts of data. Compared with traditional digital image processing methods, deep learning network has achieved significant performance improvement in many perception tasks such as classification, target detection, and segmentation with its powerful feature extraction capabilities and end-to-end learning method.

[0003] At the same time, as the capacity of deep learning models continues to increase, data scale plays an increasingly important role in improving model performance. Currently, most data sets still rely on manual annotation, but manual annotation is expensive and cannot be efficiently expanded to large-scale data sets. Models trained on such data are prone to overfitting on the training set, especially for rare categories.

[0004] However, with the continuous development of generative models, the authenticity and controllability of generated data are also constantly improving. Therefore, existing methods propose to use generative models as a means of data augmentation, that is, to use generated datasets as supplementary training models for real datasets to improve model performance.

[0005] Among them, in 2023, the paper "Synthetic Data from Diffusion Models Improves ImageNet Classification" published in the online journal Transactions on Machine Learning Research fine-tuned the pre-trained text-based graph model, enabling the model to generate large-scale data sets for classification tasks.

[0006] In 2023, the paper "DiffuMask: Synthesizing Images withPixel-level Annotations for Semantic Segmentation Using Diffusion Models" published in the conference proceedings Proceedings of the IEEE / CVF International Conference on Computer Vision, pages 1206-1217, explored the semantic information contained in the cross-attention map of the diffusion model, and used an adaptive threshold strategy to enable the generative model to simultaneously generate images and corresponding semantic segmentation annotations for semantic segmentation tasks.

[0007] In the same year, the paper "X-Paste: Revisiting Scalable Copy-Paste for Instance Segmentation using CLIP and Stable Diffusion" published on pages 42098-42109 of the conference proceedings Proceedings of Machine Learning Research used web crawling data and generated data, and used a variety of pre-trained segmentation models to annotate the data, combined with the copy and paste strategy, so that the generated data can be used for instance segmentation tasks.

[0008] Although the above methods have explored data augmentation using generated datasets, a common problem is that they cannot effectively utilize the full potential of the generative model. First, some methods require crawling data from the Internet, but due to the existence of anti-crawling programs, crawling large-scale data from the Internet is very challenging. At the same time, the content of data crawled from the Internet is usually uncontrollable, and additional checks are required to filter out data that does not meet expectations.

[0009] Secondly, existing methods do not fully utilize the controllability of generative models. Currently commonly used generative models usually rely on input prompts to determine the content of the output image, but current methods usually only use manually designed templates to construct prompts, which limits the potential ability of generative models to output images. Summary of the invention

[0010] The purpose of the present invention is to provide a method and device for constructing an image dataset for data diversity enhancement, by enhancing the diversity of data in the data generation stage, and at the same time assisting with efficient labeling modules, screening modules and enhancement modules, to further explore the potential of the generation model, so that the generated image dataset can be expanded on a large scale while maintaining the ability to improve the model performance.

[0011] In order to achieve the above-mentioned invention object, the technical solution provided by the present invention is as follows:

[0012] In a first aspect, an embodiment of the present invention provides a method for constructing an image dataset for data diversity enhancement, comprising the following steps:

[0013] Step 1: Construct a data generation module that includes a category diversity enhancement module, a prompt diversity enhancement module, and a generative model diversity enhancement module, extract the original categories from any open source dataset with category annotations, specify auxiliary additional categories, and generate the original image dataset according to the data generation module;

[0014] Step 2: construct a data annotation module including an image annotation module and an image processing module. The original image dataset obtains annotation data through the data annotation module. The annotation data is used as the image foreground of the target image dataset to be generated. The image processing module includes an annotation inversion operation and a cropping operation.

[0015] Step 3: Construct a data screening module based on image mutual similarity, calculate the mutual similarity between the labeled data and the open source dataset in the data screening module, and select the labeled data above the preset threshold as the screening data;

[0016] Step 4: Build a copy-and-paste based data enhancement module, copy and paste the screened data and open source datasets through the data enhancement module to obtain enhanced data as the target image dataset for model training.

[0017] The technical concept of the present invention is: by taking the image category extracted from any open source dataset with category annotation as the original category, additional auxiliary additional categories are introduced to improve category diversity, and the two category information is integrated into the target category for prompt design. Two strategies are adopted in designing prompts: manual design and large model design. Two prompts are designed according to the target category and mixed to obtain the target prompt. The target prompt is input into multiple generation models to generate a diverse original image dataset.

[0018] Next, according to the data annotation module based on background point prompts, the original image data set is annotated to obtain background information, and then the annotation inversion operation is performed to obtain the annotation containing the foreground object. The image foreground is obtained through cropping as the annotation data.

[0019] Since one of the original categories of the category information of the labeled data comes from the open source dataset, and the open source dataset is the real source of data of multiple categories, the labeled data and the open source dataset are input into the data screening module based on image mutual similarity together, and the mutual similarity between the two is calculated to ensure that the obtained labeled data is sufficiently similar to the data of the same category in the open source dataset. The labeled data with mutual similarity lower than the preset threshold is screened out to ensure the high quality of the labeled data and obtain the screened data.

[0020] Finally, image stitching is performed. The image data in the open source dataset and the annotated images in the filtered data are input into the data enhancement module based on copy and paste. The image data is used as the base image and the annotated image is used as the copy image. The copy image is pasted to any position of the base image. Multiple copies can be pasted on one base image. After pasting, enhanced image data is obtained. Repeat the above operation to obtain an enhanced image dataset for model training and improve model performance.

[0021] Furthermore, in step 1, the original categories are extracted from any open source dataset with category annotations, and auxiliary additional categories are specified, and the original image dataset is generated according to the data generation module, specifically:

[0022] The original category and the auxiliary additional category are input into the category diversity enhancement module for superposition to obtain the target category; by setting multiple categories, image data with diversity is generated, thereby enhancing the ability of downstream task models to learn features;

[0023] The prompt diversity enhancement module includes a manually designed prompt strategy and a large model designed prompt strategy; the manually designed prompt strategy brings the target category into the preset template to obtain a manual prompt, and the large model designed prompt strategy inputs the target category into the large model to obtain the large model prompt, and the target prompt is mixed to obtain the target prompt, which is used to limit the foreground and background of the image generated by the generative model; by setting the two prompt strategies to mix, the diversity of prompts is greatly improved, the problem of repeated and monotonous generated data is effectively alleviated, and the potential ability of the generative model to output images can be fully released;

[0024] By constraining the generative model with the target prompt, the image foreground generated by the generative model can be made to be a single object, and the image background can be as simple as possible, that is, the image background does not contain complex textures. By setting such constraints, on the one hand, the controllability of the generative model can be fully utilized, and on the other hand, the difficulty of annotation in the subsequent annotation module can be reduced.

[0025] The generative model diversity enhancement module includes multiple generative models. The generative models generate multiple data sets according to the target prompts and mix the multiple data sets as the original image data set.

[0026] Furthermore, in step 2, the image annotation module in the data annotation module includes an image encoder, a prompt encoder and an annotation decoder, wherein:

[0027] The image encoder is used to obtain first encoding information of the original image data set;

[0028] Input the corner points of the image in the original image data set as background prompt points into the prompt encoder to obtain second encoding information;

[0029] The first encoded information and the second encoded information are input into a label decoder to obtain a background label.

[0030] Furthermore, in step 2, the background annotation is input into the image processing module, and the background annotation is inverted to obtain the foreground annotation; the original image data set is cropped according to the foreground annotation to obtain the annotation data containing only the image foreground.

[0031] Furthermore, in step 3, the construction of the data screening module based on image mutual similarity is specifically as follows:

[0032] The data screening module includes a mutual similarity filter, and the mutual similarity filter is composed of two image encoders and a mutual similarity screening module;

[0033] wherein an image encoder is used to obtain a first encoded embedding vector of the labeled image in the labeled data;

[0034] Another image encoder is used to obtain a second encoded embedding vector of the image data in the open source dataset;

[0035] Calculating a mutual similarity between the first encoded embedding vector and the second encoded embedding vector;

[0036] The mutual similarity screening module is set with a preset threshold value, and the labeled data with mutual similarity higher than the preset threshold value are screened as screening data.

[0037] Furthermore, in step 3, for an annotated image in the annotated data, the average value of the mutual similarity between the annotated image and all image data of the same category in the open source dataset is calculated as the final image mutual similarity of the annotated image, and the annotated images whose final image mutual similarity is greater than a preset threshold are retained as screening data.

[0038] Furthermore, step 4 is specifically as follows:

[0039] The copy-paste based data enhancement module includes a data enhancer;

[0040] Input the filtered data and the open source dataset into the data enhancer for data enhancement: randomly select an image data from the open source dataset as the base image, and randomly select an annotated image from the filtered data as the copy image; randomly paste the copy image to any position of the base image to obtain an enhanced data;

[0041] The data enhancement process is repeated, and the obtained multiple enhanced data are used as the target image dataset.

[0042] In a second aspect, to achieve the above-mentioned purpose of the invention, an embodiment of the present invention further provides an image data set construction device for data diversity enhancement, including a diversity image generation module, an image foreground acquisition module, an image foreground screening module, and an image pasting enhancement module;

[0043] The diversity image generation module is used to construct a data generation module including a category diversity enhancement module, a prompt diversity enhancement module and a generation model diversity enhancement module, extract original categories from any open source dataset with category annotations, specify auxiliary additional categories, and generate an original image dataset according to the data generation module;

[0044] The image foreground acquisition module is used to construct a data annotation module including an image annotation module and an image processing module. The original image data set obtains annotation data through the data annotation module, and the annotation data is used as the image foreground of the target image data set to be generated, wherein the image processing module includes an annotation inversion operation and a cropping operation;

[0045] The image foreground screening module is used to construct a data screening module based on image mutual similarity, in which the mutual similarity between the annotated data and the open source data set is calculated, and the annotated data above a preset threshold is screened as screening data;

[0046] The image pasting enhancement module is used to construct a data enhancement module based on copy and paste. The screened data and the open source data set are copied and pasted through the data enhancement module to obtain enhanced data as the target image data set for model training.

[0047] In the third aspect, in order to achieve the above-mentioned invention objectives, an embodiment of the present invention also provides an image dataset construction device for data diversity enhancement, including a memory and a processor, the memory is used to store a computer program, and the processor is used to implement the image dataset construction method for data diversity enhancement provided by the embodiment of the present invention in the first aspect when executing the computer program.

[0048] The beneficial effects of the present invention are as follows:

[0049] 1) The present invention uses a data generation module for data diversity enhancement, and by setting category diversity, prompt diversity, and generation model diversity, further explores the potential ability of the generation model to output images, so that the generated image dataset has strong diversity and does not require additional network crawling data, which greatly reduces the difficulty of constructing large-scale datasets and improves the efficiency of constructing large-scale datasets.

[0050] 2) The present invention effectively improves the data quality of the generated image data set through a data annotation module based on background point prompts, a data screening module based on image mutual similarity, and a data enhancement module based on copy and paste. Therefore, when the model is trained using a high-quality image data set, the learning efficiency of the model for the generated image data set can be enhanced, thereby improving the performance of the model on downstream tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a flowchart of a method for constructing an image dataset for data diversity enhancement provided by an embodiment of the present invention.

[0052] Figure 2 It is a structural schematic diagram of a data generation module for data diversity enhancement provided by an embodiment of the present invention.

[0053] Figure 3 It is a structural schematic diagram of a data annotation module based on background point prompts provided in an embodiment of the present invention.

[0054] Figure 4 It is a structural schematic diagram of a data screening module based on image mutual similarity provided by an embodiment of the present invention.

[0055] Figure 5 It is a structural schematic diagram of a data enhancement module based on copy and paste provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation methods described herein are only used to explain the present invention and do not limit the scope of protection of the present invention.

[0057] like Figure 1 As shown, the embodiment provides a method for constructing an image dataset for data diversity enhancement, comprising the following steps:

[0058] S110, construct a data generation module including a category diversity enhancement module, a prompt diversity enhancement module and a generation model diversity enhancement module, extract original categories from any open source dataset with category annotations, specify auxiliary additional categories, and generate an original image dataset according to the data generation module.

[0059] like Figure 2 As shown, the data generation module for data diversity enhancement constructed by the present invention includes three parts: a category diversity enhancement module, a prompt diversity enhancement module, and a generation model diversity enhancement module.

[0060] Among them, the category diversity enhancement module adds additional category information in order to generate data with category diversity based on multiple category information in the expected generation model. Furthermore, in order to address the problem of insufficient adaptability of traditional manually designed prompts, the present invention adds large model design prompts to the prompt diversity enhancement module. Since the large model has a large amount of prior knowledge, it can ensure that prompts with diversity are generated according to the target category. The prompts with diversity are input into the generation model to generate more diverse original image data. The working mechanisms of the three parts are explained below:

[0061] First, extract the categories from any open source image dataset with category annotations as the original categories. In this embodiment, extract the original categories from the open source dataset LVIS. LVIS is a large-scale instance segmentation dataset containing 164,000 images and approximately 2 million high-quality instance segmentation and object detection annotations.

[0062] In the category diversity enhancement module, in addition to the original category C ori , and also added auxiliary additional categories C introduced from other open source datasets aux In this embodiment, auxiliary additional categories are extracted from other open source datasets ImageNet-1K. By setting multiple categories, the ability of downstream task models to learn features is increased. Integrate the original category C ori and auxiliary additional category C aux Then, output the target category C all , the target category contains both the original category and the auxiliary additional category.

[0063] Then, the target category C all The input is sent to the prompt diversity enhancement module, in which a combination of hand-designed prompts and large model-designed prompts are used. The hand-designed prompts use a hand-designed template to transform the target category C all Bring it into the template to get the prompt T man Large model design tips By leveraging the powerful prior knowledge of the large model, the target category C all Input the preset output requirements into the big model, and let the big model output prompt T llm .

[0064] In order to make full use of the controllability of the generative model and reduce the difficulty of annotation in the subsequent annotation module, constraints are imposed on the prompts: the prompts require that the foreground of the generated image be a single object and that the background of the generated image be as simple as possible.

[0065] In this embodiment, "with a simple background" is added to the end of the large model design prompt, so that the background in the original image data set generated by the generative model does not contain complex texture features. The mixed use of the two strategies greatly improves the diversity of prompts and effectively alleviates the problem of repeated and monotonous generated data.

[0066] Finally, the mixed prompt T obtained by the two strategies is all The input is sent to the generative model diversity enhancement module, in which n generative models are set. These n generative models will simultaneously target the mixed prompt T all Generate corresponding data, and integrate these data as the final output original image data set, which greatly enriches the diversity of generated data. In this embodiment, n=2.

[0067] After three modules, we can get a diverse original image dataset D raw ,The original image dataset does not distinguish between foreground and background.

[0068] S120, constructing a data annotation module including an image annotation module and an image processing module. The original image data set obtains annotation data through the data annotation module, and the annotation data is used as the image foreground of the target image data set to be generated, wherein the image processing module includes an annotation inversion operation and a cropping operation.

[0069] like Figure 3 As shown, the data annotation module based on background point prompts constructed by the present invention includes two parts: a prompt-based image annotation model and an image processing module. The prompt-based image annotation model includes an image encoder, a prompt encoder and an annotation decoder, and the image processing module includes an annotation inversion operation and a cropping operation. The working mechanism of these two parts is described in detail below:

[0070] Since the prompts for generating data are constrained in S110, the backgrounds of the generated original image datasets are relatively simple, and the background annotation is relatively easy for the annotation model. Therefore, in the prompt-based annotation model, the original image dataset D is firstly raw The image encoder is input, and the four corner points of the image in the original image data set are input as background prompt points into the prompt encoder, and the encoding results obtained by the two encoders are passed through the annotation decoder to obtain background annotations. In this embodiment, the image encoder, the prompt encoder and the annotation decoder all use the SAM annotation model.

[0071] Subsequently, since the foreground of the image in the original image dataset only has a single object, the background annotation is input into the image processing module, and the foreground annotation is obtained by performing the annotation inversion operation. The annotation inversion operation is to use the non-background annotation area as the foreground annotation. Then, the image in the original image dataset is cropped according to the foreground annotation to separate the background and foreground, and the annotation data D containing only the foreground object is obtained. ann .

[0072] S130, constructing a data screening module based on image mutual similarity, calculating the mutual similarity between the annotated data and the open source data set in the data screening module, and screening the annotated data that is higher than a preset threshold as screening data.

[0073] like Figure 4 As shown, the core component of the data screening module based on image mutual similarity constructed by the present invention is a mutual similarity filter, wherein the mutual similarity filter includes two image encoders and a mutual similarity screening module.

[0074] The labeled data D obtained by S120 ann The image data of the same category in the open source dataset are input into two image encoders respectively to obtain the corresponding first encoding embedding vector b1 and second encoding embedding vector b2, and then the mutual similarity S(b1,b2) between the two images is calculated as follows:

[0075]

[0076] For an annotated image in the annotated data, the average value of the mutual similarities between the annotated image and all image data of the same category in the open source dataset is calculated as the final image mutual similarity of the annotated image.

[0077] The final image mutual similarity of all annotated images in the original image dataset is screened through the mutual similarity screening module. If the final image mutual similarity is lower than the preset threshold, it means that the annotated image is far from the real data in the open source dataset, and it is considered to be low-quality data. Since low-quality data will affect the learning efficiency of the model, the annotated data corresponding to the low-quality data is screened out, and the higher-quality annotated data is retained as the screening data D flt For use in subsequent steps.

[0078] S140, construct a data enhancement module based on copy and paste, copy and paste the screened data and the open source dataset through the data enhancement module to obtain enhanced data as the target image dataset for model training.

[0079] like Figure 5As shown, the core component of the copy-paste based data enhancement module constructed by the present invention is the data enhancer.

[0080] The filtered data and the open source dataset are input into the data enhancer for data enhancement: In the data enhancer, first, an image is randomly selected from the open source dataset as the base map. flt Randomly select an image as the copy image, and randomly paste the copy image to any position of the base image. A maximum of m copy images can be pasted on a base image. After copying and pasting, the enhanced data D aug The data enhancement process is repeated, and the multiple enhanced data obtained are used as target image data sets, which can be used for model training to improve the performance of the model. In this embodiment, m=20.

[0081] Based on the same inventive concept, an embodiment of the present invention also provides an image data set construction device for data diversity enhancement, including a diversity image generation module, an image foreground acquisition module, an image foreground screening module, and an image pasting enhancement module;

[0082] Among them, the diversity image generation module is used to construct a data generation module including a category diversity enhancement module, a prompt diversity enhancement module and a generation model diversity enhancement module, extract the original category from any open source dataset with category annotations, specify auxiliary additional categories, and generate the original image dataset according to the data generation module;

[0083] The image foreground acquisition module is used to construct a data annotation module including an image annotation module and an image processing module. The original image data set obtains annotation data through the data annotation module, and the annotation data is used as the image foreground of the target image data set to be generated, wherein the image processing module includes an annotation inversion operation and a cropping operation;

[0084] The image foreground screening module is used to construct a data screening module based on image mutual similarity. In the data screening module, the mutual similarity between the annotated data and the open source data set is calculated, and the annotated data above the preset threshold is screened as the screening data;

[0085] The image pasting enhancement module is used to build a data enhancement module based on copy and paste. The screened data and open source datasets are copied and pasted through the data enhancement module to obtain enhanced data as the target image dataset for model training.

[0086] As for the image data set construction device for data diversity enhancement provided by the embodiment of the present invention, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present invention. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0087] Based on the same inventive concept, an embodiment also provides an image dataset construction device for data diversity enhancement, including a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to implement the above-mentioned image dataset construction method for data diversity enhancement when executing the computer program.

[0088] The image dataset construction device for data diversity enhancement proposed in the embodiment of the present invention can be a device such as a computer. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, it is formed by the processor of any device with data processing capability in which it is located, reading the corresponding computer program instructions in the non-volatile memory into the memory and running them. From the hardware level, in addition to the processor, memory, network interface, and non-volatile memory, the image dataset construction device for data diversity enhancement provided in the embodiment of the present invention can generally include other hardware according to the actual function of the any device with data processing capability, which will not be described in detail.

[0089] It should be noted that the image dataset construction device for data diversity enhancement and the image dataset construction equipment for data diversity enhancement provided in the above-mentioned embodiments belong to the same concept as the embodiment of the image dataset construction method for data diversity enhancement. The specific implementation process is detailed in the embodiment of the image dataset construction method for data diversity enhancement, which will not be repeated here.

[0090] The above is only a preferred implementation case of the present invention and does not limit the present invention in any form. Although the implementation process of the present invention is described in detail above, for those familiar with the art, they can still modify the technical solutions recorded in the above examples, or replace some of the technical features therein with equivalents. All modifications, equivalent replacements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for constructing an image dataset for data diversity enhancement, characterized in that: The following steps are involved: Step 1: Construct a data generation module that includes a category diversity enhancement module, a prompt diversity enhancement module, and a generative model diversity enhancement module, extract the original categories from any open source dataset with category annotations, specify auxiliary additional categories, and generate the original image dataset according to the data generation module; Step 2: construct a data annotation module including an image annotation module and an image processing module. The original image dataset obtains annotation data through the data annotation module. The annotation data is used as the image foreground of the target image dataset to be generated. The image processing module includes an annotation inversion operation and a cropping operation. Step 3: Construct a data screening module based on image mutual similarity, calculate the mutual similarity between the labeled data and the open source dataset in the data screening module, and select the labeled data above the preset threshold as the screening data; Step 4: Build a copy-and-paste based data enhancement module, copy and paste the screened data and open source datasets through the data enhancement module to obtain enhanced data as the target image dataset for model training.

2. The method for constructing an image dataset for data diversity enhancement according to claim 1, characterized in that: In step 1, the original categories are extracted from any open source dataset with category annotations, and auxiliary additional categories are specified, and the original image dataset is generated according to the data generation module, specifically: The original category and the auxiliary additional category are input into the category diversity enhancement module for superposition to obtain the target category; The prompt diversity enhancement module includes a manually designed prompt strategy and a large model designed prompt strategy; wherein the manually designed prompt strategy brings the target category into the preset template to obtain the manual prompt, and the large model designed prompt strategy inputs the target category into the large model to obtain the large model prompt, and the target prompt is mixed to obtain the target prompt, which is used to limit the foreground and background of the image generated by the generative model; The generative model diversity enhancement module includes multiple generative models. The generative models generate multiple data sets according to the target prompts and mix the multiple data sets as the original image data set.

3. The method for constructing an image dataset for data diversity enhancement according to claim 1, characterized in that: In step 2, the image annotation module in the data annotation module includes an image encoder, a prompt encoder and an annotation decoder, wherein: The image encoder is used to obtain first encoding information of the original image data set; Input the corner points of the image in the original image data set as background prompt points into the prompt encoder to obtain second encoding information; The first encoded information and the second encoded information are input into a label decoder to obtain a background label.

4. The method for constructing an image dataset for data diversity enhancement according to claim 3, characterized in that: In step 2, the background annotation is input into the image processing module, and the background annotation is inverted to obtain the foreground annotation; the original image data set is cropped according to the foreground annotation to obtain the annotation data containing only the image foreground.

5. The method for constructing an image dataset for data diversity enhancement according to claim 1, characterized in that: In step 3, the construction of a data screening module based on image mutual similarity is specifically as follows: The data screening module includes a mutual similarity filter, and the mutual similarity filter is composed of two image encoders and a mutual similarity screening module; wherein an image encoder is used to obtain a first encoded embedding vector of the annotated image in the annotated data; Another image encoder is used to obtain a second encoded embedding vector of the image data in the open source dataset; The first encoding embedding vector and the second encoding embedding vector are input into a mutual similarity screening module, the mutual similarity is calculated, and the labeled data whose mutual similarity is higher than a preset threshold is screened as screening data.

6. The method for constructing an image dataset for data diversity enhancement according to claim 5, characterized in that: In step 3, for an annotated image in the annotated data, the average value of the mutual similarity between the annotated image and all image data of the same category in the open source dataset is calculated as the final image mutual similarity of the annotated image, and the annotated images whose final image mutual similarity is greater than a preset threshold are retained as screening data.

7. The method for constructing an image dataset for data diversity enhancement according to claim 1, characterized in that: Step 4 is as follows: The copy-paste based data enhancement module includes a data enhancer; Input the filtered data and open source dataset into the data enhancer for data enhancement: randomly select an image data from the open source dataset as the base image, and randomly select an annotated image from the filtered data as the copy image; Randomly paste the copied image to any position of the base image to obtain an enhanced data; The data enhancement process is repeated, and the obtained multiple enhanced data are used as the target image dataset.

8. A device for constructing an image dataset for data diversity enhancement, characterized in that: It includes a diversity image generation module, an image foreground acquisition module, an image foreground screening module, and an image pasting enhancement module; The diversity image generation module is used to construct a data generation module including a category diversity enhancement module, a prompt diversity enhancement module and a generation model diversity enhancement module, extract original categories from any open source dataset with category annotations, specify auxiliary additional categories, and generate an original image dataset according to the data generation module; The image foreground acquisition module is used to construct a data annotation module including an image annotation module and an image processing module. The original image data set obtains annotation data through the data annotation module, and the annotation data is used as the image foreground of the target image data set to be generated, wherein the image processing module includes an annotation inversion operation and a cropping operation; The image foreground screening module is used to construct a data screening module based on image mutual similarity, in which the mutual similarity between the annotated data and the open source data set is calculated, and the annotated data above a preset threshold is screened as screening data; The image pasting enhancement module is used to construct a data enhancement module based on copy and paste. The screened data and the open source data set are copied and pasted through the data enhancement module to obtain enhanced data as the target image data set for model training.

9. An image data set construction device for data diversity enhancement, comprising a memory and a processor, wherein the memory is used to store a computer program, characterized in that: The processor is used to implement the image dataset construction method for data diversity enhancement as described in any one of claims 1 to 7 when executing the computer program.

Citation Information

Cited By

  • Large model training method, model, system and equipment based on scoring mechanism

    CN119357675A

  • Method, system and equipment for constructing portrait matting data set based on diffusion model

    CN119379825A

  • Method, system and device for constructing portrait matting dataset based on diffusion model

    CN119379825B