Vehicle poster generation method and device based on large model, equipment and medium
By extracting and processing original vehicle images, combining machine learning models and LoRa models to generate optimized models, the problem of inaccurate vehicle poster generation in the prior art is solved, and poster generation consistent with real vehicles is achieved, and accuracy is improved.
Patent Information
- Application Number
- CN202411564534.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
It is difficult for the prior art to generate posters consistent with real vehicles, and there are problems such as brand, appearance, interior gaps and vehicle locations do not match the logic of the real world.
By obtaining the original vehicle image and poster prompt words, extracting and segmenting the vehicle area, performing grayscale image conversion and edge detection, combining the preset machine learning model and LoRa model to generate an optimized model, and input vehicle image and poster prompt words after edge detection. Generate a vehicle poster by outputting an image poster and fusing it with the original vehicle image.
It realizes the generation of posters consistent with real vehicles, avoids brand, appearance, and interior gaps, ensures that the vehicle position and environment logic are consistent, and improves the accuracy of vehicle poster generation.
Smart Images

Figure CN119417850A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence model technology, and in particular to a vehicle poster generation method, device, equipment and medium based on a large model. Background Art
[0002] With the rapid development of artificial intelligence large model technology, it has become a reality to automatically generate relevant pictures through text descriptions. At present, vehicle posters are mainly generated directly through text. The vehicle shape is not fixed and there is a gap between the real vehicle, such as brand, appearance, and interior, which cannot achieve the purpose of promoting the vehicle. In addition, the generated posters do not conform to the logic of vehicle existence, such as vehicles on the lake or in places with insufficient area, and the transition between the vehicle and the background will be inconsistent.
[0003] From the above, it can be seen that how to generate posters that are consistent with real vehicles, avoid gaps in brand, appearance, and interior, solve the problem that the location of the vehicle is inconsistent with the logic of the real world and is not coordinated with the environment, and improve the accuracy of vehicle poster generation are problems to be solved in this field. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for generating vehicle posters based on a large model, which can generate posters consistent with real vehicles, avoid the situation where there are differences in brand, appearance and interior, solve the problem that the location of the vehicle does not match the logic of the real world and is not coordinated with the environment, and improve the accuracy of vehicle poster generation. The specific scheme is as follows:
[0005] In a first aspect, the present application discloses a vehicle poster generation method based on a large model, comprising:
[0006] Acquire an original vehicle image and a poster prompt word, extract and segment the vehicle region in the original vehicle image to obtain a segmented vehicle image;
[0007] Performing grayscale conversion and edge detection on the segmented vehicle image to obtain an edge-detected vehicle image;
[0008] An optimized machine learning model is generated based on a preset machine learning model and a LoRa model, and the vehicle image after edge detection and the poster prompt word are input into the optimized machine learning model to output an image poster; the machine learning model is a stable diffusion model;
[0009] The image poster is fused with the original vehicle image to generate a vehicle poster.
[0010] Optionally, extracting and segmenting the vehicle region in the original vehicle image to obtain a segmented vehicle image includes:
[0011] Using a preset image segmentation model to perform region recognition and extraction on the original vehicle image to recognize and extract the vehicle region; the image segmentation model is a SAM2 model;
[0012] The vehicle region is segmented to obtain a segmented vehicle image.
[0013] Optionally, performing grayscale conversion and edge detection on the segmented vehicle image to obtain an edge-detected vehicle image includes:
[0014] Performing grayscale image conversion on the segmented vehicle image to obtain a grayscale image;
[0015] The grayscale image is subjected to edge detection using a Canny edge detection algorithm to obtain an edge-detected vehicle image including a vehicle contour.
[0016] Optionally, the generating an optimized machine learning model based on a preset machine learning model and a LoRa model includes:
[0017] Determine the convolution kernel size based on business needs;
[0018] Add the corresponding convolution layer to the LoRa model according to the convolution kernel size, and combine it with the stable diffusion model to generate an optimized machine learning model.
[0019] Optionally, inputting the edge-detected vehicle image and the poster prompt word into the optimized machine learning model includes:
[0020] The edge-detected vehicle image and the poster prompt word are input into the optimized machine learning model using a preset Control Net network; the poster prompt word includes poster style guidance information, background information, and color preference information.
[0021] Optionally, the step of fusing the image poster with the original vehicle image to generate a vehicle poster includes:
[0022] determining an actual vehicle image from an original vehicle image;
[0023] The vehicle poster image in the image poster is replaced with the actual vehicle image, and image fusion is performed to generate a vehicle poster including the actual vehicle image.
[0024] In a second aspect, the present application discloses a vehicle poster generation device based on a large model, comprising:
[0025] An image extraction and segmentation module is used to obtain an original vehicle image and a poster prompt word, extract and segment the vehicle area in the original vehicle image to obtain a segmented vehicle image;
[0026] A grayscale image conversion and edge detection module, used for performing grayscale image conversion and edge detection on the segmented vehicle image to obtain a vehicle image after edge detection;
[0027] An image poster output module is used to generate an optimized machine learning model based on a preset machine learning model and a LoRa model, and input the edge-detected vehicle image and the poster prompt words into the optimized machine learning model to output an image poster; the machine learning model is a stable diffusion model;
[0028] The vehicle poster generation module is used to fuse the image poster with the original vehicle image to generate a vehicle poster.
[0029] Optionally, the image extraction and segmentation module includes:
[0030] An extraction module, used for performing region recognition and extraction on the original vehicle image using a preset image segmentation model, so as to recognize and extract the vehicle region; the image segmentation model is a SAM2 model;
[0031] The segmentation module is used to segment the vehicle area to obtain a segmented vehicle image.
[0032] In a third aspect, the present application discloses an electronic device, comprising:
[0033] Memory, used to store computer programs;
[0034] A processor is used to execute the computer program to implement the aforementioned large model-based vehicle poster generation method.
[0035] In a fourth aspect, the present application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned method for generating a vehicle poster based on a large model are implemented.
[0036] It can be seen that the present application provides a vehicle poster generation method based on a large model, including obtaining an original vehicle image and poster prompt words, extracting and segmenting the vehicle area in the original vehicle image to obtain a segmented vehicle image; performing grayscale image conversion and edge detection on the segmented vehicle image to obtain an edge-detected vehicle image; generating an optimized machine learning model based on a preset machine learning model and a LoRa model, inputting the edge-detected vehicle image and the poster prompt words into the optimized machine learning model to output an image poster; the machine learning model is a stable diffusion model; and fusing the image poster with the original vehicle image to generate a vehicle poster. The present application extracts and segments the vehicle area in the original vehicle image to obtain the segmented vehicle image, performs grayscale conversion and edge detection on the segmented vehicle image to obtain the vehicle image after edge detection, generates an optimized machine learning model through a machine learning model and a LoRa model, and inputs the vehicle image after edge detection and the poster prompt word into the optimized machine learning model, which can realize prompt word drawing, which is logical and the vehicle position and shape are controllable, and uses the optimized machine learning model to output an image poster, which can improve the vehicle poster drawing ability and be more in line with the actual situation of the vehicle in life. Finally, the image poster is integrated with the original vehicle image to generate a vehicle poster, avoid the situation where there is a gap in brand, appearance, and interior, solve the problem that the vehicle's location is inconsistent with the real-world logic and is not coordinated with the environment, and improve the accuracy of vehicle poster generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0038] Figure 1 A flow chart of a vehicle poster generation method based on a large model disclosed in this application;
[0039] Figure 2 This is a traditional LoRa model structure diagram disclosed in this application;
[0040] Figure 3 This is a structural diagram of an optimized machine learning model generated based on a machine learning model and a LoRa model disclosed in this application;
[0041] Figure 4 A specific flow chart for generating a vehicle poster disclosed in this application;
[0042] Figure 5This is a schematic diagram of the structure of a vehicle poster generating device based on a large model disclosed in this application;
[0043] Figure 6 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] With the rapid development of artificial intelligence large model technology, it has become a reality to automatically generate relevant pictures through text descriptions. At present, vehicle posters are mainly generated directly through text. The vehicle shape is not fixed and there is a gap with the real vehicle, such as brand, appearance, and interior, which cannot achieve the purpose of promoting the vehicle. In addition, the generated posters do not conform to the logic of vehicle existence. For example, there are vehicles on the lake or in places where the area is not enough, and the transition between the vehicle and the background will appear inconsistent. From the above, it can be seen that how to generate posters consistent with the real vehicle, avoid the gap between the brand, appearance, and interior, solve the problem that the location of the vehicle does not match the logic of the real world and is not coordinated with the environment, and improve the accuracy of vehicle poster generation are problems to be solved in this field.
[0046] See also Figure 1 As shown, the embodiment of the present invention discloses a vehicle poster generation method based on a large model, which may specifically include:
[0047] Step S11: obtaining an original vehicle image and a poster prompt word, extracting and segmenting the vehicle area in the original vehicle image to obtain a segmented vehicle image.
[0048] In this embodiment, the original vehicle image and the poster prompt word are obtained, and the region of the original vehicle image is identified and extracted using a preset image segmentation model to identify and extract the vehicle region; the image segmentation model is a SAM2 model, which segments the vehicle region to obtain a segmented vehicle image.
[0049] Specifically, the original vehicle image is input into the SAM2 model, which is an advanced image segmentation model that supports interactive image region selection. The user uses the mouse to select the vehicle region to be extracted on the image, and the SAM2 model will automatically segment the vehicle region of the vehicle part according to the user's selection and generate a segmented vehicle image.
[0050] Step S12: performing grayscale conversion and edge detection on the segmented vehicle image to obtain an edge-detected vehicle image.
[0051] In this embodiment, the segmented vehicle image is converted into a grayscale image to obtain a grayscale image; and the grayscale image is edge detected using a Canny edge detection algorithm to obtain an edge-detected vehicle image including a vehicle contour.
[0052] In this embodiment, the segmented vehicle image is converted into a grayscale image in order to simplify the image data and convert the color image into a single-channel image. Then, the Canny edge detection algorithm is used for edge detection. The algorithm detects edges by looking for strong grayscale changes in the image, and obtains a vehicle image after edge detection containing the vehicle outline, which provides input for subsequent steps.
[0053] Step S13: Generate an optimized machine learning model based on the preset machine learning model and the LoRa model, input the edge detected vehicle image and the poster prompt word into the optimized machine learning model to output an image poster; the machine learning model is a stable diffusion model.
[0054] In this embodiment, the convolution kernel size is determined according to business needs, a corresponding convolution layer is added to the LoRa model according to the convolution kernel size, and a stable diffusion model is combined to generate an optimized machine learning model. The edge-detected vehicle image and the poster prompt word are input into the optimized machine learning model using a preset ControlNet network; the poster prompt word includes poster style guidance information, background information, and color preference information.
[0055] The output image poster includes vehicle elements and creative designs; the poster prompt words include but are not limited to poster style guidance information, background information and color preference information.
[0056] The traditional LoRa model structure is as follows Figure 2 As shown, the calculation formula is:
[0057] ;
[0058] Among them, the weight matrix W is frozen during the fine-tuning process and no gradient update is performed. The above formula uses Indicates that the actual update is the matrix BA.
[0059] This application proposes an optimized machine learning model generated based on a preset machine learning model and a LoRa model. The structure of the optimized machine learning model is as follows: Figure 3As shown in the figure, adding a convolution layer with a convolution kernel of 8*8 to the input can effectively extract vehicle and environment information. With 100 training data and 50 iterations, compared with the traditional LoRa model, the loss is reduced from 19.22 to 10.87, and the effect is significantly improved.
[0060] The optimized LoRa model can achieve the following benefits: (1) Very little additional inference latency. The fine-tuned model output can be obtained by simply adding the pre-trained Stable Diffusion model and the LoRa model. (2) During the fine-tuning process, memory and storage usage is greatly reduced, mainly due to the "low-rank" property, which greatly reduces the scale of parameters that the model needs to learn and update.
[0061] Step S14: Fusion the image poster with the original vehicle image to generate a vehicle poster.
[0062] In this embodiment, the actual vehicle image is determined from the original vehicle image, the vehicle poster image in the image poster is replaced with the actual vehicle image, and image fusion is performed to generate a vehicle poster including the actual vehicle image.
[0063] The specific vehicle poster generation process is as follows: Figure 4 As shown, firstly, the original vehicle image and poster prompt words are obtained; then the vehicle area in the original vehicle image is extracted and segmented to obtain the segmented vehicle image; then the segmented vehicle image is converted into a grayscale image and edge detection is performed to obtain the vehicle image after edge detection; then the vehicle image after edge detection and the poster prompt words are input into the optimized machine learning model to output the image poster; finally, the image poster is fused with the original vehicle image to generate the vehicle poster.
[0064] The key point of the present invention is that the vehicle image and poster prompt words after edge detection are input into the optimized machine learning model using the Control Net network. The prompt word drawing is logical and the vehicle position and shape are controllable. The optimized machine learning model is obtained by improving the LoRa model structure and training the vehicle posters to improve the vehicle poster drawing ability.
[0065] The present invention changes the existing working logic of generating posters with text, adds edge images of car outlines extracted from real car pictures and Controlnet network control to achieve the consistency between the appearance of the car in the generated poster and the actual product to be promoted, optimizes the LoRa model to make the generated poster more in line with the actual situation of the car in life, and finally obtains a promotional poster that can be used for a real car through image fusion.
[0066] In this embodiment, an original vehicle image and poster prompt words are obtained, and the vehicle area in the original vehicle image is extracted and segmented to obtain a segmented vehicle image; grayscale image conversion and edge detection are performed on the segmented vehicle image to obtain an edge-detected vehicle image; an optimized machine learning model is generated based on a preset machine learning model and a LoRa model, and the edge-detected vehicle image and the poster prompt words are input into the optimized machine learning model to output an image poster; the machine learning model is a stable diffusion model; and the image poster is fused with the original vehicle image to generate a vehicle poster. The present application extracts and segments the vehicle area in the original vehicle image to obtain the segmented vehicle image, performs grayscale conversion and edge detection on the segmented vehicle image to obtain the vehicle image after edge detection, generates an optimized machine learning model through a machine learning model and a LoRa model, and inputs the vehicle image after edge detection and the poster prompt word into the optimized machine learning model, which can realize prompt word drawing, which is logical and the vehicle position and shape are controllable, and uses the optimized machine learning model to output an image poster, which can improve the vehicle poster drawing ability and be more in line with the actual situation of the vehicle in life. Finally, the image poster is integrated with the original vehicle image to generate a vehicle poster, avoid the situation where there is a gap in brand, appearance, and interior, solve the problem that the vehicle's location is inconsistent with the real-world logic and is not coordinated with the environment, and improve the accuracy of vehicle poster generation.
[0067] See also Figure 5 As shown, the embodiment of the present invention discloses a vehicle poster generation device based on a large model, which may specifically include:
[0068] The image extraction and segmentation module 11 is used to obtain the original vehicle image and the poster prompt word, extract and segment the vehicle area in the original vehicle image to obtain a segmented vehicle image;
[0069] A grayscale image conversion and edge detection module 12, used for performing grayscale image conversion and edge detection on the segmented vehicle image to obtain a vehicle image after edge detection;
[0070] The image poster output module 13 is used to generate an optimized machine learning model based on a preset machine learning model and a LoRa model, and input the edge-detected vehicle image and the poster prompt word into the optimized machine learning model to output an image poster; the machine learning model is a stable diffusion model;
[0071] The vehicle poster generation module 14 is used to merge the image poster with the original vehicle image to generate a vehicle poster.
[0072] In this embodiment, an original vehicle image and poster prompt words are obtained, and the vehicle area in the original vehicle image is extracted and segmented to obtain a segmented vehicle image; grayscale image conversion and edge detection are performed on the segmented vehicle image to obtain an edge-detected vehicle image; an optimized machine learning model is generated based on a preset machine learning model and a LoRa model, and the edge-detected vehicle image and the poster prompt words are input into the optimized machine learning model to output an image poster; the machine learning model is a stable diffusion model; and the image poster is fused with the original vehicle image to generate a vehicle poster. The present application extracts and segments the vehicle area in the original vehicle image to obtain the segmented vehicle image, performs grayscale conversion and edge detection on the segmented vehicle image to obtain the vehicle image after edge detection, generates an optimized machine learning model through a machine learning model and a LoRa model, and inputs the vehicle image after edge detection and the poster prompt word into the optimized machine learning model, which can realize prompt word drawing, which is logical and the vehicle position and shape are controllable, and uses the optimized machine learning model to output an image poster, which can improve the vehicle poster drawing ability and be more in line with the actual situation of the vehicle in life. Finally, the image poster is integrated with the original vehicle image to generate a vehicle poster, avoid the situation where there is a gap in brand, appearance, and interior, solve the problem that the vehicle's location is inconsistent with the real-world logic and is not coordinated with the environment, and improve the accuracy of vehicle poster generation.
[0073] In some specific embodiments, the image extraction and segmentation module 11 may specifically include:
[0074] A region recognition and extraction module, used to perform region recognition and extraction on the original vehicle image using a preset image segmentation model, so as to recognize and extract the vehicle region; the image segmentation model is a SAM2 model;
[0075] The segmentation module is used to segment the vehicle area to obtain a segmented vehicle image.
[0076] In some specific embodiments, the image poster output module 13 may specifically include:
[0077] A grayscale image conversion module, used for performing grayscale image conversion on the segmented vehicle image to obtain a grayscale image;
[0078] The edge detection module is used to perform edge detection on the grayscale image using a Canny edge detection algorithm to obtain a vehicle image after edge detection including a vehicle contour.
[0079] In some specific embodiments, the image poster output module 13 may specifically include:
[0080] A convolution kernel size determination module, used to determine the convolution kernel size according to business requirements;
[0081] The model generation module is used to add a corresponding convolution layer to the LoRa model according to the convolution kernel size, and combine the stable diffusion model to generate an optimized machine learning model.
[0082] In some specific embodiments, the image poster output module 13 may specifically include:
[0083] An input module is used to input the edge-detected vehicle image and the poster prompt word into the optimized machine learning model using a preset Control Net network; the poster prompt word includes poster style guidance information, background information and color preference information.
[0084] In some specific embodiments, the vehicle poster generation module 14 may specifically include:
[0085] A vehicle actual image determination module, used to determine the vehicle actual image from the original vehicle image;
[0086] The image fusion module is used to replace the vehicle poster image in the image poster with the actual image of the vehicle, and perform image fusion to generate a vehicle poster including the actual image of the vehicle.
[0087] In some specific embodiments, the image extraction and segmentation module 11 may specifically include:
[0088] An extraction module, used for performing region recognition and extraction on the original vehicle image using a preset image segmentation model, so as to recognize and extract the vehicle region; the image segmentation model is a SAM2 model;
[0089] The segmentation module is used to segment the vehicle area to obtain a segmented vehicle image.
[0090] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the large model-based vehicle poster generation method performed by the electronic device disclosed in any of the aforementioned embodiments.
[0091] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0092] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.
[0093] Among them, the operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20 to realize the operation and processing of the data 223 in the memory 22 by the processor 21, which can be Windows, Unix, Linux, etc. In addition to including a computer program that can be used to complete the vehicle poster generation method based on the large model performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks. In addition to including data transmitted from an external device received by the vehicle poster generation device based on the large model, the data 223 can also include data collected by its own input and output interface 25, etc.
[0094] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0095] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the steps of the method for generating a vehicle poster based on a large model disclosed in any of the aforementioned embodiments are implemented.
[0096] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0097] The above is a detailed introduction to the vehicle poster generation method, device, equipment and storage medium based on a large model provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A vehicle poster generation method based on a large model, characterized in that: include: Acquire an original vehicle image and a poster prompt word, extract and segment the vehicle region in the original vehicle image to obtain a segmented vehicle image; Performing grayscale conversion and edge detection on the segmented vehicle image to obtain an edge-detected vehicle image; Generate an optimized machine learning model based on a preset machine learning model and a LoRa model, input the edge-detected vehicle image and the poster prompt words into the optimized machine learning model to output an image poster; The machine learning model is a stable diffusion model; The image poster is fused with the original vehicle image to generate a vehicle poster.
2. The vehicle poster generation method based on a large model according to claim 1 is characterized in that: The extracting and segmenting the vehicle region in the original vehicle image to obtain a segmented vehicle image includes: Using a preset image segmentation model to perform region recognition and extraction on the original vehicle image to recognize and extract the vehicle region; the image segmentation model is a SAM2 model; The vehicle region is segmented to obtain a segmented vehicle image.
3. The vehicle poster generation method based on a large model according to claim 1 is characterized in that: The grayscale conversion and edge detection are performed on the segmented vehicle image to obtain the vehicle image after edge detection, including: Performing grayscale image conversion on the segmented vehicle image to obtain a grayscale image; The grayscale image is subjected to edge detection using a Canny edge detection algorithm to obtain an edge-detected vehicle image including a vehicle contour.
4. The vehicle poster generation method based on a large model according to claim 1 is characterized in that: The method of generating an optimized machine learning model based on a preset machine learning model and a LoRa model includes: Determine the convolution kernel size based on business needs; Add the corresponding convolution layer to the LoRa model according to the convolution kernel size, and combine it with the stable diffusion model to generate an optimized machine learning model.
5. The vehicle poster generation method based on a large model according to claim 1 is characterized in that: The step of inputting the edge-detected vehicle image and the poster prompt word into the optimized machine learning model comprises: The edge-detected vehicle image and the poster prompt word are input into the optimized machine learning model using a preset Control Net network; the poster prompt word includes poster style guidance information, background information, and color preference information.
6. The vehicle poster generation method based on a large model according to any one of claims 1 to 5, characterized in that: The step of fusing the image poster with the original vehicle image to generate a vehicle poster includes: determining an actual vehicle image from an original vehicle image; The vehicle poster image in the image poster is replaced with the actual vehicle image, and image fusion is performed to generate a vehicle poster including the actual vehicle image.
7. A vehicle poster generation device based on a large model, characterized in that: include: An image extraction and segmentation module is used to obtain an original vehicle image and a poster prompt word, extract and segment the vehicle area in the original vehicle image to obtain a segmented vehicle image; A grayscale image conversion and edge detection module, used for performing grayscale image conversion and edge detection on the segmented vehicle image to obtain a vehicle image after edge detection; An image poster output module, used to generate an optimized machine learning model based on a preset machine learning model and a LoRa model, input the edge-detected vehicle image and the poster prompt words into the optimized machine learning model to output an image poster; The machine learning model is a stable diffusion model; The vehicle poster generation module is used to fuse the image poster with the original vehicle image to generate a vehicle poster.
8. The vehicle poster generation method based on a large model according to claim 7 is characterized in that: The image extraction and segmentation module comprises: An extraction module, used for performing region recognition and extraction on the original vehicle image using a preset image segmentation model, so as to recognize and extract the vehicle region; the image segmentation model is a SAM2 model; The segmentation module is used to segment the vehicle area to obtain a segmented vehicle image.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the large model-based vehicle poster generation method as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: Used to store a computer program; wherein, when the computer program is executed by a processor, the method for generating a vehicle poster based on a large model as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Image main body and new background intelligent fusion method
CN116797507A
Automatic poster generation method and device, computer equipment and storage medium
CN116934908A
Automobile modeling automatic generation method, device and equipment and storage medium
CN118332698A
Image style migration method and device, storage medium and electronic equipment
CN118570052A
Image generation method and device based on target object, electronic equipment and medium
CN118762096A