Image generation method and system based on artificial intelligence
Through the artificial intelligence-based image generation method, the problem that traditional camouflage generation is difficult to adapt to a large range and diverse backgrounds is solved, and efficient and adaptable camouflage image generation is achieved, avoiding texture loss and edge blur.
Patent Information
- Application Number
- CN202510336462.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-04-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to meet the camouflage needs of a wide range and diverse backgrounds, and traditional camouflage generation is cumbersome and can easily lead to texture loss and blurred edges.
Using an artificial intelligence-based image generation method, we modify the CycleGAN model by creating basic camouflage patches, collecting and processing background images, extracting feature information and edge structures, combining U-shaped networks and jump connections to generate camouflage images adapted to the background.
It reduces the difficulty of generating camouflage patterns, avoids texture loss and edge blur, and improves the adaptability of the generated camouflage image to the background.
Smart Images

Figure CN119863540A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image generation, and in particular to an image generation method and system based on artificial intelligence. Background Art
[0002] Artificial intelligence is an important part of the intelligent discipline. It attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is a very broad science, including robotics, language recognition, image recognition, natural language processing, expert systems, machine learning, computer vision, etc.
[0003] "Camouflage" is a new type of protective color composed of irregular patterns of green, yellow, brown, black and other colors. Camouflage clothing requires that its reflected light waves are roughly the same as those reflected by the surrounding scenery, which can not only confuse the enemy's naked eye reconnaissance, but also deal with infrared reconnaissance, making it difficult for the enemy's modern reconnaissance equipment to capture the target.
[0004] In the existing technology, a single background camouflage is difficult to meet the camouflage requirements of a large range and diverse backgrounds. The traditional camouflage generation is not only cumbersome, but also easily leads to the loss of camouflage pattern texture and problems with the structure of the camouflage pattern. Summary of the invention
[0005] Based on this, the purpose of the present invention is to provide an image generation method and system based on artificial intelligence to solve the deficiencies in the above-mentioned prior art.
[0006] In a first aspect, the present invention provides an image generation method based on artificial intelligence, the method comprising: Creating basic camouflage patches, and sequentially arranging and combining the basic camouflage patches randomly or regularly to obtain a preliminary camouflage pattern; Collecting a background image set, dividing and processing the background image set in sequence to obtain a processed background image set, and performing color space conversion on the processed background image set to map the color of the processed background image set from the RGB space to the color opposition space to obtain a converted background image; Extracting feature information of the foreground part of the converted background image based on the foreground network, annotating edge structure information of the converted background image according to pixel-level features, and fusing the feature information and the edge structure information to preliminarily color the preliminary camouflage pattern to obtain a simple camouflage pattern; Calculating the background main color of the converted background image, modifying the CycleGAN model by combining the U-shaped network and the jump connection to obtain a modified CycleGAN model, and generating a second-step camouflage pattern based on the modified CycleGAN model, the simple camouflage pattern and the background main color; The similarity between the edge structure information of the converted background image and the second-step camouflage pattern is obtained, and the feature information of the edge between the second-step camouflage pattern and the converted background image is obtained according to the similarity. The second-step camouflage pattern and the converted background image are mapped one-to-one through the feature information of the edge and a non-negative orthogonal graph matching objective function to generate a camouflage image.
[0007] Compared with the prior art, the beneficial effects of the present invention are as follows: a converted background image is obtained by mapping the colors of a background image set from the RGB space to the color opposition space for conversion; a second-step camouflage pattern can be generated through a modified CycleGAN model, a simple camouflage pattern and a background main color, thereby reducing the difficulty of generating the camouflage pattern, and avoiding texture loss and edge blur in the simple camouflage pattern; and by performing a one-to-one mapping of the second-step camouflage pattern and the converted background image, the generated camouflage image has a higher degree of adaptability to the background.
[0008] Furthermore, after the step of obtaining a preliminary camouflage pattern, the method further comprises: Adjusting the layout of patches in the preliminary camouflage pattern and the distribution of colors in the preliminary camouflage pattern; The adjusted preliminary camouflage pattern is color corrected and optimized.
[0009] Furthermore, the step of dividing and processing the background image set in sequence to obtain a processed background image set includes: Dividing the background image set according to different environmental features to obtain a divided background image set; The divided background image set is subjected to normalization processing, filtering processing and image enhancement processing in sequence to obtain a processed background image set.
[0010] Furthermore, the expression for performing color space conversion on the processed background image set is: ; ; ; In the formula, , , Respectively represent three different colors in the RGB color system, represents gamma correction, , , Represents three different channels of pixels, Represents a constant in the range , , , Respectively After color conversion, After color conversion, The color converted representation is represents the transformation matrix, , , Respectively represent the color space after conversion Color representation, color space conversion Color representation, color space conversion The color representation, represents the conversion function, , , Indicates different defaults for color space conversion.
[0011] Furthermore, the step of extracting feature information of the foreground part of the converted background image based on the foreground network and marking edge structure information of the converted background image according to pixel-level features includes: Inputting the training image set into the Mask RCNN instance segmentation network, so that the Mask RCNN instance segmentation network is trained based on the training image set to obtain a trained Mask RCNN instance segmentation network; The foreground part of the converted background image is cropped based on the trained Mask RCNN instance segmentation network and a set threshold, and feature information of the foreground part is extracted.
[0012] Furthermore, the step of calculating the background primary color of the converted background image includes: Traversing the conversion background image to compare the color difference between the main color of the conversion background image and the pixel points in the simple camouflage pattern; The color areas in the converted background image and the simple camouflage pattern are sorted according to the color difference to select the background main color.
[0013] Furthermore, the calculation expression of the color difference is: ; ; In the formula, Indicates color difference, Indicates the length of the conversion background image, Indicates the width of the transition background image. Represents the pixel row index, represents the pixel column index, represents the distance between the pixels of the converted background image in the color opposition space, , , Respectively represent the color space after conversion The difference between the color and the corresponding point space color, after color space conversion The difference between the color and the corresponding point space color, after color space conversion The difference between the color and the color in the corresponding point space.
[0014] In a second aspect, the present invention provides an image generation system based on artificial intelligence, the system comprising: A creation module, used for creating basic camouflage patches, and sequentially arranging and combining the basic camouflage patches randomly or regularly to obtain a preliminary camouflage pattern; A collection and processing module, used for collecting a background image set, dividing and processing the background image set in sequence to obtain a processed background image set, and performing color space conversion on the processed background image set to map the color of the processed background image set from the RGB space to the color opposition space to obtain a converted background image; An extraction and annotation module, used for extracting feature information of the foreground part of the converted background image based on a foreground network, annotating edge structure information of the converted background image according to pixel-level features, and fusing the feature information and the edge structure information to preliminarily color the preliminary camouflage pattern to obtain a simple camouflage pattern; A calculation generation module, used for calculating the background main color of the converted background image, modifying the CycleGAN model by combining the U-type network and the jump connection to obtain a modified CycleGAN model, and generating a second-step camouflage pattern based on the modified CycleGAN model, the simple camouflage pattern and the background main color; An acquisition generation module is used to obtain the similarity between the edge structure information of the converted background image and the second-step camouflage pattern, obtain the feature information of the edge between the second-step camouflage pattern and the converted background image according to the similarity, and perform a one-to-one mapping between the second-step camouflage pattern and the converted background image through the feature information of the edge and a non-negative orthogonal graph matching objective function to generate a camouflage image.
[0015] In a third aspect, the present invention also 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 above-mentioned artificial intelligence-based image generation method when executing the computer program.
[0016] In a fourth aspect, the present invention further provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned artificial intelligence-based image generation method. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a flow chart of an image generation method based on artificial intelligence in a first embodiment of the present invention; Figure 2 is a structural block diagram of an image generation system based on artificial intelligence in a second embodiment of the present invention; Figure 3 FIG. 4 is a structural block diagram of an electronic device in a third embodiment of the present invention.
[0018] Description of main component symbols: 10. Creation module; 20. Collection and processing module; 30. Extraction and annotation module; 40. Calculation and generation module; 50. Acquisition and generation module; 60. Bus; 61. Processor; 62. Memory; 63. Communication interface.
[0019] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0020] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0021] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0023] Embodiment 1 See also Figure 1, which shows an image generation method based on artificial intelligence in a first embodiment of the present invention, the method comprises steps S1 to S5: S1, creating basic camouflage patches, and sequentially arranging and combining the basic camouflage patches randomly or regularly to obtain a preliminary camouflage pattern; Specifically, the step S1 includes steps S11 to S12: S11, adjusting the layout of the patches in the preliminary camouflage pattern and the color distribution in the preliminary camouflage pattern; S12, performing color correction and optimization on the adjusted preliminary camouflage pattern; It should be explained that the basic camouflage patches are created using computer graphics software, and these basic camouflage patches need to meet the preset design specifications, and the patches are randomly or regularly arranged and combined through computer graphics software to form a preliminary camouflage pattern. In order to make the overall coordination of the camouflage pattern and have a better visual effect, it is necessary to constantly adjust the layout and color distribution of the patches in the preliminary camouflage pattern, and finally perform color correction and detail optimization on the adjusted preliminary camouflage pattern to achieve fine adjustment, thereby improving the recognition and aesthetics of the preliminary camouflage pattern.
[0024] S2, collecting a background image set, dividing and processing the background image set in sequence to obtain a processed background image set, and performing color space conversion on the processed background image set to map the color of the processed background image set from the RGB space to the color opposition space to obtain a converted background image; Specifically, the step S2 includes steps S21 to S22: S21, dividing the background image set according to different environmental features to obtain a divided background image set; S22, sequentially performing normalization processing, filtering processing and image enhancement processing on the divided background image set to obtain a processed background image set; It should be explained that background images are collected in different time periods and weather conditions, such as morning, noon, sunny and cloudy days. In the process of collecting, the images can be collected through a camera, and different background images can also be found on the Internet to form a background image set. When dividing, the background image set can be divided according to different background types, such as jungle, grassland, snow and desert, and then the divided background image set is processed. The processing process includes: Image normalization, limiting the size of the divided background image set within a certain range. In this embodiment, the divided background image set is limited to between 0 and 1. The original divided background image set is divided by a preset constant. In this embodiment, the preset constant is 255, so as to achieve image normalization processing; Filtering: In this embodiment, a mean filtering method is used to remove noise from the background image set and smooth the data. In specific implementation, the influence of sudden noise is reduced by calculating the average value of the neighboring area around the data point to make the data smoother. Image enhancement: In this embodiment, Laplace transform is used to enhance the background image set, especially the edges and details of the background image set. Specifically, the expression of Laplace transform is: ; In the formula, represents the Laplace transform operator symbol, represents the transformed function, represents the function To transform, represents the time domain function, represents the complex frequency parameter, represents the attenuation factor, It should be noted that after image enhancement, the high-frequency details in the image can be highlighted, making the generated pattern clearer and more layered.
[0025] It should be explained that, in this embodiment, the processed background image set needs to be converted into a color space so that the background image set can be better integrated with the camouflage pattern. The background image set needs to be mapped from the RGB space to the color opposition space. The specific conversion process is expressed as follows: ; ; ; In the formula, , , Respectively represent three different colors in the RGB color system, represents gamma correction, , , Represents three different channels of pixels, Represents a constant in the range , , , Respectively After color conversion, After color conversion, The color converted representation is represents the transformation matrix, , , Respectively represent the color space after conversion Color representation, color space conversion Color representation, color space conversion The color representation, represents the conversion function, , , Indicates different default values in color space conversion. In this embodiment, The color space is adjusted and the image is enhanced to make the camouflage pattern generated later have better visual effect.
[0026] S3, extracting feature information of the foreground part of the converted background image based on the foreground network, annotating edge structure information of the converted background image according to pixel-level features, and fusing the feature information and the edge structure information to preliminarily color the preliminary camouflage pattern to obtain a simple camouflage pattern; Specifically, the step S3 includes steps S31 to S32: S31, inputting the training image set into the Mask RCNN instance segmentation network, so that the Mask RCNN instance segmentation network is trained based on the training image set to obtain a trained Mask RCNN instance segmentation network; S32, cropping the foreground portion of the converted background image based on the trained Mask RCNN instance segmentation network and a set threshold, and extracting feature information of the foreground portion; It should be explained that, in the specific implementation, it is necessary to train the foreground network first. In the present embodiment, the training image set is input into the Mask RCNN instance segmentation network so that the Mask RCNN instance segmentation network is trained. By setting the threshold, each image of the converted background image is used to obtain the cropping coordinates of the three main foreground parts, so that the foreground part can be obtained, and the feature information of the foreground part can be extracted through the foreground semantic information, thereby enhancing the image information.
[0027] It should be noted that the pixel-level features can effectively retain the color and intensity of each pixel in the conversion background image, thereby marking the edge information in the conversion background image, which can not only effectively improve the clarity of the image, but also facilitate subsequent coloring to avoid the problem of insufficient harmony between the conversion background image and the preliminary camouflage pattern. By fusing feature information and edge structure information, the initial camouflage pattern and the conversion background image can be integrated more naturally.
[0028] S4, calculating the background main color of the converted background image, modifying the CycleGAN model by combining the U-type network and the jump connection to obtain a modified CycleGAN model, and generating a second-step camouflage pattern based on the modified CycleGAN model, the simple camouflage pattern and the background main color; Specifically, the step S4 includes step S41 to step S42: S41, traversing the conversion background image to compare the color difference between the main color of the conversion background image and the pixel points in the simple camouflage pattern; The calculation expression of the color difference is: ; ; In the formula, Indicates color difference, Indicates the length of the conversion background image, Indicates the width of the transition background image. Represents the pixel row index, represents the pixel column index, represents the distance between the pixels of the converted background image in the color opposition space, , , Respectively represent the color space after conversion The difference between the color and the corresponding point space color, after color space conversion The difference between the color and the corresponding point space color, after color space conversion The difference between the color and the color of the corresponding point space; S42, sorting the color areas of the converted background image and the simple camouflage pattern according to the color difference to select the background main color; It should be noted that by traversing the color difference between the main color of the converted background image and the pixel points in the camouflage pattern, the main color is replaced with the most similar color in the image according to different color difference values, and finally the main color comes from the converted background image; It needs to be explained that the U-type network is a deep learning model for image segmentation, and the jump connection can directly connect the output features of different layers. However, by directly using the CycleGAN model, it is easy to lose some information of the image. By combining the U-type network with the jump connection to modify the CycleGAN model, the U-type network combined with the jump connection can be used as the generator of the CycleGAN model, which solves the problem of losing the camouflage pattern texture and structure during the convolution process, and can more effectively generate the second-step camouflage pattern, making the second-step camouflage pattern more harmonious with the main background color.
[0029] S5, obtaining the similarity between the edge structure information of the converted background image and the second-step camouflage pattern, obtaining feature information of the edge between the second-step camouflage pattern and the converted background image according to the similarity, and performing a one-to-one mapping between the second-step camouflage pattern and the converted background image through the feature information of the edge and a non-negative orthogonal graph matching objective function to generate a camouflage image; It should be noted that, in this embodiment, the color similarity between images is compared by cosine similarity, and the specific expression is: ; In the formula, represents the cosine value of two color vectors, represents a multidimensional vector, Represents the dimension, , Represent the components of two colors respectively. , Represent the two color vectors, , Represent the magnitude of the vectors of the two colors respectively; The feature information of the edge between the second-step camouflage pattern and the converted background image can be obtained through similarity, that is, the difference between the second-step camouflage pattern and the converted background image. The second-step camouflage pattern and the converted background image are mapped one-to-one through the edge difference and the non-negative orthogonal graph matching objective function, so that the generated camouflage image has a high matching degree and good edge hierarchy. The expression of the non-negative orthogonal graph matching objective function is: ; In the formula, represents the permutation matrix for graph matching, represents the objective function of graph matching, represents the node similarity matrix, represents the transposed matrix, represents the edge similarity matrix, represents the edge matching matrix, Represents the edgematching score.
[0030] In summary, the artificial intelligence-based image generation method in the above-mentioned embodiment of the present invention obtains a converted background image by mapping the colors of the background image set from the RGB space to the color opposition space. The second-step camouflage pattern can be generated through the modified CycleGAN model, the simple camouflage pattern and the background main color, which reduces the difficulty of generating the camouflage pattern and can avoid the loss of texture and blurred edges in the simple camouflage pattern. In addition, by performing a one-to-one mapping between the second-step camouflage pattern and the converted background image, the generated camouflage image has a higher degree of adaptability to the background.
[0031] Embodiment 2 The present invention also provides an image generation system based on artificial intelligence, see Figure 2 , shown is an image generation system based on artificial intelligence in a second embodiment of the present invention, the system comprising: A creation module 10 is used to create basic camouflage patches, and to randomly or regularly arrange and combine the basic camouflage patches in sequence to obtain a preliminary camouflage pattern; A collection and processing module 20 is used to collect a background image set, divide and process the background image set in sequence to obtain a processed background image set, and perform color space conversion on the processed background image set to map the color of the processed background image set from the RGB space to the color opposition space to obtain a converted background image; The expression for performing color space conversion on the processed background image set is: ; ; ; In the formula, , , Respectively represent three different colors in the RGB color system, represents gamma correction, , , Represents three different channels of pixels, Represents a constant in the range , , , Respectively After color conversion, After color conversion, The color converted representation is represents the transformation matrix, , , Respectively represent the color space after conversion Color representation, color space conversion Color representation, color space conversion The color representation, represents the conversion function, , , Indicates different default values in color space conversion; An extraction and annotation module 30 is used to extract feature information of the foreground part of the converted background image based on a foreground network, annotate edge structure information of the converted background image according to pixel-level features, and fuse the feature information and the edge structure information to preliminarily color the preliminary camouflage pattern to obtain a simple camouflage pattern; A calculation generation module 40 is used to calculate the background main color of the converted background image, modify the CycleGAN model by combining the U-type network and the jump connection to obtain a modified CycleGAN model, and generate a second-step camouflage pattern based on the modified CycleGAN model, the simple camouflage pattern and the background main color; An acquisition generation module 50 is used to obtain the similarity between the edge structure information of the converted background image and the second-step camouflage pattern, obtain the feature information of the edge between the second-step camouflage pattern and the converted background image according to the similarity, and perform a one-to-one mapping between the second-step camouflage pattern and the converted background image through the feature information of the edge and a non-negative orthogonal graph matching objective function to generate a camouflage image.
[0032] In some optional embodiments, the creation module 10 includes: An adjustment unit, used for adjusting the layout of the patches in the preliminary camouflage pattern and the color distribution in the preliminary camouflage pattern; The correction and optimization unit is used to perform color correction and optimization on the adjusted preliminary camouflage pattern.
[0033] In some optional embodiments, the collection and processing module 20 includes: A division unit, used for dividing the background image set according to different environmental features to obtain a divided background image set; The processing unit is used to perform normalization processing, filtering processing and image enhancement processing on the divided background image set in sequence to obtain a processed background image set.
[0034] In some optional embodiments, the extraction and annotation module 30 includes: A training unit, used for inputting a training image set into a Mask RCNN instance segmentation network, so that the Mask RCNN instance segmentation network is trained based on the training image set to obtain a trained Mask RCNN instance segmentation network; The cropping and extraction unit is used to crop the foreground part of the converted background image based on the trained Mask RCNN instance segmentation network and the set threshold, and extract feature information of the foreground part.
[0035] In some optional embodiments, the calculation generation module 40 includes: A traversal unit, configured to traverse the conversion background image to compare the color difference between the main color of the conversion background image and the pixel points in the simple camouflage pattern; The calculation expression of the color difference is: ; ; In the formula, Indicates color difference, Indicates the length of the conversion background image, Indicates the width of the transition background image. Represents the pixel row index, represents the pixel column index, represents the distance between the pixels of the converted background image in the color opposition space, , , Respectively represent the color space after conversion The difference between the color and the corresponding point space color, after color space conversion The difference between the color and the corresponding point space color, after color space conversion The difference between the color and the color of the corresponding point space; A selection unit is used to sort the color areas in the converted background image and the simple camouflage pattern according to the color difference to select the background main color.
[0036] The functions or operation steps implemented when the above modules and units are executed are generally the same as those in the above method embodiments, and will not be repeated here.
[0037] The artificial intelligence-based image generation system provided in the embodiment of the present invention has the same implementation principle and technical effects as those in the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the system embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0038] Embodiment 3 The present invention also provides an electronic device, see Figure 3 , which is a schematic diagram of the hardware structure of the electronic device in the third embodiment of the present invention.
[0039] The electronic device may include a processor 61 and a memory 62 storing computer program instructions.
[0040] Specifically, the processor 61 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the present application.
[0041] Among them, the memory 62 may include a large-capacity memory for data or instructions. For example, but not limitation, the memory 62 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 62 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 62 may be inside or outside the data processing device. In a specific embodiment, the memory 62 is a non-volatile memory. In a specific embodiment, the memory 62 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM) or a flash memory (FLASH), or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0042] The memory 62 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 61 .
[0043] The processor 61 implements the image generation method based on artificial intelligence of the first embodiment by reading and executing the computer program instructions stored in the memory 62 .
[0044] In some of the embodiments, the electronic device may further include a communication interface 63 and a bus 60. Figure 3 As shown, the processor 61, the memory 62, and the communication interface 63 are connected via a bus 60 and communicate with each other.
[0045] The communication interface 63 is used to realize the communication between the modules, devices, units and / or equipment in the present application. The communication interface 63 can also realize data communication with other components such as: external devices, image / data acquisition equipment, databases, external storage and image / data processing workstations.
[0046] The bus 60 includes hardware, software or both, and couples the components of the device to each other. The bus 60 includes but is not limited to at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 60 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, bus 60 may include one or more buses. Although this application describes and illustrates a particular bus, this application contemplates any suitable bus or interconnect.
[0047] The electronic device can acquire an artificial intelligence-based image generation system and execute the artificial intelligence-based image generation method of the first embodiment.
[0048] In addition, in combination with the image generation method based on artificial intelligence in the above embodiment 1, the present application can provide a storage medium for implementation. The storage medium stores computer program instructions; when the computer program instructions are executed by the processor, the image generation method based on artificial intelligence in the above embodiment 1 is implemented.
[0049] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0050] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. An image generation method based on artificial intelligence, characterized in that: The method comprises: Creating basic camouflage patches, and sequentially arranging and combining the basic camouflage patches randomly or regularly to obtain a preliminary camouflage pattern; Collecting a background image set, dividing and processing the background image set in sequence to obtain a processed background image set, and performing color space conversion on the processed background image set to map the color of the processed background image set from the RGB space to the color opposition space to obtain a converted background image; Extracting feature information of the foreground part of the converted background image based on the foreground network, annotating edge structure information of the converted background image according to pixel-level features, and fusing the feature information and the edge structure information to preliminarily color the preliminary camouflage pattern to obtain a simple camouflage pattern; Calculating the background main color of the converted background image, modifying the CycleGAN model by combining the U-shaped network and the jump connection to obtain a modified CycleGAN model, and generating a second-step camouflage pattern based on the modified CycleGAN model, the simple camouflage pattern and the background main color; The similarity between the edge structure information of the converted background image and the second-step camouflage pattern is obtained, and the feature information of the edge between the second-step camouflage pattern and the converted background image is obtained according to the similarity. The second-step camouflage pattern and the converted background image are mapped one-to-one through the feature information of the edge and a non-negative orthogonal graph matching objective function to generate a camouflage image.
2. The method for generating an image based on artificial intelligence according to claim 1, characterized in that: After the step of obtaining a preliminary camouflage pattern, the method further comprises: Adjusting the layout of patches in the preliminary camouflage pattern and the distribution of colors in the preliminary camouflage pattern; The adjusted preliminary camouflage pattern is color corrected and optimized.
3. The method for generating an image based on artificial intelligence according to claim 1, characterized in that: The step of dividing and processing the background image set in sequence to obtain a processed background image set comprises: Dividing the background image set according to different environmental features to obtain a divided background image set; The divided background image set is subjected to normalization processing, filtering processing and image enhancement processing in sequence to obtain a processed background image set.
4. The method for generating an image based on artificial intelligence according to claim 1, characterized in that: The expression for performing color space conversion on the processed background image set is: ; ; ; In the formula, , , Respectively represent three different colors in the RGB color system, represents gamma correction, , , Represents three different channels of pixels, Represents a constant, ranging from , , , Respectively After color conversion, After color conversion, The color converted representation is represents the transformation matrix, , , Respectively represent the color space after conversion Color representation, color space conversion Color representation, color space conversion The color representation, represents the conversion function, , , Indicates different defaults for color space conversion.
5. The method for generating an image based on artificial intelligence according to claim 1, characterized in that: The step of extracting feature information of the foreground part of the converted background image based on the foreground network and marking edge structure information of the converted background image according to pixel-level features comprises: Inputting the training image set into the Mask RCNN instance segmentation network, so that the Mask RCNN instance segmentation network is trained based on the training image set to obtain a trained Mask RCNN instance segmentation network; The foreground part of the converted background image is cropped based on the trained Mask RCNN instance segmentation network and a set threshold, and feature information of the foreground part is extracted.
6. The method for generating an image based on artificial intelligence according to claim 1, characterized in that: The step of calculating the background main color of the converted background image comprises: Traversing the conversion background image to compare the color difference between the main color of the conversion background image and the pixel points in the simple camouflage pattern; The color areas in the converted background image and the simple camouflage pattern are sorted according to the color difference to select the background main color.
7. The method for generating an image based on artificial intelligence according to claim 6, characterized in that: The calculation expression of the color difference is: ; ; In the formula, Indicates color difference, Indicates the length of the conversion background image, Indicates the width of the transition background image. Represents the pixel row index, represents the pixel column index, represents the distance between the pixels of the converted background image in the color opposition space, , , Respectively represent the color space after conversion The difference between the color and the corresponding point space color, after color space conversion The difference between the color and the corresponding point space color, after color space conversion The difference between the color and the color in the corresponding point space.
8. An image generation system based on artificial intelligence, characterized in that: The system comprises: A creation module, used for creating basic camouflage patches, and sequentially arranging and combining the basic camouflage patches randomly or regularly to obtain a preliminary camouflage pattern; A collection and processing module, used for collecting a background image set, dividing and processing the background image set in sequence to obtain a processed background image set, and performing color space conversion on the processed background image set to map the color of the processed background image set from the RGB space to the color opposition space to obtain a converted background image; An extraction and annotation module, used for extracting feature information of the foreground part of the converted background image based on a foreground network, annotating edge structure information of the converted background image according to pixel-level features, and fusing the feature information and the edge structure information to preliminarily color the preliminary camouflage pattern to obtain a simple camouflage pattern; A calculation generation module, used for calculating the background main color of the converted background image, modifying the CycleGAN model by combining the U-type network and the jump connection to obtain a modified CycleGAN model, and generating a second-step camouflage pattern based on the modified CycleGAN model, the simple camouflage pattern and the background main color; An acquisition generation module is used to obtain the similarity between the edge structure information of the converted background image and the second-step camouflage pattern, obtain the feature information of the edge between the second-step camouflage pattern and the converted background image according to the similarity, and perform a one-to-one mapping between the second-step camouflage pattern and the converted background image through the feature information of the edge and a non-negative orthogonal graph matching objective function to generate a camouflage image.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the image generation method based on artificial intelligence as described in any one of claims 1 to 7 is implemented.
10. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the image generation method based on artificial intelligence as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Digital camouflage design method based on image recognition
CN116128987A