Electronic device and system for providing image, and operating method thereof
The electronic device and server system addresses the challenges of generating high-quality images by preprocessing and post-processing images using region-of-interest information, improving image similarity and reducing latency in the image generation process.
Patent Information
- Application Number
- PCT/KR2025/007879
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-09-11
- Filing Date
- 2025-06-10
- Publication Date
- 2026-01-08
AI Technical Summary
Existing systems struggle to efficiently generate high-quality images using generative artificial intelligence models, particularly in terms of image similarity and latency in the image providing process.
An electronic device and server system that utilizes an image generation model to preprocess and post-process images, incorporating region-of-interest information and image analysis to enhance image quality and reduce latency.
Improves the quality of generated images by enhancing similarity between original and generated objects while reducing latency in the image processing pipeline.
Smart Images

Figure KR2025007879_08012026_PF_FP_ABST
Abstract
Description
Electronic devices, systems and operating methods for providing video
[0001] The present disclosure relates to an electronic device, system and method of operating the same for providing an image.
[0002] An artificial intelligence system is a system that implements intelligence through machines. Unlike systems that operate based on rules, an AI system allows machines to learn information and perform judgments and processing based on models constructed based on the results of that learning. AI technology can be comprised of technologies that perform machine learning (e.g., deep learning) and component technologies that utilize models constructed through machine learning.
[0003] Generative artificial intelligence (AI) refers to AI technology that utilizes original content (e.g., text, audio, images) to generate content based on the characteristics of the original content. A video generation model built on generative AI can generate new content through comparative learning on existing data. An electronic device or server can obtain the generated content as a response to an input that includes at least one of content or a prompt (e.g., a text-based question input) to the video generation model.
[0004] The above information may be provided as background art to aid in understanding the present disclosure. No claim or determination is made as to whether any of the above is applicable as prior art in connection with the present disclosure.
[0005] In one embodiment, an electronic device may include a display, at least one processor, and a memory storing instructions. The instructions, when executed by the at least one processor, may cause the electronic device to execute an application. The instructions, when executed by the at least one processor, may cause the electronic device to obtain at least one of image generation mode information or region-of-interest information for an original image based on the executed application. The instructions, when executed by the at least one processor, may cause the electronic device to obtain preprocessed image data including at least one of image analysis information or a preprocessed image. At least one of the image analysis information or the preprocessed image may be obtained by performing preprocessing on the original image based on at least one of the image generation mode or the region-of-interest information. The instructions, when executed by the at least one processor, may cause the electronic device to obtain at least one artificial intelligence (AI) generated image generated by an image generation model based on the preprocessed image data. The above commands may be executed by the at least one processor to cause the electronic device to display the at least one artificial intelligence-generated image through the display.
[0006] In one embodiment, a computer-readable non-transitory recording medium may have recorded thereon a computer program that causes the electronic device to perform operations.
[0007] A method of operating a system including an electronic device and a server according to one embodiment may include an operation in which the electronic device executes an application. The method may include an operation in which the electronic device obtains at least one of image generation mode information or region-of-interest information for an original image based on the executed application. The method may include an operation in which the electronic device obtains preprocessed image data including at least one of image analysis information or a preprocessed image obtained by performing preprocessing on the original image based on at least one of the image generation mode or the region-of-interest information. The method may include an operation in which the electronic device transmits the preprocessed image data to the server. The method may include an operation in which the server determines at least one of a prompt or a parameter based on the preprocessed image data. The method may include an operation in which the server obtains at least one artificial intelligence-generated image based on at least one of the prompt or the parameter. The method may include an operation in which the server transmits the at least one artificial intelligence-generated image to the electronic device. The method may include an operation in which the electronic device displays the at least one artificial intelligence-generated image.
[0008] In one embodiment, a server may include a communication circuit, at least one processor, and a memory storing instructions. The instructions may be executed by the at least one processor to cause the server to receive, from an electronic device through the communication circuit, preprocessed image data including at least one of image analysis information or a preprocessed image obtained by performing preprocessing on an original image. The instructions may be executed by the at least one processor to cause the server to determine at least one of a prompt or a parameter based on the preprocessed image data. The instructions may be executed by the at least one processor to cause the server to obtain at least one artificial intelligence-generated image based on at least one of the prompt or the parameter. The instructions may be executed by the at least one processor to cause the server to transmit, through the communication circuit, the at least one artificial intelligence-generated image to the electronic device.
[0009] In one embodiment, a computer-readable, non-transitory recording medium may have recorded thereon a computer program that causes the server to perform operations.
[0010] In connection with the description of the drawings, the same or similar reference numerals may be used for identical or similar components.
[0011] FIG. 1 is a block diagram of an electronic device within a network environment according to various embodiments.
[0012] FIG. 2 is a block diagram illustrating an example of a configuration of a system according to one embodiment.
[0013] FIG. 3 is a flowchart illustrating a process for providing an image generated according to one embodiment.
[0014] FIG. 4 is a flowchart illustrating a process by which an electronic device acquires at least one of an image generation mode or region of interest information in one embodiment.
[0015] FIG. 5 is a diagram illustrating an example of an execution screen of an application displayed by an electronic device based on whether an object is detected according to one embodiment.
[0016] FIG. 6 is a diagram illustrating an area in which an electronic device determines region of interest information and generates a cropped image according to one embodiment.
[0017] FIG. 7 is a diagram illustrating an example of a user interface that an electronic device displays to receive user input for selecting an image generation mode according to one embodiment.
[0018] FIG. 8 is a flowchart illustrating a process by which an electronic device generates preprocessed image data according to one embodiment.
[0019] FIG. 9 is a diagram illustrating an example of an image generated from an image generation model depending on whether a filter is applied in one embodiment.
[0020] FIG. 10 is a diagram illustrating an example of an image generated from an image generation model depending on whether a blur effect is applied in one embodiment.
[0021] FIG. 11 is a diagram illustrating examples of images generated from an image generation model depending on the presence or absence of noise included in the background in one embodiment.
[0022] FIG. 12 is a diagram illustrating examples of images generated from an image generation model depending on whether a dark background is included in one embodiment.
[0023] FIG. 13 is a diagram illustrating examples of images generated from an image generation model depending on the presence or absence of a background in one embodiment.
[0024] FIG. 14 is a flowchart illustrating a process for determining at least one of a prompt or parameter in one embodiment.
[0025] FIG. 15 is a diagram illustrating examples of images according to whether the first prompt is modified to the second prompt in one embodiment.
[0026] FIG. 16 is a block diagram illustrating a process for obtaining at least one AI-generated image using an image generation model in one embodiment.
[0027] FIG. 17 is a flowchart illustrating a process for post-processing and storing at least one AI-generated image in one embodiment.
[0028] FIG. 18 illustrates an example of a screen displayed by an electronic device to provide images through a gallery application according to one embodiment.
[0029] FIG. 19 illustrates an example of a screen displayed by an electronic device to provide a video through a contact application according to one embodiment.
[0030] FIG. 20 is a flowchart illustrating a process by which an electronic device expands the background of at least one AI-generated image according to one embodiment.
[0031] FIG. 21 is a diagram illustrating an example of an electronic device expanding the background of an AI-generated image according to one embodiment.
[0032] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the attached drawings so that those skilled in the art can easily implement the present disclosure. However, the disclosed embodiments may be implemented in various different forms and are not limited to the embodiments described herein.
[0033] In the present disclosure, an electronic device, a server, a system and an operating method thereof according to one embodiment may be for improving the quality of an image obtained using an image generation model.
[0034] In the present disclosure, an electronic device, a server, a system and an operating method thereof according to one embodiment may be for improving similarity between an object included in an original image and an object included in an image generated using an image generation model.
[0035] In the present disclosure, an electronic device, a server, a system and an operating method thereof according to one embodiment may be for reducing latency in an image providing process using an image generation model.
[0036] In the present disclosure, an electronic device, a server, a system and an operating method thereof according to one embodiment may be for generating various images.
[0037] The technical problems to be achieved in this document are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by a person having ordinary skill in the technical field to which the present disclosure pertains.
[0038] FIG. 1 is a block diagram of an electronic device (101) within a network environment (100) according to various embodiments. Referring to FIG. 1, in the network environment (100), the electronic device (101) may communicate with the electronic device (102) via a first network (198) (e.g., a short-range wireless communication network), or may communicate with at least one of the electronic device (104) or the server (108) via a second network (199) (e.g., a long-range wireless communication network). In one embodiment, the electronic device (101) may communicate with the electronic device (104) via the server (108). According to one embodiment, the electronic device (101) may include a processor (120), a memory (130), an input module (150), an audio output module (155), a display module (160), an audio module (170), a sensor module (176), an interface (177), a connection terminal (178), a haptic module (179), a camera module (180), a power management module (188), a battery (189), a communication module (190), a subscriber identification module (196), or an antenna module (197). In some embodiments, the electronic device (101) may omit at least one of these components (e.g., the connection terminal (178)), or may have one or more other components added. In some embodiments, some of these components (e.g., the sensor module (176), the camera module (180), or the antenna module (197)) may be integrated into one component (e.g., the display module (160)).
[0039] The processor (120) may, for example, execute software (e.g., a program (140)) to control at least one other component (e.g., a hardware or software component) of the electronic device (101) connected to the processor (120) and perform various data processing or operations. According to one embodiment, as at least a part of the data processing or operations, the processor (120) may store commands or data received from other components (e.g., a sensor module (176) or a communication module (190)) in a volatile memory (132), process the commands or data stored in the volatile memory (132), and store result data in a non-volatile memory (134). According to one embodiment, the processor (120) may include a main processor (121) (e.g., a central processing unit or an application processor) or an auxiliary processor (123) (e.g., a graphics processing unit, a neural processing unit (NPU), an image signal processor, a sensor hub processor, or a communication processor) that can operate independently or together with the main processor (121). For example, when the electronic device (101) includes the main processor (121) and the auxiliary processor (123), the auxiliary processor (123) may be configured to use less power than the main processor (121) or to be specialized for a given function. The auxiliary processor (123) may be implemented separately from the main processor (121) or as a part thereof.
[0040] The auxiliary processor (123) may control at least a portion of functions or states associated with at least one component (e.g., a display module (160), a sensor module (176), or a communication module (190)) of the electronic device (101), for example, on behalf of the main processor (121) while the main processor (121) is in an inactive (e.g., sleep) state, or together with the main processor (121) while the main processor (121) is in an active (e.g., application execution) state. In one embodiment, the auxiliary processor (123) (e.g., an image signal processor or a communication processor) may be implemented as a part of another functionally related component (e.g., a camera module (180) or a communication module (190)). In one embodiment, the auxiliary processor (123) (e.g., a neural network processing unit) may include a hardware structure specialized for processing artificial intelligence models. The artificial intelligence models may be generated through machine learning. This learning can be performed, for example, on the electronic device (101) itself where the artificial intelligence model is executed, or can be performed through a separate server (e.g., server (108)). The learning algorithm can include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but is not limited to the examples described above. The artificial intelligence model can include multiple artificial neural network layers.The artificial neural network may be one of a deep neural network (DNN), a convolutional neural network (CNN), a recurrent neural network (RNN), a restricted Boltzmann machine (RBM), a deep belief network (DBN), a bidirectional recurrent deep neural network (BRDNN), a deep Q-network, or a combination of two or more of the above, but is not limited to the examples described above. In addition to, or alternatively to, a hardware structure, an artificial intelligence model may include a software structure.
[0041] The memory (130) can store various data used by at least one component (e.g., processor (120) or sensor module (176)) of the electronic device (101). The data can include, for example, software (e.g., program (140)) and input data or output data for commands related thereto. The memory (130) can include volatile memory (132) or non-volatile memory (134).
[0042] The program (140) may be stored as software in the memory (130) and may include, for example, an operating system (142), middleware (144), or an application (146).
[0043] The input module (150) can receive commands or data to be used in a component of the electronic device (101) (e.g., a processor (120)) from an external source (e.g., a user) of the electronic device (101). The input module (150) can include, for example, a microphone, a mouse, a keyboard, a key (e.g., a button), or a digital pen (e.g., a stylus pen).
[0044] The audio output module (155) can output audio signals to the outside of the electronic device (101). The audio output module (155) can include, for example, a speaker or a receiver. The speaker can be used for general purposes, such as multimedia playback or recording playback. The receiver can be used to receive incoming calls. In one embodiment, the receiver can be implemented separately from the speaker or as part of the speaker.
[0045] The display module (160) can visually provide information to an external party (e.g., a user) of the electronic device (101). The display module (160) may include, for example, a display, a holographic device, or a projector and a control circuit for controlling the device. According to one embodiment, the display module (160) may include a touch sensor configured to detect a touch, or a pressure sensor configured to measure the intensity of a force generated by the touch.
[0046] The audio module (170) can convert sound into an electrical signal, or vice versa, convert an electrical signal into sound. According to one embodiment, the audio module (170) can acquire sound through the input module (150), output sound through the sound output module (155), or an external electronic device (e.g., electronic device (102)) (e.g., speaker or headphone) directly or wirelessly connected to the electronic device (101).
[0047] The sensor module (176) can detect the operating status (e.g., power or temperature) of the electronic device (101) or the external environmental status (e.g., user status) and generate an electrical signal or data value corresponding to the detected status. According to one embodiment, the sensor module (176) can include, for example, a gesture sensor, a gyro sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biometric sensor, a temperature sensor, a humidity sensor, or an illuminance sensor.
[0048] The interface (177) may support one or more designated protocols that may be used to directly or wirelessly connect the electronic device (101) with an external electronic device (e.g., the electronic device (102)). In one embodiment, the interface (177) may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.
[0049] The connection terminal (178) may include a connector through which the electronic device (101) may be physically connected to an external electronic device (e.g., electronic device (102)). According to one embodiment, the connection terminal (178) may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).
[0050] The haptic module (179) can convert electrical signals into mechanical stimuli (e.g., vibration or movement) or electrical stimuli that a user can perceive through tactile or kinesthetic sensations. According to one embodiment, the haptic module (179) can include, for example, a motor, a piezoelectric element, or an electrical stimulation device.
[0051] The camera module (180) can capture still images and videos. According to one embodiment, the camera module (180) may include one or more lenses, image sensors, image signal processors, or flashes.
[0052] The power management module (188) can manage power supplied to the electronic device (101). According to one embodiment, the power management module (188) can be implemented as, for example, at least a part of a power management integrated circuit (PMIC).
[0053] A battery (189) may power at least one component of the electronic device (101). In one embodiment, the battery (189) may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.
[0054] The communication module (190) may support the establishment of a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device (101) and an external electronic device (e.g., electronic device (102), electronic device (104), or server (108)), and the performance of communication through the established communication channel. The communication module (190) may operate independently from the processor (120) (e.g., application processor) and may include one or more communication processors that support direct (e.g., wired) communication or wireless communication. According to one embodiment, the communication module (190) may include a wireless communication module (192) (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module (194) (e.g., a local area network (LAN) communication module, or a power line communication module). Among these communication modules, the corresponding communication module can communicate with an external electronic device (104) via a first network (198) (e.g., a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network (199) (e.g., a long-range communication network such as a legacy cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (e.g., a LAN or WAN)). These various types of communication modules can be integrated into a single component (e.g., a single chip) or implemented as multiple separate components (e.g., multiple chips). The wireless communication module (192) can verify or authenticate the electronic device (101) within a communication network such as the first network (198) or the second network (199) by using subscriber information (e.g., an international mobile subscriber identity (IMSI)) stored in the subscriber identification module (196).
[0055] The wireless communication module (192) can support 5G networks and next-generation communication technologies following the 4G network, such as NR access technology (new radio access technology). The NR access technology can support high-speed transmission of high-capacity data (eMBB (enhanced mobile broadband)), minimization of terminal power and connection of multiple terminals (mMTC (massive machine type communications)), or high reliability and low latency (URLLC (ultra-reliable and low-latency communications)). The wireless communication module (192) can support, for example, a high-frequency band (e.g., mmWave band) to achieve a high data transmission rate. The wireless communication module (192) can support various technologies for securing performance in a high-frequency band, such as beamforming, massive multiple-input and multiple-output (MIMO), full dimensional MIMO (FD-MIMO), array antenna, analog beam-forming, or large scale antenna. The wireless communication module (192) can support various requirements specified in the electronic device (101), an external electronic device (e.g., the electronic device (104)), or a network system (e.g., the second network (199)). According to one embodiment, the wireless communication module (192) can support a peak data rate (e.g., 20 Gbps or more) for eMBB realization, a loss coverage (e.g., 164 dB or less) for mMTC realization, or a U-plane latency (e.g., 0.5 ms or less for downlink (DL) and uplink (UL), or 1 ms or less for round trip) for URLLC realization.
[0056] The antenna module (197) can transmit or receive signals or power to or from an external device (e.g., an external electronic device). In one embodiment, the antenna module (197) may include an antenna including a radiator formed of a conductor or a conductive pattern formed on a substrate (e.g., a PCB). In one embodiment, the antenna module (197) may include a plurality of antennas (e.g., an array antenna). In this case, at least one antenna suitable for a communication method used in a communication network, such as the first network (198) or the second network (199), may be selected from the plurality of antennas, for example, by the communication module (190). A signal or power may be transmitted or received between the communication module (190) and an external electronic device via the at least one selected antenna. In some embodiments, in addition to the radiator, another component (e.g., a radio frequency integrated circuit (RFIC)) may be additionally formed as a part of the antenna module (197).
[0057] According to various embodiments, the antenna module (197) may form a mmWave antenna module. In one embodiment, the mmWave antenna module may include a printed circuit board, an RFIC disposed on or adjacent a first side (e.g., a bottom side) of the printed circuit board and capable of supporting a designated high-frequency band (e.g., a mmWave band), and a plurality of antennas (e.g., an array antenna) disposed on or adjacent a second side (e.g., a top side or a side side) of the printed circuit board and capable of transmitting or receiving signals in the designated high-frequency band.
[0058] 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)).
[0059] According to one embodiment, commands or data may be transmitted or received between the electronic device (101) and an external electronic device (104) via a server (108) connected to a second network (199). Each of the external electronic devices (102 or 104) may be the same or a different type of device as the electronic device (101). According to one embodiment, all or part of the operations executed in the electronic device (101) may be executed in one or more of the external electronic devices (102, 104, or 108). For example, when the electronic device (101) is to perform a certain function or service automatically or in response to a request from a user or another device, the electronic device (101) may, instead of or in addition to executing the function or service itself, request one or more external electronic devices to perform the function or at least a part of the service. One or more external electronic devices that receive the request may execute at least a portion of the requested function or service, or an additional function or service related to the request, and transmit the result of the execution to the electronic device (101). The electronic device (101) may process the result as is or additionally and provide it as at least a portion of a response to the request. For this purpose, cloud computing, distributed computing, mobile edge computing (MEC), or client-server computing technology may be used, for example. The electronic device (101) may provide an ultra-low latency service by using distributed computing or mobile edge computing, for example. In one embodiment, the external electronic device (104) may include an Internet of Things (IoT) device. The server (108) may be an intelligent server utilizing machine learning and / or a neural network. According to one embodiment, the external electronic device (104) or the server (108) may be included in the second network (199).The electronic device (101) can be applied to intelligent services (e.g., smart home, smart city, smart car, or healthcare) based on 5G communication technology and IoT-related technology.
[0060] Electronic devices according to the various embodiments disclosed in this document may take various forms. Electronic devices may include, for example, portable communication devices (e.g., smartphones), computer devices, portable multimedia devices, portable medical devices, cameras, wearable devices, or home appliances. Electronic devices according to the embodiments of this document are not limited to the aforementioned devices.
[0061] 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.
[0062] The term "module" used in various embodiments of this document may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with terms such as logic, logic block, component, or circuit. A module may be an integral component, or a minimum unit or part of such a component that performs one or more functions. For example, according to one embodiment, a module may be implemented in the form of an application-specific integrated circuit (ASIC).
[0063] Various embodiments of the present document may be implemented as software (e.g., a program (140)) including one or more instructions stored in a storage medium (e.g., an internal memory (136) or an external memory (138)) readable by a machine (e.g., an electronic device (101)). For example, a processor (e.g., a processor (120)) of the machine (e.g., an electronic device (101)) may call at least one instruction among the one or more instructions stored from the storage medium and execute it. This enables the machine to operate to perform at least one function according to the at least one called instruction. The one or more instructions may include code generated by a compiler or code executable by an interpreter. The machine-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-transitory' simply means that the storage medium is a tangible device and does not contain signals (e.g., electromagnetic waves), and the term does not distinguish between cases where data is stored semi-permanently or temporarily on the storage medium.
[0064] According to one embodiment, the method according to various embodiments disclosed in this document may be provided as a computer program product. The computer program product may be traded between sellers and buyers as a product. The computer program product may be distributed in the form of a device-readable storage medium (e.g., compact disc read-only memory (CD-ROM)) or may be provided through an application store (e.g., Play Store). TM ) or directly between two user devices (e.g., smart phones), online distribution (e.g., downloading or uploading). In the case of online distribution, at least a portion of the computer program product may be at least temporarily stored or temporarily created in a machine-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or an intermediary server.
[0065] 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 arranged 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.
[0066] FIG. 2 is a block diagram illustrating an example of the configuration of a system (200) according to one embodiment.
[0067] In one embodiment, the system (200) may include an electronic device (201) (e.g., the electronic device (101) of FIG. 1) and at least one server (208) (e.g., the server (108) of FIG. 1). However, FIG. 2 illustrates an example of a configuration of the system (200) for explaining one embodiment, and the configuration of the system (200) may differ from the configuration illustrated in FIG. 2. For example, operations performed by at least some of the at least one server (208) may be configured to be performed within the electronic device (201). At least one server (208) may be omitted. For example, some of the operations performed by the electronic device (201) may be performed by at least one server (208). For example, the first server (221) and the second server (222) may be configured as a single physical server. In the present disclosure, the operation of the electronic device (201) may be understood as being performed by the processor (120) executing instructions stored in the memory (130) to control or perform calculations on components of the electronic device (201). The electronic device (201) may include one or more processors (120). For example, the electronic device (201) may include a processor (120) having a multi-core processor (e.g., dual core, quad core, or hexa core) structure. The processor (120) may control the operation of the electronic device (201) by executing instructions stored in the memory (130). For example, the processor (120) may include a plurality of processors that divide and perform a plurality of operations among the processors. The operation of at least one server (208) may be understood as being performed by at least one processor included in at least one server (208) executing instructions stored in the memory. At least one server (208) may include one or more processors.For example, at least one server (208) may include a processor having a multi-core processor architecture.
[0068] In one embodiment, the electronic device (201) may execute an application (211). The application (211) may include an application that can acquire an image or select an image (e.g., an image stored in the memory (130) of FIG. 1 or an image stored in a cloud server). For example, the application (211) may include a gallery application that displays stored images, a camera application that acquires an image via a camera (e.g., a camera module (180) of FIG. 1), or a contact application that sets a profile of a contact.
[0069] In one embodiment, the electronic device (201) may perform object detection on an original image selected or acquired based on an executed application (211). The electronic device (201) may identify whether an area having characteristics of an object to be detected exists within the original image. For example, if the object to be detected is a human face, the electronic device (201) may determine whether an area having characteristics of a human face exists within the original image. However, the type of object is not limited thereto. For example, the object detected by the electronic device (201) may be a pet. The electronic device (201) may acquire region of interest information as a result of performing object detection. The region of interest information may include information indicating the location of the region of interest, which includes an area in which an object exists within the original image. For example, the region of interest information may include coordinates of a starting point and an ending point that specify the region of interest. Alternatively, the region of interest information may include information indicating that an object was not detected (e.g., a null value). The electronic device (201) can display a user interface (UI) object indicating a region of interest on an original image. The electronic device (201) can obtain image generation mode information for the original image. The image generation mode information can indicate whether an image has a certain style to be generated. For example, the image generation mode information can indicate at least one of a cartoon style mode, a sketch style mode, a watercolor mode, or a 3D image mode. The image generation mode information can have, for example, the form of an index value indicating the style of the image to be generated.
[0070] In one embodiment, the electronic device (201) may include an image processing module (212) for performing image processing. The image processing module (212) may include at least one of a pre-processing module and a post-processing module. The pre-processing module may perform an image processing operation before generating an image by an image generation model. The post-processing module may perform an image processing operation on an image generated by the image generation model. The application (211) may transmit data to the image processing module (212) or receive data from the image processing module (212) using an application programming interface (API) defined in a software development kit (SDK). The electronic device (201) may obtain pre-processed image data to be processed by an image generation model through the pre-processing module. The pre-processed image data may include at least one of image analysis information and a pre-processed image. The image analysis information may refer to information related to an image obtained by analyzing the image by the electronic device (201). A preprocessed image can refer to an image with a resolution that can be processed by an image generation model. The preprocessed image can be related to the region indicated by the region-of-interest information within the original image.
[0071] In one embodiment, the electronic device (201) can transmit preprocessed image data acquired by the image processing module (212) to at least one server (208). The electronic device (201) can transmit the preprocessed image data to a first server (221). The first server (221) can request generation of an image from a second server (222) based on the preprocessed image data. The first server (221) can communicate with the second server (222). For example, the first server (221) can request generation of an image by determining at least one of a prompt or a parameter based on the preprocessed image data and transmitting at least one of the prompt or the parameter to the second server (222).
[0072] In one embodiment, the second server (222) may perform operations according to an image generation model. The image generation model may refer to a machine-learned model that generates a new image from an image based on at least one of a prompt or a parameter. For example, the image generation model may include a diffusion model that learns a process of noise diffusion through a plurality of steps and generates an image by performing denoising through a plurality of steps. The second server (222) may generate at least one AI-generated image based on the image generation model. The second server (222) may transmit the at least one AI-generated image to the first server (221). The first server (221) may transmit the at least one AI-generated image received from the second server (222) to the electronic device (201).
[0073] In one embodiment, the electronic device (201) may display at least one AI-generated image obtained from at least one server (208) through the execution screen of the application (211) through a display (e.g., the display module (160) of FIG. 1). The electronic device (201) may perform post-processing on at least one AI-generated image through a post-processing module of the image processing module (212). The electronic device (201) may display at least one post-processed image.
[0074] FIG. 3 is a flowchart (300) illustrating a process for providing an image generated according to one embodiment.
[0075] A process for providing a generated image according to one embodiment of the present disclosure may be performed, for example, according to a flowchart (300) illustrated in FIG. 3. The flowchart (300) illustrated in FIG. 3 is merely a flowchart according to one embodiment of an operation of an electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2), and the order of at least some operations may be changed, performed in parallel, performed as independent operations, or at least some other operations may be performed complementarily to at least some operations. According to one embodiment of the present disclosure, operations 310 to 340 may be performed in at least one processor (e.g., the processor (120) of FIG. 1) of an electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2).
[0076] In operation 310, an electronic device according to an embodiment (e.g., electronic device 101 of FIG. 1, electronic device 201 of FIG. 2) may acquire at least one of image generation mode information and region of interest information. In the present disclosure, the image generation mode information may include information indicating whether an image has a certain style to be generated. The region of interest information may include information indicating a region of interest to be used to generate an AI-generated image within an original image.
[0077] In operation 320, an electronic device according to an embodiment may obtain preprocessed image data. The electronic device may obtain information about an image corresponding to a region of interest so that an image generation model may generate an image according to a selected image generation mode, or may obtain a preprocessed image obtained by performing image processing on the image. The preprocessed image may have a resolution that can be processed by the image generation model. In the present disclosure, the resolution may be expressed as the number of pixels included in the image. In the present disclosure, a 'pixel' may mean a minimum unit constituting a digital image. If an image is composed of a x b pixels arranged in a rows and b columns, the resolution of the image may be referred to as a x b. For example, if the image generation model is an artificial intelligence model that processes an image with a resolution of 512 x 512, the electronic device may obtain a preprocessed image with a resolution of 512 x 512.
[0078] In one embodiment, at least a portion of operation 320 may be performed by a server (e.g., server 108 of FIG. 1 , at least one server 208 of FIG. 2 ). For example, the electronic device may transmit the original image, image generation mode information, and region of interest information to the server via a communication circuit (e.g., communication module 190 of FIG. 1 ). The server may obtain preprocessed image data from the original image based on at least one of the image generation mode information or the region of interest information.
[0079] In one embodiment, the preprocessed image data may include at least one of image analysis information and a preprocessed image. The image analysis information may include information related to features obtained by performing image analysis on a region of interest. For example, the image analysis information may include at least one of the following: gender, age, whether the person is wearing glasses, sunglasses, a mask, or accessories.
[0080] In operation 330, an electronic device according to an embodiment may obtain at least one artificial intelligence (AI)-generated image. The electronic device may obtain at least one AI-generated image by inputting at least one of a prompt or a parameter and processing a preprocessed image according to an image generation model. At least one of the prompt or the parameter may be determined based on at least one of image generation mode information or preprocessed image data.
[0081] In one embodiment, at least a portion of operation 330 may be performed by a server. For example, the electronic device may transmit image generation mode information and preprocessed image data to a first server (e.g., the first server (221) of FIG. 2) via a communication circuit. The first server may determine at least one of a prompt or a parameter based on at least one of the image generation mode information or the preprocessed image data. The first server may transmit at least one of the prompt or the parameter together with the preprocessed image to a second server (e.g., the second server (222) of FIG. 2). The second server may generate at least one AI-generated image by processing the preprocessed image according to an image generation model based on at least one of the prompt or the parameter. The second server may transmit at least one AI-generated image to the electronic device via the first server.
[0082] In operation 340, the electronic device according to one embodiment may display at least one acquired AI-generated image through a display (e.g., the display module (160) of FIG. 1). For example, when multiple AI-generated images are acquired, the electronic device may display the multiple AI-generated images simultaneously or sequentially. In one embodiment, the electronic device may perform post-processing on at least one acquired AI-generated image and display at least one post-processed image. The post-processing on at least one AI-generated image may be performed by a server.
[0083] FIG. 4 is a flowchart (400) illustrating a process by which an electronic device (e.g., the electronic device (101) of FIG. 1 and the electronic device (201) of FIG. 2) acquires at least one of an image generation mode and region of interest information according to one embodiment. FIG. 5 is a diagram illustrating an example of an execution screen of an application displayed by an electronic device based on whether an object is detected according to one embodiment. FIG. 6 is a diagram illustrating an area in which an electronic device determines region of interest information and generates a cropped image according to one embodiment. FIG. 7 is a diagram illustrating an example of a user interface displayed by an electronic device according to one embodiment to receive a user input for selecting an image generation mode.
[0084] A process of obtaining at least one of an image generation mode or region of interest information by an electronic device (e.g., the electronic device 101 of FIG. 1 or the electronic device 201 of FIG. 2) according to an embodiment of the present disclosure may be performed, for example, according to a flowchart (400) illustrated in FIG. 4. The flowchart (400) illustrated in FIG. 4 is merely a flowchart according to an embodiment of an operation of the electronic device (e.g., the electronic device 101 of FIG. 1 or the electronic device 201 of FIG. 2), and the order of at least some operations may be changed or performed in parallel, performed as independent operations, or at least some other operations may be performed complementarily to at least some operations. According to an embodiment of the present disclosure, operations 410 to 460 may be performed by at least one processor (e.g., the processor 120 of FIG. 1) of the electronic device (e.g., the electronic device 101 of FIG. 1 or the electronic device 201 of FIG. 2).
[0085] In operation 410, an electronic device according to one embodiment may execute an application. For example, the electronic device may execute a camera application, a gallery application, or a contact application. However, the types of applications are not limited thereto. The electronic device may display an original image through the application execution screen.
[0086] In operation 420, an electronic device according to an embodiment may identify at least one object. The electronic device may identify an object having features corresponding to reference feature information within an original image. For example, the electronic device may identify at least one area in the original image where a facial feature appears based on a face detection algorithm. Based on the result of object identification, the electronic device may obtain information (e.g., coordinate values) indicating at least one area in which at least one object is identified.
[0087] In operation 430, an electronic device according to an embodiment may determine whether at least one identified object satisfies an object detection condition. The electronic device may determine whether an object is detected based on whether the object detection condition is satisfied. The object detection condition may include a condition for determining whether an object suitable for generating an AI-generated image through an image generation model has been detected. For example, the object detection condition may include a condition for at least one of a size of a region in which an object is identified or an angle of the object. For example, a condition for the size of a region in which an object is identified may indicate whether the horizontal length, vertical length, or horizontal length and vertical length of the identified region are greater than or equal to a specified threshold value. If the size of the region in which an object is identified is less than the threshold value, the electronic device may determine that the object detection condition is not satisfied. The angle of the object may refer to a direction in which the object faces (e.g., a direction in which the front of the face faces). For example, based on a face detection result, the electronic device may obtain angle information including a yaw axis angle value, a roll axis angle value, and a pitch axis angle value. The condition for the angle of the object may include a range for at least one angle value included in the angle information. For example, the electronic device may determine whether the object detection condition is satisfied based on whether the yaw axis angle value is greater than or equal to a threshold. For example, the electronic device may determine whether the object detection condition is satisfied based on whether the sum of two or more angle values (e.g., the sum of the yaw axis angle value and the roll axis angle value) is greater than or equal to a threshold.
[0088] In one embodiment, the electronic device may determine whether to display a user interface (UI) object for generating an image based on an image generation model based on whether an object detection condition is satisfied. If no identified object satisfying the object detection condition is found, the electronic device may terminate the process of generating an image based on the artificial intelligence model. Alternatively, for example, referring to FIG. 5 , if no identified object satisfying the object detection condition is found, the electronic device may display a screen (510) including a UI for editing an original image (511) in a manner different from the artificial intelligence model-based image generation through a display (e.g., the display module (160) of FIG. 1 ). If an object satisfying the object detection condition is detected, the electronic device may display a screen including a UI object for receiving a user input through the display. For example, referring to FIG. 5 , if an object (513) is detected in an original image (512), the electronic device may display an icon or button (514) for receiving a user input through the display. For example, the button (514) may include information indicating that an image can be generated using generative AI.
[0089] In operation 440, the electronic device according to one embodiment may display a region of interest for an object satisfying an object detection condition through a display. If an object satisfying the object detection condition is detected (or a user input for selecting a UI object displayed when an object satisfying the object detection condition is detected is received), the electronic device may display an indicator indicating a location of at least one region of interest within the original image. The location at which the indicator is displayed may be determined based on information indicating at least one region in which at least one object is identified, obtained in operation 420. For example, the electronic device may display at least one rectangle at at least one location corresponding to at least one region of interest on the original image. In operation 450, the electronic device according to one embodiment may select one of the at least one region of interest. For example, the electronic device may receive a touch input for a location included in one of the at least one region of interest.
[0090] For example, referring to FIG. 6, the electronic device may display a screen including an original image (600) and at least one indicator (610, 620, 630, 640) indicating a region of interest through a display. The position of the indicator (610) may be specified based on the coordinates of a start point (611) and an end point (613) specifying the region of interest.
[0091] In one embodiment, the electronic device may adjust the region of interest to include an area related to the identified object. For example, if the object identified in operation 420 is a face, hair may be excluded from the region of interest due to the nature of the face detection algorithm that detects landmarks up to the forehead. The electronic device may adjust the region of interest based on the results of performing semantic segmentation on the original image (600). The electronic device may perform semantic segmentation to classify which category of subject the pixels included in the original image (600) belong to. The electronic device may adjust the region of interest to include an area related to the object included in the region of interest among the areas where pixels classified into the category specified by the semantic segmentation are arranged. Referring to FIG. 6, the hair portion (615) of the subject is located outside the region of interest corresponding to the indicator (610). The electronic device can determine a region of interest (617) adjusted to include a region (615) associated with an object within a region of interest corresponding to a pointer (610) among regions where hair is captured within the original image (600). The operation of adjusting the region of interest may also be performed by a server (e.g., server (108) of FIG. 1, server (208) of FIG. 2).
[0092] In operation 460, the electronic device according to one embodiment may select an image generation mode. The image generation mode may indicate, for example, what style of image to generate. Referring to FIG. 7, the electronic device may display a screen (700) including a list (710) including items each indicating an image generation mode and an image generation UI object (720) through a display. After receiving a user input for selecting an item indicating a specific image generation mode within the list (710), in response to a user input for selecting an image generation UI object (720), the electronic device may perform operation (320) for obtaining preprocessed image data based on at least one of the region of interest information or the image generation mode information obtained through operations 420 to 460 (or operation 310 of FIG. 3).
[0093] FIG. 8 is a flowchart (800) illustrating a process by which an electronic device (e.g., the electronic device (101) of FIG. 1 and the electronic device (201) of FIG. 2) generates preprocessed image data according to one embodiment. At least some of the operations illustrated in the flowchart (800) may be performed by a server. FIG. 9 is a diagram illustrating examples of images generated from an image generation model depending on whether a filter is applied in one embodiment. FIG. 10 is a diagram illustrating examples of images generated from an image generation model depending on whether a blur effect is applied in one embodiment. FIG. 11 is a diagram illustrating examples of images generated from an image generation model depending on whether noise is included in a background in one embodiment. FIG. 12 is a diagram illustrating examples of images generated from an image generation model depending on whether a dark background is included in one embodiment. FIG. 13 is a diagram illustrating examples of images generated from an image generation model depending on whether a background is present in one embodiment.
[0094] A process of generating preprocessed image data by an electronic device (e.g., the electronic device 101 of FIG. 1, the electronic device 201 of FIG. 2) according to an embodiment of the present disclosure may be performed, for example, according to a flowchart (800) illustrated in FIG. 8. The flowchart (800) illustrated in FIG. 8 is merely a flowchart according to an embodiment of an operation of the electronic device (e.g., the electronic device 101 of FIG. 1, the electronic device 201 of FIG. 2), and the order of at least some operations may be changed, performed in parallel, performed as independent operations, or at least some other operations may be performed complementarily to at least some operations. According to an embodiment of the present disclosure, operations 810 to 850 may be performed by at least one processor (e.g., the processor 120 of FIG. 1) of the electronic device (e.g., the electronic device 101 of FIG. 1, the electronic device 201 of FIG. 2).
[0095] In operation 810, an electronic device according to an embodiment may obtain a cropped image corresponding to the region of interest information obtained in operation 310. The electronic device may obtain the cropped image from a region of interest indicated by the region of interest information, which is adjusted based on semantic segmentation. In operation 810, the electronic device according to an embodiment may resize the cropped image to have a resolution that can be processed by the image generation model.
[0096] In operation 820, an electronic device according to an embodiment may obtain image analysis information regarding a cropped image. The image analysis information may be obtained by performing image analysis on the cropped image and determining whether the cropped image contains elements corresponding to predefined feature information. For example, the image analysis information may include at least one of gender classification information, age group classification information, whether glasses are detected, whether colored glasses are detected, whether a mask is detected, or whether an accessory is detected.
[0097] In operation 830, an electronic device according to an embodiment may apply at least one filter to a cropped image. The electronic device may apply a filter to the cropped image to provide a visual effect. For example, the at least one filter may include at least one of a smoothness filter, a jawline filter, an eye correction filter, or a tone correction filter. The smoothing filter may include a filter that flattens pixel values of the image. The jawline filter may include a filter that adjusts the shape of a human face. The eye correction filter may include a filter that adjusts the size or shape of eyes appearing in the image. The tone correction filter may include a filter that adjusts the tone of the image to be brighter or darker.
[0098] Referring to FIG. 9, by generating an AI-generated image based on a result of applying a smoothing filter to a cropped image, the electronic device can obtain an image (912) having a smaller number of wrinkles (914) or blemishes than the wrinkles (913) or blemishes that appear in an image (911) to which the smoothing filter is not applied. By generating an AI-generated image based on a result of applying an eye correction filter to the cropped image, the electronic device can obtain an image (922) having an eye (924) having a size corrected for the size of the eye (923) in the image (921) to which the eye correction filter is not applied. By generating an AI-generated image based on a result of applying a contour filter to the cropped image, the electronic device can obtain an image (932) having a contour (934) different from the contour (933) of the face that appears in the image (931) to which the contour filter is not applied. By generating an AI-generated image based on the result of applying a tone correction filter to a cropped image, the electronic device can obtain an image (942) including an object (944) having a brighter (or darker) tone than an object (943) in an image (941) to which a tone correction filter is not applied.
[0099] In operation 840, an electronic device according to an embodiment may apply a blur effect to an image or a cropped image to which at least one filter is applied. For example, the electronic device may apply a bilateral filter to the image or the cropped image to which at least one filter is applied. Since the image generation model has a characteristic of generating an image that emphasizes features included in the image, an image that highlights wrinkles or flaws included in the image may be generated. By generating an AI-generated image based on the result of applying the blur effect, the generation of an image that highlights wrinkles or flaws on the face may be reduced or prevented. The electronic device may adjust the intensity of the blur effect based on the selected image generation mode. For example, the electronic device may apply a different filter size of the bilateral filter depending on the image generation mode. For example, when an image generation mode that generates a comic image or a watercolor image is selected, the electronic device may set the filter size of the bilateral filter to a first value. For example, when an image generation mode that generates a 3D cartoon image or a sketch image is selected, the electronic device can set the filter size of the bidirectional filter to a second value. Referring to FIG. 10, by generating an AI-generated image based on an image to which a blur effect has been applied, the electronic device can obtain an image (1020) in which wrinkles or flaws (1013) emphasized in an image (1010) to which the blur effect has not been applied do not appear.
[0100] In operation 850, the electronic device may remove a background region from an image with a blurred effect or a cropped image. The background region may refer to an area excluding an object (e.g., an object identified in operation 420 of FIG. 4) within the area. When an image generation model generates an AI-generated image based on an image including a background region, information contained in the background region may affect the generated image. The electronic device may obtain a preprocessed image by removing the background region.
[0101] Referring to FIG. 11, when an image generation model generates an image based on an image (1110) including a background region (1111), images (1112, 1113) containing negative effects due to noise included in the background region (1111) may be generated. When an image generation model generates an image based on an image (1120) from which a background region has been removed, images (1122, 1123) with reduced negative effects may be generated.
[0102] Referring to FIG. 12, when an image generation model generates an image based on an image (1210) including a dark background region, overall dark images (1211) can be obtained. When an image generation model generates an image based on an image (1220) from which a background region has been removed, relatively bright images (1221) can be obtained.
[0103] Referring to FIG. 13, when an image generation model generates an image based on an image (1310) including a background region, images (1311) in which various styles are applied to the background region may be obtained, unlike the original purpose of obtaining various changes to the object. When an image generation model generates an image based on an image (1310) including a background region, images (1311) in which an object is affected by the background may be obtained. For example, at least some of the images (1311) may have an unwanted effect applied to the object or may include an unwanted shape (e.g., a hand shape (1313) or an artifact (1315)). When an image generation model generates an image based on an image (1320) from which a background region has been removed, images (1321) generated without an influence due to the background region may be obtained.
[0104] According to one embodiment, the method for acquiring preprocessed image data is not limited to the order of the operations illustrated in FIG. 8. For example, operation 810 may be performed after performing any one of operations 820 to 850. Alternatively, at least some of the operations illustrated in FIG. 8 may be omitted. For example, operation 850, which omits the background area, may be omitted.
[0105] FIG. 14 is a flowchart (1400) illustrating a process for determining at least one of a prompt or parameter in one embodiment. Hereinafter, the operations illustrated in FIG. 14 will be described as being performed by at least one server (e.g., server (108) of FIG. 1, first server (221) of FIG. 2), but the process illustrated in FIG. 14 may also be performed by an electronic device (e.g., electronic device (108) of FIG. 1, electronic device (201) of FIG. 2).
[0106] In operation 1410, at least one server according to an embodiment may determine at least one of a first prompt or a first parameter. In the present disclosure, a 'prompt' may include text that is input to an image generation model to cause the AI-generated image to be generated. The prompt may include at least one of a positive prompt or a negative prompt. In the present disclosure, a 'parameter' may include a setting value related to the operation of an image generation mode. For example, the parameter may include a value indicating the extent to which the image generation model retains features included in an input image during the process of generating an image or follows the guidance of a prompt. In an embodiment, at least one server may determine at least one of a first prompt or a first parameter corresponding to an image generation mode determined based on operation 310 of FIG. 3 or operation 460 of FIG. 4. For example, at least one server may store at least one of a prompt or a parameter in association with each image generation mode. At least one server can determine at least one of the prompts or parameters stored in association with the image generation mode as at least one of the first prompt or the first parameter based on image generation mode information included in the preprocessed image data received from the electronic device.
[0107] In one embodiment, at least one server may obtain an AI-generated image based on a first prompt or a first parameter, but according to one embodiment, at least one server may further perform operations 1420 and 1430. In operation 1420, at least one server may obtain additional information about the preprocessed image. The at least one server may obtain the additional information by inputting a query about the preprocessed image into an image description model. The image description model may output an answer to the query from the image based on a multi-modal large language model. For example, the at least one server may obtain the additional information by inputting a query related to elements of the image and the preprocessed image into the image description model. For example, examples of queries and options for answers that the image description model may output for the queries may be set as shown in Table 1 below.
[0108] Q&A optionsAre they wearing sunglasses?Yes, NoAre they wearing normal glasses?Yes, NoWhat is their gender?Male, FemaleAre they wearing a mask?Yes, NoWhat is their age?Under 10, 10-30, 30-50, 50-70, 70+Do they have a bindi?Yes, No
[0109] In one embodiment, at least one server may obtain additional information in response to a query, such as:
[0110] {"sunglasses":"Yes", "normalglasses": "No", "gender": "male", "mask": No, "age": 30-50, "bindi":"No", "skin": "Caucasian"}
[0111] In operation 1430, at least one server according to one embodiment may determine at least one of a second prompt or a second parameter. The at least one server may determine the second prompt or at least one of the second parameters by modifying at least one of the first prompt or the first parameter based on at least one of the image analysis information or the additional information included in the preprocessed image data. For example, the electronic device may add text corresponding to at least one of the image analysis information or the additional information to the first prompt.
[0112] For example, if the selected image generation mode is comic, at least one server may determine a first prompt that includes "A portrait of a vector illustration style with bold outlines." If the image analysis information includes information indicating that the gender is female, at least one server may determine a second prompt that adds text indicating that the gender is female to the first prompt. If the additional information obtained by at least one server includes information indicating that the gender is male, at least one server may modify the text indicating that the gender is female to text indicating that the gender is male. If the additional information obtained by at least one server includes information indicating that the gender does not include a bindi, at least one server may determine a second prompt that includes a negative prompt that includes a word indicating a bindi. A bindi may refer to a dot located on the forehead or between the eyebrows.
[0113] In one embodiment, the error rates for generating images without obtaining additional information about gender, whether glasses were worn, or whether a bindi was present are compared with those for generating images based on a second prompt with additional information, as shown in Table 2 below. Table 2 is based on the results of generating 514 images based on 40 original images.
[0114] Additional information not appliedAdditional information applieddeltaGender7.3% (38 / 514)0% (0 / 514)7.3%Wearing glasses5.6% (29 / 514)0% (0 / 514)5.6%Presence of bindi2.1% (11 / 514)0.001% (1 / 514)2.1%
[0115] FIG. 15 is a diagram illustrating examples of images according to whether the first prompt is modified to the second prompt in one embodiment.
[0116] In one embodiment, when an image is generated using an image generation model without modifying the first prompt to a second prompt based on additional information, an image (1512) showing a woman can be generated from an image (1511) showing a man. When an image is generated using a second prompt modified based on additional information indicating that the object is male, an image (1513) showing male features, which are characteristic of the original image, can be generated.
[0117] In one embodiment, if no prompt considering additional information is used, an image (1522) containing a bindi may be generated from an image (1521) without a bindi on the face. If an image is generated based on a second prompt including a negative prompt indicating that the object does not contain a bindi, an image (1523) without a bindi may be generated.
[0118] In one embodiment, if no prompt considering additional information is used, an image without sunglasses (1532) may be generated from an image with sunglasses (1531). If an image is generated based on a second prompt indicating that the object includes sunglasses, an image with sunglasses (1533) may be generated.
[0119] In one embodiment, the second prompt may include a positive prompt, a negative prompt, and parameters. The parameters may include at least one of at least one image preservation parameter, at least one text guidance parameter, or at least one seed value. The image preservation parameter may indicate the degree to which features included in the input image are preserved. The text guidance parameter may indicate the degree to which instructions of the prompt are followed. The seed value may include a value that serves as the basis for the image generation model to perform an operation to generate an image.
[0120] FIG. 16 is a block diagram illustrating a process for obtaining at least one AI-generated image using an image generation model in one embodiment. Hereinafter, the process according to the block diagram illustrated in FIG. 16 may be performed by a server (e.g., the first server (108) of FIG. 1 , the second server (222) of FIG. 2 ) or an electronic device (e.g., the electronic device (101) of FIG. 1 , the electronic device (201) of FIG. 2 ).
[0121] In one embodiment, the server can generate an AI-generated image (1640) from a preprocessed image (1620) according to an image generation model (1630) based on at least one of the prompts or parameters (1610). The number of AI-generated images (1640) can correspond to the number of seed values included in the prompts or parameters (1610).
[0122] In one embodiment, at least one of the prompts or parameters (1610) may be determined through a process included in the flowchart (1400) of FIG. 14. The preprocessed image (1620) may be obtained through a process included in the flowchart (800) of FIG. 8.
[0123] FIG. 17 is a flowchart (1700) illustrating a process for post-processing and storing at least one AI-generated image in one embodiment. Hereinafter, the process illustrated in FIG. 17 will be described as being performed by an electronic device (e.g., electronic device (101) of FIG. 1, electronic device (201) of FIG. 2), but may also be performed by a server (e.g., server (108) of FIG. 1, at least one server (208) of FIG. 2).
[0124] In operation 1710, an electronic device according to an embodiment may perform upscaling to increase the resolution of at least one AI-generated image generated through an image generation model. For example, the resolution of at least one AI-generated image generated through the image generation model may be 256 x 256. The electronic device may obtain an image having a resolution of 1025 x 1025 from the at least one AI-generated image through a resolution enhancement algorithm. The resolution of the image upscaled in operation 1710 may be referred to as an intermediate resolution.
[0125] In operation 1720, an electronic device according to an embodiment may determine whether an image generation mode indicated by image generation mode information is a designated mode. If the image generation mode is a designated mode, the electronic device may convert the image to grayscale in operation 1730. For example, if the image generation mode is for generating a sketch-style image, the sketch-style image may be expressed as a black-and-white image by converting the AI-generated image to grayscale in operation 1730. If the image generation mode is not a designated mode, operation 1730 may be omitted.
[0126] In operation 1740, an electronic device according to an embodiment may display at least one AI-generated image through a display (e.g., the display module (160) of FIG. 1). The image displayed in operation 1740 may be an image of medium resolution. For example, the electronic device may display any one of a plurality of AI-generated images. While displaying an AI-generated image, the electronic device may display another AI-generated image in response to a received user input.
[0127] In operation 1750, an electronic device according to one embodiment may receive at least one user input for selecting and saving at least one AI-generated image. For example, the electronic device may display a save button along with an AI-generated image displayed on a display, and receive a user input selecting the save button.
[0128] In operation 1760, the electronic device according to one embodiment can upscale at least one selected image to a high resolution. For example, the electronic device can obtain a high resolution image having a resolution of 3072 x 3072 from an image having a resolution of 1025 x 1025 through a resolution enhancement algorithm. In operation 1770, the electronic device can store the high resolution image in a memory (e.g., memory (130)).
[0129] FIG. 18 illustrates an example of a screen displayed by an electronic device (e.g., electronic device (101) of FIG. 1, electronic device (201) of FIG. 2) according to one embodiment to provide an image through a gallery application.
[0130] In one embodiment, the electronic device may display a first screen (1801) including an execution screen of a gallery application through a display (e.g., a display module (160) of FIG. 1). The first screen (1801) may include a thumbnail image (1803) for an original image. The electronic device may receive a user input for selecting the thumbnail image (1803).
[0131] In one embodiment, the electronic device may display a second screen (1805) displaying the original image in response to a user input selecting a thumbnail image (1803). The second screen (1805) may include visual objects (e.g., icons or menus) associated with the displayed original image. The visual objects associated with the original image may include an editing item (1807) for performing editing on the original image. The electronic device may receive a user input selecting the editing item (1807).
[0132] In one embodiment, in response to a user input selecting an edit item (1807), the electronic device may execute an editing function of a gallery application or an image editing application. The electronic device may display a third screen (1809) based on the executed editing function or image editing application. The third screen (1809) may include a visual object (1811) for generating a new image from an original image. The electronic device may receive a user input selecting the visual object (1811).
[0133] In one embodiment, in response to a user input selecting a visual object (1811), the electronic device may identify an object within an original image having features corresponding to reference feature information. Based on the object being identified, the electronic device may display a fourth screen (1813) including a notification (1815) indicating that a new image can be generated from the original image. The electronic device may display a fifth screen (1817) including a list (1821) displaying a region of interest (1819) for the identified object and at least one image generation mode. The electronic device may determine at least one of the region of interest information or the image generation mode information based on at least one user input for at least one of the region of interest (1819) or the list (1821). The electronic device may display a sixth screen (1823) including a visual object (1825) for executing an operation of generating an image. In response to receiving a user input for a visual object (1825) with the region of interest information or image generation mode information determined, the electronic device may display a seventh screen (1827) including a waiting screen until at least one AI-generated image is acquired.
[0134] In one embodiment, the electronic device may display an eighth screen (1829) including an acquired first AI-generated image (1831). The electronic device may receive a first swipe input (1833) for moving a touch point in a specified direction on the eighth screen. In response to the first swipe input (1833), the electronic device may display a ninth screen (1835) including a second AI-generated image (1837). The electronic device may receive a second swipe input (1839) for moving a touch point in a specified direction on the ninth screen. In response to the second swipe input (1839), the electronic device may display a tenth screen (1841) including a third AI-generated image (1843). The electronic device may receive a third swipe input (1845) for moving a touch point in a specified direction on the tenth screen (1841). In response to the third swipe input (1845), the electronic device may display an eleventh screen (1847) including a fourth AI-generated image (1849). The electronic device may receive a user input for a visual object (1851) to store the generated image. In response to the user input for the visual object (1851) included in the eleventh screen (1847), the electronic device may store the fourth AI-generated image (1849) in the memory (130) of the electronic device or an external server (e.g., a cloud server).
[0135] FIG. 19 illustrates an example of a screen displayed by an electronic device (e.g., electronic device (101) of FIG. 1, electronic device (201) of FIG. 2) according to one embodiment to provide an image through a contact application.
[0136] In one embodiment, the electronic device may execute a profile editing function of a contact application to display a twelfth screen (1901) including a selected original image through a display (e.g., the display module (160) of FIG. 1). The twelfth screen (1901) may include a visual object (1903) for generating an image from the original image. The electronic device may receive a user input for selecting the visual object (1903).
[0137] In one embodiment, based on a user input for a visual object (1903), the electronic device may display a thirteenth screen (1905) including a list (1907) for selecting an image generation mode. The thirteenth screen (1905) may include a visual object (1908) for executing an operation for generating an image. Based on receiving a user input for the visual object (1908), the electronic device may perform an operation for obtaining at least one AI-generated image from the original image. In one embodiment, the electronic device may also obtain an image from the image generation model using a prompt generated based on information about the user obtained from contact information (e.g., occupation, affiliation, age). The electronic device may display a fourteenth screen (1909) with a blur effect applied to the thirteenth screen (1905) until at least one AI-generated image is obtained.
[0138] In one embodiment, the electronic device may display a fifteenth screen (1911) including a list (1913) for selecting at least one of at least one AI-generated image. The electronic device may set the selected at least one of the at least one AI-generated image to a contact's profile based on a user input selecting a visual object (1915). The electronic device may display a sixteenth screen (1917) for displaying profile information for which at least one of the at least one AI-generated image is selected.
[0139] FIG. 20 is a flowchart (2000) illustrating a process by which an electronic device (e.g., the electronic device (101) of FIG. 1 and the electronic device (201) of FIG. 2) expands the background of at least one AI-generated image according to one embodiment. FIG. 21 is a diagram illustrating an example by which an electronic device expands the background of an AI-generated image according to one embodiment.
[0140] In operation 2010, the electronic device can determine whether an aspect ratio of at least one acquired AI-generated image is different from a specified aspect ratio. For example, an image generated by an image generation model has a resolution of 256 x 256, but the AI-generated image may not be properly displayed depending on the shape of the display of the electronic device (e.g., the display module (160) of FIG. 1) or the shape of an area set to display an image within an application execution screen. For example, when a square AI-generated image is scaled and displayed based on a length in a long direction within a rectangular area having different lengths in the horizontal and vertical directions, some of the visual objects within the AI-generated image may not be displayed on the screen.
[0141] If the aspect ratio of the AI-generated image is different from the specified aspect ratio, in operation 2020, the electronic device may expand the background portion of the generated image. For example, referring to FIG. 21, the electronic device may detect the color of the edge portion (2111) of the AI-generated image (2110). The electronic device may reduce and move the AI-generated image (2110) and insert the generated image based on the color of the edge portion (2111) into the remaining area (2121). The electronic device may obtain the AI-generated image (2120) in which the background area including the inserted image is expanded. If the aspect ratio of the AI-generated image corresponds to the specified aspect ratio, operation 2020 may be omitted.
[0142] In operation 2030, the electronic device may display at least one AI-generated image through the display. If the background area of at least one AI-generated image is expanded in operation 2020, the electronic device may display at least one AI-generated image with the expanded background area through the display. For example, the electronic device may display at least a portion of the AI-generated image (2120) with the expanded background area through the display. For example, referring to FIG. 21, by displaying an area (2122) corresponding to a specified aspect ratio within the AI-generated image, an image corresponding to the specified aspect ratio while including the shape of a main object may be displayed.
[0143] In one embodiment, an electronic device (e.g., the electronic device 101 of FIG. 1, the electronic device 201 of FIG. 2) may include a display (e.g., the display module 160 of FIG. 1), at least one processor (e.g., the processor 120 of FIG. 1), and a memory (e.g., the memory 130 of FIG. 1) that stores instructions. The instructions may be executed by the at least one processor (e.g., the processor 120 of FIG. 1) to cause the electronic device (e.g., the electronic device 101 of FIG. 1, the electronic device 201 of FIG. 2) to execute an application. The instructions may be executed by the at least one processor (e.g., the processor 120 of FIG. 1) to cause the electronic device (e.g., the electronic device 101 of FIG. 1, the electronic device 201 of FIG. 2) to obtain at least one of image generation mode information or region of interest information for an original image based on the executed application. The above commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to obtain preprocessed image data including at least one of image analysis information or a preprocessed image. At least one of the image analysis information or the preprocessed image may be obtained by performing preprocessing on an original image based on at least one of the image generation mode or the region of interest information. The above commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to obtain at least one artificial intelligence (AI) generated image generated by an image generation model based on the preprocessed image data.The above commands may be executed by at least one processor (e.g., processor (120) of FIG. 1) to cause the electronic device (e.g., electronic device (101) of FIG. 1, electronic device (201) of FIG. 2) to display the at least one artificial intelligence-generated image through the display (e.g., display module (160) of FIG. 1).
[0144] In one embodiment, the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) may further include a communication circuit. The instructions may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2)) to transmit the preprocessed image data and the image generation mode information to a server (e.g., the server (108) of FIG. 1, the server (208) of FIG. 2)) through the communication circuit. The above commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2)) to receive the at least one artificial intelligence-generated image from the server (e.g., the server (108) of FIG. 1, the server (208) of FIG. 2)) through the communication circuit.
[0145] In one embodiment, the commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to detect an object for image generation of the image generation model from the original image based on the application. The commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to display a user interface including a user interface (UI) object for receiving a user input based on the object being detected through the display (e.g., the display module (160) of FIG. 1). The above commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to obtain the at least one artificial intelligence-generated image based on the user input being received for the UI object.
[0146] In one embodiment, the commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to determine whether at least one of angle information or size information related to an object included in the original image satisfies at least one object detection condition. The commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to determine whether the object has been detected based on whether at least one of the angle information or the size information satisfies the object detection condition.
[0147] In one embodiment, the commands may be executed by the at least one processor (e.g., the processor 120 of FIG. 1) to cause the electronic device (e.g., the electronic device 101 of FIG. 1, the electronic device 201 of FIG. 2) to identify an object having a feature corresponding to reference feature information from the original image. The commands may be executed by the at least one processor (e.g., the processor 120 of FIG. 1) to cause the electronic device (e.g., the electronic device 101 of FIG. 1, the electronic device 201 of FIG. 2) to determine the region of interest information to include the region in which the object is identified. The commands may be executed by the at least one processor (e.g., the processor 120 of FIG. 1) to cause the electronic device (e.g., the electronic device 101 of FIG. 1, the electronic device 201 of FIG. 2) to perform semantic segmentation on the original image to classify pixels of the original image by category. The above commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to adjust the region of interest information to include a region associated with the object among the regions where pixels classified into a category specified by the semantic segmentation are arranged.
[0148] In one embodiment, the commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to obtain a cropped image including a region indicated by the region of interest information within the original image. The commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to generate the preprocessed image from the cropped image such that the image generation model has a processable resolution.
[0149] In one embodiment, the instructions may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to determine at least one of a first prompt or a parameter corresponding to the image generation mode information. The at least one artificial intelligence-generated image may be acquired based on at least one of the first prompt or the parameter.
[0150] The above commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to identify whether a cropped image corresponding to a region indicated by the region of interest information in the original image includes an element corresponding to predefined feature information. The commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to obtain the image analysis information indicating whether the element is included. The commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to determine a second prompt that is a modified version of the first prompt based on the image analysis information. The above commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1), so that the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) may obtain the at least one artificial intelligence-generated image by inputting at least one of the second prompt or the parameter into the image generation model together with the preprocessed image.
[0151] In one embodiment, the instructions may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to input a query and the preprocessed image associated with the elements into a large-scale language model to obtain additional information. The instructions may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to determine the second prompt based on the additional information.
[0152] In one embodiment, the commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to apply at least one filter that provides at least one visual effect to a cropped image corresponding to a region indicated by the region of interest information in the original image. The commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to obtain the preprocessed image based on a result of applying the at least one filter.
[0153] In one embodiment, the commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to apply a blur effect with a blur intensity corresponding to the image generation mode information to a result to which the at least one filter is applied. The commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to obtain the preprocessed image based on a result to which the blur effect is applied.
[0154] In one embodiment, the commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to identify a background region in a cropped image corresponding to the region indicated by the region of interest information in the original image. The commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to remove the background region from the cropped image. The commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to obtain the preprocessed image based on the image from which the background region has been removed.
[0155] In one embodiment, the commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to obtain at least one intermediate resolution image having a higher resolution of the at least one AI-generated image. The commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to display (e.g., the display module (160) of FIG. 1)) at least one intermediate resolution image through the display (e.g., the display module (160) of FIG. 1). The above commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to receive a user input for selecting one of the at least one intermediate resolution image. The above commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to store a high-resolution image having a higher resolution than the selected image in the memory (e.g., the memory (130) of FIG. 1).
[0156] In one embodiment, the commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to obtain at least one background extension image that extends the background of the at least one artificial intelligence-generated image when an aspect ratio of the at least one artificial intelligence-generated image is different from a specified aspect ratio. The commands may be executed by the at least one processor (e.g., the processor (120) of FIG. 1) to cause the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) to display the at least one background extension image through the display (e.g., the display module (160) of FIG. 1).
[0157] A method of operating a system including an electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) and a server (e.g., the server (108) of FIG. 1, the server (208) of FIG. 2) according to one embodiment of the present invention may include an operation in which the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) executes an application. The method may include an operation in which the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) acquires at least one of image generation mode information and region of interest information for an original image based on the executed application. The method may include an operation in which the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) performs preprocessing on the original image based on at least one of the image generation mode or the region of interest information to obtain preprocessed image data including at least one of image analysis information or a preprocessed image. The method may include an operation in which the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) transmits the preprocessed image data to the server (e.g., the server (108) of FIG. 1, the server (208) of FIG. 2). The method may include an operation in which the server (e.g., the server (108) of FIG. 1, the server (208) of FIG. 2) determines at least one of a prompt or a parameter based on the preprocessed image data. The method may include an operation in which the server (e.g., server (108) of FIG. 1, server (208) of FIG. 2) obtains at least one artificial intelligence-generated image based on at least one of the prompt or the parameter.The method may include an operation in which the server (e.g., the server (108) of FIG. 1, the server (208) of FIG. 2) transmits the at least one artificial intelligence-generated image to the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2). The method may include an operation in which the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) displays the at least one artificial intelligence-generated image (e.g., the display module (160) of FIG. 1).
[0158] In one embodiment, the operation of obtaining at least one of the image generation mode information or the region of interest information may include an operation of the electronic device (e.g., the electronic device 101 of FIG. 1, the electronic device 201 of FIG. 2) detecting an object for image generation of the image generation model from the original image based on the application. The operation of obtaining at least one of the image generation mode information or the region of interest information may include an operation of the electronic device (e.g., the electronic device 101 of FIG. 1, the electronic device 201 of FIG. 2) displaying a user interface including a UI object for receiving a user input based on the object being detected. The operation of obtaining at least one of the image generation mode information or the region of interest information may include an operation of the electronic device (e.g., the electronic device 101 of FIG. 1, the electronic device 201 of FIG. 2) receiving a user input for the UI object. The operation of obtaining at least one of the image generation mode information or the region of interest information may include an operation of obtaining at least one of the image generation mode information or the region of interest information based on reception of the user input.
[0159] In one embodiment, the operation of detecting the object may include an operation of determining whether at least one of angle information or size information related to the object included in the original image satisfies at least one object detection condition. The operation of detecting the object may include an operation of determining whether the object has been detected based on whether at least one of the angle information or the size information satisfies the object detection condition.
[0160] In one embodiment, the server (e.g., server (108) of FIG. 1, server (208) of FIG. 2) may include a first server (e.g., first server (221) of FIG. 2) and a second server (e.g., second server (222) of FIG. 2). The operation of determining at least one of the prompt or the parameter may include an operation of the first server (e.g., first server (221) of FIG. 2) determining at least one of the first prompt or the parameter corresponding to the image generation mode information.
[0161] In one embodiment, the operation of obtaining the preprocessed image data may include an operation of the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2) (101, 201) identifying whether a cropped image corresponding to a region indicated by the region of interest information in the original image includes an element corresponding to predefined feature information. The operation of obtaining the preprocessed image data may include an operation of obtaining the image analysis information indicating whether the element is included. The operation of determining at least one of the prompt or the parameter may include an operation of the first server (e.g., the first server (221) of FIG. 2) inputting a query associated with the elements and the preprocessed image into a large-scale language model to obtain additional information. The operation of determining at least one of the prompt or the parameter may include an operation of the first server (e.g., the first server (221) of FIG. 2) determining a second prompt that modifies the first prompt based on the additional information. The operation of obtaining at least one artificial intelligence-generated image may include an operation in which the first server (e.g., the first server (221) of FIG. 2) transmits at least one of the second prompt or the parameter together with the preprocessed image to the second server (e.g., the second server (222) of FIG. 2). The operation of obtaining at least one artificial intelligence-generated image may include an operation in which the first server (e.g., the first server (221) of FIG. 2) receives, from the second server (e.g., the second server (222) of FIG. 2), the at least one artificial intelligence-generated image obtained by the second server (e.g., the second server (222) of FIG. 2) inputting at least one of the second prompt or the parameter together with the preprocessed image into the image generation model.
[0162] In one embodiment, a server (e.g., server 108 of FIG. 1, server 208 of FIG. 2) may include communication circuitry, at least one processor, and a memory storing instructions. The instructions may be executed by the at least one processor to cause the server (e.g., server 108 of FIG. 1, server 208 of FIG. 2) to receive, through the communication circuitry, preprocessed image data including at least one of image analysis information obtained by performing preprocessing on an original image or a preprocessed image, from an electronic device (e.g., electronic device 101 of FIG. 1, electronic device 201 of FIG. 2). The instructions may be executed by the at least one processor to cause the server (e.g., server 108 of FIG. 1, server 208 of FIG. 2) to determine at least one of a prompt or a parameter based on the preprocessed image data. The above commands may be executed by the at least one processor to cause the server (e.g., the server (108) of FIG. 1, the server (208) of FIG. 2) to obtain at least one artificial intelligence-generated image based on at least one of the prompt or the parameter. The above commands may be executed by the at least one processor to cause the server (e.g., the server (108) of FIG. 1, the server (208) of FIG. 2) to transmit the at least one artificial intelligence-generated image to the electronic device (e.g., the electronic device (101) of FIG. 1, the electronic device (201) of FIG. 2)) through the communication circuit.
[0163] Electronic devices and operating methods according to various embodiments can improve the quality of images obtained using image generation.
[0164] An electronic device and an operating method according to various embodiments can improve the similarity between an object included in an original image and an object included in an image generated using an image generation model.
[0165] An electronic device and an operating method according to various embodiments can reduce latency in an image providing process using an image generation model.
[0166] Electronic devices and operating methods according to various embodiments can provide variously changed images from a single image.
[0167] The effects that can be obtained from the present disclosure are not limited to the effects mentioned above, and other effects that are not mentioned can be clearly understood by a person having ordinary skill in the art to which the present disclosure pertains from the description of the present disclosure.
[0168] The methods according to the embodiments described in the claims or specification of the present disclosure may be implemented in the form of hardware, software, or a combination of hardware and software.
[0169] When implemented in software, a computer-readable storage medium storing one or more programs (software modules) may be provided. The one or more programs stored in the computer-readable storage medium are configured for execution by one or more processors within an electronic device. The one or more programs include instructions that cause the electronic device to execute methods according to the embodiments described in the claims or specification of the present disclosure.
[0170] In the present disclosure, the functions or operations performed by the electronic device may be performed by one or more processors executing one or more instructions stored in a memory. The functions or operations of the electronic device mentioned in the present disclosure may be performed by one processor executing one or more instructions, or may be performed by a combination of multiple processors executing one or more instructions. The processor mentioned in the present disclosure may be understood to include a circuit for performing operations or controlling other components of the electronic device. For example, the one or more processors may include a central processing unit (CPU), a microprocessor unit (MPU), an application processor (AP), a communication processor (CP), a neural processing unit (NPU), a system on a chip (SoC), or an integrated circuit (IC) configured to execute one or more instructions. The one or more processors may be configured to perform the operations of the electronic device described above.
[0171] In the present disclosure, a program (software module, software) may be stored in a non-volatile memory including a random access memory (RAM), a flash memory, a read only memory (ROM), an electrically erasable programmable read only memory (EEPROM), a magnetic disc storage device, a compact disc ROM (CD-ROM), digital versatile discs (DVDs) or other forms of optical storage devices, a magnetic cassette. Or, it may be stored in a memory formed by a combination of some or all of these. The memory may be formed by a single storage medium, or may be formed by a combination of a plurality of storage media. The one or more commands may be stored in a single storage medium, or may be distributed and stored in a plurality of storage media.
[0172] Additionally, the program may be stored on an attachable storage device that is accessible via a communication network such as the Internet, an intranet, a local area network (LAN), a wide LAN (WLAN), or a storage area network (SAN), or a combination thereof. Such a storage device may be connected to a device performing an embodiment of the present disclosure via an external port. Additionally, a separate storage device on the communication network may be connected to a device performing an embodiment of the present disclosure.
[0173] In the specific embodiments of the present disclosure described above, components included in the disclosure are expressed in the singular or plural form, depending on the specific embodiment presented. However, the singular or plural expressions are selected to suit the presented situation for convenience of explanation, and the present disclosure is not limited to singular or plural components. Components expressed in the plural form may be composed of singular elements, or components expressed in the singular form may be composed of plural elements.
[0174] Additionally, in the present disclosure, terms such as “part”, “module”, etc. may refer to a hardware component such as a processor or circuit, and / or a software component executed by a hardware component such as a processor.
[0175] A "component" or "module" may be implemented by a program stored in an addressable storage medium and executed by a processor. For example, a "component" or "module" may be implemented by components such as software components, object-oriented software components, class components, and task components, as well as processes, functions, attributes, procedures, subroutines, segments of program code, drivers, firmware, microcode, circuitry, data, databases, data structures, tables, arrays, and variables.
[0176] The specific implementations described in this disclosure are merely exemplary and do not limit the scope of the present disclosure in any way. For the sake of brevity, descriptions of conventional electronic components, control systems, software, and other functional aspects of the systems may be omitted.
[0177] Additionally, in the present disclosure, “comprising at least one of a, b, or c” may mean “comprising only a, including only b, including only c, or including a combination of two or more (including a and b, including b and c, including a and c, or including all of a, b, and c).
[0178] While the detailed description of this disclosure has described specific embodiments, it should be understood that various modifications are possible without departing from the scope of this disclosure. Therefore, the scope of this disclosure should not be limited to the described embodiments, but should be defined not only by the scope of the claims described below, but also by equivalents thereof.
[0179] In this disclosure, the term "if" will be understood to mean "when, upon," "in response to determining," or "in response to detecting," as the context requires. Similarly, "if it is determined to do," or "if [a stated condition or event] is detected," will optionally be understood to mean "upon determining," or "in response to determining," "upon detecting [a stated condition or event]," or "in response to detecting [a stated condition or event]."
[0180] 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 the 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. A processing device (or processing circuit) may execute an operating system (OS) and one or more software applications running on the operating system. In addition, the processing device may 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.
[0181] 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.
[0182] 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 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 or storage media managed by app stores that distribute applications, sites that supply or distribute various software, servers, etc.
[0183] Although the 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.
Claims
1. In electronic devices, display; at least one processor; and Contains memory for storing commands, The above instructions are executed by the at least one processor, so that the electronic device: Run the application, Obtain at least one of image generation mode information or region of interest information for the original image based on the above-executed application, Obtaining preprocessed image data including at least one of image analysis information or a preprocessed image obtained by performing preprocessing on the original image based on at least one of the image generation mode or the region of interest information, Obtaining at least one artificial intelligence (AI) generated image generated by an image generation model based on the above preprocessed image data, An electronic device that displays at least one artificial intelligence-generated image through the display.
2. In claim 1, Further including communication circuits, The above instructions are executed by the at least one processor, so that the electronic device: Transmit the preprocessed image data and the image generation mode information to the server through the communication circuit, An electronic device that receives at least one artificial intelligence-generated image from the server through the communication circuit.
3. In claim 1, The above instructions are executed by the at least one processor, so that the electronic device: Detecting an object for image generation of the image generation model from the original image based on the above application, Displaying a user interface including a user interface (UI) object for receiving user input based on the object being detected through the display, An electronic device that obtains at least one artificial intelligence-generated image based on receiving a user input for the UI object.
4. In claim 3, The above instructions are executed by the at least one processor, so that the electronic device: Determine whether at least one of the angle information or size information related to the object included in the original image satisfies at least one object detection condition, An electronic device that determines whether the object is detected based on whether at least one of the angle information or the size information satisfies an object detection condition.
5. In claim 1, The above instructions are executed by the at least one processor, so that the electronic device: Identifying an object having features corresponding to the reference feature information from the original image, Determine the region of interest information so that the object includes the identified region, Perform semantic segmentation on the original image to classify the pixels of the original image into categories, An electronic device that adjusts the region of interest information to include a region associated with the object among the regions in which pixels classified into categories specified by the semantic segmentation are arranged.
6. In claim 1, The above instructions are executed by the at least one processor, so that the electronic device: Obtaining a cropped image including the region indicated by the region of interest information within the original image, An electronic device that generates a preprocessed image from the cropped image so that the image generation model has a processable resolution.
7. In claim 1, The above instructions are executed by the at least one processor, so that the electronic device: Determine at least one of the first prompts or parameters corresponding to the above image generation mode information, An electronic device that obtains at least one artificial intelligence-generated image based on at least one of the first prompt or the parameter.
8. In claim 7, The above instructions are executed by the at least one processor, so that the electronic device: Identifying whether a cropped image corresponding to the region indicated by the region of interest information within the original image includes an element corresponding to predefined feature information; Obtaining the image analysis information indicating whether the above elements are included, A second prompt is determined by modifying the first prompt based on the above image analysis information, An electronic device that obtains at least one artificial intelligence-generated image by inputting at least one of the second prompt or the parameter into the image generation model together with the preprocessed image.
9. In claim 8, The above instructions are executed by the at least one processor, so that the electronic device: Obtain additional information by inputting queries and the preprocessed images associated with the above elements into a large-scale language model, An electronic device that determines the second prompt based on the additional information.
10. In claim 1, The above instructions are executed by the at least one processor, so that the electronic device: Applying at least one filter that imparts at least one visual effect to a cropped image corresponding to the region indicated by the region of interest information within the original image, An electronic device that obtains the preprocessed image based on the result of applying at least one filter.
11. In claim 10, The above instructions are executed by the at least one processor, so that the electronic device: Applying a blur effect with a blur intensity corresponding to the image generation mode information to the result to which at least one filter is applied; An electronic device that obtains the preprocessed image based on the result of applying the blur effect.
12. In claim 1, The above instructions are executed by the at least one processor, so that the electronic device: Identifying a background region within a cropped image corresponding to the region indicated by the region of interest information within the original image, Removing the background area from the above cropped image, An electronic device that obtains the preprocessed image based on the image from which the background area has been removed.
13. In claim 1, The above instructions are executed by the at least one processor, so that the electronic device: Obtaining at least one intermediate resolution image by increasing the resolution of at least one AI-generated image, Displaying at least one medium resolution image through the above display, Receiving a user input selecting any one of the above at least one intermediate resolution image, An electronic device that stores a high-resolution image with a higher resolution than the selected image in the memory.
14. In claim 1, The above instructions are executed by the at least one processor, so that the electronic device: If the aspect ratio of the at least one artificial intelligence-generated image is different from the specified aspect ratio, at least one background extension image is obtained by extending the background of the at least one artificial intelligence-generated image, An electronic device that displays at least one background extension image through the display.
15. In a method of operating a system including an electronic device and a server, The above electronic device executes an application; An operation of the electronic device obtaining at least one of image generation mode information or region of interest information for the original image based on the executed application; An operation of the electronic device performing pre-processing on the original image based on at least one of the image generation mode or the region of interest information to obtain pre-processed image data including at least one of image analysis information or a pre-processed image; An operation of the electronic device transmitting the preprocessed image data to the server; An operation in which the server determines at least one of a prompt or a parameter based on the preprocessed image data; An operation of the server obtaining at least one artificial intelligence-generated image based on at least one of the prompt or the parameter; The server transmits at least one artificial intelligence-generated image to the electronic device; and A method, wherein the electronic device comprises an operation of displaying at least one artificial intelligence-generated image.
Citation Information
Patent Citations
Method and apparatus for hosting network information via steering of roaming in wireless communication system
KR1020240021131A
Ring earring
KR1020250019428A
Composition for preventing, ameliorating or treating atopic dermatitis comprising Pulsatilla koreana extract as effective component
KR1020250037140A
Method, server and computer program for providing artificial intelligence-based content processing service
KR102589253B1
KR20240062218A