Electronic device for generating image, and operating method thereof

The electronic device addresses the challenge of high-quality image editing by using a processor and image generation model to perform painting operations based on characteristic information from associated images, effectively filling in deleted parts and expanding image context.

WO2025095448A1PCT designated stage expired Publication Date: 2025-05-08SAMSUNG ELECTRONICS CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2024/016179
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-20
Filing Date
2024-10-23
Publication Date
2025-05-08

AI Technical Summary

Technical Problem

Users of electronic devices are seeking high-quality image editing capabilities similar to those found in high-end camera equipment, but existing devices struggle to efficiently edit images by filling in deleted parts or expanding the image context.

Method used

The electronic device employs a processor and image generation model to perform painting operations, such as in-painting and out-painting, using characteristic information from associated images to generate missing or expanded image parts.

Benefits of technology

This solution enables the electronic device to generate high-quality images by filling in deleted parts or expanding the image context, resulting in images that are contextually consistent and visually appealing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2024016179_08052025_PF_FP_ABST
    Figure KR2024016179_08052025_PF_FP_ABST
Patent Text Reader

Abstract

An electronic device according to one embodiment may comprise at least one processor and a memory for storing instructions. According to one embodiment, when the instructions are collectively or individually executed by the at least one processor, the electronic device can: respond to a first command of editing a first image stored in the memory, so as to check at least one second image, which has an acquisition time similar to that of the first image stored in the memory or is related to a subject included in the first image; obtain, from the at least one second image, feature information for generating an image corresponding to a deleted first portion in the first image or to a second portion to be extended outside the first image; use the first image and the feature information so as to perform a painting operation in which the image corresponding to the first portion or the second portion of the first image is generated; and acquire a third image including the first image and the image, corresponding to a first portion or a second portion, generated on the basis of the painting operation.
Need to check novelty before this filing date? Find Prior Art

Description

Electronic device for generating images and method of operating the same

[0001] The present disclosure relates to an electronic device for generating an image and a method of operating the same.

[0002] Thanks to remarkable advancements in information and communication technology and semiconductor technology, the proliferation and use of various electronic devices is rapidly increasing. Electronic devices are being developed to enable users to carry and communicate with one another. An electronic device can refer to any device that performs a specific function based on its embedded software, such as a mobile communication terminal, tablet PC, audio / video device, desktop / laptop computer, or in-car navigation system.

[0003] Recently, users have become increasingly interested in acquiring high-quality images, beyond simply capturing them using electronic devices. Electronic devices offer image editing capabilities. Using image editing applications, electronic devices can provide users with an environment where they can edit images stored on their devices.

[0004] In one embodiment, an electronic device may include at least one processor and a memory storing instructions. In one embodiment, when the instructions are collectively or individually executed by the at least one processor, the electronic device may, in response to a first command for editing a first image stored in the memory, identify at least one second image having a similar acquisition time to the first image stored in the memory or related to a subject included in the first image. In one embodiment, when the instructions are collectively or individually executed by the at least one processor, the electronic device may, from the at least one second image, obtain feature information for generating an image corresponding to a deleted first portion inside the first image or a second portion to be expanded outside the first image. In one embodiment, when the instructions are collectively or individually executed by the at least one processor, the electronic device may perform a painting operation for generating the image corresponding to the first portion or the second portion of the first image using the first image and the feature information. In one embodiment, when the instructions are collectively or individually executed by the at least one processor, the electronic device may obtain a third image including the image corresponding to the first portion or the second portion generated based on the first image and the painting operation.

[0005] In one embodiment, a method of operating an electronic device may include, in response to a first command for editing a first image stored in the electronic device, an operation of identifying at least one second image, the second image having a similar acquisition time to the first image stored in the memory or related to a subject included in the first image. In one embodiment, the method of operating the electronic device may include an operation of acquiring feature information for generating an image corresponding to a deleted first portion inside the first image or a second portion to be expanded outside the first image from the at least one second image. In one embodiment, the method of operating the electronic device may include an operation of performing a painting operation for generating the image corresponding to the first portion or the second portion of the first image using the first image and the feature information. In one embodiment, the method of operating the electronic device may include an operation of acquiring a third image including the image corresponding to the first portion or the second portion generated based on the first image and the painting operation.

[0006] In one embodiment, a non-transitory computer-readable recording medium may store instructions. In one embodiment, the instructions, when collectively or individually executed by at least one processor, may cause an electronic device, in response to a first command for editing a first image stored in the electronic device, to identify at least one second image, the second image having a similar acquisition time to the first image stored in the electronic device or related to a subject included in the first image. In one embodiment, the instructions, when collectively or individually executed by the at least one processor, may cause the electronic device to obtain feature information for generating an image corresponding to a deleted first portion inside the first image or a second portion to be expanded outside the first image from the at least one second image. In one embodiment, the instructions, when collectively or individually executed by the at least one processor, may cause the electronic device to perform a painting operation that generates the image corresponding to the first portion or the second portion of the first image using the first image and the feature information. In one embodiment, the instructions, when collectively or individually executed by the at least one processor, may cause the electronic device to obtain a third image that includes the image corresponding to the first portion or the second portion generated based on the first image and the painting operation.

[0007] FIG. 1 is a block diagram of an electronic device within a network environment, according to one embodiment.

[0008] FIG. 2A is a diagram illustrating a method of performing an in-painting operation on a first image to obtain an image according to one embodiment.

[0009] FIG. 2b is a diagram illustrating a method of obtaining an image by performing an out-painting operation on a first image according to one embodiment.

[0010] FIG. 3 is a drawing illustrating a method of obtaining an image by performing an out-painting operation on a first image according to a comparative example.

[0011] FIG. 4 is a block diagram of a configuration of an electronic device according to one embodiment.

[0012] FIG. 5 is a block diagram of an AI model including an image generation model and a feature extraction model, according to one embodiment.

[0013] FIG. 6 is a flowchart illustrating a method for an electronic device to perform a painting operation on a first image, according to one embodiment.

[0014] FIG. 7 is a flowchart illustrating a method for an electronic device to perform a painting operation on a first image, according to one embodiment.

[0015] FIG. 8 is a diagram illustrating a method for an electronic device to perform a painting operation on a first image, according to one embodiment.

[0016] FIG. 9 is a diagram illustrating a method for an electronic device to extract text from feature information according to one embodiment.

[0017] FIG. 10 is a diagram illustrating a method for an electronic device to obtain a text prompt, according to one embodiment.

[0018] FIG. 1 is a block diagram of an electronic device (101) within a network environment (100), according to one embodiment. Referring to FIG. 1 , in the network environment (100), the electronic device (101) may communicate with the electronic device (102) via a first network (198) (e.g., a short-range wireless communication network), or may communicate with at least one of the electronic device (104) or the server (108) via a second network (199) (e.g., a long-range wireless communication network). In one embodiment, the electronic device (101) may communicate with the electronic device (104) via the server (108). According to one embodiment, the electronic device (101) may include a processor (120), a memory (130), an input module (150), an audio output module (155), a display module (160), an audio module (170), a sensor module (176), an interface (177), a connection terminal (178), a haptic module (179), a camera module (180), a power management module (188), a battery (189), a communication module (190), a subscriber identification module (196), or an antenna module (197). In some embodiments, the electronic device (101) may omit at least one of these components (e.g., the connection terminal (178)), or may have one or more other components added. In some embodiments, some of these components (e.g., the sensor module (176), the camera module (180), or the antenna module (197)) may be integrated into one component (e.g., the display module (160)).

[0019] The processor (120) may, for example, execute software (e.g., a program (140)) to control at least one other component (e.g., a hardware or software component) of the electronic device (101) connected to the processor (120) and perform various data processing or operations. According to one embodiment, as at least a part of the data processing or operations, the processor (120) may store commands or data received from other components (e.g., a sensor module (176) or a communication module (190)) in a volatile memory (132), process the commands or data stored in the volatile memory (132), and store result data in a non-volatile memory (134). According to one embodiment, the processor (120) may include a main processor (121) (e.g., a central processing unit or an application processor) or an auxiliary processor (123) (e.g., a graphics processing unit, a neural processing unit (NPU), an image signal processor, a sensor hub processor, or a communication processor) that can operate independently or together with the main processor (121). For example, when the electronic device (101) includes the main processor (121) and the auxiliary processor (123), the auxiliary processor (123) may be configured to use less power than the main processor (121) or to be specialized for a given function. The auxiliary processor (123) may be implemented separately from the main processor (121) or as a part thereof.

[0020] The auxiliary processor (123) may control at least a portion of functions or states associated with at least one component (e.g., a display module (160), a sensor module (176), or a communication module (190)) of the electronic device (101), for example, on behalf of the main processor (121) while the main processor (121) is in an inactive (e.g., sleep) state, or together with the main processor (121) while the main processor (121) is in an active (e.g., application execution) state. In one embodiment, the auxiliary processor (123) (e.g., an image signal processor or a communication processor) may be implemented as a part of another functionally related component (e.g., a camera module (180) or a communication module (190)). In one embodiment, the auxiliary processor (123) (e.g., a neural network processing unit) may include a hardware structure specialized for processing artificial intelligence models. The artificial intelligence models may be generated through machine learning. This learning can be performed, for example, on the electronic device (101) itself where the artificial intelligence model is executed, or can be performed through a separate server (e.g., server (108)). The learning algorithm can include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but is not limited to the examples described above. The artificial intelligence model can include multiple artificial neural network layers.The artificial neural network may be one of a deep neural network (DNN), a convolutional neural network (CNN), a recurrent neural network (RNN), a restricted Boltzmann machine (RBM), a deep belief network (DBN), a bidirectional recurrent deep neural network (BRDNN), a deep Q-network, or a combination of two or more of the above, but is not limited to the examples described above. In addition to, or alternatively to, a hardware structure, an artificial intelligence model may include a software structure.

[0021] The memory (130) can store various data used by at least one component (e.g., processor (120) or sensor module (176)) of the electronic device (101). The data can include, for example, software (e.g., program (140)) and input data or output data for commands related thereto. The memory (130) can include volatile memory (132) or non-volatile memory (134).

[0022] The program (140) may be stored as software in the memory (130) and may include, for example, an operating system (142), middleware (144), or an application (146).

[0023] The input module (150) can receive commands or data to be used in a component of the electronic device (101) (e.g., a processor (120)) from an external source (e.g., a user) of the electronic device (101). The input module (150) can include, for example, a microphone, a mouse, a keyboard, a key (e.g., a button), or a digital pen (e.g., a stylus pen).

[0024] The audio output module (155) can output audio signals to the outside of the electronic device (101). The audio output module (155) can include, for example, a speaker or a receiver. The speaker can be used for general purposes, such as multimedia playback or recording playback. The receiver can be used to receive incoming calls. In one embodiment, the receiver can be implemented separately from the speaker or as part of the speaker.

[0025] The display module (160) can visually provide information to an external party (e.g., a user) of the electronic device (101). The display module (160) may include, for example, a display, a holographic device, or a projector and a control circuit for controlling the device. According to one embodiment, the display module (160) may include a touch sensor configured to detect a touch, or a pressure sensor configured to measure the intensity of a force generated by the touch.

[0026] The audio module (170) can convert sound into an electrical signal, or vice versa, convert an electrical signal into sound. According to one embodiment, the audio module (170) can acquire sound through the input module (150), output sound through the sound output module (155), or an external electronic device (e.g., electronic device (102)) (e.g., speaker or headphone) directly or wirelessly connected to the electronic device (101).

[0027] The sensor module (176) can detect the operating status (e.g., power or temperature) of the electronic device (101) or the external environmental status (e.g., user status) and generate an electrical signal or data value corresponding to the detected status. According to one embodiment, the sensor module (176) can include, for example, a gesture sensor, a gyro sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biometric sensor, a temperature sensor, a humidity sensor, or an illuminance sensor.

[0028] The interface (177) may support one or more designated protocols that may be used to directly or wirelessly connect the electronic device (101) with an external electronic device (e.g., the electronic device (102)). In one embodiment, the interface (177) may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.

[0029] The connection terminal (178) may include a connector through which the electronic device (101) may be physically connected to an external electronic device (e.g., electronic device (102)). According to one embodiment, the connection terminal (178) may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).

[0030] The haptic module (179) can convert electrical signals into mechanical stimuli (e.g., vibration or movement) or electrical stimuli that a user can perceive through tactile or kinesthetic sensations. According to one embodiment, the haptic module (179) can include, for example, a motor, a piezoelectric element, or an electrical stimulation device.

[0031] The camera module (180) can capture still images and videos. According to one embodiment, the camera module (180) may include one or more lenses, image sensors, image signal processors, or flashes.

[0032] The power management module (188) can manage power supplied to the electronic device (101). According to one embodiment, the power management module (188) can be implemented as, for example, at least a part of a power management integrated circuit (PMIC).

[0033] A battery (189) may power at least one component of the electronic device (101). In one embodiment, the battery (189) may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.

[0034] The communication module (190) may support the establishment of a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device (101) and an external electronic device (e.g., electronic device (102), electronic device (104), or server (108)), and the performance of communication through the established communication channel. The communication module (190) may operate independently from the processor (120) (e.g., application processor) and may include one or more communication processors that support direct (e.g., wired) communication or wireless communication. According to one embodiment, the communication module (190) may include a wireless communication module (192) (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module (194) (e.g., a local area network (LAN) communication module, or a power line communication module). Among these communication modules, the corresponding communication module can communicate with an external electronic device (104) via a first network (198) (e.g., a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network (199) (e.g., a long-range communication network such as a legacy cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (e.g., a LAN or WAN)). These various types of communication modules can be integrated into a single component (e.g., a single chip) or implemented as multiple separate components (e.g., multiple chips). The wireless communication module (192) can verify or authenticate the electronic device (101) within a communication network such as the first network (198) or the second network (199) by using subscriber information (e.g., an international mobile subscriber identity (IMSI)) stored in the subscriber identification module (196).

[0035] The wireless communication module (192) can support 5G networks and next-generation communication technologies following the 4G network, such as NR access technology (new radio access technology). The NR access technology can support high-speed transmission of high-capacity data (eMBB (enhanced mobile broadband)), minimization of terminal power and connection of multiple terminals (mMTC (massive machine type communications)), or high reliability and low latency (URLLC (ultra-reliable and low-latency communications)). The wireless communication module (192) can support, for example, a high-frequency band (e.g., mmWave band) to achieve a high data transmission rate. The wireless communication module (192) can support various technologies for securing performance in a high-frequency band, such as beamforming, massive multiple-input and multiple-output (MIMO), full dimensional MIMO (FD-MIMO), array antenna, analog beam-forming, or large scale antenna. The wireless communication module (192) can support various requirements specified in the electronic device (101), an external electronic device (e.g., the electronic device (104)), or a network system (e.g., the second network (199)). According to one embodiment, the wireless communication module (192) can support a peak data rate (e.g., 20 Gbps or more) for eMBB realization, a loss coverage (e.g., 164 dB or less) for mMTC realization, or a U-plane latency (e.g., 0.5 ms or less for downlink (DL) and uplink (UL), or 1 ms or less for round trip) for URLLC realization.

[0036] The antenna module (197) can transmit or receive signals or power to or from an external device (e.g., an external electronic device). In one embodiment, the antenna module (197) may include an antenna including a radiator formed of a conductor or a conductive pattern formed on a substrate (e.g., a PCB). In one embodiment, the antenna module (197) may include a plurality of antennas (e.g., an array antenna). In this case, at least one antenna suitable for a communication method used in a communication network, such as the first network (198) or the second network (199), may be selected from the plurality of antennas, for example, by the communication module (190). A signal or power may be transmitted or received between the communication module (190) and an external electronic device via the at least one selected antenna. In some embodiments, in addition to the radiator, another component (e.g., a radio frequency integrated circuit (RFIC)) may be additionally formed as a part of the antenna module (197).

[0037] According to various embodiments, the antenna module (197) may form a mmWave antenna module. In one embodiment, the mmWave antenna module may include a printed circuit board, an RFIC disposed on or adjacent a first side (e.g., a bottom side) of the printed circuit board and capable of supporting a designated high-frequency band (e.g., a mmWave band), and a plurality of antennas (e.g., an array antenna) disposed on or adjacent a second side (e.g., a top side or a side side) of the printed circuit board and capable of transmitting or receiving signals in the designated high-frequency band.

[0038] At least some of the above components can be interconnected and exchange signals (e.g., commands or data) with each other via a communication method between peripheral devices (e.g., a bus, GPIO (general purpose input and output), SPI (serial peripheral interface), or MIPI (mobile industry processor interface)).

[0039] According to one embodiment, commands or data may be transmitted or received between the electronic device (101) and an external electronic device (104) via a server (108) connected to a second network (199). Each of the external electronic devices (102 or 104) may be the same or a different type of device as the electronic device (101). According to one embodiment, all or part of the operations executed in the electronic device (101) may be executed in one or more of the external electronic devices (102, 104, or 108). For example, when the electronic device (101) is to perform a certain function or service automatically or in response to a request from a user or another device, the electronic device (101) may, instead of or in addition to executing the function or service itself, request one or more external electronic devices to perform the function or at least a part of the service. One or more external electronic devices that receive the request may execute at least a portion of the requested function or service, or an additional function or service related to the request, and transmit the result of the execution to the electronic device (101). The electronic device (101) may process the result as is or additionally and provide it as at least a portion of a response to the request. For this purpose, cloud computing, distributed computing, mobile edge computing (MEC), or client-server computing technology may be used, for example. The electronic device (101) may provide an ultra-low latency service by using distributed computing or mobile edge computing, for example. In another embodiment, the external electronic device (104) may include an Internet of Things (IoT) device. The server (108) may be an intelligent server utilizing machine learning and / or a neural network. According to one embodiment, the external electronic device (104) or the server (108) may be included in the second network (199).The electronic device (101) can be applied to intelligent services (e.g., smart home, smart city, smart car, or healthcare) based on 5G communication technology and IoT-related technology.

[0040] In the detailed description below, reference numerals in the drawings may be used interchangeably or omitted for components that can be easily understood through the preceding embodiments, and their detailed descriptions may also be omitted. An electronic device according to an embodiment disclosed in this document may be implemented by selectively combining components of different embodiments, and components of one embodiment may be replaced by components of another embodiment. For example, it should be noted that the present invention is not limited to specific drawings or embodiments.

[0041] FIG. 2A is a diagram illustrating a method for obtaining an image by performing an in-painting operation on a first image according to one embodiment. FIG. 2B is a diagram illustrating a method for obtaining an image by performing an out-painting operation on a first image according to one embodiment.

[0042] Referring to FIGS. 2A and 2B , according to an embodiment, an electronic device (e.g., the electronic device 101 of FIG. 1 or the electronic device 201 of FIG. 4 ) may store an image generation model (202). The image generation model (202) may include at least one artificial intelligence (AI) model. For example, the at least one AI model may include a generative AI model. For example, the generative AI model may use existing content, such as text, audio, and / or images, to generate new content similar to the existing content. For example, the generative AI model may learn patterns of the content and generate new content as an inference result. For example, the image generation model (202) may perform at least one of an in-painting operation or an out-painting operation on a first image (271 or 276) to generate (or obtain, output) a second image (273 or 278).

[0043] In one embodiment, the in-painting operation may refer to an operation (or function) of creating (or coloring) a deleted portion of an image to match its surroundings using an AI model. Alternatively, the in-painting operation may refer to an operation of creating (or coloring) a portion of an image obscured by some object to match its surroundings using an AI model.

[0044] In one embodiment, an out-painting operation may represent an operation (or function) of expanding an outer area of ​​an image using an AI model, and creating (or coloring) the expanded portion to match the existing image.

[0045] Referring to FIG. 2A, according to one embodiment, the first image (271) may include an image in which a portion corresponding to an object (272) is deleted (or removed). For example, the first image (271) may be an image stored in the electronic device (101 or 201).

[0046] According to one embodiment, the image generation model (202) can perform an in-painting operation on the first image (271) to generate (e.g., colorize) an image of a portion (272) corresponding to an object so that the portion (272) matches the surrounding background (or surrounding object). That is, the image generation model (202) can generate an image (e.g., pixel values ​​of the portion (272)) of a deleted portion (272) within the first image. The image generation model (202) can output a second image (273) including the image generated by the in-painting operation.

[0047] According to one embodiment, the first image (271) may include an image including an object (272). The image generation model (202) may perform an in-painting operation on the first image (271) to generate (e.g., colorize) an image of a portion (272) that was covered by the object so that the portion (272) matches the surrounding background (or surrounding object). That is, the image generation model (202) may generate an image (e.g., pixel values ​​of the portion (272)) for the portion (272) covered by the object within the first image (271). The image generation model (202) may output a second image (273) including the image generated by the in-painting operation.

[0048] Referring to FIG. 2B, according to one embodiment, the first image (276) may include an image that includes a portion of an object (e.g., a human subject). For example, the first image (276) may be an image stored in the electronic device (101 or 201).

[0049] According to one embodiment, the image generation model (202) can perform an out-painting operation on the first image (276) to expand the first image (276) such that the remaining portion of the object in the first image (276) and / or the background of the first image (276) matches the first image (276). For example, the image generation model (202) can expand the first image to a specified range (e.g., a range specified based on a display screen size or a size specified by a user). For example, for an electronic device including a rollable display or a foldable display, the image generation model can expand the first image based on an expanded display screen size (or a display area of ​​an expanded display). For example, the image generation model (202) can generate the remaining portion of the object in the first image (276) if the object does not represent the entire object. The image generation model (202) can expand the background of the first image (276) to a specified range. At this time, the image generation model (202) can generate (e.g., colorize) an image of an extended portion outside the first image (276). The image generation model (202) can output a second image (278) that includes the existing first image (276) and an image newly generated by the out-painting operation.

[0050] FIG. 3 is a drawing illustrating a method of obtaining an image by performing an out-painting operation on a first image according to a comparative example.

[0051] Referring to FIG. 3, according to a comparative example, the image generation model (202) can generate a second image (293) based on the first image (291). At this time, since the image generation model (202) generates the second image (293) based on the first image (291) input to the image generation model (202), it may generate a person or background that does not fit the context of the first image (291). For example, the image generation model (202) may recognize the “fur cushion” on which the “person” lying in the first image (291) is “cat’s fur” and generate the second image (293) that includes the “cat”. That is, the second image (293) may include an image that does not fit the context of the existing first image (291), such as a “person” lying on a “cat”.

[0052] In one embodiment of the present disclosure, when performing a painting operation (e.g., an in-painting operation or an out-painting operation) on a first image using an image generation model (202), information on another image related to the first image (e.g., feature information on another image) can be input into the image generation model (202). The image generation model (202) can perform a painting operation (e.g., an in-painting operation or an out-painting operation) on the first image by further considering information on other images related to the first image as well as the first image. Through this, the image generation model (202) according to one embodiment can generate (or output) an image that fits the context of the existing first image (291). In addition, the electronic device (101 or 201) according to one embodiment can reduce the sense of incongruity of an image generated using the image generation model (202) and generate an image based on reality.

[0053] FIG. 4 is a block diagram of a configuration of an electronic device according to one embodiment.

[0054] Referring to FIG. 4, an electronic device (201) according to one embodiment (e.g., the electronic device (101) of FIG. 1)

[0055] According to one embodiment, the electronic device (201) may include a camera (207), a processor (220), a memory (230), a communication module (250), and a display (260). For example, the electronic device (201) may be implemented in the same or similar manner as the electronic device (101) of FIG. 1.

[0056] According to one embodiment, the electronic device (201) may generate an image of a deleted first portion inside a first image or an expanded second portion outside the first image using an image generation model (202). The electronic device (201) may acquire or output an image that further includes an image of a newly generated first portion or second portion in an existing first image using the image generation model (202). For example, the image generation model (202) may include a pre-trained AI model and may be stored in the memory (230).

[0057] According to one embodiment, the processor (220) may control the overall operation of the electronic device (201). For example, the processor (220) may be implemented identically or similarly to the processor (120) of FIG. 1.

[0058] According to one embodiment, the processor (220) may confirm a first command for editing a first image stored in the memory (230). For example, when a specified user input (e.g., touch input, gesture input, or voice input) is confirmed, the processor (220) may confirm the first command for editing the first image. For example, the operation for editing the first image may include an operation for performing a painting operation (e.g., an in-painting operation and / or an out-painting operation) on the first image. For example, the first image may include an image captured using the camera (207). Alternatively, the first image may include an image received or acquired from an external electronic device.

[0059] According to one embodiment, the processor (220) may, in response to a first command, identify a second image having a high correlation with the first image from among a plurality of images stored in the memory (230). For example, the processor (220) may determine at least one image including a person, an animal, an object, a background, or a place included in the first image from among a plurality of images stored in the memory (230) as the second image having a high correlation with the first image. For example, the processor (220) may identify the second image having a high correlation with the first image by using at least one of the time, place, or scene analysis of the images being captured. For example, the processor (220) may determine or identify an image having a similar acquisition time (e.g., capture time) to the first image as the second image. The processor (220) may determine or identify an image including a subject (e.g., a person or an animal) included in the first image as the second image. Alternatively, the processor (220) may determine or identify an image captured at the same location as the first image as the second image.

[0060] According to one embodiment, the processor (220) may determine, as the second image, at least one image including the same person as the person included in the first image among images acquired on the same day as the acquisition date of the first image. According to another embodiment, the processor (220) may determine, as the at least one second image, at least one image acquired before a specified time (e.g., 30 minutes) or after the specified time based on the acquisition time of the first image among a plurality of images stored in the memory (230).

[0061] According to one embodiment, the processor (220) may extract or obtain feature information from the second image. For example, the feature information may include information for generating a deleted first portion inside the first image or an expanded second portion outside the first image from the second image. For example, the feature information may include information about at least one of a color, a shape, a form, an object, a background, or a composition of the second image. For example, the feature information may include a text guide, a feature map, or a face feature. For example, the processor (220) may obtain a feature map including values ​​representing features of the second image. For example, the feature map may include information representing a color, a shape, a form, an object, a background, or a composition of the second image as a specific value (e.g., a vector value). Depending on the implementation, the processor (220) may also obtain information about a text guide and / or a face feature using the feature map.

[0062] According to one embodiment, the processor (220) may perform a painting operation to generate an image corresponding to a first portion of the first image or the second portion using the first image and feature information. For example, the processor (220) may perform an in-painting operation to generate a first portion of the first image using the image generation model (202). Additionally, the processor (220) may perform an out-painting operation to generate a second portion of the first image using the image generation model (202). For example, the processor (220) may input the first image, feature information, and a text prompt that commands a painting operation (e.g., an in-painting operation or an out-painting operation) for the first image to the image generation model (202) to perform the painting operation to generate an image corresponding to the first portion of the first image or the second portion.

[0063] According to one embodiment, the processor (220) may obtain a prompt (or prompt data) for generating an image corresponding to the first part or the second part of the first image from feature information of the second image using a feature extraction model stored in the memory (e.g., the feature extraction model (205) of FIG. 5). For example, the processor (220) may obtain a first text for generating an image corresponding to the first part or the second part of the first image from feature information of the second image using a feature extraction model stored in the memory (e.g., the feature extraction model (205) of FIG. 5). For example, the first text may include text (or text prompt) indicating at least one of a color, a shape, a form, an object, a background, or a composition of the second image for generating the first part or the second part of the first image.

[0064] According to one embodiment, the processor (220) may generate a text prompt for generating an image corresponding to a first portion or a second portion of the first image based on the first text. For example, the text prompt (or text instruction) may include a command in the form of text that the image generation model (202) can recognize. For example, the text prompt may include a command that causes the artificial intelligence model to perform a painting operation on the first image.

[0065] According to one embodiment, the processor (220) may obtain a third image, which includes the first image as a result of the painting operation and an image corresponding to the first portion or the second portion generated based on the painting operation. For example, the third image may include an image in which a first portion that was deleted or obscured by a specific object in the original first image is generated (e.g., reproduced, colored, or added) by in-painting the first image. Alternatively, the third image may include an image further including an image corresponding to a second portion generated by out-painting the first image.

[0066] An electronic device (201) according to an embodiment may further input feature information regarding not only the first image but also other images related to the first image into an image generation model (202), thereby performing a painting operation (e.g., an in-painting operation or an out-painting operation) on the first image. Through this, the electronic device (201) according to an embodiment may generate (e.g., acquire or output) an in-painted or out-painted image (e.g., a third image) that fits the context of the existing first image. For example, the electronic device (201) may display the third image on the display (260).

[0067] FIG. 5 is a block diagram of an AI model including an image generation model and a feature extraction model, according to one embodiment.

[0068] Referring to FIG. 5, according to one embodiment, an AI model (210) may be stored in a memory (230) (e.g., the memory (230) of FIG. 4) of an electronic device (201) (e.g., the electronic device (201) of FIG. 4). The AI ​​model (210) may be pre-trained. For example, the AI ​​model (210) may be trained by the electronic device (201) or trained by an external electronic device. For example, the AI ​​model (210) may be implemented by at least one of software and hardware.

[0069] According to one embodiment, the AI ​​model (210) may include an image generation model (202) and a feature extraction model (205). The image generation model (202) and the feature extraction model (205) may be implemented as separate AI models. Alternatively, unlike as illustrated in FIG. 5, the image generation model (202) and the feature extraction model (205) may be implemented as a single AI model.

[0070] According to one embodiment, the feature extraction model (205) may extract or obtain feature information for generating an image corresponding to a first portion or a second portion of the first image from a second image related to the first image among a plurality of images stored in the memory (230). The feature extraction model (205) may provide the feature information to the image generation model (202). For example, the feature extraction model (205) may obtain, as the feature information, a first text for generating an image corresponding to the first portion or the second portion of the first image. For example, the first text may include text indicating at least one of a color, a shape, a form, an object, a background, or a composition of the second image for generating the first portion or the second portion of the first image.

[0071] In one embodiment, the processor (220) (e.g., the processor (220) of FIG. 4 ) may generate a text prompt for generating an image corresponding to a first portion or a second portion of a first image based on a first text. For example, the text prompt (or text command) may include a command in the form of text that the image generation model (202) can recognize.

[0072] In one embodiment, the image generation model (202) may receive a first image, feature information, and a text prompt as input, and output a third image. In one embodiment, the image generation model (202) may initiate a painting operation on the first image based on the text prompt. At this time, the image generation model (202) may generate an image corresponding to a first portion or a second portion of the first image based on the feature information. For example, the third image may include an image in which a first portion that was deleted from the original first image or covered by a specific object is generated (e.g., reproduced, colored, or added) by in-painting the first image. Alternatively, the third image may include an image further including an image corresponding to a second portion generated by out-painting the first image.

[0073] Based on the above-described method, the electronic device (201) according to one embodiment can generate (e.g., acquire or output) an in-painted or out-painted image (e.g., a third image) that fits the context of the existing first image.

[0074] At least some of the operations of the electronic device (201) described below may be performed by the processor (220) or the AI ​​model (210). However, for convenience of explanation, the operations below will be described as being performed by the electronic device (201).

[0075] FIG. 6 is a flowchart illustrating a method for an electronic device to perform a painting operation on a first image, according to one embodiment.

[0076] Referring to FIG. 6, according to one embodiment, in operation 601, the electronic device (201) (e.g., the electronic device (201) of FIG. 4) may, in response to a first command to edit a first image, identify at least one second image having a similar acquisition time to the first image or related to a subject (or background) included in the first image.

[0077] According to one embodiment, in operation 603, the electronic device (201) may obtain feature information for generating an image corresponding to a deleted first portion inside the first image or an expanded second portion outside the first image from at least one second image.

[0078] According to one embodiment, in operation 605, the electronic device (201) may perform a painting operation to generate an image corresponding to a first portion or a second portion of the first image using the first image and the feature information. For example, the electronic device (201) may obtain a text prompt (or text command) for performing a painting operation on the first image based on the feature information (e.g., text representing a feature of the second image). The electronic device (201) may input the text prompt, the first image, and the feature information into an image generation model (e.g., the image generation model (202) of FIG. 5) to perform a painting operation (e.g., an in-painting operation or an out-painting operation) on the first image. The electronic device (201) may generate an image corresponding to the first portion or the second portion based on the painting operation.

[0079] In one embodiment, at operation 607, the electronic device (201) may obtain a third image including an image generated based on the first image and the painting operation. For example, the image generation model (202) may output the third image as a result of the painting operation on the first image.

[0080] FIG. 7 is a flowchart illustrating a method for an electronic device to perform a painting operation on a first image, according to one embodiment.

[0081] Referring to FIG. 7, according to one embodiment, in operation 701, the electronic device (201) may obtain a first text related to an image corresponding to a first portion or a second portion of a first image from feature information of a second image using a first AI model (e.g., a feature extraction model (205) of FIG. 5). For example, the first text may include text representing information for a painting operation for the first image among features of the second image.

[0082] In one embodiment, at operation 703, the electronic device (201) may obtain a text prompt for generating an image corresponding to a first portion or a second portion of the first image based on the first text. For example, the text prompt may include a command (or text) that instructs a second AI model (e.g., the image generation model (202) of FIG. 5) to perform a painting operation on the first image.

[0083] According to one embodiment, in operation 705, the electronic device (201) may input a text prompt, feature information of the second image, and the first image to a second AI model (e.g., the image generation model (202) of FIG. 5) to obtain a third image. For example, the electronic device (201) may input a text prompt, feature information of the second image, and the first image to the second AI model (202) to perform a painting operation (e.g., an in-painting operation or an out-painting operation) on the first image. The electronic device (201) may perform the painting operation to generate or obtain the third image.

[0084] FIG. 8 is a diagram illustrating a method for an electronic device to perform a painting operation on a first image, according to one embodiment.

[0085] Referring to FIG. 8, according to an embodiment, an electronic device (e.g., the electronic device (201) of FIG. 4) may generate an image corresponding to a first portion (815) deleted within a first image (810). For example, the electronic device (201) may perform an in-painting operation on the first image (810) using an image generation model (202) to generate an image corresponding to the first portion (815).

[0086] According to one embodiment, the image generation model (202) may receive feature information of a second image (820) related to the first image (810) to generate an image corresponding to the first portion (815). For example, the second image (820) may be an image that includes the same person as the person included in the first image (810) among images acquired on the same day as the acquisition date of the first image (810). For example, the electronic device (201) may identify the second image (820) that includes the same object as the person included in the first image by analyzing at least one of the shape, clothing, composition, or posture of the person.

[0087] According to one embodiment, the feature extraction model (205) may extract (or obtain) feature information for generating an image corresponding to the first portion (815) of the first image (810) from the second image (820). For example, the feature extraction model (205) may obtain, as feature information, a first text (e.g., the first text (910), the second text (920), and the third text (930) of FIG. 9) for generating an image corresponding to the first portion (815) of the first image (810).

[0088] According to one embodiment, the electronic device (201) may perform an in-painting operation on the first image (810) using the first image and feature information to obtain a third image (830). For example, the third image (830) may include an image corresponding to the first image (810) and the first portion (815) generated by the in-painting operation.

[0089] Based on the above-described method, the electronic device (201) according to one embodiment can generate (e.g., acquire or output) an in-painted image (e.g., a third image) that fits the context of an existing first image.

[0090] Meanwhile, the out-painting operation for the first image (810) according to one embodiment of the present invention can also be performed in the same or similar manner as the in-painting operation described above.

[0091] FIG. 9 is a diagram illustrating a method for an electronic device to extract text from feature information according to one embodiment.

[0092] Referring to FIG. 9, according to an embodiment, an electronic device (e.g., the electronic device (201) of FIG. 4) may obtain feature information of a second image (e.g., the second image (820) of FIG. 8) related to a first image (810) that is a target of regeneration among a plurality of images stored in the electronic device (201). For example, the electronic device (201) may obtain texts (910, 920, and 930) representing features of the second image (820) using a feature extraction model (e.g., the feature extraction model (205) of FIG. 5). For example, when a specific person is included in the second image (820), the texts (910, 920, and 930) may include person information (910), clothing information (920), and background information (930). For example, the person information (910) may include text representing a specific person included in the second image (e.g., “small eyes,” “slightly dark skin,” “smiling expression,” “position of both arms,” “pose of left hand”). For example, the clothing information (920) may include text representing the clothing of a specific person included in the second image (e.g., “white hat,” “spotted shirt,” “blue pants,” “arm sleeves”). For example, the background information (930) may include text representing the background included in the second image (e.g., “trees above,” “shallow water below”).

[0093] According to one embodiment, the electronic device (201) may provide at least one of the person information (910), clothing information (920), and background information (930) to the image generation model (202) to perform a painting operation on the first image.

[0094] FIG. 10 is a diagram illustrating a method for an electronic device to obtain a text prompt, according to one embodiment.

[0095] Referring to FIG. 10, according to one embodiment, an electronic device (e.g., the electronic device (201) of FIG. 4) may obtain a text prompt using feature information (e.g., person information (910), clothing information (920), and background information (930) of FIG. 9) of a second image (e.g., the second image (820) of FIG. 8). For example, the text prompt may include a first text prompt (1010), a second text prompt (1020), and a third text prompt (1030).

[0096] In one embodiment, the first text prompt (1010) may be obtained or generated based on the person information (910). The second text prompt (1020) may be obtained or generated based on the clothing information (920). The third text prompt (1030) may be obtained or generated based on the background information (930).

[0097] According to one embodiment, the electronic device (201) may provide at least one of a first text prompt (1010), a second text prompt (1020), and a third text prompt (1030) to the image generation model (202) to perform a painting operation on the first image.

[0098] Meanwhile, although FIG. 10 illustrates the generation of three different text prompts (1010, 1020, and 1030), this may be merely exemplary. For example, the text prompt provided to the image generation model (202) may be implemented as a single text prompt. For example, a single text prompt may be generated or determined based on the three text prompts (1010, 1020, and 1030).

[0099] As described above, the image generation model (202) can perform a painting operation (e.g., an in-painting operation or an out-painting operation) on the first image by taking into account not only the first image but also information about other images related to the first image (e.g., feature information or text representing the feature). Through this, the image generation model (202) according to one embodiment can generate (or output) an image that fits the context of the existing first image (291). In addition, the electronic device (101 or 201) according to one embodiment can reduce the sense of incongruity of an image generated using the image generation model (202) and generate an image based on reality.

[0100] According to an embodiment, an electronic device may include at least one processor (220) and a memory (230) storing instructions. According to an embodiment, when the instructions are collectively or individually executed by the at least one processor, the electronic device may, in response to a first command for editing a first image stored in the memory, identify at least one second image having a similar acquisition time to the first image stored in the memory or related to a subject included in the first image. According to an embodiment, when the instructions are collectively or individually executed by the at least one processor, the electronic device may obtain feature information for generating an image corresponding to a deleted first portion inside the first image or a second portion to be expanded outside the first image from the at least one second image. In one embodiment, when the instructions are collectively or individually executed by the at least one processor, the electronic device may perform a painting operation that generates the image corresponding to the first portion or the second portion of the first image using the first image and the feature information. In one embodiment, when the instructions are collectively or individually executed by the at least one processor, the electronic device may obtain a third image that includes the image corresponding to the first portion or the second portion generated based on the first image and the painting operation.

[0101] According to one embodiment, when the instructions are collectively or individually executed by the at least one processor, the electronic device may obtain, using the first AI model (205) stored in the memory, a first text for generating the image corresponding to the first part or the second part of the first image from the feature information.

[0102] In one embodiment, when the instructions are collectively or individually executed by the at least one processor, the electronic device may generate a text prompt for generating the image corresponding to the first portion or the second portion of the first image based on the first text.

[0103] In one embodiment, when the instructions are collectively or individually executed by the at least one processor, the electronic device may input the text prompt, the feature information, and the first image to the second AI model (202) stored in the memory, thereby obtaining the third image.

[0104] In one embodiment, when the instructions are collectively or individually executed by the at least one processor, the electronic device may perform an in-painting operation to generate the image corresponding to the first portion of the first image using the second AI model.

[0105] In one embodiment, when the instructions are collectively or individually executed by the at least one processor, the electronic device may perform an out-painting operation to generate the image corresponding to the second portion of the first image using the second AI model.

[0106] According to one embodiment, the feature information may include information about at least one of a color, shape, form, object, background, or composition of the at least one second image.

[0107] According to one embodiment, when the instructions are collectively or individually executed by the at least one processor, the electronic device may determine at least one image including a person, animal, object, background, or place included in the first image among a plurality of images stored in the memory as at least one second image.

[0108] According to one embodiment, when the instructions are collectively or individually executed by the at least one processor, the electronic device may determine at least one image acquired before a specified time or after a specified time based on an acquisition time of the first image among a plurality of images stored in the memory as the at least one second image.

[0109] In one embodiment, when the instructions are collectively or individually executed by the at least one processor, the electronic device may determine, as the at least one second image, at least one image that includes the same person as the person included in the first image among images acquired on the same day as the acquisition date of the first image.

[0110] According to an embodiment, a method of operating an electronic device (201) may include, in response to a first command for editing a first image stored in the electronic device, an operation of identifying at least one second image, the second image having a similar acquisition time as the first image stored in the electronic device or related to a subject included in the first image. According to an embodiment, the method of operating the electronic device may include an operation of acquiring feature information for generating an image corresponding to a deleted first portion inside the first image or a second portion to be expanded outside the first image from the at least one second image. According to an embodiment, the method of operating the electronic device may include an operation of performing a painting operation for generating the image corresponding to the first portion or the second portion of the first image using the first image and the feature information. According to an embodiment, the method of operating the electronic device may include an operation of acquiring a third image including the image corresponding to the first portion or the second portion generated based on the first image and the painting operation.

[0111] According to one embodiment, the method of operating the electronic device may further include an operation of obtaining a first text for generating the image corresponding to the first part or the second part of the first image from the feature information using a first AI model (205) stored in the electronic device.

[0112] According to one embodiment, the method of operating the electronic device may further include generating a text prompt for generating the image corresponding to the first portion or the second portion of the first image based on the first text.

[0113] According to one embodiment, the operation of obtaining the third image may include an operation of obtaining the third image by inputting the text prompt, the feature information, and the first image into a second AI model (202) stored in the electronic device.

[0114] In one embodiment, the act of performing the painting operation may include an act of performing an in-painting operation of generating the image corresponding to the first portion of the first image using the second AI model.

[0115] In one embodiment, the act of performing the painting operation may include an act of performing an out-painting operation that generates the image corresponding to the second portion of the first image using the second AI model.

[0116] According to one embodiment, the feature information may include information about at least one of a color, shape, form, object, background, or composition of the at least one second image.

[0117] According to one embodiment, the method of operating the electronic device may further include an operation of determining at least one image including a person, an animal, an object, a background, or a place included in the first image among a plurality of images stored in the electronic device as at least one second image.

[0118] According to one embodiment, the method of operating the electronic device may further include an operation of determining at least one image acquired before a specified time or after a specified time based on an acquisition time of the first image among a plurality of images stored in the electronic device as the at least one second image.

[0119] In one embodiment, a non-transitory computer-readable recording medium may store instructions. In one embodiment, the instructions, when collectively or individually executed by at least one processor, may cause an electronic device, in response to a first command for editing a first image stored in the electronic device, to identify at least one second image, the second image having a similar acquisition time to the first image stored in the electronic device or related to a subject included in the first image. In one embodiment, the instructions, when collectively or individually executed by the at least one processor, may cause the electronic device to obtain feature information for generating an image corresponding to a deleted first portion inside the first image or a second portion to be expanded outside the first image from the at least one second image. In one embodiment, the instructions, when collectively or individually executed by the at least one processor, may cause the electronic device to perform a painting operation that generates the image corresponding to the first portion or the second portion of the first image using the first image and the feature information. In one embodiment, the instructions, when collectively or individually executed by the at least one processor, may cause the electronic device to obtain a third image that includes the image corresponding to the first portion or the second portion generated based on the first image and the painting operation.

[0120] Electronic devices according to the various embodiments disclosed in this document may take various forms. Electronic devices may include, for example, portable communication devices (e.g., smartphones), computer devices, portable multimedia devices, portable medical devices, cameras, wearable devices, or home appliances. Electronic devices according to the embodiments of this document are not limited to the aforementioned devices.

[0121] The various embodiments of this document and the terminology used therein are not intended to limit the technical features described in this document to specific embodiments, but should be understood to include various modifications, equivalents, or substitutes of the embodiments. In connection with the description of the drawings, similar reference numerals may be used for similar or related components. The singular form of a noun corresponding to an item may include one or more of the items, unless the context clearly indicates otherwise. In this document, each of the phrases "A or B", "at least one of A and B", "at least one of A or B", "A, B, or C", "at least one of A, B, and C", and "at least one of A, B, or C" can include any one of the items listed together in the corresponding phrase among those phrases, or all possible combinations thereof. Terms such as "first," "second," or "first" or "second" may be used merely to distinguish one component from another, and do not limit the components in any other respect (e.g., importance or order). When a component (e.g., a first component) is referred to as "coupled" or "connected" to another (e.g., a second component), with or without the terms "functionally" or "communicatively," it means that the component can be connected to the other component directly (e.g., wired), wirelessly, or through a third component.

[0122] The term "module" used in various embodiments of this document may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with terms such as logic, logic block, component, or circuit. A module may be an integral component, or a minimum unit or part of such a component that performs one or more functions. For example, according to one embodiment, a module may be implemented in the form of an application-specific integrated circuit (ASIC).

[0123] Various embodiments of the present document may be implemented as software (e.g., a program (1440)) including one or more instructions stored in a storage medium (e.g., an internal memory (1436) or an external memory (1438)) readable by a machine (e.g., an electronic device (1401)). For example, a processor (e.g., a processor (1420)) of the machine (e.g., an electronic device (1401)) may call at least one instruction among the one or more instructions stored from the storage medium and execute it. This enables the machine to operate to perform at least one function according to the at least one called instruction. The one or more instructions may include code generated by a compiler or code executable by an interpreter. The machine-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-transitory' simply means that the storage medium is a tangible device and does not contain signals (e.g., electromagnetic waves), and the term does not distinguish between cases where data is stored semi-permanently or temporarily on the storage medium.

[0124] According to one embodiment, the method according to various embodiments disclosed in this document may be provided as included in a computer program product. The computer program product may be traded as a product between a seller and a buyer. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., compact disc read-only memory (CD-ROM)), or may be distributed online (e.g., downloaded or uploaded) through an application store (e.g., Play Store™) or directly between two user devices (e.g., smart phones). In the case of online distribution, at least a portion of the computer program product may be temporarily stored or temporarily generated in a machine-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or an intermediary server.

[0125] According to various embodiments, each component (e.g., a module or a program) of the above-described components may include one or more entities, and some of the entities may be separated and placed in other components. According to various embodiments, one or more components or operations of the aforementioned components may be omitted, or one or more other components or operations may be added. Alternatively or additionally, a plurality of components (e.g., a module or a program) may be integrated into a single component. In such a case, the integrated component may perform one or more functions of each of the plurality of components identically or similarly to those performed by the corresponding component among the plurality of components prior to the integration. According to various embodiments, the operations performed by a module, program, or other component may be executed sequentially, in parallel, iteratively, or heuristically, or one or more of the operations may be executed in a different order, omitted, or one or more other operations may be added.

Claims

1. In an electronic device (201), at least one processor (220); and The electronic device comprises a memory (230) storing instructions, and when the instructions are collectively or individually executed by the at least one processor, In response to a first command to edit a first image stored in the memory, at least one second image is identified that has a similar acquisition time to the first image stored in the memory or is related to a subject included in the first image, Obtaining feature information for generating an image corresponding to a deleted first portion inside the first image or an extended second portion outside the first image from at least one second image, Using the first image and the feature information, a painting operation is performed to generate the image corresponding to the first part or the second part of the first image, An electronic device that obtains a third image including the image corresponding to the first part or the second part generated based on the first image and the painting operation.

2. In the first paragraph, when the instructions are collectively or individually executed by the at least one processor, the electronic device, An electronic device that obtains a first text for generating the image corresponding to the first part or the second part of the first image from the feature information using the first AI model (205) stored in the memory.

3. In any one of paragraphs 1 to 2, when the instructions are collectively or individually executed by the at least one processor, the electronic device, An electronic device that generates a text prompt for generating an image corresponding to the first portion or the second portion of the first image, based on the first text.

4. In any one of claims 1 to 3, when the instructions are collectively or individually executed by the at least one processor, the electronic device, An electronic device that inputs the text prompt, the feature information, and the first image into the second AI model (202) stored in the memory to obtain the third image.

5. In any one of claims 1 to 4, when the instructions are collectively or individually executed by the at least one processor, the electronic device, An electronic device that performs an in-painting operation to generate the image corresponding to the first part of the first image using the second AI model.

6. In any one of paragraphs 1 to 5, when the instructions are collectively or individually executed by the at least one processor, the electronic device, An electronic device that performs an out-painting operation to generate the image corresponding to the second portion of the first image using the second AI model.

7. In any one of paragraphs 1 to 6, An electronic device wherein the above feature information may include information about at least one of a color, shape, form, object, background, or composition of the at least one second image.

8. In any one of paragraphs 1 to 7, when the instructions are collectively or individually executed by the at least one processor, the electronic device, An electronic device that determines at least one image including a person, animal, object, background, or place included in the first image among a plurality of images stored in the memory as at least one second image.

9. In any one of claims 1 to 8, when the instructions are collectively or individually executed by the at least one processor, the electronic device, An electronic device that determines at least one image acquired before a specified time or after a specified time based on an acquisition time of the first image among a plurality of images stored in the memory as the at least one second image.

10. In any one of claims 1 to 9, when the instructions are collectively or individually executed by the at least one processor, the electronic device, An electronic device that determines at least one image that includes the same person as the person included in the first image among images acquired on the same day as the acquisition date of the first image as the at least one second image.

11. In the operating method of an electronic device (201), In response to a first command to edit a first image stored in the electronic device, an operation of identifying at least one second image having a similar acquisition time to the first image stored in the electronic device or related to a subject included in the first image; An operation of obtaining feature information for generating an image corresponding to a deleted first portion inside the first image or an extended second portion outside the first image from at least one second image; An operation of performing a painting operation to generate an image corresponding to a first part or a second part of the first image using the first image and the feature information; A method of operating an electronic device, comprising: obtaining a third image including the image corresponding to the first portion or the second portion generated based on the first image and the painting operation.

12. In paragraph 11, An operating method of an electronic device, further comprising an operation of obtaining a first text for generating the image corresponding to the first part or the second part of the first image from the feature information using a first AI model (205) stored in the electronic device.

13. In any one of paragraphs 11 to 12, A method of operating an electronic device further comprising: generating a text prompt for generating an image corresponding to the first portion or the second portion of the first image, based on the first text.

14. In any one of clauses 11 to 13, the operation of obtaining the third image comprises: An operating method of an electronic device, comprising an operation of inputting the text prompt, the feature information, and the first image into a second AI model (202) stored in the electronic device to obtain the third image.

15. In any one of clauses 11 to 14, the operation of performing the painting operation is: A method of operating an electronic device, comprising: performing an in-painting operation to generate an image corresponding to the first portion of the first image using the second AI model.

Citation Information

Patent Citations

  • Electronic device for performing image inpainting, and method for operating same

    EP4266241A1

  • Fender panel mounting structure of vehicle body

    KR1020250005604A

  • Method And Apparatus for Providing Semantic Image Extrapolation

    KR102349289B1

  • Image inpainting with geometric and photometric transformations

    US20210056668A1

  • Image inpainting based on multiple image transformations

    US20230214967A1