Electronic device for generating file related to restoration function and method for same

The electronic device uses AI to edit and store metadata for image restoration, addressing the challenge of efficient image processing and file size reduction in AI-based image editing.

WO2025159274A1PCT designated stage Publication Date: 2025-07-31SAMSUNG ELECTRONICS CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2024/015467
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-12
Filing Date
2024-10-14
Publication Date
2025-07-31

AI Technical Summary

Technical Problem

Existing technologies lack efficient methods for processing photos and videos using artificial intelligence to edit and restore original images while reducing file size and maintaining image quality.

Method used

An electronic device equipped with an AI model generates edited images and stores metadata for restoring the original image, allowing for file compression and efficient storage without the need for the original image data.

Benefits of technology

The solution enables efficient image editing and restoration, reducing file size while maintaining image quality and supporting accurate restoration of the original image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2024015467_31072025_PF_FP_ABST
    Figure KR2024015467_31072025_PF_FP_ABST
Patent Text Reader

Abstract

An electronic device according to an embodiment can display an image including at least one object through a display. The electronic device can receive an input to the at least one object. The electronic device can generate an artificial intelligence image using an artificial intelligence model at least partially on the basis of the input, and the at least one object is replaced with an object generated by artificial intelligence. The electronic device can generate first information about the input and second information about the object generated by artificial intelligence. The electronic device can store, in the memory, metadata including the first information and the second information and a file including the artificial intelligence image.
Need to check novelty before this filing date? Find Prior Art

Description

Electronic device and method for generating files related to restoration functions

[0001] The present disclosure relates to an electronic device and method for generating a file related to a restoration function.

[0002] Technologies are being developed to process photos and / or videos using artificial intelligence. For example, technologies are being developed to recognize one or more characters (or strings) associated with photos and / or videos. For example, technologies are being developed to classify subjects (e.g., objects including people, animals, and / or vehicles) captured in photos and / or videos.

[0003] The above information may be provided as background information to aid in understanding the present disclosure. None of the above is claimed to be prior art related to the present disclosure or can be used in making decisions related to prior art.

[0004] According to an embodiment, an electronic device may include a display, at least one processor including a processing circuit, and a memory including one or more storage media storing instructions. The at least one processor may be individually and / or collectively configured to control the display to display an image including at least one object. The at least one processor may be individually and / or collectively configured to receive an input regarding the at least one object. The at least one processor may be individually and / or collectively configured to generate an AI image using an AI model, at least in part based on the input, wherein the at least one object is replaced with an object generated by the AI. The at least one processor may be individually and / or collectively configured to generate first information regarding the input and second information regarding the object generated by the AI. The at least one processor may be individually and / or collectively configured to store, in the memory, metadata including the first information and the second information, and a file including the AI ​​image.

[0005] In one embodiment, a non-transitory computer-readable storage medium comprising instructions may be provided. The instructions, when individually and / or collectively executed by at least one processor of an electronic device including a display, may cause the electronic device to display an image including at least one object through the display. The instructions, when individually and / or collectively executed by at least one processor of the electronic device, may cause the electronic device to receive an input relating to the at least one object. The instructions, when individually and / or collectively executed by at least one processor of the electronic device, may cause the electronic device to generate an artificial intelligence image using an artificial intelligence model based at least in part on the input, wherein the at least one object is replaced with an object generated by the artificial intelligence. The instructions, when individually and / or collectively executed by at least one processor of the electronic device, may cause the electronic device to generate first information about the input and second information about the object generated by the artificial intelligence. The instructions, when individually and / or collectively executed by at least one processor of the electronic device, may cause the electronic device to store, in a memory of the electronic device, a file including metadata including the first information and the second information and the artificial intelligence image.

[0006] In one embodiment, an electronic device may include a display, at least one processor including a processing circuit, and a memory including one or more storage media storing instructions. The at least one processor may be configured to individually or collectively execute instructions and may be configured to cause the electronic device to display an editing screen including an original image on the display. The at least one processor may, individually or collectively, cause the electronic device to, based on receiving a first input for editing the original image through the editing screen, execute an artificial intelligence model using first information related to the first input to generate an editing image corresponding to the original image. The at least one processor may, individually or collectively, cause the electronic device to, in response to the first input, display the editing image on the editing screen. At least one processor, individually or collectively, may cause the electronic device to generate second information related to an artificial intelligence model to be executed to restore the original image based on receiving a second input for storing the edited image while displaying the edited image. At least one processor, individually or collectively, may cause the electronic device to store, in the memory, a file comprising metadata including the first information and the second information and the edited image.

[0007] In one embodiment, a non-transitory computer-readable storage medium comprising instructions may be provided. The instructions, when individually and / or collectively executed by at least one processor, including processing circuitry, of an electronic device including a display, may cause the electronic device to display an editing screen including an original image on the display. The instructions, when individually and / or collectively executed by at least one processor, including processing circuitry, of the electronic device including the display, may cause the electronic device to, based on receiving a first input for editing the original image through the editing screen, execute an artificial intelligence model using first information related to the first input to generate an editing image corresponding to the original image. The instructions, when individually and / or collectively executed by at least one processor, including processing circuitry, of the electronic device including the display, may cause the electronic device to display the editing image on the editing screen in response to the first input. The instructions, when individually and / or collectively executed by at least one processor, including a processing circuit, of an electronic device including a display, may cause the electronic device to generate second information related to an artificial intelligence model to be executed to restore the original image based on receiving a second input for storing the edited image while displaying the edited image. The instructions, when individually and / or collectively executed by at least one processor, including a processing circuit, of an electronic device including a display, may cause the electronic device to store a file, including metadata including the first information and the second information, and the edited image, in a memory of the electronic device.

[0008] In one embodiment, a method of an electronic device including a display may be provided. The method may include an operation of displaying an editing screen including an original image on the display. The method may include an operation of changing a first portion of the original image based on receiving a first input for editing the original image. The method may include an operation of displaying an edited image, which is the original image in which the first portion has been changed into a second portion, while receiving a second input for storing the edited image, the method may include an operation of storing first metadata representing the second portion, second metadata including information for restoring content of the first portion of the original image different from the edited image using an artificial intelligence model, and a file including the edited image among the original image and the edited image.

[0009] In one embodiment, an electronic device may include a display, at least one processor including a processing circuit, and a memory including one or more storage media storing instructions. The at least one processor may be configured to individually or collectively execute the instructions, and cause the electronic device to display an editing screen including an original image on the display. The at least one processor may individually or collectively cause the electronic device to modify a first portion of the original image based on receiving a first input for editing the original image. At least one processor may individually or collectively cause the electronic device to store first metadata representing the second portion, second metadata comprising information for restoring content of the first portion of the original image different from the edited image using an artificial intelligence model, and a file comprising the edited image among the original image or the edited image, based on receiving a second input for storing the edited image while the electronic device displays the edited image, the original image in which the first portion has been changed into the second portion.

[0010] The above-described and other aspects, features, and advantages of some embodiments of the present disclosure will become more apparent from the following detailed description taken in conjunction with the accompanying drawings, in which:

[0011] FIG. 1 is a diagram illustrating exemplary operations of an electronic device for generating a file including an edited image for an original image, according to various embodiments;

[0012] FIGS. 2A and 2B are block diagrams illustrating exemplary configurations of electronic devices according to various embodiments;

[0013] FIG. 3 is a flowchart illustrating exemplary operations of an electronic device for generating an edited image for an original image, according to various embodiments;

[0014] FIG. 4 is a diagram illustrating an exemplary structure of a file generated by an electronic device according to various embodiments;

[0015] FIG. 5 is a diagram illustrating an exemplary operation of an electronic device displaying an editing screen on a display according to various embodiments;

[0016] FIGS. 6A, 6B, 6C, 6D, 6E, and 6F are diagrams illustrating exemplary structures of an image editing model executed by an electronic device according to various embodiments;

[0017] FIG. 7 is a diagram illustrating exemplary operations of an electronic device for generating a file containing pixel information for at least a portion of an original image that is different from an edited image, according to various embodiments;

[0018] FIG. 8 is a diagram illustrating an exemplary operation of an electronic device for generating a file using pixel differences between an edited image and an original image, according to various embodiments;

[0019] FIG. 9 is a diagram illustrating an exemplary operation of an electronic device for generating a file containing pixel information and / or data (e.g., a prompt), according to various embodiments;

[0020] FIG. 10 is a diagram illustrating exemplary operations of an electronic device for generating a file containing feature information to be used to restore an original image, according to various embodiments;

[0021] FIG. 11 is a diagram illustrating exemplary operations of an electronic device for generating a file including one or more prompts to be used to restore an original image, according to various embodiments;

[0022] FIG. 12 is a diagram illustrating exemplary operations of an electronic device for generating a file including one or more prompts for at least a portion of an original image that is different from an edited image, according to various embodiments;

[0023] FIG. 13 is a diagram illustrating exemplary operations of an electronic device for generating a file including one or more prompts and location information related to an original image, according to various embodiments;

[0024] FIG. 14 is a diagram illustrating an exemplary operation of an electronic device for restoring an original image according to various embodiments;

[0025] FIG. 15 is a diagram illustrating exemplary programs executed by an electronic device to simulate a generative artificial intelligence model according to various embodiments;

[0026] FIG. 16 is a block diagram of an electronic device within a network environment according to various embodiments.

[0027] Hereinafter, various embodiments of the disclosure are described with reference to the attached drawings.

[0028] The various embodiments of the disclosure and the terminology used therein are not intended to limit the technology described in the disclosure to a specific embodiment, but should be understood to encompass various modifications, equivalents, and / or substitutes of the embodiments. In connection with the description of the drawings, similar reference numerals may be used for similar components. The singular expressions may include plural expressions unless the context clearly indicates otherwise. In the disclosure, expressions such as “A or B,” “at least one of A and / or B,” “A, B, or C,” or “at least one of A, B, and / or C” include all possible combinations of the listed items. Expressions such as “first,” “second,” “first,” or “second” may modify the corresponding elements, regardless of order or importance, and are used only to distinguish one element from another and do not limit the corresponding elements. When it is said that a component (e.g., a first component) is “(functionally or communicatively) connected” or “connected” to another component (e.g., a second component), said component may be directly connected to said other component, or may be connected via another component (e.g., a third component).

[0029] The term "module" encompasses a unit composed of hardware or firmware, and may be used interchangeably with terms such as logic, block, component, or circuit. A module may be an integral component, or a minimal unit or portion thereof that performs one or more functions. For example, a module may be composed of an application-specific integrated circuit (ASIC).

[0030] FIG. 1 is a diagram illustrating exemplary operations of an electronic device (101) for generating a file (124) including an edited image (120) for an original image (110), according to various embodiments. Referring to FIG. 1, an electronic device (101) having the appearance of a mobile phone is illustrated. The electronic device (101) may include a display (130) visible on one side of a housing. Various exemplary form factors of the electronic device (101) including the display (130) are described with reference to FIG. 2A and / or FIG. 2B.

[0031] Referring to FIG. 1, exemplary states (191, 192, 193) of an electronic device (101) displaying an editing screen including an original image (110) are illustrated. The editing screen may be provided by a software application for viewing images and / or videos stored in the electronic device (101), such as a gallery application. The electronic device (101) may display visual objects (182, 183, 184, 185, 186, 187, 188) related to editing of the original image (110) on the screen including the original image (110). An example of an editing screen displayed on the display (130) is described with reference to FIG. 5.

[0032] For example, a visual object (182) may be associated with a function to reduce or remove a shadow represented in the original image (110) (or selected by an input associated with the original image (110). For example, a visual object (183) may be associated with a function to reduce or remove a specular reflection represented in the original image (110). For example, a visual object (185) may be associated with a function to sequentially reverse (e.g., undo) editing actions applied to the original image (110) by one or more inputs. For example, a visual object (186) may be associated with a function to redo (e.g., redo) an action undone by a visual object (185). For example, a visual object (184) may be associated with a function to remove a subject from the image (110) by altering at least a portion of the subject represented in the original image (110). For example, a visual object (187) may be associated with a function of saving the result of editing an original image (110) displayed on a screen to a file (124). For example, a visual object (188) may be associated with a function of stopping or canceling editing of an original image (110).

[0033] In one embodiment, functions associated with visual objects (182, 183, 184) may cause execution of an artificial intelligence model. In the present disclosure, an artificial intelligence model that is executed to at least partially modify an original image (110) may be referred to as an image editing model. An exemplary operation of an electronic device (101) that executes an image editing model to modify an original image (110) is described in more detail with reference to FIG. 3 . According to one embodiment, the electronic device (101) may execute the image editing model to obtain an edited image (e.g., edited images (115, 120)), which is a result obtained by at least partially modifying the original image (110). The electronic device (101) may generate or store a file (124) that includes only the edited image among the original image (110) or the edited image. An exemplary operation of the electronic device (101) that generates the file (124) is described in more detail with reference to FIG. 4 . An artificial intelligence model including an image editing model may include a computational model executed by an electronic device (101) to simulate neural activity (e.g., reasoning, recognition, and / or creation) of a living organism. The artificial intelligence model is described in more detail with reference to FIGS. 6A to 6F.

[0034] Within the exemplary state (191) of FIG. 1, the electronic device (101) may receive an input for editing an original image (110). For example, the input for editing the original image (110) may include a first input indicating a selection of a portion associated with an exemplary subject, such as a tree. The first input may be detected by an external object being dragged from a point (p1) along a path (181) to a point (p2) on the display (130) displaying the original image (110). In response to the first input, the electronic device (101) may display a line (e.g., a dashed line) having the shape of the path (181). The input for editing the original image (110) may include a second input indicating a selection of a visual object (184) that is further received in the state in which the first input is received. In response to the second input, the electronic device (101) can switch from state (191) to state (192).

[0035] In state (192) of FIG. 1, the electronic device (101) may display an editing screen including an edited image (115) for an original image (110) on the display (130). The electronic device (101) may execute an image editing model based on an input for editing the original image (110) received in state (191). To execute the image editing model, the electronic device (101) may generate one or more prompts related to the input. In the present disclosure, a prompt may refer to, for example, a natural language (ordinary language) sentence to be input into the image editing model. A natural language may refer to, for example, a language used in human daily life. A prompt may refer to, for example, a natural language sentence that is binarized based on a binary code such as Unicode (or ASCII code).

[0036] For example, in response to the second input indicating selection of a visual object (184) within a state (191), the electronic device (101) may generate a prompt based on a function of the visual object (184). In response to a second input received after the first input based on an external object moving along the path (181), the electronic device (101) may generate a prompt (e.g., "Remove the tree") to remove a subject (e.g., a tree) captured in a portion of the original image (110) specified by the path (181). The disclosure is not limited thereto. For example, the electronic device (101) may generate a prompt from a detected utterance using analysis of an audio signal based on speech-to-text (STT). For example, the electronic device (101) may display a visual object, such as a text box, on the display (130) and directly receive a prompt from a user through the text box. By executing the image editing model using the above prompt, the electronic device (101) can obtain an edited image (115).

[0037] Referring to FIG. 1, within a state (192) of displaying an edited image including an edited image (115), the electronic device (101) may receive an input for changing the edited image (115). For example, the electronic device (101) that has received an input for removing a specific subject (e.g., a cloud) captured by the edited image (115) may execute an image editing model based on the input to obtain or generate an edited image (120) having the specific subject removed from the edited image (115). Referring to FIG. 1, within a state (193), the electronic device (101) may display the edited image (120) on the display (130) in response to the input.

[0038] Within state (192) of FIG. 1, the electronic device (101) may receive an input for storing an edited image (120). Based on the input, the electronic device (101) may generate or store a file (124) including the edited image (120) from among the edited image (120) or other images displayed before the edited image (120) (e.g., the original image (110) and / or the edited image (115)). For example, the file (124) may include a JPEG file, a HEIF (high efficiency image file format) file, a HEIC (high efficiency image container) file, a PNG (portable network graphic) file, and / or a GIF (graphics interchange format) file.

[0039] For example, the file (124) may include information for supporting a restoration function to the original image (110) together with an edited image (120) corresponding to the original image (110). The electronic device (101) may add or insert the information into the metadata of the file (124). An exemplary operation of the electronic device (101) for generating a file (124) including an edited image (120) and metadata (122) converted from the original image (110) based on the execution of an artificial intelligence model (e.g., a generative artificial intelligence model) such as an image editing model is described in more detail with reference to FIGS. 7 to 13. For example, the electronic device (101) may generate a file (124) including only an edited image (120) without the original image (110) and including compressed information for the restoration function in order to support a restoration function to the original image (110) while reducing the size of the file (124). For example, an electronic device (101) that created a file (124) within a state (193) may discard other images (e.g., original image (110) and / or edited image (115)) that are different from the edited image (120) stored in the file (124). An exemplary operation of an electronic device (101) that restores the original image (110) using the file (124) is described with reference to FIG. 14.

[0040] Hereinafter, an exemplary hardware configuration of an electronic device (101) according to various embodiments is described in more detail with reference to FIG. 2a and / or FIG. 2b.

[0041] FIGS. 2A and 2B are block diagrams illustrating exemplary configurations of an electronic device (101) according to various embodiments. The electronic device (101) of FIG. 1 may be an example of the electronic device (101) described with reference to FIGS. 2A and / or 2B . Referring to FIGS. 2A and / or 2B , the electronic device (101) may include a processor (210) (e.g., including a processing circuit), a memory (215), a display (130), a camera (220), and a communication circuit (225). The number and / or types of electronic components included in the electronic device (101) are not limited to those of FIGS. 2A and / or 2B . For example, the electronic device (101) may further include electronic components described with reference to FIG. 16 . For example, some of the electronic components of FIG. 2A (e.g., the camera (220) and / or the communication circuit (225)) may be excluded from the electronic device (101), or electronic components not shown in FIG. 2A and / or FIG. 2B may be further included in the electronic device (101).

[0042] Referring to FIGS. 2A and / or 2B , the electronic device (101) may have forms such as a laptop PC (personal computer) (101-1), smartphones (e.g., a bar-shaped smartphone (101-2), a foldable smartphone (101-3), or a sliderable (or rollable) smartphone (101-4)), a tablet PC (101-5), a head-mounted display (HMD) device (101-6), and other similar computing devices (not shown). The electronic device (101) may include a housing that forms the appearance (or outer appearance) of the electronic device (101). The housing of the electronic device (101) may be referred to as a case and may be formed of plastic, glass, ceramic, fiber composites, metal (e.g., stainless steel, aluminum, and / or titanium), another suitable material, or a combination of two or more of the foregoing materials. For example, the housing may be formed using a unibody configuration in which all or part of the housing is assembled as a single structure (e.g., a bar-shaped smartphone (101-2)), or may be formed using a plurality of structures (e.g., an internal frame structure, one or more structures forming the exterior of the housing surface) (e.g., a foldable smartphone (101-3) having a plurality of parts).

[0043] For example, the processor (210) may be operably or operatively coupled with another electronic component of the electronic device (101) that includes the memory (215). For example, operably or operatively coupled with the processor (210) may indicate that the processor (210) is directly connected to the other electronic component. For example, operably or operatively coupled with the processor (210) may indicate that the processor (210) is (indirectly) connected to the first electronic component via a second electronic component of the electronic device (101). For example, operably or operatively coupled with the processor (210) may indicate that the state of the processor (210) is capable of controlling the electronic component. For example, operably or operatively coupled with the processor (210) may indicate that the operation of the electronic component is caused based on information, data, signals, or commands provided from the processor (210). However, the disclosure is not limited to this.

[0044] For example, the processor (210) of the electronic device (101) may include a circuit (e.g., a processing circuit) for processing data based on one or more instructions. The circuit for processing data may include, for example, an arithmetic and logic unit (ALU), a floating point unit (FPU), a field programmable gate array (FPGA), a central processing unit (CPU), a graphics processing unit (GPU), a neural processing unit (NPU), and / or an application processor (AP). For example, the number of processors may be one or more. The processing circuit of the processor that loads (or fetches) instructions and performs calculations corresponding to the loaded instructions may be referred to as or referred to as a core circuit (or core). For example, the processor may have a multi-core processor structure including a plurality of core circuits, such as a dual core, a quad core, a hexa core, or an octa core. The functions and / or operations described herein may be individually or collectively performed by one or more processing circuits included in the processor (210). The processor (210) may include various processing circuits and / or multiple processors. For example, as used herein, including in the claims, the term “processor” may include various processing circuits, including at least one processor, wherein one or more of the at least one processor may be configured to individually and / or collectively perform the various functions described herein in a distributed manner.As used herein, when “a processor,” “at least one processor,” and “one or more processors” are described as being configured to perform several functions, these expressions also cover, for example, but not limited to, situations where a processor performs some of the described functions and other processor(s) perform other of the described functions, and situations where a single processor performs all of the described functions. Additionally, the at least one processor may comprise a combination of processors that perform the various described / described functions, e.g., in a distributed manner. The at least one processor may execute program instructions to achieve or perform the various functions.

[0045] For example, the display (130) of the electronic device (101) can output visualized information to the user (e.g., screens displayed in states (191, 192, 193) of FIG. 1). For example, the display (130) can be configured to visualize information provided from a graphic processing unit (GPU) and / or a processor (210). The display (130) can include a liquid crystal display (LCD), a plasma display panel (PDP), and / or light emitting diodes (LEDs). The LEDs can include organic LEDs (OLEDs). The display (130) can include a flat panel display (FPD), electronic paper, and / or a flexible display having at least a partially curved or deformable shape.

[0046] For example, the display (130) of the electronic device (101) may include a sensor (e.g., a touch sensor panel (TSP)) for detecting an external object (e.g., a user's finger) on the display (130). For example, based on the TSP, the processor (210) may detect an external object (e.g., an external object dragged along a path (181) within a state (191) of FIG. 1) that is in contact with the display (130) or floating on the display (130). In response to detecting the external object, the processor (210) may execute a function associated with a specific visual object corresponding to a location of the external object on the display (130) among visual objects displayed on the display (130).

[0047] For example, the memory (215) of the electronic device (101) may include a circuit and / or a storage medium for storing data and / or instructions input to or output from the processor (210). The memory may include, for example, volatile memory such as random-access memory (RAM) and / or non-volatile memory such as read-only memory (ROM). The non-volatile memory may be referred to as storage. The volatile memory may include, for example, at least one of dynamic RAM (DRAM), static RAM (SRAM), cache RAM, and pseudo SRAM (PSRAM). The non-volatile memory may include, for example, at least one of programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), flash memory, hard disk, compact disc, solid state drive (SSD), and embedded multi media card (eMMC). The processor (210) of the electronic device (101) can execute instructions of the memory (215) within the electronic device (101) to perform functions and / or operations indicated by the instructions. For example, when the electronic device (101) includes at least one processor, the at least one processor can be configured to collectively or individually execute the instructions.

[0048] For example, the camera (220) of the electronic device (101) may include optical sensors (e.g., a charged coupled device (CCD) sensor, a complementary metal oxide semiconductor (CMOS) sensor) that generate electrical signals representing the color and / or brightness of light. The optical sensors included in the camera (220) may be arranged in the form of a two-dimensional array. The camera (220) may acquire the electrical signals of each of the plurality of optical sensors substantially simultaneously, and generate two-dimensional frame data corresponding to light reaching the optical sensors of the two-dimensional array. For example, photographic data captured using the camera (220) (e.g., the original image (110) of FIG. 1) may refer to, for example, one (a) two-dimensional frame data acquired from the camera (220). For example, video data captured using the camera (220) may refer to, for example, a sequence of a plurality of two-dimensional frame data acquired from the camera (220).

[0049] In one embodiment, the communication circuit (225) of the electronic device (101) may include hardware for supporting transmission and / or reception of electrical signals between the electronic device (101) and an external electronic device (e.g., the external electronic device (250) of FIG. 2B). The communication circuit (225) may include, for example, at least one of a modem (MODEM), an antenna, and an optical / electronic (O / E) converter. The communication circuit (225) may support transmission and / or reception of electrical signals based on various types of protocols, such as Ethernet, a local area network (LAN), a wide area network (WAN), wireless fidelity (WiFi), near field communication (NFC), Bluetooth, Bluetooth low energy (BLE), ZigBee, long term evolution (LTE), fifth generation (5G) new radio (NR), sixth generation (6G), and / or above-6G.

[0050] According to one embodiment, the electronic device (101) can process a file (124) stored in a memory (215) (e.g., one or more storage media within the electronic device (101), such as a volatile memory and / or a non-volatile memory). For example, the processor (210) can control a display (130) to visualize an edited image (120) included in the file (124). The file (124) can include metadata (122) related to the edited image (120). Within the file (124) having a jpeg format, the edited image (120) and metadata (122) can be aligned according to a format of the International Standard Organization (ISO) called EXIF ​​(exchangeable image file) (e.g., the exemplary format illustrated in FIG. 4). The metadata (122) can be integrally included in the file (124) or can be stored in another file and / or database linked to the file (124).

[0051] In one embodiment, the processor (210) of the electronic device (101) may execute a function of at least partially modifying an edited image (120) using metadata (122). The function may include an operation of generating a restored image (e.g., a restored image including the appearance and / or content of the original image (110) of FIG. 1) corresponding to the edited image (120) using information included in the metadata (122). The restored image may include content of the original image (e.g., the original image (110) of FIG. 1) corresponding to the edited image (120). The function may include an operation of generating an intermediate version of the edited image between the edited image (120) and the original image using information included in the metadata (122).

[0052] In one embodiment, an artificial intelligence model (e.g., an image editing model (230)) for the above function may be installed in the electronic device (101). Hereinafter, the artificial intelligence model may refer to, for example, a computational model that simulates or imitates the neural activity of a living organism and a set of programs for executing the computational model.

[0053] In one embodiment, the installation of an artificial intelligence model in the electronic device (101) may refer to, for example, that resources related to the artificial intelligence model (e.g., formulas included in the computational model and weights, parameters, and / or coefficients related to the formulas) and instructions are stored in the memory (215) for execution of the artificial intelligence model using only the processor (210) of the electronic device (101). When an artificial intelligence model, such as an image editing model (230), is installed in the electronic device (101), the processor (210) can independently execute a function of generating an edited image (120) from an original image without an external electronic device. An artificial intelligence model installed in the electronic device (101) to be independently executed by the electronic device (101) may be referred to as an on-device model.

[0054] Referring to FIG. 2A, a processor (210) of an electronic device (101) may execute an on-device model (e.g., an image editing model (230)) stored in a memory (215) to at least partially change an original image, or may generate a file (124) including an edited image (120) generated by at least partially changing the original image. The disclosure is not limited thereto. Referring to FIG. 2B, the electronic device (101) may communicate with an external electronic device (250), referred to as a server, to execute a function of obtaining a changed edited image (120) from an original image. For example, the processor (210) may transmit an original image and information (e.g., one or more prompts) required to change the original image to the external electronic device (250) via a communication circuit (225). The processor (210) can transmit at least a portion of the original image to an external electronic device (250) along with a command (or request) for changing the original image.

[0055] Referring to FIG. 2B, the external electronic device (250) may include a processor (255) (including a processing circuit), a memory (260), and a communication circuit (265). The processor (255), the memory (260), and the communication circuit (265) may be electrically and / or operatively coupled via a communication bus (252). The processor (255), the memory (260), and the communication circuit (265) of the external electronic device (250) may correspond to the processor (210), the memory (215), and the communication circuit (225) of the electronic device (101), respectively. At least a portion of the description of the processor (255), the memory (260), and the communication circuit (265) of the external electronic device (250) that overlaps with the description of the processor (210), the memory (215), and the communication circuit (225) of the electronic device (101) is not repeated herein.

[0056] Referring to FIG. 2B, an embodiment in which an image editing model (230) is installed in an external electronic device (250) is illustrated. In the embodiment of FIG. 2B, a processor (255) that receives a signal for modifying an original image from an electronic device (101) may execute the image editing model (230) installed in the external electronic device (250). For example, by executing the image editing model (230) using one or more prompts included in the signal, the processor (255) may generate an edited image (120) corresponding to the original image. The processor (255) may transmit the generated edited image (120) (or a signal including the edited image (120)) to the electronic device (101) via the communication circuit (265). The processor (210) that receives the edited image (120) via the communication circuit (225) may control the display (130) to display the edited image (120).

[0057] As described above, according to one embodiment, the processor (210) of the electronic device (101) may generate or display an edited image (120) corresponding to an original image using the image editing model (230) installed in the electronic device (101) and / or the external electronic device (250). In response to an input indicating storage of the edited image (120), the electronic device (101) may generate or store a file (124) including the edited image (120) among the original image or the edited image (120). Referring to FIG. 2A and / or FIG. 2B , in an exemplary state where the file (124) is stored, the original image corresponding to the edited image (120) included in the file (124) may be removed from the electronic device (101) (and / or the external electronic device (250)). Instead of maintaining the original image, the electronic device (101) may generate or store metadata (122) containing information required to restore the original image. The metadata (122) may be associated (or linked) with the edited image (120). The information stored in the metadata (122) to restore the original image may include at least one of the data exemplified in Table 1.

[0058] Type (or Category) of Information DescriptionPixel InformationThe color, brightness, and / or saturation of at least one pixel of the original imageOne or more first promptsPrompts that were input when generating an edited image (120) from the original imageOne or more second promptsPrompts that include one or more words (e.g., keywords) to describe the original imageEdge Information (or Edge Image)Information indicating the boundary of at least one subject area of ​​the original imageLayout InformationInformation indicating the location, size, and / or shape of at least one subject area of ​​the original imageGPS (global positioning system) InformationInformation indicating the point where the original image was acquiredFeature InformationFeature vectors (e.g., latent vectors) and / or feature points (or key points) for at least a portion of the original image

[0059] Referring to Table 1, pixel information may indicate the color, brightness, and / or saturation of at least one pixel of the original image based on a resolution lower than or equal to the resolution of the original image and / or the edited image (120). The metadata may be stored in a file different from the file (124) including the edited image (120). For example, when the metadata is stored in a file different from the file (124), information (e.g., link information) indicating a linkage with the other file (or metadata) may be stored within the file (124). The information may be stored in the metadata of the file (124). For example, when the metadata is stored in a file different from the file (124), the electronic device may manage (e.g., establish and / or release a linkage) between the file (124) and the other file using a database and / or a program.

[0060] Hereinafter, with reference to FIG. 3, an exemplary operation of an electronic device (101) for generating a file (124) including an edited image (120) of FIG. 1, FIG. 2a, and / or FIG. 2b is described in more detail.

[0061] FIG. 3 is a flowchart illustrating exemplary operations of an electronic device for generating an edited image for an original image, according to various embodiments. The electronic device (101) of FIGS. 1, 2A, and 2B and / or the processor (210) of FIGS. 2A and / or 2B may perform the operations described with reference to FIG. 3. The order of the operations of FIG. 3 is exemplary, and in one embodiment, the electronic device may perform the operations of FIG. 3 in a different order than the order illustrated in FIG. 3. In one embodiment, the electronic device may perform at least two of the operations of FIG. 3 substantially concurrently (e.g., multitasking and / or multithreading).

[0062] Referring to FIG. 3, in operation (310), according to one embodiment, a processor of an electronic device may receive an input for editing an original image (e.g., the original image (110) of FIG. 1). The processor may display a screen (e.g., an editing screen) including the original image on a display (e.g., the display (130) of FIG. 1). Through the editing screen, the processor may receive the input of operation (310). Based on receiving the input, the processor may perform other operations of FIG. 3.

[0063] Referring to FIG. 3, in operation (320), according to one embodiment, a processor of an electronic device may execute an image editing model (e.g., image editing model (230) of FIGS. 2A and / or 2B) using a prompt related to a received input. If the image editing model is installed in the electronic device, the processor may perform operation (320) independently of an external electronic device (e.g., external electronic device (250) of FIG. 2B). If the image editing model is installed in an external electronic device different from the electronic device, the processor may transmit a signal to the external electronic device that causes the execution of the image editing model. The signal may include information related to the original image and / or input of operation (310).

[0064] To execute the image editing model of operation (320), the processor may generate one or more prompts related to the input of operation (310). The one or more prompts may include one or more natural language sentences describing the input of operation (310). By executing the image editing model using the original image and / or the one or more prompts, the processor may generate or obtain an edited image corresponding to the original image of operation (310).

[0065] Referring to FIG. 3, in operation (330), according to one embodiment, a processor of an electronic device may display an edited image (e.g., an edited image (120) of FIG. 1 , FIG. 2A , and / or FIG. 2B ) obtained by executing an image editing model. The processor may perform calculations indicated by the image editing model for which the prompt of operation (320) has been input, to generate or obtain the edited image of operation (330). The electronic device may display the generated edited image on a display.

[0066] Referring to FIG. 3, in operation (340), according to one embodiment, a processor of an electronic device may store a file (e.g., file (124) of FIG. 1) including metadata (e.g., metadata (122) of FIG. 1) including information for restoring an original image based on an input for storing an edited image. The input of operation (340) may include an input indicating selection of a visual object (187) of FIG. 1. In response to the input of operation (340), the electronic device may generate or store a file including the edited image. In response to the input of operation (340), the electronic device may generate metadata including information for restoring an original image (110). The metadata may be included in, or inserted into, the file including the edited image. The information for restoring the original image may include information (e.g., information of Table 1) required for executing an image restoration model (e.g., image restoration model (1431) of FIG. 14).

[0067] As described above, according to one embodiment, the electronic device may store metadata including an edited image of the original image and information for restoring the edited image to the original image after editing the original image using a generative artificial intelligence model such as an image editing model. For example, the electronic device, upon receiving the input of operation (340), may remove the original image. The information stored in the metadata may be related to (or linked to) at least a portion of the original image that has been edited by the user input. For example, the electronic device may support a restoration function to the original image by using only a file including the edited image without the original image.

[0068] Below, with reference to FIG. 4, an exemplary structure of a file generated by an electronic device performing operation (340) is described in more detail.

[0069] FIG. 4 is a diagram illustrating an exemplary structure of a file (124) generated by an electronic device according to various embodiments. The electronic device (101) of FIGS. 1, 2A, and 2B and / or the processor (210) of FIGS. 2A and / or 2B may generate or store a file (124) having a structure described with reference to FIG. 4. The file (124) of FIG. 4 may be generated by the electronic device (101) performing the operations of FIG. 3.

[0070] In one embodiment, within a file (124), an edited image (120) and metadata (e.g., metadata (122) of FIG. 1) may be arranged based on the EXIF ​​format. Referring to FIG. 4, an exemplary structure of a file (124) based on the EXIF ​​format is illustrated. The file (124) may start from a region in which a designated value indicating the start of the file (124) (e.g., Start Of Image) is stored. After the region, one or more application segments (APPlication segments) (e.g., APP1, APP2) may be formed within the file (124). The application segment of the file (124) may include a marker indicating the start of the application segment (APP1 Marker) and a length of the application segment (APP1 Length). The application segment of the file (124) may include a code for the application segment (EXIF identifier code), a tagged image file format (TIFF) header, and image file directory (IFD) values. For example, the 0th IFD value may include information related to an image (e.g., an edited image (120)) within the file (124) (e.g., the creation time of the file (124)). For example, the 1st IFD value may include a thumbnail image corresponding to the file (124). The metadata of the file (124) may be stored in the application area of ​​the file (124).

[0071] A file (124) based on the EXIF ​​format may further include, after one or more application areas, a (Define-Quantization-Tables) area, a DHT (Define-Huffman-Tables) area, a DRI (Define-Restart-Interval) area, a SOF (Start of Frame) area, and / or an SOS (Start-Of-Scan) area. After the SOS area, the file (124) may include compressed data representing the edited image (120). At the end point of the file (124), a designated value representing the end of the file (124) (End of Image) may be stored.

[0072] Hereinafter, with reference to FIG. 5, a screen (e.g., an editing screen) displayed by an electronic device to create a file (124) of FIG. 4 is described in more detail as an example.

[0073] FIG. 5 is a diagram illustrating an exemplary operation of an electronic device (101) displaying an editing screen on a display (130) according to various embodiments. The electronic device (101) of FIGS. 1, 2A, and 2B and / or the processor (210) of FIGS. 2A and / or 2B may perform the operation described with reference to FIG. 5. The operation of the electronic device (101) described with reference to FIG. 5 may be related to at least one of the operations of FIG. 3 (e.g., operation (310)).

[0074] Referring to FIG. 5, different states (501, 502, 503, 504) of an electronic device (101) displaying a screen including an original image (110) are illustrated. For example, within state (501), the electronic device (101) may display a screen including an original image (110) based on the execution of a software application (e.g., a gallery application) for viewing images and / or videos stored in a memory (e.g., memory (215) of FIG. 2A and / or FIG. 2B). The screen displayed within state (501) may further include an original image (110) and a thumbnail image (511) corresponding to the original image (110). When a plurality of images including an original image (110) are stored in the electronic device (101), the electronic device (101) may display thumbnail images each corresponding to another image different from the original image (110) next to the thumbnail image (511) (e.g., to the left and / or right of the thumbnail image (511) within the screen).

[0075] Within state (501), the electronic device (101) may display a visual object (512) associated with a function of displaying an editing screen for an original image (110) on the display (130). Referring to FIG. 5, an exemplary visual object (512) including a designated icon (or designated image) such as a pencil is illustrated, but the disclosure is not limited thereto. Within state (501), in response to an input for selecting the visual object (512), the electronic device (101) may switch to state (502).

[0076] In an exemplary state (502) of FIG. 5, the electronic device (101) may display an editing screen including an original image (110). In the state (502), the electronic device (101) may display, on the display (130), visual objects (521, 522, 523, 524, 525) each related to various functions for changing the original image (110). For example, the visual object (521) may be related to functions for editing the original image (110) using an artificial intelligence model. For example, the visual object (522) may be related to functions for cropping and / or rotating the original image (110). For example, the visual object (523) may be related to functions for changing the color of the original image (110). For example, a visual object (524) may be associated with functions for changing the brightness and / or saturation of an original image (110). For example, a visual object (525) may be associated with functions for combining another image, referred to as a sticker, onto an original image (110).

[0077] Referring to FIG. 5 , within an exemplary state (502) in which a visual object (522) is selected, the electronic device (101) may display, in an area (526) of the display (130), visual objects associated with functions for cropping and / or rotating an original image (110), respectively. In response to an input associated with any one of the visual objects displayed in the area (526), ​​the electronic device (101) may crop or rotate (e.g., tilt) the original image (110). Within the state (502), the electronic device (101) may display, on the display (130), a visual object (528) associated with a function for saving an original image (110) (or an edited image modified by the input) being displayed within the state (502). For example, a visual object (528) including designated text such as “Save” is illustratively shown, but the disclosure is not limited thereto. Within state (502), the electronic device (101) may display a visual object (527) on the display (130) for restoration to the original image (110). For example, a visual object (527) including designated text such as “original restoration” is illustrated, but the disclosure is not limited thereto.

[0078] A visual object (521) displayed within an exemplary state (502) of FIG. 5 may be associated with a function for restoring an original image (110) using an artificial intelligence model (e.g., an image editing model (230) of FIG. 2A and / or FIG. 2B). An electronic device (101) receiving an input for selecting a visual object (521) may switch from state (502) to state (503). Within state (503), the electronic device (101) may display, within an area (531), visual objects (532, 533, 534, 535) associated with various functions related to the artificial intelligence model. For example, the visual object (532) may be associated with a function for at least partially removing content of an original image (110) using an artificial intelligence model. For example, a visual object (533) may be associated with a function for segmenting or cropping at least a portion of an original image (110) using an artificial intelligence model. For example, a visual object (534) may be associated with a function for changing the color of at least a portion of an original image (110) to a specific color associated with a user input using an artificial intelligence model. For example, a visual object (535) may be associated with a function for adjusting a color distribution of an original image (110) using an artificial intelligence model.

[0079] Within the exemplary state (503) of FIG. 5, in response to an input for selecting a visual object (532), the electronic device (101) may switch to a state (504). The states (191, 192, 193) of FIG. 1 may correspond to the state (504) of FIG. 5. The electronic device (101) may display, on the display (130), visual objects (182, 183, 184) corresponding to functions for removing shadows, reflections, and / or subjects represented by the original image (110), respectively.

[0080] Referring to FIG. 5, the electronic device (101) may display editing screens for executing various functions for editing an original image (110), such as states (502, 503, 504). Based on inputs received within states (502, 503, 504), the electronic device (101) may generate or display an edited image corresponding to the original image (110). In response to an input for storing the edited image (e.g., an input for selecting one of the visual objects (187, 528)), the electronic device (101) may generate or store a file (e.g., file (124) of FIG. 1) containing the edited image. The file may include, together with the edited image, information related to the original image (110) corresponding to the edited image.

[0081] Referring to FIG. 5 , according to one embodiment, the electronic device (101) may, in response to an input for saving an edited image (e.g., an input indicating selection of a visual object (187)), display a pop-up window (541) for providing options for information to be stored in a file along with the edited image. Referring to the exemplary pop-up window (541) of FIG. 5 , the electronic device (101) may display a pop-up window (541) including a visual object (544) for initiating creation of a file. The electronic device (101) may display a pop-up window (541) including a visual object (545) for canceling creation of the file. While the visual objects (544, 545) are illustrated as having the form of buttons, the form of the visual objects (544, 545) is not limited thereto. In response to an input indicating a selection of a visual object (544), the electronic device (101) may generate or store a file containing the edited image. When generating a file containing the edited image, the electronic device (101) may add information for restoration of the original image (110) to the file (e.g., as at least part of the metadata of the file) using options provided via a pop-up window (541) and adjustable by the user.

[0082] Referring to FIG. 5, the electronic device (101) may display a visual object (542) on the display (130) for controlling whether to generate a file containing information for restoring the original image (110). While a visual object (542) in the form of a toggle button is exemplarily illustrated, the disclosure is not limited thereto, and the visual object (542) may have other forms, such as a radio button. An input associated with the visual object (542) may include an input for switching (or toggling) between a first mode that restricts the file from containing information for restoring the original image (110) and a second mode that includes information for restoring the original image (110) in the file.

[0083] Referring to FIG. 5 , the electronic device (101) may display a visual object (543) on the display (130) to adjust the accuracy of information to be stored with a file. The accuracy may be related to the difference between a restored image to be generated using the information and the original image (110). For example, since the file to be generated by the electronic device (101) does not completely include the original image (110), the restored image to be generated using the information contained in the file may not completely match the original image (110). In one embodiment, the electronic device (101) may provide an option to adjust the accuracy of information to be stored in the file using the visual object (543). While the visual object (543) is illustrated as having the form of a drop-down menu, the disclosure is not limited thereto. The visual object (543) may have other forms, such as a spinner, a progress bar, and / or a slider.

[0084] In one embodiment, as the accuracy increases, the size of the information to be stored in the file to restore the original image (110) may increase. For example, a user of the electronic device (101) may control the visual object (543) to reduce the accuracy in order to reduce or save the file size. While the visual object (543) is illustrated to adjust the accuracy using designated text such as “high,” “medium,” and “low,” the disclosure is not limited thereto, and the electronic device (101) may receive a numerical value representing the accuracy (e.g., a numerical value in units of a percentage) through a pop-up window (541). The electronic device (101) may use the received numerical value (or the accuracy selected by the visual object (543)) to generate or store information to be used to restore the original image (110).

[0085] For example, the file may contain information for restoring the original image (110) using only the edited image, without the original image (110). The information may be stored in the metadata of the file (e.g., metadata (122) of FIG. 1). For example, the information stored in the file may contain information for changing from the edited image to the original image (110) when an artificial intelligence model is executed to restore the original image (110) (e.g., information of Table 1).

[0086] Hereinafter, with reference to FIGS. 6A to 6F, an image editing model executed by an electronic device (101) that receives an input for editing an original image (110) according to one embodiment is exemplarily described in more detail.

[0087] FIGS. 6A, 6B, 6C, 6D, 6E, and 6F are diagrams illustrating exemplary structures of an image editing model (e.g., the image editing model (230) of FIGS. 2A and / or 2B) executed by an electronic device according to various embodiments. The electronic device (101) of FIGS. 1, 2A, and 2B and / or the processor (210) of FIGS. 2A and / or 2B may execute or utilize the artificial intelligence model described with reference to FIGS. 6A to 6F as the image editing model. The image editing model may be referred to as a super resolution model from the perspective of editing a high-resolution original image (e.g., the original image (110) of FIG. 1). The image editing model may be referred to as a generative artificial intelligence model from the perspective of generating an edited image that includes content not included in the original image. The image editing model may be referred to as an auto-encoder-based model based on the structure used to implement the model. The image editing model may be referred to as a prompt model from the perspective of modifying the original image using prompts or generating an edited image corresponding to the original image.

[0088] In the present disclosure, a generative artificial intelligence model may refer to an artificial intelligence model trained using a set of multiple images (e.g., a training set and / or a training database), and capable of generating or outputting new images approximated to the multiple images, for example.

[0089] Referring to FIG. 6A, artificial intelligence models trained based on generative adversarial networks (GANs) (e.g., a generator model (611) and a discriminator model (612)) are illustrated. The generator model (611) can be trained to output a generated image (614) from input data (e.g., a latent vector (613) in a latent space). The discriminator model (612) can be trained to output a parameter (R) indicating whether an input image (e.g., a generated image (614) and / or a real image (615) generated by the generator model (611)) was generated by the artificial intelligence model (e.g., a probability that the input image is generated by the artificial intelligence model).

[0090] For example, when executing a discriminator model (612) using a real image (615), the electronic device can obtain, from the discriminator model (612), a parameter indicating that the input image of the discriminator model (612) (in the above example, the real image (615)) was not generated by the artificial intelligence model. For example, when executing a discriminator model (612) using a generated image (614), the electronic device can obtain, from the discriminator model (612), a parameter indicating that the input image of the discriminator model (612) (in the above example, the generated image (614)) was generated by the artificial intelligence model.

[0091] In one embodiment, the generator model (611) may be trained such that a generated image (614) generated by the generator model (611) is determined by the discriminator model (612) not to have been generated by the artificial intelligence model. For example, the generator model (611) may be trained such that the probability that an input image output by the discriminator model (612) is generated by the artificial intelligence model is reduced. Training of the generator model (611) and / or the discriminator model (612) may be performed iteratively for a plurality of generated images including the generated image (614). Training of the generator model (611) and / or the discriminator model (612) may be terminated when the generated image (614) is determined by the discriminator model (612) not to have been generated by the artificial intelligence model. For example, training of the generator model (611) may be terminated when a generated image (614) having content, composition, and / or color distribution similar to the actual image (615) is generated. The trained generator model (611) may be used as an image editing model (e.g., the image editing model (230) of FIGS. 2A and / or 2B) for at least partially modifying the original image.

[0092] Referring to FIG. 6B, an artificial intelligence model having the structure of an auto encoder (AE) is illustrated. The artificial intelligence model may include an encoding model (621) and a decoding model (622). The artificial intelligence model having the structure of an auto encoder, including the encoding model (621) and the decoding model (622), may be trained to reduce the difference between an input image (623) input to the encoding model (621) and a generated image (625) output from the decoding model (622) (e.g., to generate a generated image (625) that is identical to the input image (623)).

[0093] When an artificial intelligence model having an auto-encoder structure is executed, dimensionality reduction based on the encoding model (621) can be performed. For example, feature information (e.g., latent vector (624)) having a size smaller than the size of the input image (623) can be output from the encoding model (621). The latent vector (624) is implicit information output from the encoding model (621), and the encoding model (621) can be trained to output a latent vector (624) having different elements for images input to the encoding model (621).

[0094] When an artificial intelligence model having an auto-encoder structure is executed, dimensionality expansion based on a decoding model (622) may be performed. For example, the decoding model (622) may be trained to output a generated image (625) from feature information such as a latent vector (624). The decoding model (622) may be trained to output a generated image (625) having the same resolution and / or size as the input image (623). For example, the artificial intelligence model having an auto-encoder structure may be trained to reduce or minimize the difference between the input image (623) and the generated image (625). After training, at least a portion of the artificial intelligence model may be used as an image editing model to modify the original image.

[0095] Referring to Fig. 6c, an artificial intelligence model having a variational autoencoder (VAE) structure is illustrated. The artificial intelligence model having a VAE structure may include an encoding model (631) and a decoding model (632). Within the artificial intelligence model having a VAE structure, the encoding model (631) may be trained to output a latent vector (636) including a mean vector (634) and a standard deviation vector (635) for an input image (633) (e.g., at least one image included in a set of images set for training during training).

[0096] In one embodiment, the decoding model (632) can be trained to generate a generated image (637) using a probability distribution that has features of the input image (633) as probability variables based on the latent vector (636). For example, when training using a set of images for training, the decoding model (632) can be trained to perform dimensionality expansion based on a probability distribution of features included in the images. After the training, the decoding model (632) can output a generated image (637) that expresses one or more features represented by the latent vector (636) using the probability distribution represented by the latent vector (636). After the training, at least a portion of the artificial intelligence model having the structure of a VAE including the decoding model (632) can be used as an image editing model for modifying the original image.

[0097] Referring to FIG. 6D, an artificial intelligence model having a diffusion model (DM) structure is illustrated. The AI ​​model having the DM structure can be trained to compensate for and / or restore distortions (e.g., distortions based on noise and / or masking) of images included in a set of training images when trained using the set. For example, a corrupted version of an image included in the set (e.g., an image (642-1) completely contaminated by noise) can be input to the AI ​​model. Based on the execution of the AI ​​model, a restored image (642-3) can be generated from the corrupted version of the image (642-1). The process of the AI ​​model generating the restored image (642-3) from the corrupted version of the image (642-1) can be referred to as denoising.

[0098] Referring to FIG. 6D, an artificial intelligence model having a DM structure may include an artificial intelligence model for natural language processing (e.g., a transformer (641)). For example, by executing the transformer (641) using a prompt (643) (e.g., a natural language phrase and / or sentence such as "An image of the face of a man"), information (644) that can be input to the artificial intelligence model for denoising may be generated. The information (644) may include vectors (or tokens) generated from each of the words (or morphemes) included in the prompt (643) based on tokenization.

[0099] For example, as information (644) is input to an artificial intelligence model for denoising, the artificial intelligence model can be trained to generate a restored image (642-3) including features indicated by the prompt (643) from a corrupted version of the image (642-1). For example, information (644) can be input to the artificial intelligence model when an intermediate version of the image (642-2) is generated from the corrupted version of the image (642-1). The information (644) input to the artificial intelligence model can function as a condition for generating the intermediate version of the image (642-2). After training is completed, at least a portion of the artificial intelligence model including the transformer (641) can be used as an image editing model for obtaining an edited image from the original image.

[0100] Referring to Fig. 6e, an artificial intelligence model having a latent diffusion model (LDM) structure is illustrated. The artificial intelligence model having an LDM structure may have a structure in which a contrastive language-image pre-training model (CLIP) and / or VAE-based structure is combined with an artificial intelligence model having a DM structure of Fig. 6d. The artificial intelligence model having an LDM structure may include a text encoding model (652) that performs tokenization of a prompt (651). The text encoding model (652) may have a structure based on CLIP. Information (653) corresponding to the prompt (651) may be generated from the text encoding model (652). The information (653) may include vectors (or tokens) corresponding to each of the words (or morphemes) included in the prompt (651) based on tokenization.

[0101] Referring to FIG. 6e, an artificial intelligence model having the structure of an LDM may include a U-model (654) (or U-Net) and a scheduler (657) for repeatedly performing image transformation based on the U-model (654). The scheduler (657) is a program based on a scheduling algorithm and may be configured to repeatedly input an input image (655) into the U-model (654) and input an output image (656) output from the U-model (654) as an input image (655) for the U-model (654).

[0102] Referring to FIG. 6e, when the U-model (654) is executed, information (653) corresponding to the prompt (651) can be input to the U-model (654) as a condition for generating an output image (656). The U-model (654) can be trained to perform denoising on the input image (655), similar to the artificial intelligence model having the structure of the DM of FIG. 6d. The U-model (654) can be trained to perform denoising based on the condition set by the information (653).

[0103] Referring to Fig. 6e, an artificial intelligence model having the structure of an LDM may include a decoding model (658) for generating a generated image (659) to be provided as a result of generating an image from an output image (656) of a U-model (654). For example, the output image (656) finally output from the U-model (654) by the scheduler (657) may be converted into a generated image (659) by the decoding model (658). For example, based on the execution of the decoding model (658), the resolution of the output image (656) may be increased, or the size of the output image (656) may be enlarged. The artificial intelligence model having the structure of an LDM of Fig. 6e may be used as an image editing model for editing related to an original image.

[0104] Referring to Fig. 6f, an artificial intelligence model having a layout diffusion model structure is illustrated. The artificial intelligence model of Fig. 6f may have a structure modified from the structure of the LDM of Fig. 6e so that layout information (661) can be input. The layout information (661) may be set to indicate the types of subjects associated with each portion of the generated image (659) in order to guide the layout of the generated image (659). For example, the layout information (661) may include data indicating bounding boxes indicating portions of the generated image (659) where the subjects are to be positioned (e.g., coordinates of the vertices of the bounding boxes, the width, and the height of the bounding boxes). For example, the layout information (661) may include pixel-wise information indicating subjects expressed in each portion of the generated image (659). For example, the layout information (661) may include an image in which a shape of a specified color corresponding to a specific subject is drawn.

[0105] The U-model (654) of the artificial intelligence model having the structure of the layout diffusion model can be trained to process layout information (661) based on attention operations. For example, based on a query-key-value (QKV) attention algorithm, the layout information (661) can be synthesized with other information within the U-model (654). Based on the synthesis, when generating an output image (656) from an input image (655), the layout information (661) can function as a condition related to the output image (656). The artificial intelligence model having the structure of the layout diffusion model of FIG. 6F can be used as an image editing model for generating an edited image using an original image.

[0106] As described above, when generating an edited image (e.g., an edited image (120) of FIG. 1) by at least partially modifying an original image (e.g., an original image (110) of FIG. 1), image editing models having various structures may be used. Hereinafter, with reference to FIGS. 7 to 13, exemplary operations of an electronic device for generating an edited image by modifying an original image using the artificial intelligence model described with reference to FIGS. 6A to 6F will be described in more detail.

[0107] FIG. 7 is a diagram illustrating exemplary operations of an electronic device for generating a file (124) including pixel information for at least a portion (e.g., portion (712)) of an original image (711) that is different from an edited image (721), according to various embodiments. The electronic device (101) of FIGS. 1, 2A, and 2B and / or the processor (210) of FIGS. 2A and / or 2B may perform the operation(s) described with reference to FIG. 7. At least one of the operations of FIG. 7 may be related to, or may be performed similarly to, the operations of FIG. 3. The order of the operations of FIG. 7 is exemplary, and in one embodiment, the electronic device may perform the operations of FIG. 7 in a different order than the order illustrated in FIG. 7. In one embodiment, the electronic device may perform at least two of the operations of FIG. 7 substantially simultaneously.

[0108] Referring to FIG. 7, in operation (710), according to one embodiment, a processor of an electronic device may receive an input for editing an original image (711). The processor may receive the input of operation (710) through an editing screen displayed on a display (e.g., display (130) of FIG. 1). For example, in a state where visual objects corresponding to functions for editing an original image (711) are displayed, such as the editing screens illustrated in FIG. 1 and / or FIG. 5, the processor may receive an input for selecting one of the visual objects. The processor, having received the input of operation (710), may perform other operations of FIG. 7. The input of operation (710) may include the input of operation (310) of FIG. 3. Referring to FIG. 7, in a state where a plurality of people are displayed in a captured original image (711), the processor can receive an input for changing the expression of a face captured by the original image (711).

[0109] Referring to FIG. 7, within operation (720), a processor of an electronic device according to one embodiment may display an edited image (721) generated by modifying at least a portion (e.g., portion (712)) of an original image (711). The processor may perform operations (320, 330) of FIG. 3 to generate or display an edited image (721) corresponding to the original image (711). For example, the processor may execute an image editing model (e.g., the image editing model (230) of FIG. 2A and / or FIG. 2B) using a prompt associated with an input of operation (710) to obtain the edited image (721).

[0110] Referring to FIG. 7, when an input for changing the expression of a face captured by an original image (711) is received, the processor may generate a prompt indicating the change in the expression (e.g., "Change the expression of the nearest person to a smiling expression"). By executing an image editing model using the prompt, the processor may obtain or generate an edited image (721) including content corresponding to the prompt (e.g., a face with a smiling expression). In response to the input of the operation (710), the processor may display the edited image (721) on an editing screen.

[0111] Referring to FIG. 7, within operation (730), according to one embodiment, a processor of an electronic device may generate a file (124) including pixel information for an edited image (721) and at least a portion (e.g., portion (712)) of an original image (711) based on an input for storing the edited image (721). For example, while displaying the edited image (721) based on operation (720), the processor may receive an input for storing the edited image (721). Based on receiving the input, the processor may generate a file (124) including the edited image (721).

[0112] The processor may store, in the first metadata (122-1) of the file (124), history information about the edited image (721) stored in the file (124). The history information may indicate one or more editing actions performed while generating the edited image (721) from the original image (711). For example, in the exemplary case of FIG. 7 in which the edited image (721) is obtained by modifying a portion (712) of the original image (711), the processor may store, in the first metadata (122-1), data indicating the position, shape, and / or size of the portion (712). For example, the processor may add or store, in the first metadata (122-1), a value (or flag) indicating whether the edited image (721) was generated by a generative artificial intelligence model (e.g., the image editing model (230) of FIG. 2A and / or FIG. 2B). For example, the processor may add or store, in the first metadata (122-1), region information indicating the time (e.g., date and / or timestamp) at which the edited image (721) was created, and a portion (712) of the original image (711) that is different from the edited image (721).

[0113] Referring to FIG. 7, in a state where a portion (712) of an original image (711) is modified to generate an edited image (721), based on receiving an input of an operation (730), the processor may generate pixel information indicating the colors of pixels corresponding to the portion (712). The processor may store the pixel information in the second metadata (122-2) of the file (124) including the edited image (721). For example, the pixel information stored in the second metadata (122-2) may express the content of a portion (712) of the original image (711) that is different from the edited image (721). For example, the pixel information stored in the second metadata (122-2) may include colors (or values) of pixels included in a portion (712) of the original image (711). For example, the pixel information may include a color distribution and / or a brightness distribution of the portion (712).

[0114] In the present disclosure, metadata terms may be numbered, such as first metadata (122-1) and second metadata (122-2). The numbered metadata terms may be used for logical distinction according to the content, purpose, type, and / or format of the metadata. For example, all numbered metadata may be stored within a logical area set to store metadata within a file (124). The disclosure is not limited thereto, and the numbered metadata may be stored separately within the file (124) (or a storage medium for storing metadata).

[0115] In one embodiment, the pixel information stored in the second metadata (122-2) may be based on the resolution and / or size of the original image (711). For example, the pixel information may include pixels that are one-to-one matched with pixels corresponding to a portion (712) of the original image (711). For example, the pixel information may represent the color distribution of pixels of the original image corresponding to the portion (712) using a resolution lower than the resolution of the original image (711) or a size smaller than the size of the portion (712) of the original image (711).

[0116] As described above, when an edited image (721) is generated by changing at least a portion of an original image (711), the entire original image (711) is not stored in the file (124), but pixel information corresponding to a portion (712) of the original image (711) is stored, so that the file (124) may have a relatively small size and further include information for restoring and / or displaying the original image (711). The file (124) including the second metadata (122-2) including the pixel information may be used to obtain a portion (712) to be combined with the edited image (721) when a function for restoring the original image (711) is executed. An electronic device executing the function may generate or output a restored image by combining the portion (712) with the edited image (721). The position of the part (712) combined with the edit image (721) can be set based on the history information included in the first metadata (122-1).

[0117] FIG. 8 is a diagram illustrating exemplary operations of an electronic device that generates a file (124) using pixel differences between an edited image (721) and an original image (711), according to various embodiments. The electronic device (101) of FIGS. 1, 2A, and 2B and / or the processor (210) of FIGS. 2A and / or 2B may perform the operations described with reference to FIG. 8. At least one of the operations of FIG. 8 may be related to, or may be performed similarly to, the operations of FIG. 3. The order of the operations of FIG. 8 is exemplary, and in one embodiment, the electronic device may perform the operations of FIG. 8 in a different order than the order illustrated in FIG. 8. In one embodiment, the electronic device may perform at least two of the operations of FIG. 8 substantially simultaneously.

[0118] Referring to FIG. 8, in operation (810), according to one embodiment, a processor of an electronic device may receive an input for editing an original image (711). The processor may receive the input of operation (810) while displaying an editing screen including the original image (711). The input may include the input of operation (310) of FIG. 3 and / or the input of operation (710) of FIG. 7. Referring to FIG. 8, similarly to FIG. 7, it is assumed that the processor has received an input for changing an expression of a face captured by the original image (711).

[0119] Referring to FIG. 8, in operation (820), a processor of an electronic device according to an embodiment may display an edited image (721) generated by modifying at least a portion (e.g., portion (712)) of an original image (711). The processor may obtain or generate the edited image (721) by performing operations (320, 330) of FIG. 3 and / or operation (720) of FIG. 7. Having obtained the edited image (721), the processor may display the edited image (721) on a display (e.g., display (130) of FIG. 1). For example, the processor may switch or replace the original image (711) included in the edit screen with the edited image (721).

[0120] Referring to FIG. 8, in operation (830), according to one embodiment, a processor of an electronic device may generate a file (124) including information (831) indicating a difference between an original image (711) and an edited image (721), based on an input for storing an edited image (721). For example, the processor may obtain the information (831) by comparing a portion (821) of the edited image (721) that is different from the original image (711) and a portion (712) of the original image (711) corresponding to the portion (821). For example, the information (831) may indicate a color difference (e.g., a pixel-wise color difference and / or a pixel-wise value difference) between the portions (821, 712). The processor may obtain or calculate information (831) including difference values ​​of pixel values ​​(or colors) of portions (821, 712). For example, based on receiving an input of an operation (830), the processor may generate information (831) representing pixel differences between an original image (711) and an edited image (721).

[0121] Referring to FIG. 8, the processor that generated the information (831) may generate or store an edited image (721) and a file (124) including the information (831). Within the file (124), the information (831) may be stored in the second metadata (122-2) as information to be used for restoring the original image (711). The processor may store data representing a portion (712) of the original image (711) that has been modified by generating the edited image (721) (e.g., the size, position, and / or shape of the portion (712) within the original image (711)) in the first metadata (122-1).

[0122] As described above, the processor may generate a file (124) including information (831) to support a restoration function to the original image (711) while reducing the size of the file (124). For example, when the restoration function is executed based on the file (124), the processor may change the colors (or values) of pixels of the edited image (721) corresponding to the portion (712) indicated by the first metadata (122-1) using the information (831).

[0123] FIG. 9 is a diagram illustrating exemplary operations of an electronic device for generating a file (124) including pixel information (931) and / or data, according to various embodiments. The electronic device (101) of FIGS. 1, 2A, and 2B and / or the processor (210) of FIGS. 2A and / or 2B may perform the operations described with reference to FIG. 9. At least one of the operations of FIG. 9 may be related to, or may be performed similarly to, the operations of FIG. 3. The order of the operations of FIG. 9 is exemplary, and in one embodiment, the electronic device may perform the operations of FIG. 9 in a different order than the order illustrated in FIG. 9. In one embodiment, the electronic device may perform at least two of the operations of FIG. 9 substantially simultaneously.

[0124] Referring to FIG. 9, in operation (910), according to one embodiment, a processor of an electronic device may receive an input for editing an original image (911). The processor may receive the input of operation (910) through an editing screen displayed on a display (e.g., display (130) of FIG. 1) and including the original image (911). The input of operation (910) may include the input of operation (310) of FIG. 3, the input of operation (710) of FIG. 7, and / or the input of operation (810) of FIG. 8. Referring to FIG. 9, it is assumed that the processor detects an input for removing a person while displaying an original image (911) representing a landscape including a person, a telephone booth, and a steel fence.

[0125] Referring to FIG. 9 , in operation (920), a processor of an electronic device according to an embodiment may display an edited image (921) generated by modifying at least a portion of an original image (911). The processor may obtain or generate the edited image (921) by performing operations (320, 330) of FIG. 3 , operation (720) of FIG. 7 , and / or operation (820) of FIG. 8 . For example, in an exemplary case where an input for removing a person is received, the processor may generate a prompt describing the input (e.g., “Remove the person included in the image”). From an image editing model (e.g., the image editing model (230) of FIG. 2A and / or FIG. 2B ) executed using the generated prompt, the processor may obtain or generate the edited image (921) of operation (920). Based on the acquisition of the edited image (921), the processor can replace the original image (911), displayed on the display (130), with the edited image (921).

[0126] Referring to FIG. 9, in operation (930), according to one embodiment, a processor of an electronic device may obtain pixel information (931) and a prompt (e.g., data (932)) based on an input for storing an edited image (921). For example, in a case where an edited image (921) is generated by changing a part related to a person in an original image (911), the part may be divided into a main region (912) and a sub region (913). For example, the changed part of the original image (911) for the edited image (921) may be divided into a main region (912) and a sub region (913). Referring to FIG. 9, a part related to a person's face may be divided into a main region (912), and another part related to the person's clothes may be divided into a sub region (913). The edited image (921) to be stored in the file (124) may include content different from the content of the main area (912) and sub area (913) of the original image (911).

[0127] For example, the contents of the main region (912) and the sub-region (913) of the original image (911) may not be maintained in the edited image (921). In the exemplary case of FIG. 9, the restored image generated from the edited image (921) may again include the contents (e.g., a person) of the main region (912) and the sub-region (913). Since a user viewing the restored image is likely to focus on the restored face, a portion related to the person's face may be identified as the main region (912), and other portions different from the main region may be identified as the sub-region (913).

[0128] According to one embodiment, the electronic device may obtain pixel information (931) corresponding to the main region (912) in order to relatively accurately restore the main region (912) of the original image (911). The pixel information (931) may include colors (or values) of pixels included in the main region (912) of the original image (911). For example, the pixel information (931) may represent a color distribution and / or a brightness distribution of the main region (912) based on a size and / or a resolution of the main region (912). For example, the pixel information (931) may represent a color distribution and / or a brightness distribution of the main region (912) based on a lower resolution than the main region (912) and / or a smaller size than the main region (912).

[0129] In one embodiment, the electronic device may generate or obtain data (e.g., prompts) (932) describing the content of the sub-region (913) to reduce the size of the file (124). In the exemplary case of FIG. 9, the data (932) may include natural language sentences describing the clothing of the person excluded from the edited image (921) (e.g., “The person is wearing a black backpack. The person is wearing a winter jumper with a brown fur hat attached, black training pants. The person’s right arm is bent toward the body, and the person’s right hand is positioned on the chest area. The person is holding a black cell phone in the right hand. The person’s left hand is positioned in a pants pocket. The person is wearing a fur hat.”).

[0130] Referring to FIG. 9, in operation (940), according to one embodiment, a processor of an electronic device may generate a file (124) including an edited image (921), pixel information (931), and a prompt. In the exemplary case of FIG. 9, the processor may generate or store a file (124) including first metadata (122-1) including history information for generating the edited image (921), second metadata (122-2) including pixel information (931), and data (932). The file (124) may display the edited image (921) among the original image (911) or the edited image (921). When generating the file (124), the processor may discard or remove the original image (911).

[0131] As described above, the processor that generates the edited image (921) by modifying a portion of the original image (911) (e.g., a portion including the main region (912) and the sub-region (913)) can generate pixel information (931) of the main region (912) and data (932) related to the sub-region (913) based on receiving an input for storing the edited image. The main region (912) and the sub-region (913) can be distinguished by the content of the portion of the original image (911). The processor can generate a file (124) including all of the pixel information (931) and data (932) to support restoration of the original image (911) using the edited image (921) of the file (124). For example, information (e.g., data (932)) related to an artificial intelligence model (e.g., an image restoration model) to be executed to restore an original image (911) may be generated by the processor, and a file (124) containing the information may be stored.

[0132] Using the file (124) generated based on the operation described with reference to FIG. 9, the electronic device can restore the original image (911). For example, the electronic device can combine a partial image indicated by pixel information (931) in the second metadata (122-2) with an area corresponding to the main area (912) within the edited image (921) included in the file (124). For example, the electronic device can change an area corresponding to the sub-area (913) within the edited image (921) using an image editing model executed using data (932) indicated by the third metadata (122-3).

[0133] FIG. 10 is a diagram illustrating exemplary operations of an electronic device for generating a file (124) including feature information (1031) to be used for restoring an original image (110), according to various embodiments. The electronic device (101) of FIGS. 1, 2A, and 2B, and / or the processor (210) of FIGS. 2A and / or 2B, may perform the operations described with reference to FIG. 10. At least one of the operations of FIG. 10 may be related to, or may be performed similarly to, the operations of FIG. 3. The order of the operations of FIG. 10 is exemplary, and in one embodiment, the electronic device may perform the operations of FIG. 10 in a different order than the order illustrated in FIG. 10. In one embodiment, the electronic device may perform at least two of the operations of FIG. 10 substantially simultaneously.

[0134] Referring to FIG. 10 , within operation (1010), a processor of an electronic device according to an embodiment may receive an input for editing an original image (110). Within a state (e.g., states (191, 192, 193) of FIG. 1 and / or states (502, 503, 504) of FIG. 5 ) in which the original image (110) is displayed on a display (e.g., display (130) of FIG. 1 ), the processor may receive an input of operation (1010). The input of operation (1010) may include an input of operation (310) of FIG. 3 , an input of operation (710) of FIG. 7 , an input of operation (810) of FIG. 8 , and / or an input of operation (910) of FIG. 9 . Referring to FIG. 10, it is assumed that the processor receives input indicating the removal of trees and / or clouds, while displaying an original image (110) relating to a landscape including trees, clouds, the sun, and mountains.

[0135] Referring to FIG. 10, in operation (1020), a processor of an electronic device according to an embodiment may display an edited image (120) generated by modifying at least a portion (e.g., portion (1011)) of an original image (110). The processor may obtain the edited image (120) by performing operations (320, 330) of FIG. 3, operation (720) of FIG. 7, operation (820) of FIG. 8, and / or operation (920) of FIG. 9. For example, the processor may execute an image editing model (e.g., image editing model (230) of FIG. 2A and / or FIG. 2B) using information related to an input of operation (1010), thereby obtaining the edited image (120).

[0136] Referring to FIG. 10 , in operation (1030), according to one embodiment, a processor of an electronic device may obtain feature information (1031) for at least a portion (e.g., portion (1011)) of an original image (110) based on an input for storing an edited image (120). Based on receiving an input indicating storing of the edited image (120), the processor may generate or obtain feature information (1031) related to at least a portion of the original image (110). At least a portion of the original image (110) may correspond to at least a portion of the edited image (120) to be replaced to restore the original image (110).

[0137] In the exemplary case of FIG. 10, the processor can obtain feature information (1031) related to a portion (1011) of the original image (110) that is different from the edited image (120). The feature information (1031) may include a latent vector (624) output from the encoding model (621) of FIG. 6B, into which the original image (110) (or portion (1011)) is input. Since the latent vector (624) is generated based on dimensionality reduction, the processor can obtain feature information (1031) of a relatively small size. For example, the feature information (1031) may include data output from an encoding part of an artificial intelligence model provided for an original restoration model, such as the encoding model (621) of FIG. 6B. Training of the artificial intelligence model may be performed based on an input representing the storage of the edited image (120). Training of the above artificial intelligence model can be performed using an edited image (120) and an original image (110) corresponding to the edited image (120). For example, based on the input of the operation (1030), an artificial intelligence model provided for the original restoration model can be trained using the original image (110) and the edited image (120).

[0138] Referring to FIG. 10, in operation (1040), according to one embodiment, a processor of an electronic device may generate a file (124) including an edited image (120) and feature information (1031). The processor may generate or store the file (124) including first metadata (122-1) including a change history from an original image (110) to an edited image (120) and information (e.g., feature information (1031)) to be used to restore the original image (110). The file (124) may include only the edited image (120) among the original image (110) or the edited image (120).

[0139] As described above, the file (124) stored by the processor that performed the operation of FIG. 10 may include feature information (1031) of a relatively small size, and may support restoration of the original image (110) using the feature information (1031). For example, when executing the restoration function of the original image (110), the feature information (1031) included in the second metadata (122-2) of the file (124) may be input into the decoding model (622) of FIG. 6B. By performing calculations indicated by the decoding model (622) into which the feature information (1031) is input, the electronic device may generate or display a restored image including the content indicated by the feature information (1031).

[0140] FIG. 11 is a diagram illustrating exemplary operations of an electronic device for generating a file including one or more prompts to be used to restore an original image, according to various embodiments. The electronic device (101) of FIGS. 1, 2A, and 2B, and / or the processor (210) of FIGS. 2A and / or 2B, may perform the operations described with reference to FIG. 11. At least one of the operations of FIG. 11 may be related to, or performed similarly to, the operations of FIG. 3. The order of the operations of FIG. 11 is exemplary, and in one embodiment, the electronic device may perform the operations of FIG. 11 in a different order than the order illustrated in FIG. 11. In one embodiment, the electronic device may perform at least two of the operations of FIG. 11 substantially simultaneously.

[0141] Referring to FIG. 11, in operation (1110), according to one embodiment, a processor of an electronic device may receive an input for editing an original image (1111). The processor may display an editing screen related to the original image (1111) on a display (e.g., display (130) of FIG. 1). While displaying the editing screen, the processor may receive an input of operation (1110). The input of operation (1110) may include an input of operation (310) of FIG. 3, an input of operation (710) of FIG. 7, an input of operation (810) of FIG. 8, an input of operation (910) of FIG. 9, and / or an input of operation (1010) of FIG. 10. The input of operation (1110) may be received through a UI displayed by the electronic device (101). Referring to FIG. 11, it is assumed that the processor receives an input for adding content to the original image (1111), which is displayed as an original image expressing a night scene including people and streetlights. For example, the electronic device (101) may provide an option for enlarging the size of the original image (1111) (e.g., expanding an area for out painting) within the editing screen. In response to an input related to the option, the electronic device (101) may detect an input of an action (1110) and generate a prompt (1121) related to the input.

[0142] Referring to FIG. 11, in operation (1120), according to one embodiment, a processor of an electronic device may display an edited image (1122) generated by executing an image editing model (230) using a first prompt (1121) based on an input. Operation (1120) may be performed similarly to operations (320, 330) of FIG. 3 , operation (720) of FIG. 7 , operation (820) of FIG. 8 , operation (920) of FIG. 9 , and / or operation (1020) of FIG. 10 . For example, a processor that receives an input of operation (1110) may obtain or generate a first prompt (1121) related to the input. For example, the processor may generate the first prompt (1121) using a visual object selected by the input. For example, the processor may detect a first prompt (1121) included in text input received from a user (e.g., a software keyboard and / or a virtual keyboard). For example, the processor may identify or detect the first prompt (1121) indicated by the audio signal based on the STT. By performing calculations indicated by the image editing model (230) using the original image (1111) and / or the first prompt (1121), the processor may obtain or generate an edited image (1122).

[0143] In the exemplary case of FIG. 11, from the image editing model (230) executed using the first prompt (1121), the processor can obtain an edited image (1122) having a larger size than the original image (1111). The edited image (1122) may have an appearance that further includes content (e.g., content expressing a night view of a city) on top of the original image (1111). For example, the edited image (1122) may further include a portion (1123) with respect to the original image (1111).

[0144] Referring to FIG. 11, in operation (1130), according to one embodiment, a processor of an electronic device may obtain a second prompt (1131) to be used for restoring an original image (1111) based on an input for storing an edited image (1122). For example, the processor may execute an artificial intelligence model for natural language processing to generate or obtain the second prompt (1131) to be used for restoring the original image (1111) from the first prompt (1121). For example, the processor may obtain a second prompt (1122) indicating a different editing action (e.g., an action for removing the added content) that is opposite to the editing action indicated by the first prompt (1121) (e.g., an action for adding content to the original image (1111).

[0145] In the exemplary case of FIG. 11, the processor can generate a first prompt for adding content to an original image (1111) (e.g., "Add a city night view to the top of the image", "Perform out-painting on a 500-pixel-tall rectangular expanded area at the top of the image") and a second prompt (e.g., "Remove the part above the light bulb", "Remove a 500-pixel-tall rectangular expanded area at the top of the image") that has the opposite meaning. For example, the second prompt can include words that have the opposite meaning of the first prompt. For example, the second prompt can have the opposite intent of the first prompt. For example, an artificial intelligence model that outputs the second prompt (1131) from the first prompt (1121) can be trained to generate a prompt that has the opposite meaning and / or intent of the prompt input to the artificial intelligence model.

[0146] Referring to FIG. 11, in operation (1140), according to one embodiment, a processor of an electronic device may generate a file (124) including an edited image (1122), a first prompt (1121), and / or a second prompt (1131). The processor may store the first prompt (1121) as history information used to generate the edited image (1122) in first metadata (122-1) of the file (124). The processor may store the second prompt (1131) as information for an artificial intelligence model to be executed to restore the original image (1111) in second metadata (122-2) of the file (124). For example, the processor may generate a file (124) including all of the edited image (1122), the first prompt (1121), and the second prompt (1131). The disclosure is not limited thereto.

[0147] Although exemplary operations of an electronic device generating a file (124) including a second prompt (1131) indicating removal of a portion (1123) of an edited image (1122) have been described, the disclosure is not limited thereto. For example, in one embodiment where an edited image is generated using a third prompt indicating addition of a particular subject, a fourth prompt may be stored within the file together with the third prompt indicating a different editing action than the third prompt (e.g., removal of the particular subject). In this example, when restoring the original image, the processor may use the fourth prompt to execute an image restoration model to alter or remove portions associated with the particular subject within the edited image.

[0148] As described above, the file (124) generated by the processor performing the operation of FIG. 11 may include a second prompt (1131) to be provided as an artificial intelligence model to be executed using the edited image (1122) in order to have a relatively small size, and may not include the original image (1111). When restoring the original image (1111), the electronic device may execute the image restoration model using the second prompt (1131) of the second metadata (122-2) and / or the edited image (1122) in the file (124), thereby generating a restoration image, which is an edited image (1122) to which an editing action related to the second prompt (1131) has been applied. The electronic device may provide or display the generated restoration image as a result of restoring the original image (1111).

[0149] FIG. 12 is a diagram illustrating exemplary operations of an electronic device for generating a file (124) including one or more prompts (1231) for at least a portion of an original image (1211) that is different from an edited image (1221), according to various embodiments. The electronic device (101) of FIGS. 1, 2A, and 2B, and / or the processor (210) of FIGS. 2A and / or 2B, may perform the operations described with reference to FIG. 12. At least one of the operations of FIG. 12 may be related to, or may be performed similarly to, the operations of FIG. 3. The order of the operations of FIG. 12 is exemplary, and in one embodiment, the electronic device may perform the operations of FIG. 12 in a different order than the order illustrated in FIG. 12. In one embodiment, the electronic device may perform at least two of the operations of FIG. 12 substantially simultaneously.

[0150] Referring to FIG. 12, in operation (1210), according to one embodiment, a processor of an electronic device may receive an input for editing an original image (1211). While displaying an editing screen, the processor may detect or receive an input of operation (1210) based on a touch gesture on a display (e.g., display (130) of FIG. 1). The processor may analyze an audio signal received through a microphone to identify the input of operation (1210). The input of operation (1210) may include an input of operation (310) of FIG. 3, an input of operation (710) of FIG. 7, an input of operation (810) of FIG. 8, an input of operation (910) of FIG. 9, an input of operation (1010) of FIG. 10, and / or an input of operation (1110) of FIG. 11. Referring to FIG. 12, it is assumed that the processor receives an input to change a specific subject (e.g., a palm tree) to another subject (e.g., a parasol and multiple chairs), while displaying an original image (1211) containing a person, a beach, and a palm tree.

[0151] Referring to FIG. 12 , in operation (1220), a processor of an electronic device according to an embodiment may display an edited image (1221) generated by modifying at least a portion (e.g., a portion related to a palm tree) of an original image (1211). Operation (1220) may be performed similarly to operations (320, 330) of FIG. 3 , operation (720) of FIG. 7 , operation (820) of FIG. 8 , operation (920) of FIG. 9 , operation (1020) of FIG. 10 , and / or operation (1120) of FIG. 11 . For example, the processor may generate a prompt related to the input of operation (1210). Using the generated prompt, the processor may perform calculations indicated by an image editing model (e.g., the image editing model (230) of FIG. 2A and / or FIG. 2B ), thereby obtaining or generating the edited image (1221). The processor can display the acquired edited image (1221) on the display.

[0152] Referring to FIG. 12 , in operation (1230), according to an embodiment, a processor of an electronic device may obtain a prompt (1231) for at least a portion (a portion related to a palm tree) of an original image (1211) based on an input for storing an edited image (1221). The prompt (1231) obtained based on operation (1230) may include a natural language sentence (e.g., for natural numbers x and y, "The photo includes a palm tree with a straight trunk measuring 300 pixels wide by 700 pixels high, centered at a coordinate location (x, y) planted on a sandy beach") describing at least a portion (e.g., a portion of the original image (1211) that is different from the edited image (1221)) of the original image (1211) before it is changed to the edited image (1221). The prompt (1231) can be generated by executing an artificial intelligence model trained to output one or more natural language sentences representing features of the input image from the input image.

[0153] For example, the prompt (1231) may include one or more words that indicate the type, shape, and / or location (e.g., location of a portion associated with a subject) within the original image (1211) of one or more subjects (e.g., palm trees) that were associated with the original image (1211) before being changed to the edited image (1221). For example, the processor may generate or obtain the prompt (1231) that describes at least a portion of the original image (1211). For example, the prompt (1231) may be a natural language sentence that describes at least a portion of the original image (1211) that is different from the edited image (1221) (e.g., "The photo includes a palm tree planted on a sandy beach"). For example, the prompt (1231) may include one or more words indicating the type, shape, and / or location within the original image (1211) of one or more subjects that were associated with the original image (1211) before being changed to the edited image (1221).

[0154] Referring to FIG. 12, in operation (1240), according to one embodiment, a processor of an electronic device may generate a file (124) including an edited image (1221) and an acquired prompt (1231). The processor may generate first metadata (122-1) including the edited image (1221), history information for generating the edited image (1221) from an original image (1211), second metadata (122-2) including the prompt (1231) of operation (1230), and third metadata (122-3) indicating a boundary (1212) of a portion of the original image (1211) that is different from the edited image (1221). The third metadata (122-3) may include an image (e.g., an edge image) representing the boundary (1212).

[0155] In one embodiment, the processor may generate or store a file (124) comprising a result of recognizing one or more subjects associated with the original image (1211). The result may include data representing portions of the original image (1211) associated with the one or more subjects (e.g., data for forming bounding boxes). The result may include an identifier (e.g., an ID and / or a key value) uniquely assigned to the one or more subjects and the data matching the identifier.

[0156] In one embodiment, the processor may store or insert data (e.g., an edge image) representing a boundary (1212) of a portion of the original image (1211) that is different from the edited image (1221) within the third metadata (122-3). The third metadata (122-3) may be stored within the file (124) to guide a portion of the edited image (1221) to be replaced by a prompt (1231) of the second metadata (122-2). The information representing the portion of the edited image (1221) stored in the third metadata (122-3) may be referred to as layout information for the portion.

[0157] In one embodiment, when generating a file of operation (1240), the processor may train or update an artificial intelligence model (e.g., the image editing model (230) of FIGS. 2A and / or 2B , and / or the image restoration model (1431) of FIG. 14 ) related to restoration of the original image (1121) using information related to the original image (1121) (e.g., keywords and / or natural language sentences describing the original image (1121), edge images, and / or layout information). The training may be performed such that the artificial intelligence model generates or outputs a prompt optimized for restoration of the original image (1121). For example, the prompt may be generated by a dedicated artificial intelligence model for inferring or generating a prompt (e.g., a prompt inference model). For example, the prompt inference model may be trained together with the artificial intelligence model for altering and / or restoring the original image (1121).

[0158] In one embodiment, the file of operation (1240) may be generated based on the similarity between the restored image and the original image (1211), generated using the prompt obtained based on operation (1230). For example, the processor may execute an artificial intelligence model (e.g., the image restoration model (1431) of FIG. 14) using the prompt of operation (1230) to generate or obtain the restored image. The processor may calculate or determine the similarity between the restored image and the original image (1211). In response to a similarity exceeding (or greater than) a threshold similarity, the processor may perform operation (1240) to generate a file including the prompt of operation (1230). In response to a similarity less than (or equal to) the threshold similarity, the processor may, instead of performing operation (1240), perform operation (1230) again to re-obtain at least one prompt associated with the original image (1211). By comparing the restored image generated using the re-acquired prompt and the original image (1211), the processor can determine whether to perform the operation (1240) using the re-acquired prompt.

[0159] As described above, a file (124) that supports restoration to an original image (1211) while having a relatively small size can be generated by a processor that performs the operation of FIG. 12. Using a file (124) that does not include an original image (1211), an electronic device can generate or obtain a restored image that includes the appearance and / or content of the original image from an edited image (1221) included in the file (124) by using a prompt (1231) of the second metadata (122-2) and an edge image of the third metadata (122-3).

[0160] FIG. 13 is a diagram illustrating exemplary operations of an electronic device that generates a file (124) including one or more prompts (e.g., prompts (1331)) and location information related to an original image (1311), according to various embodiments. The electronic device (101) of FIGS. 1, 2A, and 2B, and / or the processor (210) of FIGS. 2A and / or 2B, may perform the operations described with reference to FIG. 13. At least one of the operations of FIG. 13 may be related to, or may be performed similarly to, the operations of FIG. 3. The order of the operations of FIG. 13 is exemplary, and in one embodiment, the electronic device may perform the operations of FIG. 13 in a different order than the order illustrated in FIG. 13. In one embodiment, the electronic device may perform at least two of the operations of FIG. 13 substantially simultaneously.

[0161] Referring to FIG. 13, within operation (1310), according to one embodiment, a processor of an electronic device may receive an input for editing an original image (1311). The input of operation (1310) may represent information (e.g., one or more prompts) to be used for executing an image editing model (e.g., the image editing model (230) of FIGS. 2A and / or 2B). The input of operation (1310) may include the input of operation (310) of FIG. 3, the input of operation (710) of FIG. 7, the input of operation (810) of FIG. 8, the input of operation (910) of FIG. 9, the input of operation (1010) of FIG. 10, the input of operation (1110) of FIG. 11, and / or the input of operation (1210) of FIG. 12. Referring to FIG. 13, it is assumed that the processor detects or receives an input of an action (1310) while displaying an editing screen containing an original image (1311) representing a landscape including a person, a telephone booth, and a steel fence.

[0162] Referring to FIG. 13, in operation (1320), according to one embodiment, a processor of an electronic device may display an edited image (1321) generated by changing at least a portion (e.g., portion (1312)) of an original image (1311). Operation (1320) may be performed similarly to operations (320, 330) of FIG. 3 , operation (720) of FIG. 7 , operation (820) of FIG. 8 , operation (920) of FIG. 9 , operation (1020) of FIG. 10 , operation (1120) of FIG. 11 , and / or operation (1220) of FIG. 12 . For example, when an input for changing a portion (1312) corresponding to a background of the original image (1311) is received, the processor may execute an image editing model using a prompt related to the input (e.g., "Change the background of the photo to a night view of a city"). The processor can display an edited image (1321) obtained by performing calculations indicated by an image editing model on a display. Referring to FIG. 13, an edited image (1321) in which a portion (1312) corresponding to the background in the original image (1311) is changed can be displayed.

[0163] Referring to FIG. 13, in operation (1330), according to one embodiment, a processor of an electronic device may obtain a prompt (1331) for at least a portion (e.g., portion (1312)) of an original image (1311) and location information associated with the original image (1311) based on an input for storing an edited image (1321). The processor may obtain the prompt (1331) of operation (1330), which is a natural language sentence describing a portion (1312) of the original image (1311) that is different from the edited image (1321). The prompt (1331) may include a natural language sentence describing the content of the portion (1312) of the original image (1311), such as, "The background of the photo includes a public telephone booth, a tree, and a steel fence."

[0164] In one embodiment, along with information related to the original image (1311) (e.g., prompt (1331)), the processor may obtain location information to be used by obtaining additional images and / or videos to be used for restoration of the original image (1311). For example, the location information may include GPS coordinates for a point at which the original image (1311) was captured. For example, the location information may be used to obtain information about a real space related to the original image (1311) when a function for restoring the original image (1311) is executed. The information about the real space may include images uploaded to the Internet (e.g., road view images and / or images uploaded to a social network service (SNS)). The location information is not limited to the GPS coordinates, and may include addresses within the network of information about the real space (e.g., uniform resource locators (URLs) and / or uniform resource indicators (URIs)). Addresses within the network may be linked to images and / or videos based on real-world locations associated with the original images (1311) uploaded to the Internet.

[0165] Referring to FIG. 13, in operation (1340), according to one embodiment, a processor of an electronic device may generate a file (124) including an edited image (1321), a prompt (1331), and location information. The processor performing operation (1340) may search for or obtain an image similar to the original image (1311) from among images uploaded to the Internet using the location information of operation (1330). The processor may store an address (e.g., URL and / or URI) within a network representing the searched image in the metadata of the file (124). The file (124) may include the edited image (1321) from among the original image (1311) or the edited image (1321). For example, the file (124) may include first metadata (122-1) including history information during the process of generating the edited image (1321) by modifying the original image (1311). For example, the file (124) may include second metadata (122-2) including a prompt (1331) to be input into an artificial intelligence model (e.g., an image restoration model) to restore the original image (1311). For example, the file (124) may include third metadata (122-3) including information representing a boundary of a portion (1312) that is different from the edited image (1321). For example, the file (124) may include fourth metadata (122-4) including an action (1330).

[0166] As described above, the file (124) generated based on the operation (1340) of FIG. 13 may include information for restoring the edited image (1321) and the original image (1311) corresponding to the edited image (1321). When the function for restoring the original image (1311) using the file (124) is executed, the electronic device may execute an image restoration model using the prompt (1331) of the second metadata (122-2). For example, at least one of the edited image (1321), information included in the third metadata (122-3) (e.g., information related to the portion (1312)), or location information included in the fourth metadata (122-4) may be input into the image restoration model. For example, an image (e.g., a photo of an actual space) and / or a video crawled (or searched) from the Internet based on the location information may be input into the image restoration model.

[0167] Hereinafter, with reference to FIG. 14, an exemplary operation of an electronic device for restoring an original image (1311) using a file (124) generated based on the operations of FIGS. 1 to 13 is described in more detail.

[0168] FIG. 14 is a diagram illustrating exemplary operations of an electronic device for restoring an original image (110) according to various embodiments. The electronic device (101) of FIGS. 1, 2A, and 2B, and / or the processor (210) of FIGS. 2A and / or 2B may perform the operations described with reference to FIG. 14. The order of the operations of FIG. 14 is exemplary, and in one embodiment, the electronic device may perform the operations of FIG. 14 in a different order than the order illustrated in FIG. 14. In one embodiment, the electronic device may perform at least two of the operations of FIG. 14 substantially simultaneously.

[0169] Referring to FIG. 14, in operation (1410), according to one embodiment, a processor of an electronic device may display an edited image (120) corresponding to an original image (110). The processor may display the edited image (120) identified from a file (124) on a display (e.g., the display (130) of FIG. 1). For example, the processor may control the display to display a viewer screen including the edited image (120). The processor may determine whether the original image (110) can be restored using metadata stored in the file (124) (e.g., the first metadata (122-1) to the fourth metadata (122-4) described with reference to FIGS. 1 to 13). If the original image (110) corresponding to the edited image (120) can be restored, the processor may display a visual object for restoring the original image (110) on the display.

[0170] Referring to FIG. 14, in operation (1420), according to one embodiment, a processor of an electronic device may receive an input for at least partially restoring an original image (110). The input may include an input indicating a selection of a visual object displayed by the processor performing operation (1410). Based on the input, the processor may perform operation (1430).

[0171] Referring to FIG. 14, in operation (1430), according to one embodiment, a processor of an electronic device may obtain metadata for at least partially restoring an original image (110) from a file (124) including an edited image (120). The metadata of operation (1430) may include at least one of the first metadata (122-1) to the fourth metadata (122-4) described with reference to FIGS. 1 to 13. The metadata of operation (1430) may include information related to the original image (110) (or content of the original image (110), such as information in Table 1.

[0172] Referring to FIG. 14, in operation (1440), according to one embodiment, a processor of an electronic device may execute an image restoration model (1431) using acquired metadata to generate at least a portion of a restoration image (150). The image restoration model (1431) of FIG. 14 may have a structure of the generative artificial intelligence model of FIGS. 6A to 6F. The processor may execute the image restoration model (1431) using the metadata and / or the edited image (120) of operation (1430). In one embodiment where the image restoration model (1431) is installed in the electronic device, the processor may directly perform calculations indicated by the image restoration model (1431) to generate at least a portion of the restoration image (150) of operation (1440). In one embodiment where the image restoration model (1431) is installed in an external electronic device different from the electronic device (e.g., the external electronic device (250) of FIG. 2B), the processor may communicate with the external electronic device to receive or obtain at least a portion of the restoration image (150) from the external electronic device. For example, the processor may use metadata of the file (124) to identify the image restoration model (1431) to be used to generate the restoration image (150) (e.g., type, structure, name, and / or location information of the image restoration model (1431), etc.). The processor may request the external electronic device to generate the restoration image (150) using the identified image restoration model (1431).

[0173] Referring to FIG. 14, in operation (1450), according to one embodiment, a processor of an electronic device may display at least a portion of a restored image (150). For example, the processor may display at least a portion of the restored image (150) by replacing an edited image (120) displayed on the display. The restored image (150) may include content and / or an appearance of the original image (110).

[0174] As described above, according to one embodiment, the electronic device can store reduced-size information related to the original image (110) in a file (124) that contains only the edited image (120) without the original image (110) (e.g., within metadata). Using the reduced-size information, the file (124) can support restoration to the original image (110) while having a relatively small size.

[0175] FIG. 15 is a diagram illustrating exemplary programs executed by an electronic device to simulate a generative artificial intelligence model (1530) according to various embodiments. Referring to FIG. 15, a generative artificial intelligence system is illustrated. According to one embodiment, a processor (e.g., processor (210) of FIGS. 2A and / or 2B) of an electronic device (e.g., electronic device (101) of FIG. 1) may execute one or more programs defined by blocks of FIG. 15 to execute functions related to the generative artificial intelligence model (1530).

[0176] According to one embodiment, a user question response interface (1510) executed by an electronic device may be executed by the electronic device to receive a user input. The input may include a non-verbal gesture (e.g., a touch input on a display of the electronic device), natural language sentences such as prompts, images, videos, or a combination thereof. The electronic device executing the user question response interface (1510) may obtain context information at the time of receiving the input. The context information may include various information at the time, and may include, for example, the status of a program (or software application) executed by the electronic device. The context information may include, for example, location information of the electronic device and / or the user.

[0177] An electronic device executing a user query response interface (1510) may output information generated by a generative artificial intelligence model (1530) in response to the input. The information may be output in the form of natural language sentences. The information may be output in the form of a UI displayed on a display. The information generated by the generative artificial intelligence model (1530) may be output in a format selected by the user.

[0178] The AI ​​framework (1520) may be a program for executing or controlling a component (e.g., a prompt design component (1521), an application programming interface (API) / plugin management component (1522), and / or a refinery component (1523)) based on input received through a user question response interface (1510). The input detected by executing the user question response interface (1510) may be processed by the prompt design component (1521). An electronic device executing the prompt design component (1521) may generate one or more prompts to be input into a generative artificial intelligence model (1530), such as a large language model (LLM), from the input. The prompt design component (1521) may include an artificial intelligence model that is trainable to generate improved prompts.

[0179] An electronic device that executes the prompt design component (1521) can access knowledge repositories (1540) to obtain information for generating prompts. The information for generating prompts may include data on preferences of a user of the electronic device, a prompt library, and / or exemplary prompts. One or more prompts generated based on the execution of the prompt design component (1521) may be used for executing a generative artificial intelligence model (1530).

[0180] An electronic device executing an API / plug-in management component (1522) may, when executing a generative artificial intelligence model (1530) based on a user's input, execute a function to obtain additional information required for executing the generative artificial intelligence model (1530). The API provided by the API / plug-in management component (1522) may be used to establish a communication link (e.g., a channel and / or session) between the generative artificial intelligence model (1530) and another software application. Through the communication link, information additionally required for executing the generative artificial intelligence model (1530) may be provided to the generative artificial intelligence model (1530).

[0181] An electronic device executing an API / plug-in management component (1522) can trigger an action to be performed by an application / service component (1550) (e.g., a program and / or software application installed on the electronic device) using an API provided by the API / plug-in management component (1522). Information acquired by executing the application / service component (1550) can be used to generate a prompt based on the execution of the prompt design component (1521) and / or can be input into a generative artificial intelligence model (1530).

[0182] The refinement component (1523) (or output modification component) can change, tamper with, or tune the output data of the generative artificial intelligence model (1530). The electronic device executing the refinement component (1523) can detect relevance, bias, appropriateness, or hallucination of the output data of the generative artificial intelligence model (1530). The electronic device executing the refinement component (1523) can determine whether to re-execute the generative artificial intelligence model (1530) based on the detected relevance, bias, appropriateness, and / or hallucination. The electronic device executing the refinement component (1523) can display hints (e.g., images and / or text) to the user to reduce or prevent unintended output data.

[0183] A generative artificial intelligence model (1530) may refer to, for example, an artificial intelligence model that generates new information and / or data based on a user's input. The generative artificial intelligence model (1530) may include an artificial intelligence model that generates images and / or natural language. The artificial intelligence model that generates images may include a diffusion model based on a generative adversarial network (GAN), a variational auto encoder (VAE), and / or a transformer. The artificial intelligence model that generates natural language may include a model trained to output statistically appropriate natural language, such as CHAT-GPT 3 and / or CHAT-GPT 4. The disclosure is not limited thereto, and the generative artificial intelligence model (1530) may include a large multimodal model (LMM) that receives various types of input data including text, images, and / or audio signals, and then generates output data related to the input data.

[0184] FIG. 16 is a block diagram of an electronic device (1601) within a network environment (1600) according to various embodiments. Referring to FIG. 16, in the network environment (1600), the electronic device (1601) may communicate with the electronic device (1602) via a first network (1698) (e.g., a short-range wireless communication network), or may communicate with at least one of the electronic device (1604) or the server (1608) via a second network (1699) (e.g., a long-range wireless communication network). In one embodiment, the electronic device (1601) may communicate with the electronic device (1604) via the server (1608). According to one embodiment, the electronic device (1601) may include a processor (1620), a memory (1630), an input module (1650), an audio output module (1655), a display module (1660), an audio module (1670), a sensor module (1676), an interface (1677), a connection terminal (1678), a haptic module (1679), a camera module (1680), a power management module (1688), a battery (1689), a communication module (1690), a subscriber identification module (1696), or an antenna module (1697). In various embodiments, the electronic device (1601) may omit at least one of these components (e.g., the connection terminal (1678)), or may have one or more other components added. In various embodiments, some of these components (e.g., sensor module (1676), camera module (1680), or antenna module (1697)) may be integrated into one component (e.g., display module (1660)).

[0185] The processor (1620) may include various processing circuits and / or multiple processors. For example, as used herein, including in the claims, the term "processor" may include various processing circuits, including at least one processor, one or more of which may be configured to perform the various functions described herein, individually and / or collectively, in a distributed manner. As used herein, when "processor," "at least one processor," and "one or more processors" are described as being configured to perform several functions, these expressions also cover, for example, but not limited to, situations where a processor performs some of the described functions and other processor(s) perform the remainder of the described functions, and situations where a single processor performs all of the described functions. Additionally, the at least one processor may include a combination of processors that perform the various functions described / described, for example, in a distributed manner. The at least one processor may execute program instructions to achieve or perform the various functions. The processor (1620) may control at least one other component (e.g., a hardware or software component) of the electronic device (1601) connected to the processor (1620) by executing, for example, software (e.g., a program (1640)), and may perform various data processing or operations. According to one embodiment, as at least a part of the data processing or operations, the processor (1620) may store commands or data received from other components (e.g., a sensor module (1676) or a communication module (1690)) in a volatile memory (1632), process the commands or data stored in the volatile memory (1632), and store result data in a non-volatile memory (1634).According to one embodiment, the processor (1620) may include a main processor (1621) (e.g., a central processing unit or an application processor) or an auxiliary processor (1623) (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 (1621). For example, when the electronic device (1601) includes the main processor (1621) and the auxiliary processor (1623), the auxiliary processor (1623) may be configured to use less power than the main processor (1621) or to be specialized for a given function. The auxiliary processor (1623) may be implemented separately from the main processor (1621) or as a part thereof.

[0186] The auxiliary processor (1623) may control at least a portion of functions or states associated with at least one component (e.g., the display module (1660), the sensor module (1676), or the communication module (1690)) of the electronic device (1601), for example, on behalf of the main processor (1621) while the main processor (1621) is in an inactive (e.g., sleep) state, or together with the main processor (1621) while the main processor (1621) is in an active (e.g., application execution) state. In one embodiment, the auxiliary processor (1623) (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 (1680) or a communication module (1690)). In one embodiment, the auxiliary processor (1623) (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 (1601) itself where the artificial intelligence model is executed, or can be performed through a separate server (e.g., server (1608)). 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.

[0187] The memory (1630) can store various data used by at least one component (e.g., the processor (1620) or the sensor module (1676)) of the electronic device (1601). The data can include, for example, software (e.g., the program (1640)) and input data or output data for commands related thereto. The memory (1630) can include volatile memory (1632) or non-volatile memory (1634).

[0188] The program (1640) may be stored as software in memory (1630) and may include, for example, an operating system (1642), middleware (1644), or an application (1646).

[0189] The input module (1650) can receive commands or data to be used in a component of the electronic device (1601) (e.g., a processor (1620)) from an external source (e.g., a user) of the electronic device (1601). The input module (1650) 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).

[0190] The audio output module (1655) can output audio signals to the outside of the electronic device (1601). The audio output module (1655) 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.

[0191] The display module (1660) can visually provide information to an external party (e.g., a user) of the electronic device (1601). The display module (1660) may include, for example, a display, a holographic device, or a projector and a control circuit for controlling the device. In one embodiment, the display module (1660) 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.

[0192] The audio module (1670) can convert sound into an electrical signal, or vice versa. According to one embodiment, the audio module (1670) can acquire sound through the input module (1650), output sound through the sound output module (1655), or an external electronic device (e.g., electronic device (1602)) (e.g., speaker or headphone) directly or wirelessly connected to the electronic device (1601).

[0193] The sensor module (1676) can detect the operating status (e.g., power or temperature) of the electronic device (1601) 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 (1676) 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.

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

[0195] The connection terminal (1678) may include a connector through which the electronic device (1601) may be physically connected to an external electronic device (e.g., the electronic device (1602)). In one embodiment, the connection terminal (1678) may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).

[0196] The haptic module (1679) 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. In one embodiment, the haptic module (1679) may include, for example, a motor, a piezoelectric element, or an electrical stimulation device.

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

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

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

[0200] The communication module (1690) may support the establishment of a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device (1601) and an external electronic device (e.g., electronic device (1602), electronic device (1604), or server (1608)), and the performance of communication through the established communication channel. The communication module (1690) may operate independently from the processor (1620) (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 (1690) may include a wireless communication module (1692) (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 (1694) (e.g., a local area network (LAN) communication module, or a power line communication module). Any of these communication modules may communicate with an external electronic device (1604) via a first network (1698) (e.g., a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network (1699) (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 local area network or a wide area network)). These various types of communication modules may 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 (1692) may use subscriber information (e.g., an international mobile subscriber identity (IMSI)) stored in the subscriber identification module (1696) to identify or authenticate the electronic device (1601) within a communication network such as the first network (1698) or the second network (1699).

[0201] The wireless communication module (1692) 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 communications (URLLC (ultra-reliable and low-latency communications)). The wireless communication module (1692) can support, for example, a high-frequency band (e.g., mmWave band) to achieve a high data transmission rate. The wireless communication module (1692) may support various technologies for securing performance in high-frequency bands, 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 (1692) may support various requirements specified in the electronic device (1601), an external electronic device (e.g., the electronic device (1604)), or a network system (e.g., the second network (1699)). According to one embodiment, the wireless communication module (1692) may support a peak data rate (e.g., 20 Gbps or more) for eMBB implementation, a loss coverage (e.g., 164 dB or less) for mMTC implementation, 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 implementation.

[0202] The antenna module (1697) 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 (1697) may include an antenna including a radiator including a conductor or a conductive pattern formed on a substrate (e.g., a PCB). In one embodiment, the antenna module (1697) 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 (1698) or the second network (1699), may be selected from the plurality of antennas by, for example, the communication module (1690). A signal or power may be transmitted or received between the communication module (1690) and the 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 (1697).

[0203] According to various embodiments, the antenna module (1697) 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.

[0204] 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)).

[0205] According to one embodiment, commands or data may be transmitted or received between the electronic device (1601) and an external electronic device (1604) via a server (1608) connected to a second network (1699). Each of the external electronic devices (1602 or 704) may be the same or a different type of device as the electronic device (1601). According to one embodiment, all or part of the operations executed in the electronic device (1601) may be executed in one or more of the external electronic devices (1602, 704, or 708). For example, when the electronic device (1601) is to perform a certain function or service automatically or in response to a request from a user or another device, the electronic device (1601) 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 (1601). The electronic device (1601) 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 (1601) may provide an ultra-low latency service by using distributed computing or mobile edge computing, for example. In one embodiment, the external electronic device (1604) may include an Internet of Things (IoT) device. The server (1608) may be an intelligent server utilizing machine learning and / or a neural network.In one embodiment, an external electronic device (1604) or server (1608) may be included within the second network (1699). The electronic device (1601) may be applied to intelligent services (e.g., smart homes, smart cities, smart cars, or healthcare) based on 5G communication technology and IoT-related technology.

[0206] Electronic devices according to 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, home appliances, or the like. Electronic devices according to embodiments of this document are not limited to the aforementioned devices.

[0207] 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.

[0208] The term "module" used in various embodiments of this document may include a unit implemented in hardware, and may be used interchangeably with terms such as 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).

[0209] Various embodiments of the present document may be implemented as software (e.g., a program (1640)) including one or more instructions stored in a storage medium (e.g., an internal memory (1636) or an external memory (1638)) readable by a machine (e.g., an electronic device (1601)). For example, a processor (e.g., a processor (1620)) of the machine (e.g., an electronic device (1601)) 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, a 'non-transitory' storage medium is a tangible device and may not be a signal (e.g., an electromagnetic wave), but the term does not distinguish between cases where data is stored semi-permanently on the storage medium and cases where it is stored temporarily.

[0210] According to one embodiment, the method according to various embodiments disclosed in the present 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) via 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.

[0211] 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. The electronic device (1601) of FIG. 16 may be an example of the electronic device (101) of FIG. 1, FIG. 2a, and / or FIG. 2b.

[0212] In one embodiment, a method may be required to store an edited image of an original image together with information for restoring the original image. In one embodiment, a method may be required to generate information required for restoring the original image using an artificial intelligence model. As described above, according to an embodiment, an electronic device (e.g., electronic device 101 of FIG. 1 and / or electronic device 1601 of FIG. 16) may include a display (e.g., display 130 of FIG. 1), at least one processor (e.g., processor 210 of FIGS. 2A and / or 2B), and a memory (e.g., memory 215 of FIGS. 2A and / or 2B). The at least one processor may be individually and / or collectively configured to control the display to display an image including at least one object through the display. The at least one processor may be individually and / or collectively configured to receive an input regarding the at least one object. At least one processor may be configured, individually and / or collectively, to generate an AI image using an AI model, at least in part based on the input, wherein the at least one object is replaced with an object generated by the AI. The at least one processor may be configured, individually and / or collectively, to generate first information about the input and second information about the object generated by the AI. The at least one processor may be configured, individually and / or collectively, to store, in the memory, a file comprising metadata including the first information and the second information and the AI ​​image. In one embodiment, the electronic device may store an edited image of an original image together with information for restoring the original image.According to one embodiment, an electronic device can generate information required to restore an original image using an artificial intelligence model.

[0213] For example, at least one processor may be configured, individually and / or collectively, to control the display to display the AI ​​image as a substitute for the image. At least one processor may be configured, individually and / or collectively, to receive another user input for storing the AI ​​image while displaying the AI ​​image.

[0214] For example, at least one processor may be configured, individually and / or collectively, to generate the first information comprising a prompt corresponding to a natural language sentence describing the at least one object.

[0215] For example, at least one processor may be configured, individually and / or collectively, to obtain second information comprising a different prompt comprising a word having an opposite meaning to a word included in the prompt included in the first information.

[0216] For example, at least one processor may be configured, individually and / or collectively, to generate, as at least part of generating said first information, said first information including feature information associated with said at least one object.

[0217] For example, at least one processor may be configured, individually and / or collectively, to generate first information comprising pixel information of the at least one object that has been replaced, at least as part of generating the first information.

[0218] For example, at least one processor may be configured, individually and / or collectively, to generate the first information comprising a prompt related to the object generated by the artificial intelligence.

[0219] For example, at least one processor may be configured, individually and / or collectively, to generate second information representing a pixel difference between the image and the artificial intelligence image, at least as part of generating the second information.

[0220] In one embodiment, as described above, a non-transitory computer-readable storage medium comprising instructions may be provided. The instructions, when individually and / or collectively executed by at least one processor of an electronic device including a display, may cause the electronic device to display an image including at least one object through the display. The instructions, when individually and / or collectively executed by at least one processor including a processing circuit of the electronic device, may cause the electronic device to receive an input regarding the at least one object. The instructions, when individually and / or collectively executed by at least one processor including a processing circuit of the electronic device, may cause the electronic device to generate an artificial intelligence image using an artificial intelligence model based at least in part on the input, wherein the at least one object is replaced with an object generated by the artificial intelligence. The instructions, when individually and / or collectively executed by at least one processor, including a processing circuit, of the electronic device, may cause the electronic device to generate first information about the input and second information about the object generated by the artificial intelligence. The instructions, when individually and / or collectively executed by at least one processor, including a processing circuit, of the electronic device, may cause the electronic device to store, in a memory of the electronic device, a file, including metadata including the first information and the second information, and the artificial intelligence image.

[0221] For example, the instructions, when individually and / or collectively executed by at least one processor, including processing circuitry, of the electronic device, may cause the electronic device to display the artificial intelligence image as a substitute for the image. The instructions, when individually and / or collectively executed by at least one processor, including processing circuitry, of the electronic device, may cause the electronic device to receive another input for storing the artificial intelligence image while displaying the artificial intelligence image.

[0222] For example, the instructions, when individually and / or collectively executed by at least one processor, including a processing circuit, of the electronic device, may cause the electronic device to generate the first information, the first information including a prompt corresponding to a natural language sentence describing the at least one object.

[0223] For example, the instructions, when individually and / or collectively executed by at least one processor, including a processing circuit, of the electronic device, may cause the electronic device to obtain second information comprising a different prompt, the second information comprising a word having a designation opposite to a word included in the prompt included in the first information.

[0224] For example, the instructions, when individually and / or collectively executed by at least one processor, including a processing circuit, of the electronic device, may cause the electronic device to generate, as at least part of generating the first information, the first information including feature information associated with the at least one object.

[0225] For example, the instructions, when individually and / or collectively executed by at least one processor, including a processing circuit, of the electronic device, may cause the electronic device to generate first information comprising pixel information of the at least one object that has been replaced, at least as part of generating the first information.

[0226] For example, the instructions, when individually and / or collectively executed by at least one processor, including a processing circuit, of the electronic device, may cause the electronic device to generate the first information, the first information including a prompt related to the object generated by the artificial intelligence.

[0227] For example, the instructions, when individually and / or collectively executed by at least one processor, including a processing circuit, of the electronic device, may cause the electronic device to generate the second information representing a pixel difference between the original image and the edited image, at least as part of generating the second information.

[0228] According to an embodiment, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (1601) of FIG. 16) may include a display (e.g., display (130) of FIG. 1), at least one processor including processing circuitry (e.g., processor (210) of FIGS. 2A and / or 2B), and a memory including one or more storage media for storing instructions (e.g., memory (215) of FIGS. 2A and / or 2B). The at least one processor may be configured to individually or collectively execute the instructions, and may be configured to cause the electronic device to display an editing screen including an original image (e.g., original image (110) of FIG. 1) on the display. At least one processor may be configured to individually or collectively execute the instructions, and cause the electronic device to, based on receiving a first input for editing the original image through the editing screen, execute an artificial intelligence model using first information related to the first input to generate an edited image corresponding to the original image (e.g., edited images (115, 120) of FIG. 1 ). At least one processor may be configured to individually or collectively execute the instructions, and cause the electronic device to, in response to the first input, display the edited image on the editing screen.At least one processor may be configured to individually or collectively execute the instructions, and cause the electronic device to generate second information related to an artificial intelligence model to be executed to restore the original image based on receiving a second input for storing the edited image while displaying the edited image. At least one processor may be configured to individually or collectively execute the instructions, and cause the electronic device to store, in the memory, metadata (e.g., metadata 122 of FIG. 1 ) including the first information and the second information and a file (e.g., file 124 of FIG. 1 ) including the edited image. In one embodiment, the electronic device may store the edited image for the original image together with information for restoring the original image. In one embodiment, the electronic device may generate information required to restore the original image using the artificial intelligence model.

[0229] For example, at least one processor may be configured, individually or collectively, to cause the electronic device to generate the second information comprising a prompt describing the original image (e.g., data (932) of FIG. 9 and / or prompt (1231) of FIG. 12).

[0230] For example, the prompt may include a natural language sentence describing at least a portion of the original image that is different from the edited image.

[0231] For example, at least one processor may be configured, individually or collectively, to cause the electronic device to obtain second information that includes a second prompt (e.g., a second prompt (1131) of FIG. 11) that includes a word having a designation opposite to a word included in a first prompt (e.g., a first prompt (1121) of FIG. 11) included in the first information.

[0232] For example, at least one processor may be individually or collectively configured to cause the electronic device to generate, based on receiving the second input, second information comprising feature information (e.g., feature information (1031) of FIG. 10) associated with at least a portion of the original image. The at least a portion of the original image (e.g., portion (1011) of FIG. 10) may correspond to at least a portion of the edited image to be replaced to restore the original image.

[0233] For example, at least one processor may be configured, individually or collectively, to cause the electronic device to generate, based on receiving the second input, second information comprising pixel information of a first region within the portion of the original image (e.g., pixel information (931) of FIG. 9 ) distinguished by content of the portion of the original image and a prompt associated with a second region within the portion that is different from the first region (e.g., data (932) of FIG. 9 ).

[0234] For example, at least one processor may be individually or collectively configured to cause the electronic device to generate, based on receiving the second input, the second information representing a pixel difference between the original image and the edited image.

[0235] For example, at least one processor may be individually or collectively configured to cause the electronic device to generate, based on receiving the second input, the second information representing the color of pixels corresponding to the portion of the original image that has been modified to generate the edited image.

[0236] In one embodiment, as described above, a non-transitory computer-readable storage medium comprising instructions may be provided. The instructions, when individually and / or collectively executed by at least one processor, including processing circuitry, of an electronic device including a display, may cause the electronic device to display an editing screen including an original image on the display. The instructions, when individually and / or collectively executed by at least one processor, including processing circuitry, of the electronic device including the display, may cause the electronic device to, based on receiving a first input for editing the original image through the editing screen, execute an artificial intelligence model using first information related to the first input to generate an editing image corresponding to the original image. The instructions, when individually and / or collectively executed by at least one processor, including processing circuitry, of the electronic device including the display, may cause the electronic device to display the editing image on the editing screen in response to the first input. The instructions, when individually and / or collectively executed by at least one processor, including a processing circuit, of an electronic device including a display, may cause the electronic device to generate second information related to an artificial intelligence model to be executed to restore the original image based on receiving a second input for storing the edited image while displaying the edited image.The instructions, when individually and / or collectively executed by at least one processor, including a processing circuit, of an electronic device including a display, may cause the electronic device to store a file including metadata including the first information and the second information and the edited image in a memory of the electronic device.

[0237] For example, the instructions, when individually and / or collectively executed by at least one processor, including processing circuitry, of the electronic device, may cause the electronic device to generate the second information, the second information including a prompt describing the original image.

[0238] For example, the prompt may include a natural language sentence describing at least a portion of the original image that is different from the edited image.

[0239] For example, the instructions, when executed individually and / or collectively by at least one processor, including a processing circuit, of the electronic device, may cause the electronic device to obtain second information comprising a second prompt, the second prompt comprising a word having a designation opposite to a word included in a first prompt included in the first information.

[0240] For example, the instructions, when individually and / or collectively executed by at least one processor, including a processing circuit, of the electronic device, may cause the electronic device to generate second information, based on receiving the second input, the second information including feature information associated with at least a portion of the original image. The at least a portion of the original image may correspond to at least a portion of the edited image, which is to be replaced to restore the original image.

[0241] For example, the instructions, when executed individually and / or collectively by at least one processor, including a processing circuit, of the electronic device, may cause the electronic device, based on receiving the second input while generating the edited image by modifying the portion of the original image, to generate second information, the second information including pixel information of a first region within the portion, the first region being distinguished by content of the portion of the original image, and a prompt associated with a second region within the portion, the second region being different from the first region.

[0242] For example, the instructions, when individually and / or collectively executed by at least one processor, including a processing circuit, of the electronic device, may cause the electronic device to generate the second information representing a pixel difference between the original image and the edited image based on receiving the second input.

[0243] For example, the instructions, when individually and / or collectively executed by at least one processor, including a processing circuit, of the electronic device, may cause the electronic device to generate the second information representing the color of pixels corresponding to the portion of the original image that has been modified to generate the edited image based on receiving the second input.

[0244] As described above, in one embodiment, a method of an electronic device including a display may be provided. The method may include an operation of displaying an editing screen including an original image on the display. The method may include an operation of changing a first portion of the original image based on receiving a first input for editing the original image. The method may include an operation of displaying an edited image, which is the original image in which the first portion has been changed into a second portion, while receiving a second input for storing the edited image, the method may include an operation of storing first metadata representing the second portion, second metadata including information for restoring content of the first portion of the original image different from the edited image using an artificial intelligence model, and a file including the edited image among the original image and the edited image.

[0245] For example, the changing operation may include an operation of executing an artificial intelligence model using a first prompt indicated by the first input to obtain the edited image in which the first portion has been changed.

[0246] For example, the saving operation may include saving the first prompt in the first metadata. The saving operation may include saving a second prompt including a word having a designation opposite to a word included in the first prompt in the second metadata.

[0247] For example, the saving operation may include storing at least one prompt describing the content of the first portion to be input to the artificial intelligence model in the second metadata.

[0248] For example, the storing operation may include an operation of storing feature information of the first portion of the original image in the second metadata.

[0249] According to one embodiment, an electronic device (e.g., the electronic device (101) of FIG. 1 and / or the electronic device (1601) of FIG. 16) as described above may include a display (e.g., the display (130) of FIG. 1), at least one processor including processing circuitry (e.g., the processor (210) of FIG. 2A and / or FIG. 2B), and a memory including one or more storage media for storing instructions (e.g., the memory (215) of FIG. 2A and / or FIG. 2B). The at least one processor may be configured to individually or collectively execute the instructions, and may be configured to cause the electronic device to display, on the display, an editing screen including an original image (e.g., the original image (110) of FIG. 1). At least one processor may be individually or collectively configured to execute the instructions, and may be configured to cause the electronic device to modify a first portion of the original image based on receiving a first input for editing the original image.At least one processor may be configured to individually or collectively execute the instructions, and cause the electronic device to, based on receiving a second input for storing the edited image while displaying the edited image (e.g., edited images (115, 120) of FIG. 1) which is the original image in which the first portion has been changed into a second portion, store first metadata representing the second portion (e.g., first metadata (122-1) of FIGS. 7 to 13), second metadata comprising information for restoring content of the first portion of the original image different from the edited image using an artificial intelligence model (e.g., second metadata (122-2) of FIGS. 7 to 13), and a file comprising the edited image among the original image or the edited image (e.g., file (124) of FIG. 1).

[0250] For example, at least one processor may be individually or collectively configured to cause the electronic device to execute an artificial intelligence model using a first prompt indicated by the first input to obtain the edited image in which the first portion has been changed.

[0251] For example, at least one processor may be individually or collectively configured to cause the electronic device to store the first prompt in the first metadata. At least one processor may be individually or collectively configured to cause the electronic device to store a second prompt comprising a word having an opposite meaning to a word included in the first prompt in the second metadata.

[0252] For example, at least one processor may be individually or collectively configured to cause the electronic device to store in the second metadata at least one prompt describing the content of the first portion to be input to the artificial intelligence model.

[0253] For example, at least one processor may be individually or collectively configured to cause the electronic device to store feature information of the first portion of the original image in the second metadata.

[0254] As used herein, the term "if" is understood as "when, upon," "in response to deciding," or "in response to detecting," depending on the context. Similarly, "if it is decided to do," or "if [the stated condition or event] is detected," is optionally understood as "upon deciding," or "in response to deciding," "upon detecting [the stated condition or event]," or "in response to detecting [the stated condition or event]."

[0255] The devices described above may be implemented as hardware components, software components, and / or a combination of hardware components and software components. For example, the devices and components described in various embodiments may be implemented using one or more general-purpose computers or special-purpose computers, such as a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), a programmable logic unit (PLU), a microprocessor, or any other device capable of executing instructions and responding to them. The processing device may execute an operating system (OS) and one or more software applications running on the operating system. The processing device may also access, store, manipulate, process, and generate data in response to the execution of the software. For ease of understanding, the processing device is sometimes described as being used alone; however, one of ordinary skill in the art will recognize that the processing device may include multiple processing elements and / or multiple types of processing elements. For example, a processing unit may include multiple processors, or a processor and a controller. Other processing configurations, such as parallel processors, are also possible.

[0256] Software may include a computer program, code, instructions, or a combination of one or more of these, which may configure a processing device to perform a desired operation or may independently or collectively command the processing device. The software and / or data may be embodied in any type of machine, component, physical device, computer storage medium, or device for interpretation by the processing device or for providing instructions or data to the processing device. The software may also be distributed over networked computer systems and stored or executed in a distributed manner. The software and data may be stored on one or more computer-readable recording media.

[0257] The method according to the embodiment may be implemented in the form of program commands that can be executed through various computer means and recorded on a computer-readable medium. In this case, the medium may be one that continuously stores a computer-executable program or one that temporarily stores it for execution or download. In addition, the medium may be various recording means or storage means in the form of a single or multiple hardware combinations, and is not limited to a medium directly connected to a computer system, but may also be distributed over a network. Examples of the medium may include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, and those configured to store program commands, including ROM, RAM, and flash memory. In addition, examples of other media may include recording media or storage media managed by app stores that distribute applications, sites that supply or distribute various software, servers, etc.

[0258] Although the various embodiments described above have been described by way of limited examples and drawings, those skilled in the art will appreciate that various modifications and variations can be made based on the above teachings. For example, appropriate results can still be achieved even if the described techniques are performed in a different order than described, and / or components of the described systems, structures, devices, circuits, etc. are combined or combined in a different manner than described, or are replaced or substituted with other components or equivalents.

[0259] It will also be understood that any of the embodiment(s) described herein may be used in combination with any other embodiment(s) described herein.

Claims

1. In electronic devices, display; At least one processor comprising a processing circuit; and A memory comprising one or more storage media for storing instructions, At least one processor is configured to individually or collectively execute the instructions and the electronic device, Through the above display, an image including at least one object is displayed; Receiving input for at least one object; Generating an artificial intelligence image using an artificial intelligence model, at least partially based on said input, wherein at least one object is replaced with an object generated by the artificial intelligence; Generating first information about the input and second information about the object generated by the artificial intelligence; and Causing a file including metadata including the first information and the second information and the artificial intelligence image to be stored in the memory, Electronic devices.

2. In claim 1, at least one processor, individually or collectively, the electronic device, Displaying the artificial intelligence image as a substitute for the above image; and configured to cause, while displaying the artificial intelligence image, to receive another input for storing the artificial intelligence image; Electronic devices.

3. In claim 1, at least one processor, individually or collectively, the electronic device, configured to cause the first information to be generated, wherein the first information comprises a prompt corresponding to a natural language sentence describing the at least one object; Electronic devices.

4. In claim 3, at least one processor, individually or collectively, the electronic device, configured to cause the user to obtain the second information, which includes a different prompt, wherein the second information includes a word having an opposite meaning to a word included in the prompt included in the first information. Electronic devices.

5. In claims 1 to 4, at least one processor, individually or collectively, the electronic device, As at least part of generating said first information, configured to cause said first information to be generated, said first information including feature information related to said at least one object, Electronic devices.

6. In claims 1 to 5, at least one processor, individually or collectively, the electronic device, As at least part of generating said first information, configured to cause said first information to be generated, said first information including pixel information of said at least one object that has been replaced, Electronic devices.

7. In claim 6, at least one processor, individually or collectively, the electronic device, Further including prompts related to objects generated by the artificial intelligence configured to cause, to generate, the first information, Electronic devices.

8. In claims 1 to 6, at least one processor, individually or collectively, the electronic device, As at least part of generating said second information, configured to cause said second information to be generated, said second information representing a pixel difference between said image and said artificial intelligence image, Electronic devices.

9. A non-transitory computer-readable storage medium comprising instructions, wherein the instructions, when individually and / or collectively executed by at least one processor including a processing circuit of an electronic device including a display, cause the electronic device to: Through the above display, an image including at least one object is displayed; Receiving input for at least one object; Generating an artificial intelligence image using an artificial intelligence model, at least partially based on said input, wherein at least one object is replaced with an object generated by the artificial intelligence; Generating first information about the input and second information about the object generated by the artificial intelligence; and Causing a file including metadata including the first information and the second information and the artificial intelligence image to be stored in the memory of the electronic device. Non-transitory computer-readable storage medium.

10. In claim 9, the instructions, when individually and / or collectively executed by at least one processor, including a processing circuit of the electronic device, cause the electronic device to: Displaying the artificial intelligence image as a substitute for the above image; and Causing another input to be received for storing the artificial intelligence image while displaying the artificial intelligence image; Non-transitory computer-readable storage medium.

11. In claim 9, the instructions, when individually and / or collectively executed by at least one processor, including a processing circuit of the electronic device, cause the electronic device to: causing said first information to be generated, said first information including a prompt corresponding to a natural language sentence describing said at least one object; Non-transitory computer-readable storage medium.

12. In claim 11, the instructions, when individually and / or collectively executed by at least one processor, including a processing circuit of the electronic device, cause the electronic device to: causing the second information to be obtained, which includes a different prompt, wherein the second information includes a word having an opposite meaning to a word included in the prompt included in the first information; Non-transitory computer-readable storage medium.

13. In claims 9 to 12, the instructions, when individually and / or collectively executed by at least one processor, including a processing circuit of the electronic device, cause the electronic device to: As at least part of generating said first information, causing said first information to be generated, said first information including feature information related to said at least one object, Non-transitory computer-readable storage medium.

14. In claims 9 to 13, the instructions, when individually and / or collectively executed by at least one processor, including a processing circuit of the electronic device, cause the electronic device to: As at least part of generating said first information, causing said first information to be generated, said first information including pixel information of said at least one object that has been replaced, Non-transitory computer-readable storage medium.

15. In claim 14, the instructions, when individually and / or collectively executed by at least one processor, including a processing circuit of the electronic device, cause the electronic device to: causing said first information to be generated, further comprising a prompt related to the object generated by said artificial intelligence; Non-transitory computer-readable storage medium.

Citation Information

Patent Citations

  • Image processing method, model training method and related device

    CN114943789A

  • Catalyst filter for removing harmful gases with increased reactivity and bonding properties, and catalyst solution composition used to form a catalyst layer thereof

    KR1020220032361A

  • Camera sutter apparatus of mobile device

    KR1020230100564A

  • Method and apparatus for learning artificial intelligence learning model for image reconstruction

    KR102592890B1

  • Method, system and apparatus for image orientation correction

    US20240005453A1