Picture batch processing method, system and device and medium
By performing keyword semantic segmentation and target mask map generation on the images to be processed, combined with VAE, IPAdapter, Clip visual model and LORA fine-tuning model, the stable recognition and consistency of the AI image processing model is improved, and the problem of image batching in the existing technology is solved. It solves the problem of low stability and reduces the workload of manual screening.
Patent Information
- Application Number
- CN202410557046.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-07
- Publication Date
- 2024-08-30
AI Technical Summary
Existing AI image batch processing technology has problems such as low stability and low content consistency, which requires a lot of manual screening and correction.
Through keyword semantic segmentation of the images to be processed, the target extraction content is extracted, the target mask map is generated, and the AI image processing model is used for decoding and sampling under constraints, and the batch-processed target images are output. Combined with VAE, IPAdapter, Clip The visual model and LORA fine-tuning model adjust the AI image processing model to improve the model's stable recognition and processing efficiency.
It achieves accurate semantic segmentation and extraction of image content, improves the content consistency of batch modifications, reduces the workload of manual screening in the later stage, and solves the problem of low stability in batch processing of images.
Smart Images

Figure CN118570463A
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, system, device and medium for batch processing of images. Background Art
[0002] In the traditional batch conversion of character images, it is necessary to manually create masks for each image to process, which is very labor-intensive. In the existing AI-based automatic batch processing of images, there are also problems such as low stability. It is difficult for general AI models to stably identify the modified parts of the image, and the consistency of the content of batch modification is not high. It is difficult to generate hundreds or thousands of images that meet the requirements at one time. Therefore, it can only be completed through a large number of AI output images and then manually screened, manually modified and formatted. Although some workload is saved, it still requires a lot of manual screening and correction.
[0003] Currently, no effective solution has been proposed for the problem of low stability in batch image processing in related technologies. Summary of the invention
[0004] The embodiments of the present application provide a method, system, device and medium for batch processing of images, so as to at least solve the problem of low stability in batch processing of images in the related art.
[0005] In a first aspect, an embodiment of the present application provides a method for batch processing of images, the method comprising:
[0006] After performing keyword semantic segmentation on the image to be processed, the target content is extracted;
[0007] Based on the target extraction content, generating a target mask image of the image to be processed;
[0008] Based on the image to be processed, analyze and generate positive conditions and negative conditions for constraining the AI image processing model;
[0009] Under the constraints of the positive condition and the negative condition, the target mask image is decoded and sampled through the AI image processing model to output the target image after batch processing.
[0010] In some embodiments, before decoding and sampling the target mask map through the AI image processing model, the method includes:
[0011] Load the checkpoint model through the VAE loader;
[0012] Reference elements for batch conversion are obtained, and the checkpoint model is adjusted based on the reference elements to obtain an AI image processing model.
[0013] In some embodiments, adjusting the checkpoint model based on the reference element to obtain the AI image processing model includes:
[0014] The checkpoint model, the IPAdapter fine-tuning model, the Clip visual model and the LORA fine-tuning model are combined to obtain an AI image processing model; wherein the checkpoint model is used as the main model; the IPAdapter fine-tuning model and the Clip visual model are used to adjust the checkpoint model according to the reference element; and the LORA fine-tuning model is used to improve the processing efficiency of the checkpoint model.
[0015] In some embodiments, under the constraints of the positive condition and the negative condition, decoding and sampling the target mask image through the AI image processing model, and outputting the batch processed target image includes:
[0016] Decoding the target mask image and the image to be processed by the AI image processing model to obtain a first latent space;
[0017] Under the constraints of the positive condition and the negative condition, the first latent space is sampled through the AI image processing model to output the target image after batch processing.
[0018] In some embodiments, sampling the first latent space through the AI image processing model and outputting the batch processed target images includes:
[0019] Sampling the first latent space through the AI image processing model to obtain a second latent space;
[0020] After decoding the second latent space through the AI image processing model, converting it into a preprocessed picture based on the reference element;
[0021] The pre-processed image and the image to be processed are masked and mixed through the AI image processing model to obtain the target image after batch processing.
[0022] In some embodiments, based on the image to be processed, parsing and generating positive conditions and negative conditions for constraining the AI image processing model includes:
[0023] Performing a first process on the image to be processed by a DW preprocessor to obtain a skeleton image;
[0024] Performing a second process on the image to be processed by a MeshGraphormer preprocessor to obtain a depth map;
[0025] Based on the skeleton map and depth map of the image to be processed, the positive conditions and negative conditions for constraining the AI image processing model are generated by the ControNet tool.
[0026] In some embodiments, after keyword semantic segmentation is performed on the image to be processed, the target extracted content includes:
[0027] Get the path address of the image to be processed;
[0028] Through the Clip visual model, keyword semantic segmentation is performed on a number of images to be processed under the path address one by one, and target extraction content corresponding to each image to be processed is extracted.
[0029] In a second aspect, an embodiment of the present application provides a system for batch processing of images, the system being used to execute the method described in any one of the first aspects above, the system comprising a segmentation and extraction module, a mask generation module, a conditional constraint module, and a model processing module;
[0030] The segmentation and extraction module is used to extract the target extracted content after performing keyword semantic segmentation on the image to be processed;
[0031] The mask generation module is used to generate a target mask image of the image to be processed according to the target extraction content;
[0032] The condition constraint module is used to analyze and generate positive conditions and negative conditions for constraining the AI image processing model according to the image to be processed;
[0033] The model processing module is used to decode and sample the target mask image through the AI image processing model under the constraints of the positive condition and the negative condition, and output the target image after batch processing.
[0034] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the computer program.
[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect above.
[0036] Compared with the related art, the embodiments of the present application provide a method, system, device and medium for batch processing of images, wherein the method extracts target extraction content after performing keyword semantic segmentation on the image to be processed; based on the target extraction content, generates a target mask map of the image to be processed; based on the image to be processed, parses and generates positive conditions and negative conditions for constraining the AI image processing model; under the constraints of the positive and negative conditions, decodes and samples the target mask map through the AI image processing model, and outputs the target image after batch processing, thereby achieving accurate semantic segmentation and extraction of the image content while generating positive and negative conditions for constraining the AI model, improving the model's stable recognition of the modified part, improving the content consistency of batch modifications, reducing the workload of later manual screening, and solving the problem of low stability in batch processing of images. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0038] Figure 1 is a flowchart of the steps of the method for batch processing of pictures according to an embodiment of the present application;
[0039] Figure 2 is a schematic diagram of a picture to be processed under a path address according to an embodiment of the present application;
[0040] Figure 3 is a schematic diagram of reference elements for batch conversion according to an embodiment of the present application;
[0041] Figure 4 is a schematic diagram of a target image after batch processing according to an embodiment of the present application;
[0042] Figure 5 is a structural block diagram of a system for batch processing of images according to an embodiment of the present application;
[0043] Figure 6 It is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0045] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.
[0046] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0047] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0048] The present application provides a method for batch processing of images. Figure 1 is a flowchart of the steps of the method for batch processing of pictures according to an embodiment of the present application, such as Figure 1As shown, the method comprises the following steps:
[0049] Step S102, after performing keyword semantic segmentation on the image to be processed, target content is extracted;
[0050] Specifically, step S102 obtains the path address of the image to be processed; through the Clip visual model, keyword semantic segmentation is performed on a number of images to be processed under the path address one by one, and the target extraction content corresponding to each image to be processed is extracted.
[0051] It should be noted that the CLIP (Contrastive Language-Image Pre-training) visual model is a powerful multimodal pre-training model that achieves joint representation learning between images and texts by performing contrastive learning on large-scale Internet data. The key advantage of the CLIP model lies in its zero-shot learning ability, that is, it can classify, retrieve or generate images based on text descriptions alone without having seen training samples of a specific category; CLIP encodes images and texts into a shared semantic space respectively, so that the model can understand and match image content with natural language descriptions, and then be applied to a variety of multimodal tasks such as image generation, image retrieval, and visual question answering. Therefore, in step S102, based on the input keywords and the image to be processed, CLIP encodes both into a shared semantic space, and then completes the matching of the two, and then divides the image to be processed into multiple parts and extracts the target extracted content from them.
[0052] Step S104, generating a target mask image of the image to be processed based on the target extraction content;
[0053] It should be noted that mask is a very important concept in computer graphics, image processing, and machine learning. It is mainly used to define a certain area in an image so that specific operations can be performed on the area without affecting other parts of the image. Masks can be binary (i.e., only black and white), where white areas represent selected or retained areas, and black areas represent unselected or excluded areas; or they can be grayscale, used to represent different degrees of transparency or selection.
[0054] Based on the target extraction content (if the image to be processed is a person's image, the target extraction content may include the head, hair, clothes, hands, etc.), etc., the target mask map of the image to be processed is generated by adjusting the heat map; the heat map is a parameter for adjusting the intensity range of the mask map, and the gradient of color from blue to red (or black to white) represents the magnitude of the intensity. In other words, in step S104, the display intensity of each target extraction content is correspondingly adjusted through the heat map (the target extraction content that needs to be changed is retained, and the target extraction content that does not need to be changed is removed) to generate the target mask map of the image to be processed.
[0055] Step S106, based on the image to be processed, analyzing and generating positive conditions and negative conditions for constraining the AI image processing model;
[0056] Specifically, step S106 performs a first processing on the image to be processed through the DW preprocessor to obtain a skeleton map; performs a second processing on the image to be processed through the MeshGraphormer preprocessor to obtain a depth map; based on the skeleton map and depth map of the image to be processed, the ControNet tool is used to generate positive and negative conditions for constraining the AI image processing model.
[0057] It should be noted that ControlNet is an auxiliary tool or plug-in for AI painting. Step S106 generates positive and negative conditions for constraining the AI image processing model, which can guide the model to generate images that are more in line with expectations. The positive condition indicates what the model should do, and the negative condition indicates what the model should not do. The DW preprocessor is a secondary distillation model preprocessor, which is used to identify the characters in the image to be processed (character picture) to generate a skeleton map, and its accuracy is higher than that of the ordinary skeleton recognition preprocessor. MeshGraphormer is mainly used to generate a depth map (such as a point cloud or a three-dimensional shape map) of the image to be processed.
[0058] Step S108, under the constraints of positive conditions and negative conditions, the target mask image is decoded and sampled through the AI image processing model, and the target image after batch processing is output.
[0059] Before step S108, the method further includes step S107, and step S107 includes the following steps:
[0060] Step S1071, loading the checkpoint model through the VAE loader;
[0061] It should be noted that the VAE loader is a component or tool used to load the variational autoencoder (VAE) model. The role of the VAE loader is to read the weights and structure of the pre-trained VAE model; the checkpoint model refers to the model state file saved during the training process. These files contain the model's weights, biases, and other necessary parameters, which are saved at a specific training stage. In other words, the checkpoint model in step S1071 is a VAE model, which is a generative model that can learn the latent space (low-dimensional representation) of data and generate new samples.
[0062] Step S1072, obtaining reference elements for batch conversion, adjusting the checkpoint model based on the reference elements, and obtaining an AI image processing model;
[0063] Specifically, step S1072 obtains reference elements for batch conversion, combines the checkpoint model, IPAdapter fine-tuning model, Clip visual model and LORA fine-tuning model to obtain the AI image processing model; wherein, the checkpoint model is used as the main model; the IPAdapter fine-tuning model and the Clip visual model are used to adjust the checkpoint model according to the reference elements; the LORA fine-tuning model is used to improve the processing efficiency of the checkpoint model.
[0064] It should be noted that the IPAdapter fine-tuning model is a technology for fine-tuning models for specific tasks or fields, aiming to improve the performance of the model in specific application scenarios while maintaining low intrusion to the original model structure. Combining the LoRA (Low-Rank Adaptation) technology can greatly improve the performance of the model on specific tasks. This model design facilitates rapid adaptation and optimization of specific tasks by adding a learnable lightweight adapter layer without significantly changing the original model architecture. The LORA fine-tuning model is preferably the LCM LoRA fine-tuning model, which can significantly improve the speed and efficiency of the model's image generation while maintaining high-quality output, and can use the CPU for image generation, greatly reducing dependence on high-end GPUs.
[0065] Step S108 specifically includes the following steps:
[0066] Step S1081, decoding the target mask image and the image to be processed by the AI image processing model to obtain a first latent space;
[0067] Step S1082, under the constraints of positive conditions and negative conditions, the first latent space is sampled through the AI image processing model, and the target image after batch processing is output.
[0068] Specifically, in step S1082, under the constraints of positive conditions and negative conditions, the first latent space is sampled through the AI image processing model to obtain the second latent space; after decoding the second latent space through the AI image processing model, it is converted to obtain a preprocessed image based on the reference element; the preprocessed image and the image to be processed are masked and mixed through the AI image processing model to obtain the target image after batch processing.
[0069] It should be noted that Figure 2 is a schematic diagram of a picture to be processed under a path address according to an embodiment of the present application, such as Figure 2 As shown, the image to be processed under the path address obtained in step S102; Figure 3 is a schematic diagram of reference elements for batch conversion according to an embodiment of the present application, such as Figure 3 As shown, the reference elements for batch conversion obtained in step S1072 (if the image to be processed is a person image, the reference elements may include head, hair, clothes, hands, etc.); Figure 4 is a schematic diagram of a target image after batch processing according to an embodiment of the present application, such as Figure 4 As shown, in step S108, the AI image processing model is used to decode and sample the image to be processed and the target mask image to obtain a preprocessed image based on the reference element (including the position information and boundary information of the reference element in the image to be processed), and then the preprocessed image and the image to be processed are masked and mixed to obtain the target image. In other words, based on the image batch processing method described in the embodiment of the present application, it is only necessary to specify the path address of the image to be processed through the input end, specify the reference element (such as Figure 3 clothes), configure the naming variables and storage path, and you can execute it with one click.
[0070] Through steps S102 to S108 in the embodiment of the present application, it is possible to generate positive and negative conditions for constraining the AI model while performing accurate semantic segmentation and extraction of the image content, thereby improving the model's stable recognition of modified parts, improving the consistency of content in batch modifications, reducing the workload of later manual screening, and solving the problem of low stability in batch image processing.
[0071] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0072] The present application embodiment provides a system for batch processing of images, and the system is used to execute the method in the above embodiment. Figure 5is a structural block diagram of a system for batch processing of images according to an embodiment of the present application, such as Figure 5 As shown, the system includes a segmentation and extraction module, a mask generation module, a condition constraint module and a model processing module;
[0073] The segmentation and extraction module is used to perform keyword semantic segmentation on the image to be processed and extract the target content;
[0074] A mask generation module is used to generate a target mask image of the image to be processed according to the target extraction content;
[0075] The conditional constraint module is used to analyze and generate positive and negative conditions for constraining the AI image processing model based on the image to be processed;
[0076] The model processing module is used to decode and sample the target mask image through the AI image processing model under the constraints of positive and negative conditions, and output the target image after batch processing.
[0077] Through the segmentation and extraction module, mask generation module, conditional constraint module and model processing module in the embodiments of the present application, it is possible to generate positive and negative conditions for constraining the AI model while performing accurate semantic segmentation and extraction of the image content, thereby improving the model's stable recognition of modified parts, improving the content consistency of batch modifications, reducing the workload of later manual screening, and solving the problem of low stability in batch image processing.
[0078] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0079] This embodiment further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0080] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0081] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0082] In addition, in combination with the network user role identification method in the above embodiment, the present application embodiment can provide a storage medium for implementation. The storage medium stores a computer program; when the computer program is executed by a processor, any one of the image batch processing methods in the above embodiment is implemented.
[0083] In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for batch processing of images is implemented. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, trackball, or touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0084] In one embodiment, Figure 6 is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application, such as Figure 6 As shown, an electronic device is provided, which may be a server, and its internal structure diagram may be as shown in Figure 6 As shown. The electronic device includes a processor, a network interface, an internal memory and a non-volatile memory connected through an internal bus, wherein the non-volatile memory stores an operating system, a computer program and a database. The processor is used to provide computing and control capabilities, the network interface is used to communicate with an external terminal through a network connection, the internal memory is used to provide an environment for the operation of the operating system and the computer program, the computer program is executed by the processor to implement a method for batch processing of images, and the database is used to store data.
[0085] Those skilled in the art will understand that Figure 6 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0086] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0087] Those skilled in the art should understand that the technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0088] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for batch processing of pictures, characterized in that: The method comprises: After performing keyword semantic segmentation on the image to be processed, the target content is extracted; Based on the target extraction content, generating a target mask image of the image to be processed; Based on the image to be processed, analyze and generate positive conditions and negative conditions for constraining the AI image processing model; Under the constraints of the positive condition and the negative condition, the target mask image is decoded and sampled through the AI image processing model to output the target image after batch processing.
2. The method according to claim 1, characterized in that Before decoding and sampling the target mask image through the AI image processing model, the method includes: Load the checkpoint model through the VAE loader; Reference elements for batch conversion are obtained, and the checkpoint model is adjusted based on the reference elements to obtain an AI image processing model.
3. The method according to claim 2, characterized in that The checkpoint model is adjusted based on the reference element to obtain an AI image processing model including: The checkpoint model, IPAdapter fine-tuning model, Clip visual model and LORA fine-tuning model are combined to obtain an AI image processing model; wherein the checkpoint model is used as the main model; the IPAdapter fine-tuning model and the Clip visual model are used to adjust the checkpoint model according to the reference element; the LORA fine-tuning model is used to improve the processing efficiency of the checkpoint model.
4. The method according to claim 3, characterized in that Under the constraints of the positive condition and the negative condition, the target mask image is decoded and sampled by the AI image processing model, and the target image after batch processing is outputted, including: Decoding the target mask image and the image to be processed by the AI image processing model to obtain a first latent space; Under the constraints of the positive condition and the negative condition, the first latent space is sampled through the AI image processing model to output the target image after batch processing.
5. The method according to claim 4, characterized in that Sampling the first latent space by the AI image processing model and outputting the target images after batch processing includes: Sampling the first latent space through the AI image processing model to obtain a second latent space; After decoding the second latent space through the AI image processing model, converting it into a preprocessed picture based on the reference element; The pre-processed image and the image to be processed are masked and mixed through the AI image processing model to obtain the target image after batch processing.
6. The method according to claim 1, characterized in that Based on the image to be processed, the positive conditions and negative conditions for constraining the AI image processing model are analyzed and generated, including: Performing a first process on the image to be processed by a DW preprocessor to obtain a skeleton image; Performing a second process on the image to be processed by a MeshGraphormer preprocessor to obtain a depth map; Based on the skeleton map and depth map of the image to be processed, the positive conditions and negative conditions for constraining the AI image processing model are generated by the ControNet tool.
7. The method according to claim 1, characterized in that After keyword semantic segmentation is performed on the image to be processed, the target extracted content includes: Get the path address of the image to be processed; Through the Clip visual model, keyword semantic segmentation is performed on a number of images to be processed under the path address one by one, and target extraction content corresponding to each image to be processed is extracted.
8. A system for batch processing of images, characterized in that: The system is used to execute the method according to any one of claims 1 to 7, and the system comprises a segmentation and extraction module, a mask generation module, a condition constraint module and a model processing module; The segmentation and extraction module is used to extract the target extracted content after performing keyword semantic segmentation on the image to be processed; The mask generation module is used to generate a target mask image of the image to be processed according to the target extraction content; The condition constraint module is used to analyze and generate positive conditions and negative conditions for constraining the AI image processing model according to the image to be processed; The model processing module is used to decode and sample the target mask image through the AI image processing model under the constraints of the positive condition and the negative condition, and output the target image after batch processing.
9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Historical building ontology modeling system oriented to generative artificial intelligence
CN120541930A
