Portrait missing image completion method and system based on mixed editing

By employing a hybrid editing approach that combines manual drawing with AI generation, the dual requirements of anatomical accuracy and visual naturalness in portrait image completion are addressed, achieving efficient and high-quality completion results suitable for commercial design and content creation.

CN121190359APending Publication Date: 2025-12-23SHENZHEN LAMAN MODEL CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511327804.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-17
Publication Date
2025-12-23

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently and effectively complete high-quality restoration of missing parts of a human image while maintaining anatomical accuracy and visual naturalness. In particular, the restoration of complex human structures suffers from uncontrollable results and distortion of details.

Method used

By using a hybrid editing method, combining manually drawn structural references with AI generation, the canvas space is expanded, limb outlines and facial positioning lines are drawn, background is filled, and a generative image completion model is used to adjust the human posture and edge areas to ensure that the completed parts are consistent with the original image.

Benefits of technology

It achieves improved repair efficiency and quality while maintaining anatomical accuracy, lowers the technical threshold, and enables ordinary users to obtain professional-grade repair results, solving the problems of low efficiency in traditional manual repair and uncontrollable pure AI generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121190359A_ABST
    Figure CN121190359A_ABST
Patent Text Reader

Abstract

The invention relates to a portrait missing image completion method and system based on hybrid editing, and the method comprises the steps: expanding a canvas space of an input image, and reserving a blank completion region of a missing part in an expansion region; a limb contour and a face positioning line are drawn on the expanded canvas, and an intermediate image is generated; performing background filling according to color distribution characteristics of adjacent pixels in the missing area; inputting the image containing the structure reference and the background filling into the generative image completion model, and generating a preliminary completion image in combination with a cue word reversely deduced from the original image; and adjusting the human body posture of the complemented score in the preliminary complemented image and optimizing the marginal area until the complemented score and the original image are coordinated and consistent in posture and background, and outputting a final complemented image so as to achieve the purpose of efficiently completing high-quality complementation of the missing part of the portrait while keeping the accuracy of human anatomy.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of digital image processing, in particular to a portrait missing image completion method and system based on hybrid editing. BACKGROUND

[0002] In the field of digital image processing, the repair of incomplete portrait materials has always been a key challenge in commercial design and content creation. Traditional solutions mainly fall into two categories: one is to rely on professional designers to use image processing software and other tools for manual repair, which is not only inefficient, but also requires high artistic skills of the operator; the second is the automatic repair technology based on generative artificial intelligence, which improves efficiency, but has the problems of uncontrollable generation results and detail distortion. Especially when dealing with complex human structures, existing technologies are difficult to meet the dual requirements of anatomical accuracy and visual naturalness. With the growing demand for high-quality image materials in the film, game and other industries, developing a hybrid repair method that combines human creative intent and AI generation efficiency has become a technical problem that the industry urgently needs to solve. SUMMARY

[0003] The main purpose of the present application is to provide a portrait missing image completion method and system based on hybrid editing, which combines artificial drawing of structural references and AI intelligent generation to efficiently complete the high-quality completion of the missing part of the portrait while maintaining anatomical accuracy.

[0004] To achieve the above purpose, the present application provides a portrait missing image completion method based on hybrid editing, comprising the following steps:

[0005] Expand the canvas space of the input image and reserve a blank completion area for the missing part in the expanded area;

[0006] Draw the limb contour and facial positioning line on the expanded canvas to generate an intermediate image;

[0007] Fill the background according to the color distribution characteristics of the adjacent pixels of the missing area;

[0008] Input the image containing the structural reference and the background fill into the generative image completion model, and generate a preliminary completion image combined with the hint words derived from the original image;

[0009] Adjust the human posture of the completed part in the preliminary completion image and optimize the edge area until the completed part is consistent with the original image in posture and background, and output the final completion image.

[0010] Further, the step of expanding the canvas space of the input image and reserving a blank completion area for the missing part in the expanded area comprises:

[0011] Receive canvas size adjustment commands through the image processing interface;

[0012] The scaling ratio is calculated based on the original image size;

[0013] Perform a canvas expansion operation in image processing software;

[0014] Based on the spatial location of the missing part, reserve corresponding blank areas in the expanded area to fill in the missing part.

[0015] Further, the step of drawing limb outlines and facial positioning lines on the expanded canvas to generate an intermediate image includes:

[0016] Invoke the brush function of the image drawing tool;

[0017] Determine the location of key connection points based on human anatomical features;

[0018] Draw the outline of the limbs within the reserved blank area;

[0019] Draw auxiliary lines for locating facial features in the facial area;

[0020] Generate an intermediate image containing structural reference information.

[0021] Furthermore, the step of filling the background based on the color distribution characteristics of adjacent pixels in the missing region includes:

[0022] Scan the color values ​​of the pixels at the boundary of the missing region;

[0023] Calculate the average value and distribution pattern of color characteristics in adjacent areas;

[0024] Choose the fill color value that best matches the surrounding background;

[0025] Perform a progressive color fill operation;

[0026] Smooth the transition at the filled edges.

[0027] Furthermore, the generative image completion model is input with an image containing structural references and background fill, and a preliminary completed image is generated by combining the prompts derived from the original image. This includes the following steps:

[0028] Load the pre-trained generative image completion model;

[0029] By reverse engineering the original image, descriptive keywords can be obtained;

[0030] The intermediate image, which includes structural references and background filling, along with the descriptive cue words, is simultaneously input into the generative image completion model.

[0031] Perform the image generation calculation process;

[0032] Output the preliminary completed image.

[0033] Furthermore, the steps to derive descriptive keywords by working backward from the original image include:

[0034] Visual features of the original image are extracted using an image feature analysis model;

[0035] Convert visual features into semantic descriptions;

[0036] Generate a structured sequence of prompt words;

[0037] Optimize the weighting of prompt keywords;

[0038] Output the final descriptive prompt words used.

[0039] Furthermore, the steps for performing the image generation calculation process include:

[0040] The face detail optimization sub-model is invoked to process the face region in the preliminary completed image;

[0041] Load the posture control model to constrain the generated human posture;

[0042] Perform multiple rounds of iterative optimization calculations;

[0043] Output the optimized preliminary completed image.

[0044] Further, the steps of adjusting the human pose of the completed portion in the initially completed image and optimizing the edge regions until the completed portion is consistent with the original image in pose and background, and outputting the final completed image, also include:

[0045] Extract edge features from the original image and the completed region;

[0046] Calculate texture matching degree;

[0047] Generate an adaptive blending mask;

[0048] Perform multi-scale edge blending processing;

[0049] Output the final completed image with a natural transition.

[0050] The present invention also provides a portrait image missing completion system based on hybrid editing, comprising:

[0051] The canvas processing unit is used to expand the canvas space of the input image and reserve blank areas for missing parts in the expanded area;

[0052] The structural drawing unit is used to draw limb outlines and facial positioning lines on the expanded canvas to generate intermediate images;

[0053] Intelligent fill unit, used to fill the background based on the color distribution characteristics of adjacent pixels in the missing area;

[0054] The AI ​​generation unit is used to input an image containing structural reference and background filling into the generative image completion model, and combine it with prompts derived from the original image to generate a preliminary completed image;

[0055] The optimization and adjustment unit is used to adjust the human pose of the completed part in the initial completed image and optimize the edge region until the completed part is consistent with the original image in pose and background, and outputs the final completed image.

[0056] The method and system for completing missing human portrait images based on hybrid editing provided by this invention have the following beneficial effects: This invention integrates the technical advantages of traditional image processing tools and generative artificial intelligence through a hybrid editing architecture. It not only preserves the creative space for manually drawing key structural anchor points, ensuring that the completed content conforms to the designer's artistic intent, but also utilizes the powerful generative capabilities of AI models to reduce the difficulty of repairing complex human structures. Through intelligent background blending and pose constraint mechanisms, it ensures a natural connection between the completed area and the original image in terms of anatomical structure and lighting style. Compared to traditional methods, this invention improves the quality and stability of image restoration while lowering the professional technical threshold to a level that ordinary users can operate. It is suitable for commercial design scenarios requiring high-precision portrait restoration, providing an efficient and reliable solution for digital content creation. Attached Figure Description

[0057] Figure 1 This is a flowchart illustrating a method for completing missing portrait images based on hybrid editing, according to an embodiment of the present invention.

[0058] Figure 2 This is a structural block diagram of a portrait missing image completion system based on hybrid editing in one embodiment of the present invention.

[0059] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0060] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0061] Reference Figure 1 This is a flowchart illustrating a method for completing missing portrait images based on hybrid editing proposed in this invention, including the following steps:

[0062] S1 expands the canvas space of the input image and reserves blank areas in the expanded area to fill in the missing parts;

[0063] S2, Draw limb outlines and facial positioning lines on the expanded canvas to generate an intermediate image;

[0064] S3, fill the background based on the color distribution characteristics of adjacent pixels in the missing area;

[0065] S4. Input the image containing structural reference and background filling into the generative image completion model, and combine it with the prompt words derived from the original image to generate a preliminary completed image;

[0066] S5, adjust the human pose of the completed part in the preliminary completed image and optimize the edge region until the completed part is consistent with the original image in pose and background, and output the final completed image.

[0067] In one embodiment, for step S1,

[0068] The steps of expanding the canvas space of the input image and reserving blank areas for missing parts in the expanded area include:

[0069] Receive canvas size adjustment commands through the image processing interface;

[0070] The scaling ratio is calculated based on the original image size;

[0071] Perform a canvas expansion operation in image processing software;

[0072] Based on the spatial location of the missing part, reserve corresponding blank areas in the expanded area to fill in the missing part.

[0073] In practice, the canvas size is adjusted: by executing the "Image → Canvas Size" command in the image processing software, the canvas is enlarged proportionally to the original image size, and the spatial distribution of the material on the canvas is adjusted according to the missing parts. Blank space that conforms to human proportions is reserved in the expanded area, establishing a reasonable working area for subsequent completion. This canvas size adjustment addresses the issue of missing limbs in images. Systematic space reservation ensures anatomical rationality, avoiding the arbitrary completion defects of traditional manual editing, and providing a standardized input space for the subsequent AI generation unit. Specifically, the spatial structural characteristics of the missing parts are analyzed, reserving space for head completion in the top expanded area and arm completion in the right expanded area. This precise spatial positioning solves the "loss of detail control" problem pointed out in the handover document. In the field of commercial design, it is common to encounter situations where original shooting materials have missing limbs (such as arms or heads being obscured or cut off), requiring manual restoration to meet compositional integrity requirements. Traditional manual editing methods have defects such as difficulty in restoring complex structures and harsh background blending. This step replaces parametric input with visual canvas adjustments, establishing standardized input for subsequent AI generation, reducing repeated adjustments, and improving work efficiency. It also ensures that the proportions of the completed parts are consistent with the original image through precise space reservation, improving generation quality. Furthermore, it lowers the technical barrier, enabling non-professionals to achieve professional-grade results. Step S1, as the foundational step in the entire hybrid editing workflow, establishes operational guidelines for subsequent "manual drawing of basic structural anchor points" and AI generation.

[0074] In one embodiment, for step S2,

[0075] The steps for drawing limb outlines and facial positioning lines on the expanded canvas to generate an intermediate image include:

[0076] Invoke the brush function of the image drawing tool;

[0077] Determine the location of key connection points based on human anatomical features;

[0078] Draw the outline of the limbs within the reserved blank area;

[0079] Draw auxiliary lines for locating facial features in the facial area;

[0080] Generate an intermediate image containing structural reference information.

[0081] In practice, an intermediate image containing structural reference information is generated by manually drawing limb outlines and facial positioning lines on an expanded canvas. First, image drawing tools (such as the brush function of image processing software) are used to determine the positions of key connection points based on human anatomical features (such as key limb points like the shoulder and elbow joints, and facial reference positions like the eyes, nose, and mouth). Then, limb outlines conforming to anatomical structures are drawn within reserved blank areas, and facial feature positioning auxiliary lines are drawn in the facial region, ultimately generating a structured intermediate image to guide AI generation. Specifically, by manually drawing basic structural anchor points (such as limb outlines and facial reference lines), precise spatial constraints are provided for subsequent AI generation, ensuring that the posture and proportions of the completed parts meet ergonomic requirements. Compared to pure AI generation methods in existing technologies (such as Stable Diffusion directly generating potentially deformed limbs), this step improves the anatomical rationality of the generated results through manual key point annotation. Simultaneously, it preserves the designer's creative intent (such as adjustment space for specific limb postures or facial expressions), solving the problem of "inconsistency between AI generation and creator's intention." The generated intermediate image not only contains the visual features of the original image, but also integrates manually annotated structural reference information, providing high-precision spatial guidance for subsequent AI generation units (such as Stable Diffusion combined with ControlNet). Ultimately, it reduces deformities in AI generation (such as incorrect number of fingers, joint distortion, etc.) through key point constraints, thereby improving generation quality; it reduces the uncertainty of relying entirely on AI generation, enabling non-professionals to obtain professional-grade restoration results through simple annotation; and it establishes an accurate reference framework for background fusion and edge optimization in subsequent steps, ensuring a natural connection between the completed area and the original image in terms of structure and style.

[0082] In one embodiment, for step S3,

[0083] The steps for filling the background based on the color distribution characteristics of adjacent pixels in the missing region include:

[0084] Scan the color values ​​of the pixels at the boundary of the missing region;

[0085] Calculate the average value and distribution pattern of color characteristics in adjacent areas;

[0086] Choose the fill color value that best matches the surrounding background;

[0087] Perform a progressive color fill operation;

[0088] Smooth the transition at the filled edges.

[0089] In practice, intelligent background filling establishes a natural transition for the missing areas. First, the color values ​​of the boundary pixels of the missing area are scanned. By analyzing the RGB color distribution characteristics of adjacent areas, the most matching background color value is calculated. Specifically, the paint bucket tool in image processing software is used for approximate color filling, while the spot healing brush tool is combined to refine the filled edges, achieving a smooth transition in the background area. To address the issue of "harsh background blending," intelligent color picking and progressive fill techniques resolve color differences and texture breaks caused by traditional manual repair. Compared to the potential style inconsistencies (such as resolution / lighting mismatch) that may arise from pure AI generation methods, this step preserves the physical characteristics of the original background, providing color and texture references for subsequent AI generation units, ensuring that the "style consistency" requirement is met. This technical step improves the naturalness of the transition between the completed area and the original image edges; establishes an accurate color environment reference for subsequent AI generation, avoiding significant color differences between the generated content and the background; and reduces reliance on professional retouching skills through semi-automated processing, enabling ordinary users to obtain high-quality background repair results.

[0090] In one embodiment, for step S4,

[0091] The process involves inputting an image containing structural references and background fill into a generative image completion model, and combining this with prompts derived from the original image to generate a preliminary completed image. This includes:

[0092] Load the pre-trained generative image completion model;

[0093] By reverse engineering the original image, descriptive keywords can be obtained;

[0094] The intermediate image, which includes structural references and background filling, along with the descriptive cue words, is simultaneously input into the generative image completion model.

[0095] Perform the image generation calculation process;

[0096] Output the preliminary completed image.

[0097] In practice, an image containing structural references and background filling is input into a generative AI model, namely the Stable Diffusion model, and combined with prompts derived from the original image to generate a preliminary completed image. Specifically, a pre-trained generative AI model (Stable Diffusion model) is loaded, and descriptive prompts are obtained through image feature analysis. The intermediate image processed in the previous steps (containing hand-drawn structural references and intelligently filled backgrounds) and the derived prompts (such as "1girl, solo, navel..." and other feature descriptions) are input into the generative AI model, and image generation calculations are performed to output a preliminary completed image. This step realizes a "hybrid restoration method combining traditional image editing tools and generative AI," effectively solving the problems of "loss of detail control" and "inconsistent style" that exist in pure AI generation through structured input.

[0098] In one embodiment, the step of deriving descriptive prompts by reverse engineering the original image includes:

[0099] Visual features of the original image are extracted using an image feature analysis model;

[0100] Convert visual features into semantic descriptions;

[0101] Generate a structured sequence of prompt words;

[0102] Optimize the weighting of prompt keywords;

[0103] Output the final descriptive prompt words used.

[0104] In practice, descriptive cues are derived by reverse engineering the original image. Specifically, a built-in image feature analysis module (such as the image-to-image function of the Stable Diffusion model) is used to extract visual features from the original image, and these features are converted into a semantic sequence of cues (such as descriptive words for clothing, posture, etc.). The generated reverse-engineered cues are input into the image-to-image function of SD as positive cues. Positive and negative cues can also be added or modified according to needs. After filling in the cues, parameters such as Sampler, Steps, CFG Scale, and seed need to be set. Specifically, the weights of the cues are allocated through optimization algorithms (such as adjusting the "Clipskip" parameter), and finally, structured descriptive text is output. This step reduces the workload of manual annotation by automating cue generation, while ensuring a high degree of matching between the generated content and the features of the original image.

[0105] In one embodiment, the steps of performing the image generation calculation process include:

[0106] The face detail optimization sub-model is invoked to process the face region in the preliminary completed image;

[0107] Load the posture control model to constrain the generated human posture;

[0108] Perform multiple rounds of iterative optimization calculations;

[0109] Output the optimized preliminary completed image.

[0110] In the specific implementation, the image generation calculation process involves directly generating images from the original image, but the facial depiction is too coarse. ADetailer is used to optimize the face. Additionally, positive and negative prompts can be input as needed. Specifically, the ADetailer model (e.g., "face_yolov8n.pt") is called to optimize the details of the facial region in the generated image; the ControlNet OpenPose model is loaded to constrain the overall pose; and the generated result is optimized through multiple iterations (e.g., setting parameters such as "Denoising strength: 0.55"). This step uses a layered processing mechanism to ensure that the completed part maintains consistency with the original image in terms of anatomical structure and visual style.

[0111] In one embodiment, for step S5,

[0112] The steps of adjusting the pose of the human body in the initially completed image and optimizing the edge regions until the completed part is consistent with the original image in pose and background, and outputting the final completed image, include:

[0113] Key human body points are extracted from the original image using a pose recognition model;

[0114] Establish a three-dimensional spatial attitude reference frame;

[0115] Calculate the spatial deviation between the completed part and the reference attitude;

[0116] Perform attitude correction calculations;

[0117] Generate a pose-corrected, completed image.

[0118] In practice, the human posture is adjusted, and key points of the human body in the original image are extracted using the ControlNet OpenPose model (specifically, the parameter is "control_v11p_sd15_openpose[cab727d4]") to establish a three-dimensional spatial posture reference system. Specifically, the spatial deviations between the generated part and the original image in terms of joint positions, limb angles, etc. (i.e., "posture preservation constraints") are calculated, and pixel-level posture correction calculations are performed. The correction intensity is controlled by parameters such as "Guidance Start: 0.17, Guidance End: 1.0", ultimately generating an anatomically reasonable completed image to solve the problem of "limb deformities (such as incorrect number of fingers, joint twisting)".

[0119] In one embodiment, the step of adjusting the human pose of the completed portion in the initially completed image and optimizing the edge regions until the completed portion is consistent with the original image in pose and background, and outputting the final completed image, further includes:

[0120] Extract edge features from the original image and the completed region;

[0121] Calculate texture matching degree;

[0122] Generate an adaptive blending mask;

[0123] Perform multi-scale edge blending processing;

[0124] Output the final completed image with a natural transition.

[0125] In practice, for edge optimization, edge texture features of the original image and the AI-generated area are extracted (e.g., "edge smoothing technology"), and the optimal blending path at the seam is calculated using a feature matching algorithm. Adaptive masking technology is used to progressively blend the different areas. This step addresses the problem of "harsh background blending" by using multi-scale fusion processing to ensure that the completed area and the original image are completely consistent in terms of resolution, lighting, and other stylistic elements.

[0126] Reference Figure 2 Here is a structural block diagram of a portrait missing image completion system based on hybrid editing in one embodiment of the present invention, comprising:

[0127] The canvas processing unit is used to expand the canvas space of the input image and reserve blank areas for missing parts in the expanded area;

[0128] The structural drawing unit is used to draw limb outlines and facial positioning lines on the expanded canvas to generate intermediate images;

[0129] Intelligent fill unit, used to fill the background based on the color distribution characteristics of adjacent pixels in the missing area;

[0130] The AI ​​generation unit is used to input an image containing structural reference and background filling into the generative image completion model, and combine it with prompts derived from the original image to generate a preliminary completed image;

[0131] The optimization and adjustment unit is used to adjust the human pose of the completed part in the initial completed image and optimize the edge region until the completed part is consistent with the original image in pose and background, and outputs the final completed image.

[0132] For the specific implementation of each unit in the above device example, please refer to the method embodiments described above, and will not be repeated here.

[0133] In summary, this invention expands the canvas space of the input image and reserves blank areas for missing parts in the expanded area; it draws limb outlines and facial positioning lines on the expanded canvas to generate an intermediate image; it fills the background based on the color distribution characteristics of adjacent pixels in the missing area; it inputs the image containing structural references and background filling into a generative image completion model, and combines it with prompts derived from the original image to generate a preliminary completed image; it adjusts the human posture of the completed part in the preliminary completed image and optimizes the edge areas until the completed part is consistent with the original image in posture and background, and outputs the final completed image, thereby achieving the goal of efficiently completing high-quality completion of missing parts of a human image while maintaining the accuracy of human anatomy.

[0134] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the present invention and embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM, etc.

[0135] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0136] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A method for completing missing portrait images based on hybrid editing, characterized in that, Includes the following steps: Expand the canvas space of the input image and reserve blank areas in the expanded area to fill in the missing parts; Draw limb outlines and facial positioning lines on the expanded canvas to generate an intermediate image; Background filling is performed based on the color distribution characteristics of adjacent pixels in the missing area; An image containing structural references and background fill is input into a generative image completion model, which then combines prompts derived from the original image to generate a preliminary completed image. Adjust the human pose of the completed part in the initial completed image and optimize the edge region until the completed part is consistent with the original image in pose and background, and output the final completed image.

2. The method for completing missing portrait images based on hybrid editing according to claim 1, characterized in that, The step of expanding the canvas space of the input image and reserving blank areas for missing parts in the expanded area includes: Receive canvas size adjustment commands through the image processing interface; The scaling ratio is calculated based on the original image size; Perform a canvas expansion operation in image processing software; Based on the spatial location of the missing part, reserve corresponding blank areas in the expanded area to fill in the missing part.

3. The method for completing missing portrait images based on hybrid editing according to claim 1, characterized in that, The step of drawing limb outlines and facial positioning lines on the expanded canvas to generate an intermediate image includes: Invoke the brush function of the image drawing tool; Determine the location of key connection points based on human anatomical features; Draw the outline of the limbs within the reserved blank area; Draw auxiliary lines for locating facial features in the facial area; Generate an intermediate image containing structural reference information.

4. The method for completing missing portrait images based on hybrid editing according to claim 1, characterized in that, The step of filling the background based on the color distribution characteristics of adjacent pixels in the missing region includes: Scan the color values ​​of the pixels at the boundary of the missing region; Calculate the average value and distribution pattern of color characteristics in adjacent areas; Choose the fill color value that best matches the surrounding background; Perform a progressive color fill operation; Smooth the transition at the filled edges.

5. The method for completing missing portrait images based on hybrid editing according to claim 1, characterized in that, The step of inputting an image containing structural reference and background fill into a generative image completion model, and generating a preliminary completed image by combining it with prompts derived from the original image, includes: Load the pre-trained generative image completion model; By reverse engineering the original image, descriptive keywords can be obtained; The intermediate image, which includes structural references and background filling, along with the descriptive cue words, is simultaneously input into the generative image completion model. Perform the image generation calculation process; Output the preliminary completed image.

6. The method according to claim 5, characterized in that, The step of obtaining descriptive prompts by reverse engineering from the original image includes: Visual features of the original image are extracted using an image feature analysis model; Convert visual features into semantic descriptions; Generate a structured sequence of prompt words; Optimize the weighting of prompt keywords; Output the final descriptive prompt words used.

7. The method for completing missing portrait images based on hybrid editing according to claim 5, characterized in that, The steps of performing the image generation calculation process include: The face detail optimization sub-model is invoked to process the face region in the preliminary completed image; Load the posture control model to constrain the generated human posture; Perform multiple rounds of iterative optimization calculations; Output the optimized preliminary completed image.

8. The method for completing missing portrait images based on hybrid editing according to claim 1, characterized in that, The steps of adjusting the human pose of the completed portion in the preliminary completed image and optimizing the edge regions until the completed portion is consistent with the original image in pose and background, and outputting the final completed image, include: Key human body points are extracted from the original image using a pose recognition model; Establish a three-dimensional spatial attitude reference frame; Calculate the spatial deviation between the completed part and the reference attitude; Perform attitude correction calculations; Generate a pose-corrected, completed image.

9. The method for completing missing portrait images based on hybrid editing according to claim 1, characterized in that, The step of adjusting the human pose of the completed portion in the preliminary completed image and optimizing the edge region until the completed portion is consistent with the original image in pose and background, and outputting the final completed image, further includes: Extract edge features from the original image and the completed region; Calculate texture matching degree; Generate an adaptive blending mask; Perform multi-scale edge blending processing; Output the final completed image with a natural transition.

10. A system for completing missing human portrait images based on hybrid editing, characterized in that, include: The canvas processing unit is used to expand the canvas space of the input image and reserve blank areas for missing parts in the expanded area; The structural drawing unit is used to draw limb outlines and facial positioning lines on the expanded canvas to generate intermediate images; Intelligent fill unit, used to fill the background based on the color distribution characteristics of adjacent pixels in the missing area; The AI ​​generation unit is used to input an image containing structural reference and background filling into the generative image completion model, and combine it with prompts derived from the original image to generate a preliminary completed image; The optimization and adjustment unit is used to adjust the human pose of the completed part in the initial completed image and optimize the edge region until the completed part is consistent with the original image in pose and background, and outputs the final completed image.

Citation Information

Patent Citations

  • Image complementing method, device, electronic device and storage medium

    CN107730457A

  • An image editing method and device

    CN109472795A

  • Picture generation method and device, storage medium and computing equipment

    CN117036546A

  • Painting line draft intelligent extraction and interactive teaching method based on artificial intelligence

    CN118334179A

  • Method, computer device, and non-transitory computer-readable recording medium for generating image

    US20240371049A1