Image generation apparatus, method, and electronic equipment

The image generation method addresses unnatural object-hand connections by generating hand masks and enhancing images, resulting in more natural and balanced images that improve HOID model performance.

JP2026185803APending Publication Date: 2026-11-27FUJITSU LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2026077044
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-15
Filing Date
2026-05-01
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing image generation methods based on diffusion models fail to account for changes in the shape, size, and pose of target objects, resulting in awkward and unnatural connections between objects and hands in generated images.

Method used

An image generation method that generates a hand mask based on the hand region, performs enhancement processes on a second image, and synthesizes it with a composite mask to create a collage image, adapting to hand posture and object changes, and improves the balance and generalization performance of human-object interaction models.

Benefits of technology

The method generates more natural-looking images by adapting to hand posture and object changes, enhancing image balance, and improves the generalization performance of Human Object Interaction Detection (HOID) models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026185803000001_ABST
    Figure 2026185803000001_ABST
Patent Text Reader

Abstract

The present invention provides an image generation apparatus, method, and electronic device. [Solution] The image generation apparatus includes a mask generation apparatus that generates a hand mask based on the hand region in a first image, and generates a composite mask based on the hand mask and the object region mask; a synthesis apparatus that performs at least one enhancement process on a second image, performs a composite on the second image and the image after the enhancement process, or performs a composite on a plurality of images after the enhancement process, and generates a collage image by collaging the composite image and the first image; and a stitching apparatus that generates a third image by stitching the collage image and the composite mask together.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present invention relates to the technical field of image processing, and more particularly, to an image generation apparatus, an image generation method, and an electronic device. BACKGROUND ART

[0002] With the rapid development of artificial intelligence, Human Object Interaction Detection (HOID) technology has demonstrated immense application potential and value in fields such as self-checkout systems, video surveillance, and human-computer interaction. Training a high-quality HOID model relies on a large amount of image data containing multiple objects and different scenes. However, collecting such large-scale image data requires preparing numerous items and capturing videos under various conditions, which is time-consuming and costly. To easily generate image data from a small dataset, it is crucial for the HOID model to generate a hint image that can effectively guide the image generation process.

[0003] Conventional image generation methods employ object-level image customization technology, such as methods based on a diffusion model framework, to generate diverse image data by replacing objects carried by a human body. For example, high-quality object image customization can be achieved through AnyDoor technology, and replacement of hands and interaction objects can be performed through HOI-swap technology.

[0004] It should be noted that the above introduction to the background art is provided to clearly and completely describe the technical solution of the present invention and to facilitate understanding by those skilled in the art. These technical solutions should not be construed as being well-known to those skilled in the art merely because they are described in the background art of the present invention. SUMMARY OF THE INVENTION [Problems that the invention aims to solve]

[0005] The inventors discovered the following: Existing image generation methods based on diffusion models do not take into account changes in the shape, size, and pose of the target object, which can result in awkward and unnatural connections between the object and the hand in the generated images.

[0006] To address at least one of the technical problems described above, embodiments of the present invention provide an image generation apparatus and method and electronic equipment. The image generation method can adapt to changes in hand posture and make the generated third image more natural by generating a third image (i.e., an image obtained by replacing the original object held in the hand with a target object) based on a hand mask of the hand region; it can also adapt to changes in the shape, size, and position of the object and improve the balance of the generated image by generating a third image based on an image after enhancement processing of the image containing the target object; and furthermore, the generalization performance of the interaction between human and object in the HOID model can be improved by training the HOID model using the generated third image. [Means for solving the problem]

[0007] According to one aspect of the embodiments of the present invention, an image generating apparatus is provided, the image generating apparatus is A mask generation device that generates a hand mask based on the hand region in the first image, and further generates a composite mask based on the hand mask and the object region mask; A synthesis apparatus that performs at least one enhancement process on a second image, synthesizes the second image and the image after the enhancement process, or synthesizes multiple images after the enhancement process, and generates a collage image by collaging the synthesized image with the first image; and The device includes a stitching apparatus that stitches together the collage image and the composite mask to generate a third image.

[0008] According to another aspect of the embodiments of the present invention, an image generation method is provided, the image generation method is A hand mask is generated based on the hand region in the first image, and a composite mask is generated based on the hand mask and the object region mask; Performing at least one enhancement process on the second image, compositing the second image and the image after the enhancement process, or compositing multiple images after the enhancement process, and generating a collage image by collaging the composite image and the first image; and This includes generating a third image by combining the collage image and the composite mask.

[0009] According to another aspect of the embodiments of the present invention, an electronic device is provided, the electronic device including the aforementioned image generating device. [Effects of the Invention]

[0010] The image generation method according to the present invention generates a third image (i.e., an image obtained by replacing the original object held in the hand with the target object) based on a hand mask of the hand region, thereby adapting to changes in hand posture and making the generated third image more natural; furthermore, by generating a third image based on an image after enhancement processing of the image containing the target object, it is possible to adapt to changes in the shape, size, and position of the object and improve the balance of the generated image; and furthermore, by training the HOID model using the generated third image, the generalization performance of human-object interaction in the HOID model can be improved. [Brief explanation of the drawing]

[0011] The included drawings are used to provide a further understanding of embodiments of the present invention, and these drawings constitute part of this specification, illustrating embodiments of the present invention and, together with the textual description, are used to explain the principles of the present invention. Furthermore, as will be apparent, the drawings described below are merely for illustrating some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort. [Figure 1] This figure shows an image generation method according to an embodiment of the present invention. [Figure 2] This figure shows the framework of the image generation method in an embodiment of the present invention. [Figure 3] This figure shows a method for generating a hand mask based on the hand region in the first image according to an embodiment of the present invention. [Figure 4] This figure shows a method for producing a hand mask according to an embodiment of the present invention. [Figure 5] This figure shows a synthetic mask in an embodiment of the present invention. [Figure 6] This figure shows a method for generating a collage image according to an embodiment of the present invention. [Figure 7] This figure shows the framework of the image generation method in an embodiment of the present invention. [Figure 8] This figure shows the input of a third image to the AnyDoor model in an embodiment of the present invention. [Figure 9] This figure shows an image generation apparatus according to an embodiment of the present invention. [Figure 10] This figure shows an electronic device in an embodiment of the present invention. [Modes for carrying out the invention]

[0012] Hereinafter, preferred embodiments for carrying out the present invention will be described in detail with reference to the attached drawings. Note that the following embodiments are merely illustrative and do not limit the present invention.

[0013] It should be noted that, in the embodiments of the present invention, the term "key point" may be replaced by "key coordinate point", "landmark", "landmark point", etc., and the term "object" may be replaced by "detected object", "object to be detected", "research object", etc., which may be a part, another component, or the like.

[0014] <Embodiment of the First Aspect> An embodiment of the present invention provides an image generation method.

[0015] FIG. 1 is a diagram illustrating an image generation method in an embodiment of the present invention. FIG. 2 is a diagram illustrating a framework of an image generation method in an embodiment of the present invention. As shown in FIG. 1 and FIG. 2, the image generation method includes the following operations (steps), namely: Operation 101: generating a hand mask based on a hand region in a first image, and further generating a composite mask based on the hand mask and an object region mask; Operation 102: performing at least one enhancement process on a second image, and performing synthesis on the second image and the image after the enhancement process, or performing synthesis on a plurality of images after the enhancement process, and then performing collage on the synthesized image and the first image to generate a collage image; and Operation 103: stitching the collage image and the composite mask to generate a third image.

[0016] According to an embodiment of the first aspect of the present invention, in the image generation method, a hand mask is generated based on a hand region in a first image, and a composite mask is further generated based on the hand mask and an object region mask; at least one enhancement process is performed on a second image, and compositing is performed on the second image and the image after the enhancement process, or compositing is performed on multiple images after the enhancement process, and then the composited image and the first image are collaged to generate a collage image; and the collage image and the composite mask are stitched together to generate a third image. Therefore, by generating the third image (i.e., an image obtained by replacing the original object held in the hand with a target object) based on the hand mask of the hand region, it is possible to adapt to changes in hand posture and make the generated third image more natural; in addition, by generating the third image based on the image obtained after performing enhancement processing on the image containing the target object, it is possible to adapt to changes in the position of the object and improve the balance of the generated image; furthermore, by performing HOID model training using the generated third image, it is possible to improve the generalization performance of the interaction between a human and an object in the HOID model.

[0017] In some examples, the first image includes a human body part and an object region. The human body part is, for example, a human hand, or may further include other parts, which is not limited in the present invention. In one example, the first image includes, for example, a region where a hand holds an object. Therefore, the region where the object is located (e.g., referred to as an object region) may include a partial image of the hand. In the present invention, the first image may be referred to as an input source image.

[0018] In some examples, the second image includes the region of an object, of which the object in the second image is the target object, and the target object is used to replace the object in the first image. In this invention, the second image may also be referred to as the input target object.

[0019] In some examples, the third image may be an image containing a part of the human body in the first image and an object in the second image. In one example, the third image may be input to an AnyDoor model or another model for training purposes. In this invention, the third image may be referred to as a hint image.

[0020] Operation 101 generates a composite mask based on the hand mask and the object region mask. The methods for obtaining the object region mask and the hand mask are described below.

[0021] First, we will explain the object region mask in operation 101.

[0022] In some examples, the method for obtaining an object region mask in an image may include a region frame and mask generation method based on target detection or an end-to-end example splitting model. For example, in a region frame and mask generation method based on target detection, the region of an object in an image can be determined by detecting the bounding box (BBox) of the object in the image using a deep learning model (e.g., YOLO, Faster R-CNN, etc.); and for the image region within the bounding box, segmentation of the object (also called foreground) and background may be performed in conjunction with the region mask, and a binarized mask may be output by employing algorithms such as thresholding or object contour extraction. Alternatively, in an end-to-end example splitting model, for example, a lightweight backbone network (e.g., ShuffleNet) may be employed to directly output the object mask.

[0023] The present invention is not limited to the above, and object region masks in images may be obtained by other models or other methods.

[0024] In some examples, the object region mask in operation 101 of the embodiments of the present invention may be obtained by performing the above-described detection or division on a single image (for example, the single image may be the first image, or a video image frame before or after the first image in the video data), or it may be obtained by obtaining an object region mask for each of multiple images and then compositing the multiple object region masks. For example, from video data within a predetermined period, multiple frames (i.e., multiple images) containing the same object may be obtained (for example, based on video division or tracking techniques), at least two frames may be selected from the multiple frames, a mask of the same object in each frame may be obtained, and the masks on the at least two frames (images) may be merged to form the object region mask (for example, the intersection or union of the masks on the at least two frames (images) may be taken to form the object region mask). The object region mask in operation 101 of the embodiments of the present invention may further be an object region mask on another image, but the present invention is not limited thereto.

[0025] The following describes a method for generating a hand mask based on the hand region in the first image in operation 101 of the embodiment of the present invention.

[0026] Figure 3 shows a method for generating a hand mask based on the hand region in the first image in an embodiment of the present invention. As shown in Figures 2 and 3, operation 101, which generates a hand mask based on the hand region in the first image, includes the following operations, namely: Operation 301: Detect the finger keypoints, wrist keypoints and elbow keypoints in the hand area; Operation 302: Calculate the hand boundary frame based on the finger keypoints in the hand area; Operation 303: Generate an elliptical mask based on the hand bounding frame; and Operation 304: A rectangular mask is generated based on the wrist keypoint and the elbow keypoint, and the rectangular mask is connected to the elliptical mask.

[0027] Figure 4 shows a method for producing a hand mask according to an embodiment of the present invention. The method for producing a hand mask according to the present invention will be explained below in conjunction with the specific example shown in Figure 4.

[0028] In operation 301, the DWPose (Effective Whole-body Pose Estimation with Two-stages Distillation) method is employed to detect finger keypoints, wrist keypoints, and elbow keypoints in the hand region. For example, the hand region includes the hand (e.g., fingers, palm, back of hand, etc.), wrist, and elbow, and DWPose employs the TPD (Two-stage Pose Distillation, TPD) technique to perform joint detection on the hand, elbow, etc., thereby covering major joints (e.g., elbow, wrist, etc.) and detailed parts (e.g., finger keypoints); however, other methods may be employed to detect finger keypoints, wrist keypoints, and elbow keypoints in the hand region, but the present invention is not limited thereto.

[0029] For example, as shown in Figure 4, the black dots in Figure 4 are finger keypoints 41, wrist keypoints 42, and elbow keypoints 43 within the detected hand area. The black dots in Figure 4 are merely illustrative examples, and the present invention may further involve detecting all finger joints to constitute finger keypoints, detecting multiple wrist and elbow areas to constitute wrist keypoints and elbow keypoints, or detecting other areas to constitute the aforementioned keypoints. However, the present invention is not limited to these methods.

[0030] In operation 302, the hand boundary frame is calculated based on the finger keypoints in the detected hand region.

[0031] For example, as shown in Figure 4, the dotted rectangular frame in Figure 4 is the hand boundary frame 44, where the length of the long side of the hand boundary frame is the distance between the wrist keypoint 42 and the finger keypoint 41 furthest from the wrist keypoint 42, and the length of the short side of the hand boundary frame is the longest distance between the finger joint keypoints 41 of different fingers.

[0032] After the hand bounding frame 44 is generated, operation 303 generates an ellipse mask based on the hand bounding frame 44.

[0033] For example, as shown in Figure 4, the elliptical region in Figure 4 represents an ellipse mask 45, and the ellipse mask region is generated by adaptively expanding the hand boundary frame. For example, in Figure 4, the ellipse mask can be constructed by setting half the length of the long side of the hand boundary frame 44 as the long side radius (ellipse_radius_x) of the ellipse mask region, half the length of the short side of the hand boundary frame as the short side radius (ellipse_radius_y) of the ellipse mask region, and using the connecting line between the wrist keypoint and the finger keypoint as the long side diameter of the ellipse mask region.

[0034] Then, in operation 304, a rectangular mask is generated based on the wrist keypoint and the elbow keypoint, and the rectangular mask is connected to the elliptical mask.

[0035] In some examples, the width of the rectangular mask is equal to the average value of the sum of the radii of the elliptical mask in two directions; and / or, the length of the rectangular mask is greater than or equal to the distance between the wrist keypoint and the elbow keypoint.

[0036] For example, as shown in Figure 4, the solid rectangular frame in Figure 4 is a rectangular mask region 46. For example, in Figure 4, the longer side of the rectangular mask region 46 is parallel to the direction of the connection line 43 between the wrist keypoint 42 and the elbow keypoint, and the longer side of the rectangular mask region is greater than or equal to the distance between the wrist keypoint and the elbow keypoint. For example, the shorter side of the rectangular mask region is equal to the average value of the sum of the radii in the two directions of the ellipse mask, i.e., the width of the shorter side (width) = (ellipse_radius_x + ellipse_radius_y) / 2.

[0037] In some cases, when a rectangular mask generated based on wrist and elbow keypoints is not connected to an elliptical mask, the length of the rectangular mask is extended to cause it to connect to the elliptical mask.

[0038] For example, as shown in Figure 4, when a rectangular mask 46 is connected to an elliptical mask 45, it means that the rectangular mask 46 and the elliptical mask 45 have at least one connection point, and the rectangular mask 46 and the elliptical mask 45 jointly constitute the hand mask 40 of the hand region in the first image.

[0039] This allows for the generation of a hand mask based on the shape and position of the hand in the first image, enabling flexible adaptation to different hand shapes when generating the third image, resulting in a more natural-looking third image.

[0040] The above clarifies the methods for generating object region masks and hand masks. Below, we will describe the composite mask generated in operation 101 based on the hand mask and object region mask.

[0041] In some examples, a composite mask is generated by applying pixel markings to the hand mask and the object region mask. This composite mask includes a first mask, a second mask, and a third mask, of which the first mask corresponds to a mask region containing only the object region mask; the second mask corresponds to a mask region containing only the hand mask; and the third mask corresponds to a mask region where the object region mask and the hand mask overlap.

[0042] Figure 5 shows a synthetic mask in an embodiment of the present invention.

[0043] Let's explain using the example that the object area mask is the object area mask on the first image. For example, after determining the object area mask and the hand area mask, the first mask, second mask, and third mask are marked with different pixels. Of these, the third mask corresponds to the position and area of ​​the overlapping mask area of ​​the object area mask and the hand mask, the first mask corresponds to the position and area of ​​the object area mask excluding the third mask area, and the second mask corresponds to the position and area of ​​the hand mask excluding the third mask area.

[0044] For example, as shown in Figure 5, the first mask 51 is marked to have a first pixel value (e.g., white, corresponding to the maximum pixel value of 255 in a single-channel image), the second mask 52 is marked to have a second pixel value (e.g., first gray, corresponding to the second pixel value of 64 in a single-channel image), and the third mask 53 is marked to have a third pixel value (e.g., second gray, corresponding to the third pixel value of 128 in a single-channel image). As shown in Figure 5, the size of the composite mask image is the same as the size of the first image, and pixels in the composite mask image other than the first mask 51, second mask 52, and third mask 53 are set to have a fourth pixel value (e.g., black, corresponding to the minimum value of 0 in a single-channel image). A composite mask can be formed by the method described above. The following describes the step of performing composite on multiple images using operation 102 of the embodiment of the present invention.

[0045] In some examples of operation 101, at least one enhancement process is performed on the second image, the enhancement process including at least one of the following processes: mirroring, rotation, and translation.

[0046] For example, the second image includes at least a target object, and the enhancement process applied to the second image includes performing at least one of the following on the target object in the second image: mirroring, rotation, and translation; however, the enhancement process may further include other processes, such as inversion and elastic transformation, but the present invention is not limited thereto.

[0047] In some cases, the second image is combined with the image after enhancement processing, or multiple images after enhancement processing are combined.

[0048] For example, a second image may be combined with an image obtained by mirroring the second image, or an image obtained by mirroring the second image may be combined with an image obtained by rotating the second image.

[0049] This allows the generated third image to adapt to changes in the shape, size, and position of the target object by collaging it with the first image based on the combined image, thereby improving the balance of the generated image.

[0050] The following describes how to generate a collage image using operation 102 of the embodiment of the present invention.

[0051] Figure 6 shows a method for generating a collage image in an embodiment of the present invention. As shown in Figures 2 and 6, operation 102, which generates a collage image by collaging the combined image with the first image, includes the following operations, namely, Operation 601: Determine the collage region in the first image based on the object region mask; and Operation 602: The combined images are collaged into the collage area to generate a collage image.

[0052] For example, an object mask area is determined based on the object area in the first image or another image, the position and area of ​​the object mask area are set as the position and area of ​​the collage area, and the size of the composite image is adjusted so that the size of the composite image is the same as the collage area, and then the composite image is collaged onto the collage area of ​​the first image (for example, pasted onto the collage area of ​​the first image) to generate a collage image. The size of the collage image and the first image are the same.

[0053] In some embodiments of operation 103, a third image is generated by combining the collage image obtained in operation 102 with the composite mask obtained in operation 101. In these embodiments, the collage image and the composite mask are the same size.

[0054] In some examples, the concatenation operation may also involve connecting the composite mask and the collage image in the channel dimension.

[0055] For example, following the stitching method in conventional diffusion model architectures, identity features and detail features of the target object in the collage image may be stitched together to form a complete conditional input, and a third image may be generated by combining the acquired conditional input with boundary features in the composite mask. For a detailed explanation of the stitching operation, please refer to related technologies, such as the technology related to AnyDoor, and a detailed explanation will be omitted here. Other stitching methods may also be used, and this invention is not limited to them.

[0056] The above explains the generation of composite masks, collage images, and third images, respectively.

[0057] Figure 7 shows the framework of the image generation method in an embodiment of the present invention.

[0058] As shown in Figure 7, the first image includes a hand and an object, for example, the hand and scissors in the first image shown in Figure 7, and the second image includes a target object, for example, the scissors shown in Figure 7. In some examples, the second image is mirrored, and the mirrored image and the second image are combined to form a combined image; also, the object area mask and hand mask in the first image are determined based on the method described above, and a composite mask is generated (the method for generating the composite mask is not shown in Figure 7); and a collage image is formed by collaging the combined image and the first image according to the size and position of the object area mask in the first image (as shown in the dotted line frame 71 in Figure 7); and further, a third image (not shown in Figure 7) may be formed by joining the collage image and the composite mask.

[0059] This allows for the generation of a third image based on a hand mask of the hand region, adapting to flexible changes in hand posture and making the generated third image more natural; and also allows for the generation of a third image based on the image after enhancement processing, adapting to changes in object shape, size, and position, and improving the balance of the generated image.

[0060] In some embodiments, by inputting the generated third image into an AnyDoor model or another model, an image can be generated in which the target object in the second image replaces the object in the first image.

[0061] Figure 8 shows an example of inputting a third image into the AnyDoor model in an embodiment of the present invention.

[0062] As shown in Figure 8, after the third image is generated by the method described above, the third image is input to the AnyDoor model. For example, the third image is input to a detail extractor, where a convolution operation is performed on the third image using a high-pass filter such as the Sobel operator to extract a high-frequency map (HF-Map) in which only edge and texture information remains. Separation processing is then performed on the RGB color channels in conjunction with the Hadamard transform to enhance the identifiability of the high-frequency features. After fusing the generated high-frequency map with the background of the original image, it is input to the detail extractor, which generates a multi-level detail feature map of the third image. For example, identity information of objects and / or hands on the third image is extracted using a pre-trained visual encoder, and the multi-scale features are directly injected into the corresponding layer of a denoising U-shaped network (UNET) by skip connections; and the second image is input to the encoder, for example, the encoder uses DINOV2 (Depth-Induced Noise for Online Video Self-Supervision, Version 2) The encoder in AnyDoor is a DINOV2 encoder that acts as an ID feature extraction backbone network to preserve the identity of the target object (e.g., color and shape) in zero samples. A linear layer maps the output of the DINOV2 encoder to the dimensions required for a denoising U-shaped network (UNET). The output of the linear layer, the output of the detail extractor, and the noise are input to the denoising UNET, which generates a replaced image by achieving highly efficient noise suppression through linearized feature processing. For detailed processing steps of the detail extractor, encoder, linear layer, and denoising UNET shown in Figure 8, please refer to related technologies, as this invention is not limited thereto.

[0063] This allows us to improve the generalization performance of the HOID model's interaction between humans and objects by training the HOID model using the generated third image.

[0064] Table 1 shows a set of data representing the verification results of the image generation method in an embodiment of the present invention.

[0065] In this invention, a comparison is made between the image generation results obtained based on HOI-swap (Exp.1), the image generation results obtained based on the Anydoor model (Exp.2), and the image generation results obtained based on the image generation method of this invention (Exp.3).

[0066] As shown in Table 1, hand agreement and hand fidelity in the generated image and the reference image (i.e., the first image) are used as evaluation metrics.

[0067] For example, hand agreement refers to calculating the Intersection over Union (IoU) of the detected hand bboxes between the first image and the generated image, i.e., "area of ​​the intersection / area of ​​the union". For instance, the higher the hand agreement value, the closer the area of ​​the hand images between the first image and the generated image will be.

[0068] For example, hand fidelity refers to calculating the confidence score of the hand object detector between the first image and the generated image. For instance, the higher the hand fidelity value, the more natural the connection between the hand and the object.

[0069] [Table 1] As can be seen from the results, the Hand agr. and Hand fid. values ​​of Exp.3 are higher than the Hand agr. and Hand fid. values ​​of Exp.2 and Exp.1. Therefore, it is proven that images can be generated effectively and accurately by the image generation method of the present invention.

[0070] Although only steps or processes relating to the present invention have been described above, the present invention is not limited thereto. The methods for object detection, human body keypoint detection, object mask acquisition, and replacement of object regions in the first image may further include other steps or processes, and the specific details of these steps or processes can be found in the prior art. Furthermore, although embodiments of the present invention have been illustrated above using several configurations of models used by these methods as examples, the present invention is not limited to these configurations, and appropriate modifications may be made to these configurations, and all methods of carrying out these modifications should be included within the scope of embodiments of the present invention.

[0071] The embodiments described above are for illustrative purposes to illustrate embodiments of the present invention, but the present invention is not limited thereto, and appropriate modifications may be made based on the embodiments described above. For example, the embodiments described above may be used individually, or a combination of several of the embodiments described above may be used.

[0072] As can be seen from the above-described embodiment, according to the first aspect of the present invention, a hand mask is generated based on the hand region in the first image, and a composite mask is generated based on the hand mask and the object region mask; at least one enhancement process is performed on the second image, and the second image and the image after the enhancement process are combined, or a combination is performed on multiple images after the enhancement process, and a collage image is generated by collaging the combined image and the first image; and a third image is generated by joining the collage image and the composite mask. Thus, by generating a third image based on the hand mask of the hand region, it is possible to adapt to flexible changes in the posture of the hand and make the generated third image more natural; and by generating a third image based on the image after the enhancement process, it is possible to adapt to changes in the shape, size, position, etc. of the object and improve the balance of the generated image; and furthermore, by training the HOID model using the generated third image, the generalization performance of the interaction between human and object in the HOID model can be improved.

[0073] <Example of the second aspect> An image generation apparatus is provided in the embodiment of the present invention, which corresponds to the image generation method in the embodiment of the first aspect. In the embodiment of the second aspect, the description of the same content as in the embodiment of the first aspect is omitted.

[0074] Figure 9 shows an image generation apparatus according to an embodiment of the present invention. As shown in Figure 9, the image generation apparatus 900 includes a mask generation apparatus 901, a synthesis apparatus 902, and a stitching apparatus 903.

[0075] Mask generation device 901: Generates a hand mask based on the hand region in the first image, and further generates a composite mask based on the hand mask and the object region mask; Synthesis apparatus 902: Performs at least one enhancement process on the second image, and performs synthesis on the second image and the image after the enhancement process, or performs synthesis on multiple images after the enhancement process, and generates a collage image by collaging the synthesized image and the first image; and Adaptation device 903: Adapts the collage image and the composite mask to generate a third image.

[0076] In some cases, generating a hand mask based on the hand region in the first image involves the following: The keypoints of the fingers, wrist, and elbow in the hand region are detected; The hand boundary frame is calculated based on the finger keypoints in the hand area; Generate an elliptical mask based on the hand bounding frame; and A rectangular mask is generated based on the wrist keypoint and the elbow keypoint, and the rectangular mask is connected to the elliptical mask.

[0077] In some examples, when the rectangular mask generated based on the wrist keypoint and the elbow keypoint is not connected to the elliptical mask, the length of the rectangular mask is extended to cause it to connect to the elliptical mask.

[0078] In some examples, the width of the rectangular mask is equal to the average value of the sum of the radii of the elliptical mask in two directions; and / or, the length of the rectangular mask is greater than or equal to the distance between the wrist keypoint and the elbow keypoint.

[0079] In some examples, the synthetic mask includes a first mask, a second mask, and a third mask.

[0080] The first mask corresponds to a mask region that includes only the object region mask; The second mask corresponds to a mask area that includes only the hand mask; and The third mask corresponds to the overlapping mask area of ​​the object area mask and the hand mask.

[0081] In some examples, generating a collage image by collaging the combined image with the first image includes the following: Based on the object region mask, the collage region in the first image is determined; and The combined images are collaged into the collage area to generate the collage image.

[0082] In some examples, the enhancement process includes at least one of the following processes: mirroring, rotation, and translation.

[0083] Although only the individual components or devices relating to the present invention have been described above, the present invention is not limited thereto. The image generation apparatus 900 may further include other components or devices. Specific details of these components or devices can be found in related technologies.

[0084] For convenience, Figure 9 only shows the connection relationships or signal directions between each component or device, but various related technologies such as bus connections may be employed as can be understood by those skilled in the art. The above-mentioned components or devices may be realized by hardware such as processors and memory devices, but the embodiments of the present invention are not limited to these.

[0085] The embodiments described above are for illustrative purposes to illustrate embodiments of the present invention, but the present invention is not limited thereto, and appropriate modifications may be made based on the embodiments described above. For example, the embodiments described above may be used individually, or a combination of several of the embodiments described above may be used.

[0086] <Example of the third side> An embodiment of the present invention provides an electronic device, which includes the image generating device 900 described in the embodiment of the second aspect, and the contents thereof are incorporated herein by reference. The electronic device may be, for example, a computer, server, workstation, laptop computer, smartphone, etc., but the embodiments of the present invention are not limited thereto.

[0087] Figure 10 shows an electronic device in an embodiment of the present invention. As shown in Figure 10, the electronic device 1000 may include a processor (e.g., a central processor CPU) 1010 and a memory unit 1020, the memory unit 1020 being connected to the central processor 1010. The memory unit 1020 can store various types of data, and can also store a program 1021 for information processing, and can execute the program 1021 under the control of the processor 1010.

[0088] In some embodiments, the functions of the image generation device 900 may be integrated into the processor 1010. In some of these embodiments, the processor 1010 is configured to perform the image generation method described in the first embodiment.

[0089] In some embodiments, the image generation device 900 may be located separately from the processor 1010. For example, the image generation device 900 may be configured as a chip connected to the processor 1010, and the functions of the image generation device 900 may be realized by the control of the processor 1010.

[0090] Furthermore, as shown in Figure 10, the electronic device 1000 may also include an input / output (I / O) device 1030, a display 1040, and the like. Since the functions of the aforementioned components are the same as in the prior art, a detailed explanation of them is omitted here. Note that the electronic device 1000 does not need to include all the components shown in Figure 10. Also, the electronic device 1000 may include components not shown in Figure 10, for which related technologies can be consulted.

[0091] In embodiments of the present invention, a computer-readable program is further provided, in which, when the program is executed on an electronic device, the program causes the computer to execute the image generation method described in the first embodiment on the electronic device.

[0092] In embodiments of the present invention, a storage medium storing a computer-readable program is provided, wherein the computer-readable program causes a computer to execute the image generation method described in the first embodiment using an electronic device.

[0093] Furthermore, the above-described apparatus and method may be implemented by software or hardware, or by a combination of hardware and software. The present invention further relates to a computer-readable program as described below, that is, the program, when executed by a logic component, causes the logic component to implement the above-described apparatus or component, or to the logic component to implement the above-described various methods or steps. The logic component may be, for example, an FPGA (Field Programmable Gate Array), a microprocessor, or a processor used in a computer. The present invention further relates to a storage medium storing the above-described program, for example, a hard disk, a magnetic disk, an optical hard disk, a DVD, a flash memory, etc.

[0094] Furthermore, one or more combinations of the functional blocks shown in the drawings and / or one or more combinations of functional blocks may be implemented as a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA) or other programmable logic component, discrete gate or transistor logic component, discrete hardware assembly or any other suitable combination for performing the functions described herein. Also, one or more combinations of the functional blocks shown in the drawings and / or one or more combinations of functional blocks may further be configured as a combination of computing devices, for example, a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors connected to a DSP by communication or any other combination of any other configuration.

[0095] Furthermore, the above embodiments and other details are disclosed as follows:

[0096] (Note 1) An image generation method, wherein the method is A hand mask is generated based on the hand region in the first image, and a composite mask is generated based on the hand mask and the object region mask; Performing at least one enhancement process on the second image, compositing the second image and the image after the enhancement process, or compositing multiple images after the enhancement process, and generating a collage image by collaging the composite image and the first image; and This method includes generating a third image by combining the aforementioned collage image and the aforementioned composite mask.

[0097] (Note 2) The method described in Appendix 1, Generating a hand mask based on the hand region in the first image is: The keypoints of the fingers, wrist, and elbow in the hand region are detected; The hand boundary frame is calculated based on the finger keypoints in the aforementioned hand area; An elliptic mask is generated based on the aforementioned hand bounding frame; and This includes generating a rectangular mask based on the wrist keypoint and the elbow keypoint, The rectangular mask is connected to the elliptical mask.

[0098] (Note 3) The method described in Appendix 2, When the rectangular mask generated based on the wrist keypoint and the elbow keypoint is not connected to the elliptical mask, the length of the rectangular mask is extended to cause it to connect to the elliptical mask.

[0099] (Note 4) The method described in Appendix 2, The width of the rectangular mask is equal to the average value of the sum of the radii of the elliptical mask in two directions; and / or The length of the rectangular mask is greater than or equal to the length between the wrist keypoint and the elbow keypoint.

[0100] (Note 5) The method described in Appendix 1, The aforementioned synthetic mask includes a first mask, a second mask, and a third mask. The first mask corresponds to a mask region that includes only the object region mask; The second mask corresponds to a mask region that includes only the hand mask; and The third mask corresponds to the overlapping mask area of ​​the object area mask and the hand mask.

[0101] (Note 6) The method described in Appendix 1, Generating a collage image by collaging the aforementioned synthesized image with the first image is, Based on the object region mask, the collage region in the first image is determined; and This method includes collaging the synthesized images into the collage area to generate the collage image.

[0102] (Note 7) The method described in Appendix 1, The enhancement process includes at least one of the following processes: namely, mirroring, rotation, and translation.

[0103] (Note 8) A storage medium that stores computer-readable programs, The computer-readable program causes a processor connected to the storage medium to execute the image generation method described in any one of the appendices 1 to 7.

[0104] Although preferred embodiments of the present invention have been described above, the present invention is not limited to these embodiments, and any modification to the present invention that does not deviate from the spirit of the invention falls within the technical scope of the present invention.

Claims

1. A device for generating images, A mask generation device that generates a hand mask based on the hand region in the first image, and generates a composite mask based on the hand mask and the object region mask; A synthesis apparatus that performs at least one enhancement process on a second image, synthesizes the second image and the image after the enhancement process, or synthesizes multiple images after the enhancement process, and generates a collage image by collaging the synthesized image with the first image; and An apparatus including a stitching device that generates a third image by stitching together the aforementioned collage image and the aforementioned composite mask.

2. The apparatus according to claim 1, Generating a hand mask based on the hand region in the first image is: The finger keypoints and elbow keypoints in the hand region are detected; The hand boundary frame is calculated based on the finger keypoints in the aforementioned hand region; An ellipse mask is generated based on the aforementioned hand bounding frame; and This includes generating a rectangular mask based on the wrist keypoint and the elbow keypoint, The rectangular mask is connected to the elliptical mask in the device.

3. The apparatus according to claim 2, A device that extends the length of a rectangular mask so that it connects to an elliptical mask when the rectangular mask generated based on the wrist keypoint and the elbow keypoint is not connected to the elliptical mask.

4. The apparatus according to claim 2, The width of the rectangular mask is equal to the average value of the sum of the radii of the elliptical mask in two directions; and / or The device wherein the length of the rectangular mask is greater than or equal to the distance between the wrist keypoint and the elbow keypoint.

5. The apparatus according to claim 1, The aforementioned synthetic mask includes a first mask, a second mask, and a third mask. The first mask corresponds to a mask region that includes only the object region mask; The second mask corresponds to a mask region that includes only the hand mask; and The third mask corresponds to the overlapping mask region of the object region mask and the hand mask.

6. The apparatus according to claim 1, Generating a collage image by collaging the synthesized image and the first image is, Based on the object region mask, the collage region in the first image is determined; and An apparatus comprising generating a collage image by collaging the synthesized images into the collage area.

7. The apparatus according to claim 1, The apparatus wherein the enhancement process includes at least one of a mirroring process, a rotation process, and a translation process.

8. A method for generating an image, A hand mask is generated based on the hand region in the first image, and a composite mask is generated based on the hand mask and the object region mask; Performing at least one enhancement process on the second image, compositing the second image and the image after the enhancement process, or compositing multiple images after the enhancement process, and generating a collage image by collaging the composite image and the first image; and A method comprising generating a third image by combining the collage image and the composite mask.

9. The method according to claim 8, Generating a hand mask based on the hand region in the first image is: The finger keypoints and elbow keypoints in the hand region are detected; The hand boundary frame is calculated based on the finger keypoints in the aforementioned hand region; An ellipse mask is generated based on the aforementioned hand bounding frame; and This includes generating a rectangular mask based on the wrist keypoint and the elbow keypoint, A method in which the rectangular mask is connected to the elliptical mask.

10. Electronic device including the apparatus described in any one of claims 1 to 7.