WO2024043604A1 - 신경망을 통해 이미지를 처리하는 방법 및 그 전자 장치 - Google Patents

신경망을 통해 이미지를 처리하는 방법 및 그 전자 장치 Download PDF

Info

Publication number
WO2024043604A1
WO2024043604A1 PCT/KR2023/012115 KR2023012115W WO2024043604A1 WO 2024043604 A1 WO2024043604 A1 WO 2024043604A1 KR 2023012115 W KR2023012115 W KR 2023012115W WO 2024043604 A1 WO2024043604 A1 WO 2024043604A1
Authority
WO
WIPO (PCT)
Prior art keywords
neural network
image
network model
electronic device
quantization
Prior art date
Application number
PCT/KR2023/012115
Other languages
English (en)
French (fr)
Inventor
전형주
강영준
김영조
박현희
최종범
한창수
박재형
원종훈
Original Assignee
삼성전자 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from KR1020220122524A external-priority patent/KR20240026816A/ko
Application filed by 삼성전자 주식회사 filed Critical 삼성전자 주식회사
Publication of WO2024043604A1 publication Critical patent/WO2024043604A1/ko

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration

Definitions

  • Various embodiments disclosed in this document relate to a method and electronic device for processing images through a neural network.
  • An artificial intelligence system (or integrated intelligence system) is a computer system that implements human-level intelligence. It is a system in which machines learn and make decisions on their own, and the recognition rate improves as they are used. Artificial intelligence technology consists of machine learning (deep learning) technology that uses an algorithm that classifies/learns the characteristics of input data on its own, and element technologies that mimic the functions of the human brain such as cognition and judgment using machine learning algorithms.
  • Element technologies include, for example, linguistic understanding technology that recognizes human language/characters, visual understanding technology that recognizes objects as if they were human eyes, reasoning/prediction technology that judges information and makes logical inferences and predictions, and human experience information. It may include at least one of a knowledge expression technology that processes knowledge data and a motion control technology that controls the autonomous driving of a vehicle and the movement of a robot.
  • an electronic device equipped with an artificial intelligence system can support the function of analyzing image data acquired through a camera and performing image processing through a neural network model based on the analyzed results. .
  • a neural network model can be quantized by quantizing the high-frequency operators of the neural network model from floating-point number types to integer types, and then performing subsequent operations. For example, parameters expressed in floating point numbers can be quantized by reducing them to a specific number of bits. Quantization methods mainly include deterministic quantization methods and random quantization methods.
  • an electronic device including a memory storing a first neural network model and at least one processor operatively connected to the memory.
  • the at least one image processor generates device status information related to image processing speed of the electronic device; determine a quantization level for the first neural network model based on the device state information, and the quantization level includes information about a quantization strength for the first neural network model; Generating a second neural network model by performing quantization on the first neural network model based on the quantization level; It may be configured to obtain a second image in which deterioration of the first image is improved through the second neural network model.
  • generating device status information related to an image processing speed of an electronic device An operation of determining a quantization level for a first neural network model based on the device state information, wherein the quantization level includes information about a quantization strength for the first neural network model; generating a second neural network model by performing quantization on the first neural network model based on the quantization level; and acquiring a second image in which deterioration of the first image is improved through the second neural network model.
  • a non-transitory computer-readable storage medium storing at least one program.
  • the at least one program when executed by the at least one processor of the electronic device, causes the electronic device to generate device state information related to an image processing speed of the electronic device; determine a quantization level for a first neural network model based on the device state information, and the quantization level includes information about a quantization strength for the first neural network model; generate a second neural network model by performing quantization on the first neural network model based on the quantization level; It may include instructions for obtaining a second image in which deterioration of the first image is improved through the second neural network model.
  • FIG. 1 is a block diagram showing components of an electronic device according to an embodiment.
  • Figure 2 is a block diagram illustrating a software module of a processor according to one embodiment.
  • FIG. 3 is a flowchart illustrating generating a second quantized neural network model based on device state information according to an embodiment.
  • FIG. 4 is a flowchart illustrating generating a second quantized neural network model based on a determined quantization level according to an embodiment.
  • FIG. 5 is a flowchart illustrating an electronic device improving image deterioration through a quantized neural network model according to an embodiment.
  • FIG. 6 is a flowchart illustrating improvement in image quality of a face area of an electronic device according to an embodiment.
  • Figure 7 is a flowchart illustrating improvement of low-light image quality of an electronic device according to an embodiment.
  • FIG. 8 is a diagram illustrating a screen displaying an image with improved deterioration according to an embodiment.
  • FIG. 9 is a diagram illustrating an electronic device in a network environment according to an embodiment.
  • FIG. 10 is a block diagram illustrating a camera module according to various embodiments.
  • FIG. 1 is a block diagram showing components of an electronic device according to an embodiment.
  • the electronic device 100 may include a memory 110, at least one processor 120, a display 130, and a camera 140.
  • the components listed above may be operatively or electrically connected to each other. As an example, some of the components of the electronic device 100 shown in FIG. 1 may be modified, deleted, or added.
  • the memory 110 includes instructions that process data or control components of the electronic device 100 to perform operations of the electronic device 200 when the processor 120 is executed. ) can be saved.
  • memory 110 may store a plurality of neural network models.
  • the memory 110 may store a neural network model 111 learned to improve image deterioration.
  • the processor 120 may acquire an image with improved quality through a neural network model 111 learned to improve image deterioration.
  • the memory 110 may store a plurality of neural network models. For example, a learned neural network model corresponding to the type of degradation that needs improvement can be stored. In one embodiment, the type of degradation can be expressed as a solution.
  • the neural network model 111 may be a model learned by the processor 120 or a model learned through an external device.
  • An artificial intelligence model is created through learning, which means that the basic artificial intelligence model is learned using a large number of learning data by a learning algorithm, and is a predefined operation rule or artificial intelligence model set to perform the desired characteristics (or purpose). This could mean being created.
  • an artificial intelligence model e.g., neural network model
  • Examples of learning algorithms include supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but are not limited to the examples described above.
  • the neural network model 111 may be composed of a plurality of neural network layers.
  • Each of the plurality of neural network layers has a plurality of weight values, and a neural network calculation can be performed through calculation between the calculation result of the previous layer and the plurality of weights.
  • Multiple weights of multiple neural network layers can be optimized by the learning results of the artificial intelligence model. For example, a plurality of weights may be updated so that loss or cost values obtained from the artificial intelligence model are reduced or minimized during the learning process.
  • the artificial neural network may include a deep neural network (DNN), for example, a convolutional neural network (CNN), a deep neural network (DNN), a recurrent neural network (RNN), and RBM.
  • DNN deep neural network
  • CNN convolutional neural network
  • DNN deep neural network
  • RNN recurrent neural network
  • RBM Restricted Boltzmann Machine
  • DBN Deep Belief Network
  • BRDNN Bidirectional Recurrent Deep Neural Network
  • GAN Geneerative Adversarial Network
  • Deep Q-Networks Deep Q-Networks, etc., but are not limited thereto.
  • the neural network model 111 may be a model learned to generate a restored image with improved quality by receiving an original image as input data. According to one embodiment, neural network model 111 may be trained to improve specific degradation. For example, the neural network model 111 may be trained to improve degradation in facial areas included within an image. For example, the neural network model 111 can be learned to improve low-light degradation of images. Without being limited to the example described, the neural network model 111 may be a model learned to improve at least one degradation.
  • the processor 120 may acquire an image with improved degradation through a neural network model 111 for the type of degradation to be improved among a plurality of neural network models. According to various embodiments, the processor 120 may acquire images in which various types of degradation have been improved using one neural network model.
  • memory 110 may store images.
  • the memory 110 may store at least one image acquired through the camera 140 included in the electronic device 100.
  • the memory 110 may store at least one image downloaded by the electronic device 100 through an external electronic device (eg, a server).
  • the image stored in the memory 110 may be provided as an original image for improving deterioration.
  • the first image of the present disclosure may include the original image.
  • the processor 120 may be electrically or operatively connected to the memory 110, the display 130, and/or the camera 140. According to one embodiment, the processor 120 may perform operations or data processing related to control and/or communication of at least one other component of the electronic device 100 using instructions stored in the memory 110. According to one embodiment, the processor 120 includes a central processing unit (CPU), a graphics processing unit (GPU), a micro controller unit (MCU), a sensor hub, a supplementary processor, a communication processor, and an application. It may include at least one of an application processor, an application specific integrated circuit (ASIC), a field programmable gate arrays (FPGA), and a neural processing unit (NPU), and may have a plurality of cores.
  • CPU central processing unit
  • GPU graphics processing unit
  • MCU micro controller unit
  • a sensor hub a sensor hub
  • a supplementary processor a communication processor
  • an application may include at least one of an application processor, an application specific integrated circuit (ASIC), a field programmable gate arrays (FPGA),
  • the processor 120 may process input data (eg, images) according to predefined operation rules or artificial intelligence models stored in the memory 110.
  • the artificial intelligence dedicated processors may be designed with a hardware structure specialized for processing a specific artificial intelligence model.
  • the processor 120 may generate device status information related to the image processing speed of the electronic device 100. For example, the processor 120 may determine the processing speed associated with the electronic device 100 performing a process to improve image deterioration. For example, the processor 120 may generate device status information that includes various information that affects the time it takes for the electronic device 100 to perform an operation to improve image deterioration.
  • the device status information may include at least one of overload information of the electronic device 100 and throughput information related to the processor 120.
  • the processor 120 determines that the throughput associated with the processor 120 is high when tasks using various types of neural network models are already assigned to hardware (e.g., NPU, GPU, CPU), and the electronic The speed reduction multiplier according to the overload state of the device 100 can be determined.
  • the processor 120 may determine a quantization level for the neural network model 111 based on the device state information. For example, the processor 120 may determine the quantization level according to a speed reduction multiplier determined based on device state information.
  • the quantization level may include information about the quantization strength for the neural network model 111. For example, if the processor 120 determines that the electronic device 100 is in an overloaded state based on device state information, the processor 120 may increase the quantization strength compared to the standard. For example, if the processor 120 determines that the throughput is excessive based on throughput information related to the processor 120, the quantization intensity may be increased from the standard. For example, the processor 120 may determine not to quantize the neural network model 111 when it is determined that the electronic device 100 is not in an overload state based on the device status information and there is no slowdown in speed. Accordingly, when performing quantization on a neural network model, the electronic device 100 according to one embodiment may dynamically determine the quantization strength according to the state of the device. Therefore, the processing speed for improving image degradation can be guaranteed while maintaining the performance of existing degradation improvement.
  • the processor 120 may generate a quantized neural network model by quantizing the neural network model 111 based on the determined quantization level.
  • the processor 120 may quantize the neural network model 111 with high intensity when the quantization level determined based on device state information is high. For example, when the quantization level is high, the processor 120 can significantly reduce the number of bits of the neural network model 111. For example, if the quantization level is high, the processor 120 may quantize the weight and activation function output values expressed in 32 bits by reducing them to 16 bits or 8 bits.
  • the processor 120 may not perform quantization on the neural network model 111 when the quantization level determined based on device state information is low. For example, if the processor 120 determines that image deterioration can be improved without speed reduction based on the determined quantization level, the processor 120 may obtain an image with improved deterioration using the unquantized neural network model 111. .
  • the processor 120 may quantize the neural network model 111 at a low intensity. For example, when the quantization level is low, the processor 120 may reduce the number of bits of the neural network model 111 to a smaller number than when the quantization level is high. For example, if the quantization level is low, the processor 120 may quantize all of the weight and activation function output values expressed in 32 bits by reducing them to 16 bits or only part of the weight or activation function output to 16 bits. .
  • the processor 120 may acquire an image with improved degradation using a quantized neural network model.
  • the display 130 may display various contents (eg, text, images, videos, icons, and/or symbols, etc.).
  • the display 130 may include a liquid crystal display (LCD), a light emitting diode (LED) display, or an organic light emitting diode (OLED) display.
  • LCD liquid crystal display
  • LED light emitting diode
  • OLED organic light emitting diode
  • the display 130 may display an image selected by the processor 120 among images stored in the memory 110. According to one embodiment, the display 130 may display an image (eg, a preview image) acquired through the camera 140. According to one embodiment, the display 130 may display the original image and/or an image whose deterioration has been improved through the neural network model 111.
  • Figure 2 is a block diagram illustrating a software module of a processor according to one embodiment.
  • the processor 120 may include a device state determination module 210, a quantization level determination module 220, a quantization execution module 230, and/or an image degradation processing module 240.
  • the above-described components may be implemented as software modules or may be manufactured in the form of hardware modules (e.g., hardware chips), and two or more of the above-described components may be implemented as one component and implemented as a software module or as a hardware module. It can be manufactured in any shape. According to one embodiment, each module implemented as a software module can be executed by executing instructions stored in the memory 110.
  • the processor 120 may include a device state determination module 210.
  • the device status determination module 210 may determine status information of the electronic device 100 in response to a request to improve image deterioration.
  • image degradation improvement performed in response to a request for image degradation improvement may represent image degradation improvement performed using the neural network model 111.
  • the device state determination module 210 determines the temperature of the electronic device 100, whether the electronic device 100 is in an overload state, and the hardware on which the neural network model operates (e.g., NPU, GPU, CPU) is occupied. It is possible to determine the status of various electronic devices 100, including at least one of whether the electronic device 100 is running or not and the processing throughput of the processor 120. In one embodiment, the device state information determination module 210 may generate device state information based on the determination. According to one embodiment, the device status information is not limited to the information listed above and may include various information related to image processing speed. For example, device status information may include various information related to processing speed to improve image deterioration using the neural network model 111.
  • the quantization level determination module 220 may determine the quantization level for the neural network model 111 based on at least device state information generated through the device state determination module 210. For example, when the quantization level determination module 220 determines that the image processing speed of the electronic device 100 will be delayed based on device status information, the quantization level determination module 220 may determine the size of the quantization level to be larger than the standard. According to one embodiment, the quantization level may include information about the quantization strength of a neural network model for improving deterioration of images stored in the memory 110.
  • the quantization level determination module 220 may determine the quantization level by further considering the processing speed of the neural network model 111 and the required processing speed related to improving image deterioration.
  • the electronic device 100 may predetermine the required processing speed depending on the type of deterioration to be improved.
  • the speed that serves as a real-time standard may be the required processing speed. For example, if the number of images to be processed per second is 60, 16ms may be the required processing speed related to improving image deterioration.
  • the quantization execution module 230 may perform quantization on the neural network model 111 based on the quantization level determined through the quantization level determination module 220. For example, when the size of the quantization level is large, the quantization execution module 230 may perform intensive quantization processing on the neural network model 111 and output a quantized neural network model. For example, when the size of the quantization level is small, the quantization execution module 230 may perform low-intensity quantization processing on the neural network model 111 and output a quantized neural network model. For example, when the quantization level is '0', the quantization execution module 230 may output the neural network model 111 as is without performing quantization processing on the neural network model 111.
  • the quantized neural network model generated through the quantization execution module 230 is one of the weights of the layers included in the original neural network model 111, the input data, the output data, and the size of the internal processing bits. At least one may contain a modified neural network model.
  • the overall size of the quantized neural network model can be reduced by reducing the bit size of the weight and activation function output value of the neural network model 111.
  • reducing the bit size of the weight and activation function output values may indicate outputting the weight and activation function with fewer bits. Accordingly, the processor 120 can perform image processing without delay in processing speed even in a limited resource environment using a quantized neural network model.
  • the quantized neural network model generated through the quantization execution module 230 may be quantized into various bits, such as 16 bit, 8 bit, 4 bit, and 2 bit, depending on the quantization level.
  • the quantization execution module 230 may additionally obtain quantization processing information when the quantization level is higher than a specified level.
  • the quantization processing information may include information considered when performing quantization on the neural network model 111.
  • quantization processing information may include information about factors that can minimize the impact on image quality depending on the type of degradation requested to be improved in relation to the image (e.g., type of solution).
  • quantization processing information may include information about various factors that can minimize the impact on quality even if image deterioration is improved using a quantized neural network model.
  • quantization processing information may include information listing multiple faces included in the image in order of importance.
  • the quantization processing information may include range information of frequently used values for each layer of the neural network model 111 in a solution to improve low-light deterioration.
  • the quantization execution module 230 may perform quantization on the neural network model 111 using the quantization level and quantization processing information to generate a quantized neural network model.
  • the image deterioration processing module 240 may improve image deterioration using a neural network model generated through the quantization execution module 230.
  • the image degradation processing module 240 may obtain an image with improved degradation by inputting an image for which degradation improvement has been requested (eg, an original image) into a quantized neural network model.
  • the image deterioration processing module 240 may improve image deterioration using processing limitation information related to image deterioration improvement.
  • the image degradation processing module 240 may obtain an image with improved degradation by inputting the image for which degradation improvement is requested and processing limitation information into a quantized neural network model.
  • the processing limitation information may include information about the scope of improvement of deteriorations included in the image.
  • the neural network model is a neural network model trained to improve degradation in face regions
  • the processing limit information may include the number of faces to be processed, the extent of the face region for which degradation is to be improved, and/or information about the faces for which degradation is to be improved. may include.
  • processing limitation information may be generated based on quantization processing information.
  • the quantization execution module 230 and/or the image degradation processing module 240 may generate processing limitation information based on quantization processing information.
  • FIG. 3 is a flowchart 300 illustrating generating a second quantized neural network model based on device state information according to one embodiment.
  • FIG. 4 is a flowchart 400 illustrating generating a second quantized neural network model based on a determined quantization level according to one embodiment.
  • a device state determination module 210 a quantization level determination module 220, a quantization execution module 230, and/or an image degradation processing module 240 are shown.
  • the software module can be described as the operation of the processor 120.
  • the software modules listed above can generate the quantized second neural network model 313 through operations similar to those described with reference to FIG. 2 . Accordingly, descriptions that overlap or are similar to those of FIG. 2 may be omitted below.
  • Deterioration improvement for the first image 301 described with reference to FIGS. 3 and 4 is described as being performed through the first neural network model 309 (e.g., the neural network model 111 in FIG. 1).
  • the operation of the present disclosure can be performed even when using a plurality of neural network models without limitation.
  • the device state determination module 210 may generate device state information 303. According to one embodiment, the device state determination module 210 may generate device state information 303 according to a request to improve deterioration of the first image 301. In one embodiment, the device state determination module 210 determines the temperature of the electronic device 100, whether the electronic device 100 is in an overloaded state, and whether the hardware on which the neural network model operates (e.g., NPU, GPU, CPU) is occupied. Device status information 303 may be generated including at least one of availability and process throughput of the processor 120. According to one embodiment, the device status information 303 may include status information (eg, speed reduction multiplier) of various electronic devices 100 that affect the processing speed of image degradation processing.
  • status information eg, speed reduction multiplier
  • the device state determination module 210 may transmit the device state information 303 to the quantization level determination module 220. According to various embodiments, when the device state determination module 210 and the quantization level determination module 220 are implemented as one module, the operation of transmitting the device state information 303 may be omitted.
  • the quantization level determination module 220 may receive device state information 303 and the first image 301 and determine the quantization level 305. For example, the quantization level determination module 220 may determine the quantization strength for the first neural network model 309 to improve deterioration of the first image 301 based on the device state information 303.
  • the quantization level determination module 220 determines the quantization level by considering the device state information 303, the processing speed 403 of the neural network model, and/or the required processing speed 401 related to image degradation improvement. You can. For example, the quantization level determination module 220 calculates the quantization strength to meet the required processing rate 401 related to image degradation improvement based on the processing speed 403 of the neural network model and the device state information 303. Thus, the quantization level can be determined. For example, based on the device state information 303, the quantization level determination module 220 determines that the speed reduction of the electronic device 100 is 1 time or less and that the processing speed 403 of the neural network model is the required processing speed 401.
  • the quantization level may be '0' and it may be determined that quantization processing does not need to be performed. For example, if the quantization level determination module 220 determines that the required processing speed 401 related to image degradation improvement cannot be met based on the device state information 303 and the processing speed 403 of the neural network model, The quantization level can be determined to be a value greater than 0. According to one embodiment, the quantization level determination module 220 may determine the quantization level within a specified range (eg, 0 to 3) in proportion to the quantization strength. For example, the quantization level determination module 220 may determine a high intensity level of the first neural network model 309 based on the device state information 303, the required processing speed 401, and/or the processing speed 403 of the neural network model.
  • a specified range eg, 0 to 3
  • the size of the quantization level can be determined to be a large value (e.g., 3). For example, if the quantization level determination module 220 determines that low intensity quantization is required for the first neural network model 309, the quantization level determination module 220 may determine the size of the quantization level to be a relatively small value (e.g., 1 or 2). .
  • the change in size of the neural network model may be large.
  • the size of the quantized neural network model may be smaller than when the quantization level is 1 or 2.
  • the electronic device 100 may control the processing speed of image degradation improvement using the neural network model as the size of the neural network model changes.
  • the quantization level determination module 220 may transmit the determined quantization level 305 to the quantization execution module 230.
  • the quantization execution module 230 may perform quantization on the first neural network model 309 based on the quantization level 305. For example, the quantization execution module 230 adjusts the bit of the weight value of each layer included in the first neural network model 309 or adjusts the calculation processing bit to create a quantized second neural network model. (313) can be generated.
  • the quantization execution module 230 may perform quantization on the first neural network model 309 based on the quantization level 305 as well as the quantization processing information 307. For example, when the quantization execution module 230 determines that the quantization processing information 307 is necessary according to the quantization level 305, the quantization execution module 230 additionally considers the quantization processing information 307 to create the first neural network model 309. Quantization can be performed on According to one embodiment, the quantization processing information 307 may include information about factors that can minimize the impact on image quality depending on the type of degradation requested to be improved in relation to the image (e.g., type of solution). there is.
  • the quantization execution module 230 determines the quantization strength for the first neural network model 309 based on the quantization level 305 and increases the proportion of quantization bits through the quantization processing information 307. You can decide which layer section to take or adjust the strength of quantization.
  • the quantization execution module 230 may perform quantization on the first neural network model 309 based on the first image 301, the quantization level 305, and the quantization processing information 307. .
  • the quantization execution module 230 may perform quantization by determining the quantization strength for the first neural network model 309 using the correlation between the first image 301 and the quantization processing information 307. .
  • the quantization execution module 230 reduces the processing time of image deterioration by quantization for the first neural network model 309. It is possible to reduce and satisfy the required processing speed (401) that must be guaranteed in a degradation improvement solution.
  • the quantization execution module 230 performs quantization on the first neural network model 309 based on the quantization level 305, quantization processing information 307, and/or the first image 301.
  • a second neural network model 313 can be created.
  • the quantization execution module 230 may generate processing limitation information 311 based on the quantization processing information 307 and/or the first image 301.
  • the processing limitation information 311 may include information about the scope of improvement of deteriorations included in the image.
  • the quantization execution module 230 may transmit the generated processing limitation information 311 and the second neural network model 313 to the image deterioration processing module 240.
  • the image deterioration processing module 240 may acquire a second image 315 in which image deterioration of the first image 301 is improved through the second neural network model 313. For example, the image deterioration processing module 240 inputs the first image 301 and the processing limitation information 311 into the second neural network model 313 to obtain a second image 315 with improved image deterioration. You can. In one embodiment, the image degradation processing module 240 may shorten the processing time for improving image degradation of the first image 301 using the quantized second neural network model 313.
  • the quantization execution module 230 does not perform quantization on the first neural network model 309 when it is unnecessary to perform quantization on the first neural network model 309 (e.g., when the quantization level is 0). Instead, the first neural network model 309 can be transmitted to the image deterioration processing module 240. In one embodiment, the image deterioration processing module 240 may acquire a second image 315 in which deterioration of the first image 301 is improved through the first neural network model 309.
  • FIG. 5 is a flowchart illustrating an electronic device improving image deterioration through a quantized neural network model according to an embodiment.
  • the processor 120 may generate device status information (e.g., device status information 303) related to the image processing speed of the electronic device (e.g., the electronic device 100) in operation 501.
  • device status information may include various information that affects the time it takes for the electronic device 100 to perform an operation to improve image deterioration.
  • the processor 120 determines a quantization level (e.g., quantization level 305) for a first neural network model (e.g., first neural network model 309) based on device state information. You can decide.
  • the quantization level may include information about the quantization strength for the first neural network model. For example, if the processor 120 determines that the electronic device 100 is in an overloaded state based on device state information, the processor 120 may increase the quantization strength compared to the standard. For example, if the processor 120 determines that the throughput is excessive based on throughput information related to the processor 120, the quantization intensity may be increased from the standard. For example, if the processor 120 determines that the electronic device 100 is not overloaded based on the device status information and there is no slowdown in speed, the processor 120 may determine not to quantize the neural network model.
  • the processor 120 may generate a second neural network model (e.g., the second neural network model 313) by performing quantization on the first neural network model based on the quantization level.
  • the processor 120 may generate a second neural network model by changing at least one of the weights of layers included in the first neural network model, input data, output data, and/or the size of internal processing bits.
  • operation 505 may be omitted if the processor 120 determines that the quantization operation for the first neural network model is unnecessary based on the quantization level.
  • the processor 120 may acquire a second image (eg, the second image 315) in which deterioration of the first image has been improved through a second neural network model.
  • the processor 120 may input a first image into a second neural network model and obtain a second image in which deterioration of the first image is improved.
  • the processor 120 may obtain a second image in which deterioration of the first image is improved using the first neural network model.
  • FIG. 6 is a flowchart 600 illustrating improvement of image quality of a face area of an electronic device according to an embodiment.
  • a device state determination module 210 a quantization level determination module 220, a quantization execution module 230, and/or an image degradation processing module 240 are shown.
  • the software module can be described as the operation of the processor 120.
  • the software modules listed above can improve the image quality of the face area included in the first image 601 through operations similar to those described with reference to FIGS. 2, 3, and 4. Accordingly, descriptions that overlap or are similar to those described with reference to FIGS. 2, 3, and 4 may be omitted below.
  • Deterioration improvement for the first image 601 described with reference to FIG. 6 is achieved through the first neural network model 613 (e.g., the neural network model 111 in FIG. 1 and the first neural network model 309 in FIG. 3). It can be done.
  • the first neural network model 613 may include a neural network model learned to detect the face area included in the image and improve the image quality of the face area.
  • the device status determination module 210 may generate device status information 603 in response to a request to improve image deterioration for the face area of the first image 601.
  • the device state determination module 210 determines the temperature of the electronic device 100, whether the electronic device 100 is in an overloaded state, and whether the hardware on which the neural network model operates (e.g., NPU, GPU, CPU) is occupied.
  • Device status information 303 may be generated including at least one of availability and process throughput of the processor 120.
  • the device state determination module 210 determines a device state that may affect image deterioration processing and determines a speed reduction multiplier (e.g., 1.5 times) of the electronic device 100 using the device state information 603. can be created.
  • the device state determination module 210 may transmit the device state information 603 to the quantization level determination module 220.
  • the quantization level determination module 220 determines the quantization level 609 based on device state information 603, first neural network model processing speed 607, and/or face region solution required processing speed 605. can be decided.
  • the facial area solution required processing speed 605 may represent the processing speed for improving the deterioration of the facial area included in the image.
  • the quantization level determination module 220 determines the quantization strength to meet the face region solution required processing speed 605 based on the first neural network model processing speed 607 and the device state information 603.
  • the quantization level can be determined by calculation. For example, if the quantization level determination module 220 determines that the face area solution required processing speed 605 cannot be satisfied based on the device state information 603 and the first neural network model processing speed 607, quantization The level can be determined to be a value greater than 0.
  • the quantization level determination module 220 may determine the quantization level within a specified range (eg, 0 to 3) in proportion to the quantization strength.
  • the quantization level determination module 220 may determine the first neural network model 613 based on the device state information 603, the face region solution required processing speed 605, and/or the first neural network model processing speed 607. ), if it is determined that high-strength quantization is necessary, the size of the quantization level can be determined to be a large value (e.g., 3).
  • the quantization level determination module 220 may transmit the determined quantization level 609 to the quantization execution module 230.
  • the quantization execution module 230 may perform quantization on the first neural network model 613 based on the quantization level 609. For example, the quantization execution module 230 adjusts the bits of the weight values of each layer included in the first neural network model 613 or adjusts the calculation processing bits to create a quantized second neural network model. (617) can be generated.
  • the quantization execution module 230 generates the first neural network model 613 based on the minimum face area range 611 (e.g., quantization processing information 307 in FIG. 3) as well as the quantization level 609. Quantization can be performed on .
  • the minimum face area range 611 may include the range of the minimum face area within the image aimed at improving image quality.
  • the quantization execution module 230 determines that image deterioration due to quantization is large because the quantization strength for the first neural network model 613 is large, the quantization execution module 230 adjusts the quantization strength based on the minimum face area range 611. It can be adjusted. For example, if the quantization level 609 is greater than or equal to a specified size, the quantization execution module 230 may adjust the quantization strength based on the number of faces included in the first image 601 and the minimum face area range 611. there is.
  • the quantization execution module 230 determines that all deterioration of the face area within the first image 601 must be improved.
  • the first neural network model 613 can be quantized according to the quantization level 609.
  • the quantization execution module 230 1 By reducing the range of the face area for which deterioration is to be improved within the image 601, deterioration in only some areas can be improved.
  • the minimum face area range may mean a value that defines the range of the face area to improve image deterioration through a quantized neural network model.
  • the minimum face area range may mean the quantity of the face area for which improvement of image deterioration is to be performed.
  • the quantization execution module 230 can lower the quantization strength because the facial area in the first image 601 to improve deterioration is reduced and the processing speed for deterioration improvement can be increased.
  • the face information to be corrected 615 is sent to the image deterioration processing module 240. It can be delivered.
  • the face information to be corrected 615 may be determined based on various information about the face area in the first image 601 (eg, profile information, size of the face area).
  • the quantization execution module 230 performs quantization on the first neural network model 613 based on the first image 601, the quantization level 609, and the minimum face area range 611, and 2 A neural network model 617 can be created.
  • the quantization execution module 230 may transmit the face information to be corrected 615 and the second neural network model 617 to the image deterioration processing module 240.
  • the image deterioration processing module 240 may acquire a second image 619 in which deterioration of the face area of the first image 601 is improved through the second neural network model 617.
  • the image deterioration processing module 240 inputs the first image 601 and the face information to be corrected 615 into the second neural network model 617 to create a second image 619 in which image deterioration of the face area is improved. ) can be obtained.
  • FIG. 7 is a flowchart 700 illustrating improvement of low-light image quality of an electronic device according to an embodiment.
  • a device state determination module 210 a quantization level determination module 220, a quantization execution module 230, and/or an image degradation processing module 240 are shown.
  • the software module can be described as the operation of the processor 120.
  • the above-listed software modules improve the image quality of the face area included in the first image 701 (e.g., image quality deteriorated due to low illumination) through operations similar to those described with reference to FIGS. 2, 3, and 4. You can. Accordingly, descriptions that overlap or are similar to those described with reference to FIGS. 2, 3, and 4 may be omitted below.
  • Deterioration improvement for the first image 701 described with reference to FIG. 7 is achieved through the first neural network model 713 (e.g., the neural network model 111 in FIG. 1 and the first neural network model 309 in FIG. 3). It can be done.
  • the first neural network model 713 may include a neural network model learned to improve image quality deterioration due to low illumination of the first image 701.
  • the device state determination module 210 may generate device state information 703 in response to a request to improve deterioration of the first image 701 due to low illumination.
  • the device state determination module 210 determines the temperature of the electronic device 100, whether the electronic device 100 is in an overloaded state, and whether the hardware on which the neural network model operates (e.g., NPU, GPU, CPU) is occupied.
  • Device status information 703 may be generated including at least one of availability and process throughput of the processor 120.
  • the device state determination module 210 determines a device state that may affect image deterioration processing and determines a speed reduction multiple (e.g., 2 times) of the electronic device 100 using the device state information 703. can be created.
  • the device state determination module 210 may transmit the device state information 703 to the quantization level determination module 220.
  • the quantization level determination module 220 determines the quantization level 709 based on the device state information 703, the first neural network model processing rate 707, and/or the low-light enhancement solution required processing rate 705. can be decided.
  • the low-light improvement solution required processing speed 705 may indicate the required processing speed for improving the low-light of an image.
  • the quantization level determination module 220 determines the quantization intensity to meet the low-light improvement solution required processing speed 705 based on the first neural network model processing speed 707 and the device state information 703.
  • the quantization level can be determined by calculation. For example, if the quantization level determination module 220 determines that the low-light improvement solution required processing speed 705 cannot be satisfied based on the device state information 703 and the first neural network model processing speed 707, quantization The level can be determined to be a value greater than 0.
  • the quantization level determination module 220 may determine the quantization level within a specified range (eg, 0 to 3) in proportion to the quantization strength.
  • the quantization level determination module 220 may determine the first neural network model 713 based on the device state information 703, the low-light enhancement solution required processing speed 705, and/or the first neural network model processing speed 707. ), if it is determined that high-strength quantization is necessary, the size of the quantization level can be determined to be a large value (e.g., 3).
  • the quantization level determination module 220 may transmit the determined quantization level 709 to the quantization execution module 230.
  • the quantization execution module 230 may perform quantization on the first neural network model 713 based on the quantization level 709. For example, the quantization execution module 230 adjusts the bits of the weight values of each layer included in the first neural network model 713 or adjusts the calculation processing bits to create a quantized second neural network model. (717) can be generated.
  • the quantization execution module 230 performs a first neural network based on the quantization level 709 as well as the auxiliary image 711 (e.g., the quantization processing information 307 of FIG. 3, a plurality of low-light images). Quantization can be performed on the model 713. In one embodiment, the quantization execution module 230 may determine the range of each layer included in the first neural network model 713 through the auxiliary image 711.
  • the quantization execution module 230 uses the auxiliary image 711 to adjust the proportion of the quantization bits. Determine the layer section to be taken high, or exclude some values that greatly deviate from the median or average value of the range of each layer included in the first neural network model 713 but are very small in number, and perform quantization by determining the range of each layer. can do. For example, when the quantization level 709 is greater than or equal to a specified size, the quantization execution module 230 generates the auxiliary image 711 so that it can be quantized by excluding some very small values when performing quantization of the first neural network model 713. Available.
  • the quantization execution module 230 performs quantization on the first neural network model 713 based on the first image 701, the quantization level 709, and the auxiliary image 711 and performs quantization on the second neural network model 713.
  • a model 717 can be created.
  • the quantization execution module 230 may transmit the second neural network model 717 to the image deterioration processing module 240.
  • the image deterioration processing module 240 may acquire a second image 719 in which image quality deterioration due to low illumination of the first image 701 is improved through the second neural network model 717.
  • FIG. 8 is a diagram illustrating a screen displaying an image with improved deterioration according to an embodiment.
  • the electronic device 100 displays a first screen 810, a second screen 820, and a third screen 830 that display images with improved deterioration through the display 130.
  • the first screen 810 represents a screen for executing an application for an image.
  • the first screen 810 may include various icons related to executing an application for an image.
  • the first screen 810 may include an icon 811 for improving image deterioration.
  • the processor 120 may obtain a request related to improving deterioration of a first image among at least one image stored in the memory 110.
  • the processor 120 may display an icon 811 for improving deterioration through the display 130.
  • the user of the electronic device 100 may make a request related to image quality through the icon 811 for improving deterioration.
  • the processor 120 may obtain a request related to improving deterioration of an image (eg, a preview image) acquired through the camera 140.
  • the processor 120 may display a preview image and an icon 811 for improving degradation through the display 130.
  • the user of the electronic device 100 may make a request related to image quality through the icon 811 for improving deterioration.
  • the second screen 820 may include a deterioration improvement guidance screen related to a deterioration improvement operation for the first image selected on the first screen 810.
  • the processor 120 may display a visual object 821 on the display 130 indicating that deterioration improvement is being performed on the first image.
  • the processor 120 may display, through the display 130, a visual object 821 indicating that deterioration improvement is being performed according to the performance status of deterioration improvement for the image.
  • the processor 120 may omit display of the second screen 820.
  • the third screen 830 may include a comparison screen 831 including the first image 832 and the improved second image 833.
  • the processor 120 may improve deterioration of the first image through a second neural network model, obtain an image with improved deterioration, and display it on the display 130. For example, the processor 120 may display the first image 832 and a second image 833 in which deterioration of the first image 832 has been improved through the display 130 .
  • the electronic device 100 may obtain the second image 833 by improving the deterioration of the first image 832 through a method similar to that described with reference to FIGS. 1 to 7. there is.
  • the electronic device 100 may display a first image 832 and/or a second image 833.
  • the electronic device 100 may not display the first image 832 but only the second image 833 in which deterioration has been improved.
  • the electronic device 100 may display not only the second image 833 but also various visual objects that may be displayed together in relation thereto.
  • an electronic device uses a first neural network model (e.g., the first neural network model 309 of FIG. 3 or 4, FIG.
  • a memory e.g., memory 110 in FIG. 1, memory 930 in FIG. 9) storing the first neural network model 613 in FIG. 6, first neural network model 713 in FIG. 7) and the memory (e.g. It may include at least one processor (e.g., the processor 120 of FIG. 1 or FIG. 2 or the processor 920 of FIG. 9) operatively connected to the memory 110 of FIG. 1 or the memory 930 of FIG. 9. You can.
  • the electronic device e.g., the electronic device 100 of FIG.
  • the electronic device 901 of FIG. 9) includes the at least one processor (e.g., the processor 120 of FIG. 1 or FIG. 2, the processor 920 of FIG. 9). )) may be configured to generate device status information related to the image processing speed of the electronic device (e.g., the electronic device 100 in FIG. 1 and the electronic device 901 in FIG. 9).
  • the electronic device e.g., the electronic device 100 of FIG. 1, the electronic device 901 of FIG. 9) includes the at least one processor (e.g., the processor 120 of FIG. 1 or FIG. 2, the processor 920 of FIG. 9). )) may be configured to determine the quantization level for the first neural network model based on the device state information.
  • the quantization level may include information about the quantization strength for the first neural network model.
  • the electronic device e.g., the electronic device 100 of FIG. 1, the electronic device 901 of FIG. 9) includes the at least one processor (e.g., the processor 120 of FIG. 1 or FIG. 2, the processor 920 of FIG. 9). )) may be configured to generate a second neural network model by performing quantization on the first neural network model based on the quantization level.
  • the electronic device e.g., the electronic device 100 of FIG. 1, the electronic device 901 of FIG. 9) includes the at least one processor (e.g., the processor 120 of FIG. 1 or FIG. 2, the processor 920 of FIG. 9). )
  • the device status information includes overload information of the electronic device (e.g., the electronic device 100 of FIG. 1 and the electronic device 901 of FIG. 9) and processing amount associated with the at least one processor ( Throughput) information may be included.
  • overload information of the electronic device e.g., the electronic device 100 of FIG. 1 and the electronic device 901 of FIG. 9
  • processing amount associated with the at least one processor Throughput
  • An electronic device (e.g., the electronic device 100 of FIG. 1 or the electronic device 901 of FIG. 9) according to an embodiment includes the at least one processor (e.g., the processor 120 of FIG. 1 or FIG. 2 or the electronic device 901 of FIG. 9
  • the processor 920 may be configured to determine the quantization level based on the device state information, the processing speed of the first neural network model, and a required processing speed related to improving degradation of the first image.
  • An electronic device (e.g., the electronic device 100 of FIG. 1 or the electronic device 901 of FIG. 9) according to an embodiment includes the at least one processor (e.g., the processor 120 of FIG. 1 or FIG. 2 or the electronic device 901 of FIG. 9
  • the processor 920 may be configured to generate the second neural network model by changing at least one of the weights of layers included in the first neural network model, input data, output data, and the size of internal processing bits.
  • An electronic device (e.g., the electronic device 100 of FIG. 1 or the electronic device 901 of FIG. 9) according to an embodiment includes the at least one processor (e.g., the processor 120 of FIG. 1 or FIG. 2 or the electronic device 901 of FIG. 9
  • the processor 920 may be configured to compare the quantization level with a designated level and obtain quantization processing information based on the comparison result.
  • the quantization processing information may be generated based on a deterioration improvement method for the first image.
  • An electronic device (e.g., the electronic device 100 of FIG. 1 or the electronic device 901 of FIG. 9) according to an embodiment includes the at least one processor (e.g., the processor 120 of FIG. 1 or FIG. 2 or the electronic device 901 of FIG. 9
  • the processor 920 may be configured to obtain the quantization processing information when the quantization level is higher than the designated level.
  • the electronic device (e.g., the electronic device 100 of FIG. 1 or the electronic device 901 of FIG. 9) includes the at least one processor (e.g., the processor 120 of FIG. 1 or FIG. 2 or the processor 920 of FIG. 9). ) may be configured to generate the second neural network model by quantizing the first neural network model based on the quantization level and the quantization processing information.
  • An electronic device (e.g., the electronic device 100 of FIG. 1 or the electronic device 901 of FIG. 9) according to an embodiment includes the at least one processor (e.g., the processor 120 of FIG. 1 or FIG. 2 or the electronic device 901 of FIG. 9
  • the processor 920 may be configured to generate processing limitation information related to improving deterioration of the first image based on the quantization processing information.
  • the processing limitation information may include information about the scope of improvement of deteriorations included in the first image.
  • An electronic device (e.g., the electronic device 100 of FIG. 1 or the electronic device 901 of FIG. 9) according to an embodiment includes the at least one processor (e.g., the processor 120 of FIG. 1 or FIG. 2 or the electronic device 901 of FIG. 9
  • the processor 920 may be configured to obtain the second image in which deterioration of the first image has been improved through the second neural network model based on the processing limitation information.
  • An electronic device (e.g., the electronic device 100 of FIG. 1 or the electronic device 901 of FIG. 9) according to an embodiment includes the at least one processor (e.g., the processor 120 of FIG. 1 or FIG. 2 or the electronic device 901 of FIG. 9
  • the processor 920 may be configured to obtain a plurality of auxiliary images based on the comparison result.
  • the electronic device (e.g., the electronic device 100 of FIG. 1 or the electronic device 901 of FIG. 9) includes the at least one processor (e.g., the processor 120 of FIG. 1 or FIG. 2 or the processor 920 of FIG. 9). ) may be configured to analyze the plurality of auxiliary images and generate the quantization processing information.
  • the quantization processing information may include information related to at least one of a weight included in the first neural network model determined based on the plurality of auxiliary images, input data, output data, and an internal processing bit size.
  • An electronic device (e.g., the electronic device 100 of FIG. 1 or the electronic device 901 of FIG. 9) may further include a display.
  • the electronic device (e.g., the electronic device 100 of FIG. 1 or the electronic device 901 of FIG. 9) includes the at least one processor (e.g., the processor 120 of FIG. 1 or FIG. 2 or the processor 920 of FIG. 9). ) may be configured to display the second image in which deterioration of the first image has been improved through the display.
  • the first image is an image stored in the memory, an image acquired through a camera included in the electronic device (e.g., electronic device 100 in FIG. 1, electronic device 901 in FIG. 9), It may include at least one of preview images acquired through the camera.
  • the electronic device (e.g., : May include an operation of generating device status information related to the image processing speed of the electronic device 100 of FIG. 1 and the electronic device 901 of FIG. 9.
  • a method of operating an electronic device (e.g., the electronic device 100 in FIG. 1 and the electronic device 901 in FIG. 9) may include determining a quantization level for the first neural network model based on the device state information. The quantization level may include information about the quantization strength for the first neural network model.
  • a method of operating an electronic device (e.g., the electronic device 100 in FIG.
  • a method of operating an electronic device includes acquiring a second image in which deterioration of the first image is improved through a second neural network model. can do.
  • the operation of determining the quantization level includes determining the quantization level based on the device state information, the processing speed of the first neural network model, and a required processing speed related to improving deterioration of the first image. Additional actions may be included.
  • the device status information includes overload information of the electronic device (e.g., the electronic device 100 in FIG. 1, the electronic device 901 in FIG. 9), and the electronic device (e.g., the electronic device 100 in FIG. 1, FIG. 9). It may include at least one of throughput information related to the processor included in the electronic device 901).
  • the operation of generating the second neural network model may further include changing at least one of the size of the weight, input, output, and internal processing bit of the layer included in the first neural network model. there is.
  • a method of operating an electronic device includes comparing the quantization level with a specified level and, according to the result of the comparison, the An operation of generating quantization processing information based on a deterioration improvement method for the first image may be further included.
  • the operation of generating the quantization processing information may further include generating the quantization processing information in response to the quantization level being greater than or equal to the specified level.
  • Generating the second neural network model may further include generating the second neural network model by quantizing the first neural network model based on the quantization level and the quantization processing information.
  • the operation of acquiring the second image includes generating processing limitation information related to improving deterioration of the first image based on the quantization processing information and generating the processing limitation information related to improving deterioration of the first image based on the processing limitation information.
  • the method may further include acquiring the second image in which deterioration of the first image is improved through a neural network model.
  • the processing limitation information may include information about the scope of improvement of deteriorations included in the first image.
  • the operation of generating the quantization processing information may further include acquiring a plurality of auxiliary images and analyzing the plurality of auxiliary images to generate the quantization processing information.
  • the quantization processing information may include information related to at least one of a weight, an input, an output, and an internal processing bit depth included in the first neural network model determined based on the plurality of auxiliary images.
  • a method of operating an electronic device improves deterioration of the first image through a display included in the electronic device (e.g., the electronic device 100 in FIG. 1 and the electronic device 901 in FIG. 9).
  • the operation of displaying the second image may further be included.
  • a non-transitory computer-readable storage medium storing at least one program, wherein the one or more programs are stored in one or more processors of an electronic device (e.g., electronic device 100 in FIG. 1 or electronic device 901 in FIG. 9). When executed, it can cause the electronic device (e.g., the electronic device 100 in FIG. 1 or the electronic device 901 in FIG. 9) to perform a series of operations.
  • the one or more programs generate device status information related to the image processing speed of the electronic device (e.g., the electronic device 100 in FIG. 1 and the electronic device 901 in FIG. 9), and operate based on the device status information.
  • a quantization level for a first neural network model is determined, the quantization level includes information about a quantization strength for the first neural network model, and quantization is performed on the first neural network model based on the quantization level. It may include instructions for generating a second neural network model and obtaining a second image in which deterioration of the first image is improved through the second neural network model.
  • FIG. 9 is a block diagram of an electronic device 901 in a network environment 900, according to various embodiments.
  • the electronic device 901 communicates with the electronic device 902 through a first network 998 (e.g., a short-range wireless communication network) or a second network 999. It is possible to communicate with at least one of the electronic device 904 or the server 908 through (e.g., a long-distance wireless communication network). According to one embodiment, the electronic device 901 may communicate with the electronic device 904 through the server 908.
  • a first network 998 e.g., a short-range wireless communication network
  • a second network 999 e.g., a second network 999. It is possible to communicate with at least one of the electronic device 904 or the server 908 through (e.g., a long-distance wireless communication network). According to one embodiment, the electronic device 901 may communicate with the electronic device 904 through the server 908.
  • the electronic device 901 includes a processor 920, a memory 930, an input module 950, an audio output module 955, a display module 960, an audio module 970, and a sensor module ( 976), interface 977, connection terminal 978, haptic module 979, camera module 980, power management module 988, battery 989, communication module 990, subscriber identification module 996 , or may include an antenna module 997.
  • at least one of these components eg, the connection terminal 978
  • may be omitted, or one or more other components may be added to the electronic device 901.
  • some of these components e.g., sensor module 976, camera module 980, or antenna module 997) are integrated into one component (e.g., display module 960). It can be.
  • Processor 920 may, for example, execute software (e.g., program 940) to operate at least one other component (e.g., hardware or software component) of electronic device 901 connected to processor 920. It can be controlled and various data processing or calculations can be performed. According to one embodiment, as at least part of data processing or computation, the processor 920 stores commands or data received from another component (e.g., sensor module 976 or communication module 990) in volatile memory 932. The commands or data stored in the volatile memory 932 can be processed, and the resulting data can be stored in the non-volatile memory 934.
  • software e.g., program 940
  • the processor 920 stores commands or data received from another component (e.g., sensor module 976 or communication module 990) in volatile memory 932.
  • the commands or data stored in the volatile memory 932 can be processed, and the resulting data can be stored in the non-volatile memory 934.
  • the processor 920 may include a main processor 921 (e.g., a central processing unit or an application processor) or an auxiliary processor 923 that can operate independently or together (e.g., a graphics processing unit, a neural network processing unit ( It may include a neural processing unit (NPU), an image signal processor, a sensor hub processor, or a communication processor).
  • a main processor 921 e.g., a central processing unit or an application processor
  • auxiliary processor 923 e.g., a graphics processing unit, a neural network processing unit ( It may include a neural processing unit (NPU), an image signal processor, a sensor hub processor, or a communication processor.
  • the electronic device 901 includes a main processor 921 and a auxiliary processor 923
  • the auxiliary processor 923 may be set to use lower power than the main processor 921 or be specialized for a designated function. You can.
  • the auxiliary processor 923 may be implemented separately from the main processor 921 or as part of it.
  • the auxiliary processor 923 may, for example, act on behalf of the main processor 921 while the main processor 921 is in an inactive (e.g., sleep) state, or while the main processor 921 is in an active (e.g., application execution) state. ), together with the main processor 921, at least one of the components of the electronic device 901 (e.g., the display module 960, the sensor module 976, or the communication module 990) At least some of the functions or states related to can be controlled.
  • co-processor 923 e.g., image signal processor or communication processor
  • may be implemented as part of another functionally related component e.g., camera module 980 or communication module 990. there is.
  • the auxiliary processor 923 may include a hardware structure specialized for processing artificial intelligence models.
  • Artificial intelligence models can be created through machine learning. For example, such learning may be performed in the electronic device 901 itself on which the artificial intelligence model is performed, or may be performed through a separate server (e.g., server 908).
  • Learning algorithms may include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but It is not limited.
  • An artificial intelligence model may include multiple artificial neural network layers.
  • Artificial neural networks include deep neural network (DNN), convolutional neural network (CNN), recurrent neural network (RNN), restricted boltzmann machine (RBM), belief deep network (DBN), bidirectional recurrent deep neural network (BRDNN), It may be one of deep Q-networks or a combination of two or more of the above, but is not limited to the examples described above.
  • artificial intelligence models may additionally or alternatively include software structures.
  • the memory 930 may store various data used by at least one component (eg, the processor 920 or the sensor module 976) of the electronic device 901. Data may include, for example, input data or output data for software (e.g., program 940) and instructions related thereto.
  • Memory 930 may include volatile memory 932 or non-volatile memory 934.
  • the program 940 may be stored as software in the memory 930 and may include, for example, an operating system 942, middleware 944, or application 946.
  • the input module 950 may receive commands or data to be used in a component of the electronic device 901 (e.g., the processor 920) from outside the electronic device 901 (e.g., a user).
  • the input module 950 may include, for example, a microphone, mouse, keyboard, keys (eg, buttons), or digital pen (eg, stylus pen).
  • the sound output module 955 may output sound signals to the outside of the electronic device 901.
  • the sound output module 955 may include, for example, a speaker or receiver. Speakers can be used for general purposes such as multimedia playback or recording playback.
  • the receiver can be used to receive incoming calls. According to one embodiment, the receiver may be implemented separately from the speaker or as part of it.
  • the display module 960 can visually provide information to the outside of the electronic device 901 (eg, a user).
  • the display module 960 may include, for example, a display, a hologram device, or a projector, and a control circuit for controlling the device.
  • the display module 960 may include a touch sensor configured to detect a touch, or a pressure sensor configured to measure the intensity of force generated by the touch.
  • the audio module 970 can convert sound into an electrical signal or, conversely, convert an electrical signal into sound. According to one embodiment, the audio module 970 acquires sound through the input module 950, the sound output module 955, or an external electronic device (e.g., directly or wirelessly connected to the electronic device 901). Sound may be output through an electronic device 902 (e.g., speaker or headphone).
  • an electronic device 902 e.g., speaker or headphone
  • the sensor module 976 detects the operating state (e.g., power or temperature) of the electronic device 901 or the external environmental state (e.g., user state) and generates an electrical signal or data value corresponding to the detected state. can do.
  • the sensor module 976 includes, for example, a gesture sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biometric sensor, It may include a temperature sensor, humidity sensor, or light sensor.
  • the interface 977 may support one or more designated protocols that can be used to connect the electronic device 901 directly or wirelessly with an external electronic device (e.g., the electronic device 902).
  • the interface 977 may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.
  • HDMI high definition multimedia interface
  • USB universal serial bus
  • SD card interface Secure Digital interface
  • audio interface audio interface
  • connection terminal 978 may include a connector through which the electronic device 901 can be physically connected to an external electronic device (eg, the electronic device 902).
  • the connection terminal 978 may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (eg, a headphone connector).
  • the haptic module 979 can convert electrical signals into mechanical stimulation (e.g., vibration or movement) or electrical stimulation that the user can perceive through tactile or kinesthetic senses.
  • the haptic module 979 may include, for example, a motor, a piezoelectric element, or an electrical stimulation device.
  • the camera module 980 can capture still images and moving images.
  • the camera module 980 may include one or more lenses, image sensors, image signal processors, or flashes.
  • the power management module 988 can manage power supplied to the electronic device 901.
  • the power management module 988 may be implemented as at least a part of, for example, a power management integrated circuit (PMIC).
  • PMIC power management integrated circuit
  • the battery 989 may supply power to at least one component of the electronic device 901.
  • the battery 989 may include, for example, a non-rechargeable primary cell, a rechargeable secondary cell, or a fuel cell.
  • Communication module 990 provides a direct (e.g., wired) communication channel or wireless communication channel between electronic device 901 and an external electronic device (e.g., electronic device 902, electronic device 904, or server 908). It can support establishment and communication through established communication channels. Communication module 990 operates independently of processor 920 (e.g., an application processor) and may include one or more communication processors that support direct (e.g., wired) communication or wireless communication.
  • processor 920 e.g., an application processor
  • the communication module 990 is a wireless communication module 992 (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 994 (e.g., : LAN (local area network) communication module, or power line communication module) may be included.
  • a wireless communication module 992 e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module
  • GNSS global navigation satellite system
  • a wired communication module 994 e.g., : LAN (local area network) communication module, or power line communication module
  • the corresponding communication module is a first network 998 (e.g., a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network 999 (e.g., legacy It may communicate with an external electronic device 904 through a telecommunication network such as a cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (e.g., LAN or WAN).
  • a telecommunication network such as a cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (e.g., LAN or WAN).
  • a telecommunication network such as a cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (e.g., LAN or WAN).
  • a telecommunication network such as a cellular network, a 5G network, a next-generation communication network
  • the wireless communication module 992 uses subscriber information (e.g., International Mobile Subscriber Identifier (IMSI)) stored in the subscriber identification module 996 within a communication network such as the first network 998 or the second network 999.
  • subscriber information e.g., International Mobile Subscriber Identifier (IMSI)
  • IMSI International Mobile Subscriber Identifier
  • the wireless communication module 992 may support 5G networks after 4G networks and next-generation communication technologies, for example, NR access technology (new radio access technology).
  • NR access technology provides high-speed transmission of high-capacity data (eMBB (enhanced mobile broadband)), minimization of terminal power and access to multiple terminals (mMTC (massive machine type communications)), or high reliability and low latency (URLLC (ultra-reliable and low latency). -latency communications)) can be supported.
  • the wireless communication module 992 may support high frequency bands (e.g., mmWave bands), for example, to achieve high data rates.
  • the wireless communication module 992 uses various technologies to secure performance in high frequency bands, for example, beamforming, massive array multiple-input and multiple-output (MIMO), and full-dimensional multiplexing. It can support technologies such as input/output (FD-MIMO: full dimensional MIMO), array antenna, analog beam-forming, or large scale antenna.
  • the wireless communication module 992 may support various requirements specified in the electronic device 901, an external electronic device (e.g., electronic device 904), or a network system (e.g., second network 999).
  • the wireless communication module 992 supports peak data rate (e.g., 20 Gbps or more) for realizing eMBB, loss coverage (e.g., 164 dB or less) for realizing mmTC, or U-plane latency (e.g., 164 dB or less) for realizing URLLC.
  • peak data rate e.g., 20 Gbps or more
  • loss coverage e.g., 164 dB or less
  • U-plane latency e.g., 164 dB or less
  • the antenna module 997 may transmit or receive signals or power to or from the outside (e.g., an external electronic device).
  • the antenna module 997 may include an antenna including a radiator made of a conductor or a conductive pattern formed on a substrate (eg, PCB).
  • the antenna module 997 may include a plurality of antennas (eg, an array antenna). In this case, at least one antenna suitable for the communication method used in the communication network, such as the first network 998 or the second network 999, is connected to the plurality of antennas by, for example, the communication module 990. can be selected. Signals or power may be transmitted or received between the communication module 990 and an external electronic device through the selected at least one antenna.
  • other components eg, radio frequency integrated circuit (RFIC) may be additionally formed as part of the antenna module 997.
  • RFIC radio frequency integrated circuit
  • antenna module 997 may form a mmWave antenna module.
  • a mmWave antenna module includes: a printed circuit board, an RFIC disposed on or adjacent to a first side (e.g., bottom side) of the printed circuit board and capable of supporting a designated high frequency band (e.g., mmWave band); And a plurality of antennas (e.g., array antennas) disposed on or adjacent to the second side (e.g., top or side) of the printed circuit board and capable of transmitting or receiving signals in the designated high frequency band. can do.
  • a mmWave antenna module includes: a printed circuit board, an RFIC disposed on or adjacent to a first side (e.g., bottom side) of the printed circuit board and capable of supporting a designated high frequency band (e.g., mmWave band); And a plurality of antennas (e.g., array antennas) disposed on or adjacent to the second side (e.g., top or side) of
  • peripheral devices e.g., bus, general purpose input and output (GPIO), serial peripheral interface (SPI), or mobile industry processor interface (MIPI)
  • signal e.g. commands or data
  • commands or data may be transmitted or received between the electronic device 901 and the external electronic device 904 through the server 908 connected to the second network 999.
  • Each of the external electronic devices 902 or 904 may be of the same or different type as the electronic device 901.
  • all or part of the operations performed in the electronic device 901 may be executed in one or more of the external electronic devices 902, 904, or 908.
  • the electronic device 901 may perform the function or service instead of executing the function or service on its own.
  • one or more external electronic devices may be requested to perform at least part of the function or service.
  • One or more external electronic devices that have received the request may execute at least part 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 901.
  • the electronic device 901 may process the result as is or additionally and provide it as at least part of a response to the request.
  • cloud computing distributed computing, mobile edge computing (MEC), or client-server computing technology can be used.
  • the electronic device 901 may provide an ultra-low latency service using, for example, distributed computing or mobile edge computing.
  • the external electronic device 904 may include an Internet of Things (IoT) device.
  • Server 908 may be an intelligent server using machine learning and/or neural networks.
  • the external electronic device 904 or server 908 may be included in the second network 999.
  • the electronic device 901 may be applied to intelligent services (e.g., smart home, smart city, smart car, or healthcare) based on 5G communication technology and IoT-related technology.
  • Electronic devices may be of various types.
  • 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 embodiments of this document are not limited to the above-described devices.
  • first, second, or first or second may be used simply to distinguish one component from another, and to refer to that component in other respects (e.g., importance or order) is not limited.
  • One (e.g., first) component is said to be “coupled” or “connected” to another (e.g., second) component, with or without the terms “functionally” or “communicatively.”
  • any of the components can be connected to the other components directly (e.g. wired), wirelessly, or through a third component.
  • module used in various embodiments of this document may include a unit implemented in hardware, software, or firmware, and is interchangeable with terms such as logic, logic block, component, or circuit, for example. It can be used as A module may be an integrated part or a minimum unit of the parts or a part thereof that performs one or more functions. For example, according to one embodiment, the module may be implemented in the form of an application-specific integrated circuit (ASIC).
  • ASIC application-specific integrated circuit
  • Various embodiments of the present document are one or more instructions stored in a storage medium (e.g., built-in memory 936 or external memory 938) that can be read by a machine (e.g., electronic device 901). It may be implemented as software (e.g., program 940) including these.
  • a processor e.g., processor 920
  • a device e.g., electronic device 901
  • the one or more instructions may include code generated by a compiler or code that can be executed by an interpreter.
  • a storage medium that can be read by a device may be provided in the form of a non-transitory storage medium.
  • 'non-transitory' only means that the storage medium is a tangible device and does not contain signals (e.g. electromagnetic waves), and this term refers to cases where data is semi-permanently stored in the storage medium. There is no distinction between temporary storage cases.
  • Computer program products are commodities and can be traded between sellers and buyers.
  • the computer program product may be distributed in the form of a machine-readable storage medium (e.g. compact disc read only memory (CD-ROM)) or through an application store (e.g. Play StoreTM) or on two user devices (e.g. It can be distributed (e.g. downloaded or uploaded) directly between smart phones) or online.
  • a machine-readable storage medium e.g. compact disc read only memory (CD-ROM)
  • an application store e.g. Play StoreTM
  • two user devices e.g. It can be distributed (e.g. downloaded or uploaded) directly between smart phones) or online.
  • 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 a relay server.
  • each component (e.g., module or program) of the above-described components may include a single or plural entity, and some of the plurality of entities may be separately placed in other components. there is.
  • one or more of the components or operations described above may be omitted, or one or more other components or operations may be added.
  • multiple components eg, modules or programs
  • the integrated component may perform one or more functions of each component of the plurality of components in the same or similar manner as those performed by the corresponding component of the plurality of components prior to the integration. .
  • 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, or omitted. Alternatively, one or more other operations may be added.
  • FIG. 10 is a block diagram 1000 illustrating a camera module 980, according to various embodiments.
  • the camera module 980 includes a lens assembly 1010, a flash 1020, an image sensor 1030, an image stabilizer 1040, a memory 1050 (e.g., buffer memory), or an image signal processor. It may include (1060).
  • the lens assembly 1010 may collect light emitted from a subject that is the target of image capture.
  • Lens assembly 1010 may include one or more lenses.
  • the camera module 980 may include a plurality of lens assemblies 1010. In this case, the camera module 980 may form, for example, a dual camera, a 360-degree camera, or a spherical camera.
  • Some of the plurality of lens assemblies 1010 have the same lens properties (e.g., angle of view, focal length, autofocus, f number, or optical zoom), or at least one lens assembly is different from another lens assembly. It may have one or more lens properties that are different from the lens properties of .
  • the lens assembly 1010 may include, for example, a wide-angle lens or a telephoto lens.
  • the flash 1020 may emit light used to enhance light emitted or reflected from a subject.
  • the flash 1020 may include one or more light emitting diodes (eg, red-green-blue (RGB) LED, white LED, infrared LED, or ultraviolet LED), or a xenon lamp.
  • the image sensor 1030 can acquire an image corresponding to the subject by converting light emitted or reflected from the subject and transmitted through the lens assembly 1010 into an electrical signal.
  • the image sensor 1030 is one image sensor selected from among image sensors with different properties, such as an RGB sensor, a BW (black and white) sensor, an IR sensor, or a UV sensor, and the same It may include a plurality of image sensors having different properties, or a plurality of image sensors having different properties.
  • Each image sensor included in the image sensor 1030 may be implemented using, for example, a charged coupled device (CCD) sensor or a complementary metal oxide semiconductor (CMOS) sensor.
  • CCD charged coupled device
  • CMOS complementary metal oxide semiconductor
  • the image stabilizer 1040 moves at least one lens or image sensor 1030 included in the lens assembly 1010 in a specific direction in response to the movement of the camera module 980 or the electronic device 901 including the same.
  • the operating characteristics of the image sensor 1030 can be controlled (e.g., adjusting read-out timing, etc.). This allows to compensate for at least some of the negative effects of said movement on the image being captured.
  • the image stabilizer 1040 is a gyro sensor (not shown) or an acceleration sensor (not shown) disposed inside or outside the camera module 980. It is possible to detect such movement of the camera module 980 or the electronic device 901 using .
  • the image stabilizer 1040 may be implemented as, for example, an optical image stabilizer.
  • the memory 1050 may at least temporarily store at least a portion of the image acquired through the image sensor 1030 for the next image processing task. For example, when image acquisition is delayed due to the shutter or when multiple images are acquired at high speed, the acquired original image (e.g., Bayer-patterned image or high-resolution image) is stored in the memory 1050. , the corresponding copy image (e.g., low resolution image) may be previewed through the display module 960. Thereafter, when a specified condition is satisfied (eg, user input or system command), at least a portion of the original image stored in the memory 1050 may be obtained and processed, for example, by the image signal processor 1060. According to one embodiment, the memory 1050 may be configured as at least part of the memory 930 or as a separate memory that operates independently.
  • a specified condition eg, user input or system command
  • the image signal processor 1060 may perform one or more image processes on an image acquired through the image sensor 1030 or an image stored in the memory 1050.
  • the one or more image processes may include, for example, depth map creation, three-dimensional modeling, panorama creation, feature point extraction, image compositing, or image compensation (e.g., noise reduction, resolution adjustment, brightness adjustment, blurring). may include blurring, sharpening, or softening.
  • the image signal processor 1060 may include at least one of the components included in the camera module 980 (e.g., an image sensor). (1030)) may perform control (e.g., exposure time control, lead-out timing control, etc.).
  • the image processed by the image signal processor 1060 is stored back in the memory 1050 for further processing.
  • the image signal processor 1060 may be configured as at least a part of the processor 920, or may be configured as a separate processor that operates independently of the processor 920.
  • the image signal processor 1060 may be configured as the processor 920.
  • at least one image processed by the image signal processor 1060 may be displayed through the display module 960 as is or after additional image processing by the processor 920.
  • the electronic device 901 may include a plurality of camera modules 980, each with different properties or functions.
  • at least one of the plurality of camera modules 980 may be a wide-angle camera and at least another one may be a telephoto camera.
  • at least one of the plurality of camera modules 980 may be a front camera, and at least another one may be a rear camera.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

일 실시예에 따른 전자 장치는, 제1 신경망 모델을 저장하는 메모리 및 적어도 하나의 프로세서를 포함할 수 있다. 전자 장치는 적어도 하나의 프로세서가 전자 장치의 이미지 처리 속도와 관련된 디바이스 상태 정보를 생성하고, 디바이스 상태 정보에 기반하여 제1 신경망 모델에 대한 양자화 레벨을 결정하며, 양자화 레벨에 기반하여 양자화된 제2 신경망 모델을 생성하여 열화된 이미지를 개선하도록 구성될 수 있다. 이 외에도 명세서를 통해 파악되는 다양한 실시예가 가능하다.

Description

신경망을 통해 이미지를 처리하는 방법 및 그 전자 장치
본 문서에서 개시되는 다양한 실시예들은, 신경망을 통해 이미지를 처리하는 방법 및 그 전자 장치에 관한 것이다.
인공지능 시스템(또는 통합 지능화 시스템)은 인간 수준의 지능을 구현하는 컴퓨터 시스템으로서 기계가 스스로 학습하고 판단하며, 사용할수록 인식률이 향상되는 시스템이다. 인공지능 기술은 입력 데이터들의 특징을 스스로 분류/학습하는 알고리즘을 이용하는 기계학습(딥러닝) 기술 및 기계학습 알고리즘을 활용하여 인간 두뇌의 인지, 판단 등의 기능을 모사하는 요소 기술들로 구성된다.
요소 기술들은, 예로, 인간의 언어/문자를 인식하는 언어적 이해 기술, 사물을 인간의 시각처럼 인식하는 시각적 이해 기술, 정보를 판단하여 논리적으로 추론하고 예측하는 추론/예측 기술, 인간의 경험 정보를 지식데이터로 처리하는 지식 표현 기술 및 차량의 자율 주행, 로봇의 움직임을 제어하는 동작 제어 기술 중 적어도 하나를 포함할 수 있다.
인공지능 시스템이 탑재된 전자 장치는 이미지 처리를 함에 있어서, 카메라를 통해 획득된 이미지 데이터를 분석하고, 분석된 결과에 기초하여 신경망(neural network) 모델을 통해 이미지 처리를 수행하는 기능을 지원할 수 있다.
다만, 신경망 모델이 광범위하게 적용됨에 따라, 원본 신경망 모델의 복잡성이 높아지고 메모리 용량이 제한된 장치에서 실행이 불가능 할 수 있다. 이를 해결하기 위해, 신경망 모델을 양자화하여 기존 신경망 모델의 메모리 점유율과 연산 속도를 향상시킬 수 있고, 원본 모델의 크기 또한 압축할 수 있다. 신경망 모델은 신경망 모델의 고주파 연산자를 부동 소수점 수 유형에서 정수 유형으로 양자화한 다음 후속 작업을 수행하여 양자화될 수 있다. 예를 들어, 부동소수점으로 표현되는 파라미터들을 특정 비트 수로 줄여 양자화할 수 있다. 양자화 방법에는 주로 결정적 양자화 방법과 랜덤 양자화 방법이 있다.
본 개시의 일 양태에 따르면, 제1 신경망 모델을 저장하는 메모리 및 상기 메모리와 작동적으로 연결된 적어도 하나의 프로세서를 포함하는 전자 장치가 제공될 수 있다. 상기 적어도 하나의 이미지 프로세서는, 상기 전자 장치의 이미지 처리 속도와 관련된 디바이스 상태 정보를 생성하고; 상기 디바이스 상태 정보에 기반하여 상기 제1 신경망 모델에 대한 양자화 레벨을 결정하고, 상기 양자화 레벨은 상기 제1 신경망 모델에 대한 양자화 강도에 대한 정보를 포함하며; 상기 양자화 레벨에 기반하여 상기 제1 신경망 모델에 대한 양자화를 수행함에 따라 제2 신경망 모델을 생성하며; 상기 제2 신경망 모델을 통해 제1 이미지의 열화를 개선한 제2 이미지를 획득하도록 구성될 수 있다.
본 개시의 일 양태에 따르면, 전자 장치의 이미지 처리 속도와 관련된 디바이스 상태 정보를 생성하는 동작; 상기 디바이스 상태 정보에 기반하여 제1 신경망 모델에 대한 양자화 레벨을 결정하는 동작으로서, 상기 양자화 레벨은 상기 제1 신경망 모델에 대한 양자화 강도에 대한 정보를 포함하고; 상기 양자화 레벨에 기반하여 상기 제1 신경망 모델에 대한 양자화를 수행함에 따라 제2 신경망 모델을 생성하는 동작; 및 상기 제2 신경망 모델을 통해 제1 이미지의 열화를 개선한 제2 이미지를 획득하는 동작을 포함하는 전자 장치를 동작하는 방법이 제공될 수 있다.
본 개시의 일 양태에 따르면, 적어도 하나의 프로그램들을 저장하는 비일시적 컴퓨터 판독가능 저장 매체가 제공될 수 있다. 상기 적어도 하나의 프로그램은, 전자 장치의 적어도 하나의 프로세서에 의해 실행될 때, 전자 장치로 하여금 상기 전자 장치의 이미지 처리 속도와 관련된 디바이스 상태 정보를 생성하고; 상기 디바이스 상태 정보에 기반하여 제1 신경망 모델에 대한 양자화 레벨을 결정하고, 상기 양자화 레벨은 상기 제1 신경망 모델에 대한 양자화 강도에 대한 정보를 포함하며; 상기 양자화 레벨에 기반하여 상기 제1 신경망 모델에 대한 양자화를 수행함에 따라 제2 신경망 모델을 생성하고; 상기 제2 신경망 모델을 통해 제1 이미지의 열화를 개선한 제2 이미지를 획득하게 하는 명령어들을 포함할 수 있다.
도 1은 일 실시예에 따른 전자 장치의 구성요소를 도시한 블록도이다.
도 2는 일 실시예에 따른 프로세서의 소프트웨어 모듈을 도시한 블록도이다.
도 3은 일 실시예에 따라 디바이스 상태 정보에 기반하여 양자화된 제2 신경망 모델을 생성하는 것을 도시한 흐름도이다.
도 4는 일 실시예에 따라 결정된 양자화 레벨에 기반하여 양자화된 제2 신경망 모델을 생성하는 것을 도시한 흐름도이다.
도 5는 일 실시예에 따른 전자 장치가 양자화된 신경망 모델을 통해 이미지 열화를 개선하는 것을 도시한 흐름도이다.
도 6는 일 실시예에 따른 전자 장치의 얼굴 영역 화질 개선을 도시한 흐름도이다.
도 7은 일 실시예에 따른 전자 장치의 저조도 화질 개선을 도시한 흐름도이다.
도 8은 일 실시예에 따라 열화가 개선된 이미지를 표시하는 화면을도시한 도면이다.
도 9는 일 실시예에 따른 네트워크 환경 내의 전자 장치를 도시한 도면이다.
도 10은 다양한 실시예들에 따른 카메라 모듈을 예시하는 블록도이다.
도면의 설명과 관련하여, 동일 또는 유사한 구성요소에 대해서는 동일 또는 유사한 참조 부호가 사용될 수 있다.
이하, 본 발명의 다양한 실시예가 첨부된 도면을 참조하여 기재된다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 실시예의 다양한 변경(modification), 균등물(equivalent), 및/또는 대체물(alternative)을 포함하는 것으로 이해되어야 한다.
도 1은 일 실시예에 따른 전자 장치의 구성요소를 도시한 블록도이다.
도 1을 참조하면, 전자 장치(100)는 메모리(110), 적어도 하나의 프로세서(120), 디스플레이(130) 및 카메라(140)를 포함할 수 있다. 상기 열거된 구성요소들은 서로 작동적(operatively)으로 또는 전기적으로 연결될 수 있다. 도 1에 도시된 전자 장치(100)의 구성 요소들은 일 예로서 일부가 변형되거나 삭제 또는 추가될 수 있다.
일 실시예에 따르면, 메모리(110)는 프로세서(120)가 실행 시에 전자 장치(200)의 동작을 수행하기 위해 데이터를 처리하거나 전자 장치(100)의 구성요소를 제어하도록 하는 인스트럭션들(instructions)을 저장할 수 있다. 일 실시예에 따르면, 메모리(110)는 복수의 신경망 모델들을 저장할 수 있다. 예를 들어, 메모리(110)는 이미지의 열화를 개선하기 위해 학습된 신경망 모델(111)을 저장할 수 있다.
일 실시예에 따르면, 프로세서(120)는 이미지 열화를 개선하기 위해 학습된 신경망 모델(111)을 통해 품질이 개선된 이미지를 획득할 수 있다. 일 실시예에 따르면, 도시된 도면에 제한되지 않고 메모리(110)는 복수의 신경망 모델들을 저장할 수 있다. 예를 들어, 개선이 필요한 열화의 종류에 대응되는 학습된 신경망 모델을 저장할 수 있다. 일 실시예에서, 열화의 종류는 솔루션으로 표현될 수 있다.
일 실시예에 따르면, 신경망 모델(111)은 프로세서(120)에 의해 학습되거나 외부 장치를 통해 학습된 모델일 수 있다. 인공지능 모델이 학습을 통해 만들어진다는 것은, 기본 인공 지능 모델이 학습 알고리즘에 의하여 다수의 학습 데이터들을 이용하여 학습됨으로써, 원하는 특성(또는, 목적)을 수행하도록 설정된 기 정의된 동작 규칙 또는 인공 지능 모델이 만들어짐을 의미할 수 있다. 일 실시예에 따르면, 인공지능 모델(예: 신경망 모델)은 다양한 학습 알고리즘을 통해 학습될 수 있다. 학습 알고리즘의 예로는, 지도형 학습(supervised learning), 비지도형 학습(unsupervised learning), 준지도형 학습(semi-supervised learning) 또는 강화 학습(reinforcement learning)이 있으나, 전술한 예에 한정되지 않는다.
일 실시예에 따르면, 신경망 모델(111)은 복수의 신경망 레이어들로 구성될 수 있다. 복수의 신경망 레이어들 각각은 복수의 가중치들(weight values)을 갖고 있으며, 이전(previous) 레이어의 연산 결과와 복수의 가중치들 간의 연산을 통해 신경망 연산을 수행할 수 있다. 복수의 신경망 레이어들이 갖고 있는 복수의 가중치들은 인공 지능 모델의 학습 결과에 의해 최적화될 수 있다. 예를 들어, 학습 과정 동안 인공 지능 모델에서 획득한 로스(loss) 값 또는 코스트(cost) 값이 감소 또는 최소화되도록 복수의 가중치들이 갱신될 수 있다.
일 실시예에 따르면, 인공 신경망은 심층 신경망(DNN:Deep Neural Network)를 포함할 수 있으며, 예를 들어, CNN(Convolutional Neural Network), DNN (Deep Neural Network), RNN(Recurrent Neural Network), RBM(Restricted Boltzmann Machine), DBN(Deep Belief Network), BRDNN(Bidirectional Recurrent Deep Neural Network), GAN(Generative Adversarial Network) 또는 심층 Q-네트워크(Deep Q-Networks) 등이 있으나, 이에 한정되는 것은 아니다.
일 실시예에 따르면, 신경망 모델(111)은 원본 이미지를 입력 데이터로 제공 받아 품질이 개선된 복원 이미지를 생성하도록 학습된 모델일 수 있다. 일 실시예에 따르면, 신경망 모델(111)은 특정 열화를 개선하기 위해 학습될 수 있다. 예를 들어, 신경망 모델(111)은 이미지 내에 포함된 얼굴 영역에 열화를 개선하기 위해 학습될 수 있다. 예를 들어, 신경망 모델(111)은 이미지의 저조도 열화를 개선하기 위해 학습될 수 있다. 설명된 예시에 제한되지 않고, 신경망 모델(111)은 적어도 하나의 열화를 개선하기 위해 학습된 모델일 수 있다.
일 실시예에 따르면, 프로세서(120)는 복수의 신경망 모델들 중에서 개선하고자 하는 열화의 종류에 대한 신경망 모델(111)을 통해 열화가 개선된 이미지를 획득할 수 있다. 다양한 실시예에 따르면, 프로세서(120)는 하나의 신경망 모델을 이용하여 다양한 종류의 열화가 개선된 이미지를 획득할 수 있다.
일 실시예에 따르면, 메모리(110)는 이미지들을 저장할 수 있다. 예를 들어, 메모리(110)는 전자 장치(100)에 포함된 카메라(140)를 통해 획득된 적어도 하나의 이미지들을 저장할 수 있다. 또한, 메모리(110)는 전자 장치(100)가 외부 전자 장치(예: 서버)를 통해 다운로드한 적어도 하나의 이미지를 저장할 수 있다. 일 실시예에 따르면, 메모리(110)에 저장된 이미지는 열화 개선을 위한 원본 이미지로 제공될 수 있다. 이하, 본 개시의 제1 이미지는 원본 이미지를 포함할 수 있다.
일 실시예에 따르면, 프로세서(120)는 메모리(110), 디스플레이(130) 및/또는 카메라(140)와 전기적으로 또는 작동적으로 연결될 수 있다. 일 실시예에 따르면, 프로세서(120)는 메모리(110)에 저장된 인스트럭션들을 이용하여 전자 장치(100)의 적어도 하나의 다른 구성요소들의 제어 및/또는 통신에 관한 연산이나 데이터 처리를 실행할 수 있다. 일 실시예에 따르면, 프로세서(120)는 중앙처리장치(CPU), 그래픽처리장치(GPU), MCU(micro controller unit), 센서 허브, 보조프로세서(supplementary processor), 통신프로세서(communication processor), 애플리케이션 프로세서(application processor), ASIC(application specific integrated circuit), FPGA(field programmable gate arrays), NPU(Neural Processing Unit) 중 적어도 하나를 포함할 수 있으며, 복수의 코어를 가질 수 있다.
일 실시예에 따르면, 프로세서(120)는, 메모리(110)에 저장된 기 정의된 동작 규칙 또는 인공지능 모델에 따라, 입력 데이터(예: 이미지)를 처리할 수 있다. 일 실시예에서, 하나 또는 복수의 프로세서가 인공지능 전용 프로세서인 경우, 인공지능 전용 프로세서는 특정 인공 지능 모델의 처리에 특화된 하드웨어 구조로 설계될 수 있다.
일 실시예에 따르면, 프로세서(120)는 전자 장치(100)의 이미지 처리 속도와 관련된 디바이스 상태 정보를 생성할 수 있다. 예를 들어, 프로세서(120)는 전자 장치(100)가 이미지 열화를 개선하기 위한 프로세스를 수행하는 것과 관련된 처리 속도를 판단할 수 있다. 예를 들어, 프로세서(120)는 전자 장치(100)가 이미지 열화를 개선하는 동작을 수행하는 데에 소요되는 시간에 영향을 주는 다양한 정보를 포함하는 디바이스 상태 정보를 생성할 수 있다.
일 실시예에 따르면, 디바이스 상태 정보는 전자 장치(100)의 과부하(overload) 정보, 프로세서(120)와 관련된 처리량(throughput) 정보 중 적어도 하나를 포함할 수 있다. 예를 들어, 프로세서(120)는 다양한 종류의 신경망 모델을 이용하는 태스크(task)가 이미 하드웨어(예: NPU, GPU, CPU)에 할당된 경우 프로세서(120)와 관련된 처리량이 높은 것으로 결정하고, 전자 장치(100)의 과부하 상태에 따른 속도 저하 배수를 결정할 수 있다.
일 실시예에 따르면, 프로세서(120)는 상기 디바이스 상태 정보에 기반하여, 신경망 모델(111)에 대한 양자화 레벨을 결정할 수 있다. 예를 들어, 프로세서(120)는 디바이스 상태 정보에 기반하여 결정되는 속도 저하 배수에 따라 양자화 레벨을 결정할 수 있다.
일 실시예에 따르면, 상기 양자화 레벨은 신경망 모델(111)에 대한 양자화 강도에 대한 정보를 포함할 수 있다. 예를 들어, 프로세서(120)는 디바이스 상태 정보에 기반하여 전자 장치(100)가 과부화 상태인 것으로 판단되면 양자화 강도를 기준보다 증가시킬 수 있다. 예를 들어, 프로세서(120)는 프로세서(120)와 관련된 처리량 정보에 기반하여, 처리량이 과다한 것으로 판단되면 양자화 강도를 기준보다 증가시킬 수 있다. 예를 들어, 프로세서(120)는 디바이스 상태 정보에 기반하여 전자 장치(100)가 과부하 상태가 아닌 것으로 판단되어 속도 저하가 없는 경우, 신경망 모델(111)을 양자화하지 않는 것으로 결정할 수 있다. 따라서, 일 실시예에 따른 전자 장치(100)는 신경망 모델에 대한 양자화를 수행함에 있어서, 디바이스의 상태에 따라 동적으로 양자화 강도를 결정할 수 있다. 따라서, 이미지의 열화 개선을 위한 처리 속도는 보장하면서도 기존 열화 개선의 성능은 유지할 수 있다.
일 실시예에 따르면, 프로세서(120)는 결정된 양자화 레벨에 기반하여 신경망 모델(111)을 양자화 하여 양자화된 신경망 모델을 생성할 수 있다. 일 실시예에 따르면, 프로세서(120)는 디바이스 상태 정보에 기반하여 결정된 양자화 레벨이 높은 경우 신경망 모델(111)을 높은 강도로 양자화 처리할 수 있다. 예를 들어, 프로세서(120)는 양자화 레벨이 높은 경우, 신경망 모델(111)의 비트 수를 크게 줄일 수 있다. 예를 들어, 프로세서(120)는 양자화 레벨이 높은 경우 32bit로 표현되는 가중치(weight) 및 활성함수 출력(activation out) 값을 16bit 또는 8bit로 줄여 양자화할 수 있다.
일 실시예에 따르면, 프로세서(120)는 디바이스 상태 정보에 기반하여 결정된 양자화 레벨이 낮은 경우, 신경망 모델(111)에 대한 양자화를 수행하지 않을 수 있다. 예를 들어, 프로세서(120)는 결정된 양자화 레벨에 기반하여 속도 저하 없이 이미지의 열화 개선이 가능하다고 판단되는 경우, 양자화되지 않은 신경망 모델(111)을 이용하여 열화가 개선된 이미지를 획득할 수 있다. 일 실시예에 따르면, 프로세서(120)는 디바이스 상태 정보에 기반하여 결정된 양자화 레벨이 낮은 경우, 신경망 모델(111)을 낮은 강도로 양자화 처리할 수 있다. 예를 들어, 프로세서(120)는 양자화 레벨이 낮은 경우, 신경망 모델(111)의 비트 수를 양자화 레벨이 높은 경우에 비하여 적게 줄일 수 있다. 예를 들어, 프로세서(120)는 양자화 레벨이 낮은 경우 32bit로 표현되는 가중치(weight) 및 활성함수 출력(activation out) 값을 모두 16bit 또는 가중치 또는 활성함수 출력 중 일부만을 16bit로 줄여 양자화할 수 있다.
일 실시예에 따르면, 프로세서(120)는 양자화된 신경망 모델을 이용하여 열화가 개선된 이미지를 획득할 수 있다.
일 실시예에 따르면, 디스플레이(130)는 각종 콘텐트(예: 텍스트, 이미지, 비디오, 아이콘, 및/또는 심볼 등)를 표시할 수 있다. 일 실시예에 따르면, 디스플레이(130)는 액정 디스플레이(LCD), 발광 다이오드(LED) 디스플레이 또는 유기 발광 다이오드(OLED) 디스플레이를 포함할 수 있다.
일 실시예에 따르면, 디스플레이(130)는 메모리(110)에 저장된 이미지들 중 프로세서(120)에 의해 선택된 이미지를 표시할 수 있다. 일 실시예에 따르면, 디스플레이(130)는 카메라(140)를 통해 획득되는 이미지(예: 프리뷰 이미지)를 표시할 수 있다. 일 실시예에 따르면, 디스플레이(130)는 원본 이미지 및/또는 신경망 모델(111)을 통해 열화가 개선된 이미지를 표시할 수 있다.
도 2는 일 실시예에 따른 프로세서의 소프트웨어 모듈을 도시한 블록도이다.
도 2를 참조하면, 프로세서(120)는 디바이스 상태 판단 모듈(210), 양자화 레벨 결정 모듈(220), 양자화 실행 모듈(230), 및/또는 이미지 열화 처리 모듈(240)을 포함할 수 있다. 상기 전술된 구성요소는 소프트웨어 모듈로 구현되거나 또는 하드웨어 모듈(예: 하드웨어 칩) 형태로 제작될 수 있으며, 전술한 구성 요소의 둘 이상이 하나의 구성요소로 구현되어 소프트웨어 모듈로 구현되거나 또는 하드웨어 모듈 형태로 제작될 수 있다. 일 실시예에 따르면, 소프트웨어 모듈로 구현된 각각의 모듈들은 메모리(110)에 저장된 명령어를 실행함으로써 실행될 수 있다.
일 실시예에 따르면, 프로세서(120)는 디바이스 상태 판단 모듈(210)을 포함할 수 있다. 일 실시예에 따르면, 디바이스 상태 판단 모듈(210)은 이미지에 대한 열화 개선 요청에 응답하여, 전자 장치(100)의 상태 정보를 판단할 수 있다. 일 실시예에 따르면, 본 개시에서 이미지에 대한 열화 개선 요청에 응답하여 수행되는 이미지 열화 개선은 신경망 모델(111)을 이용하여 수행되는 이미지 열화 개선을 나타낼 수 있다.
일 실시예에 따르면, 디바이스 상태 판단 모듈(210)은 전자 장치(100)의 온도, 전자 장치(100)가 과부하 상태인지 여부, 신경망 모델이 동작하는 하드웨어(예: NPU, GPU, CPU)가 점유되어 있는지 여부, 프로세서(120)의 프로세스 처리량 중 적어도 하나를 포함하는 다양한 전자 장치(100)에 대한 상태를 판단할 수 있다. 일 실시예에서, 디바이스 상태 정보 판단 모듈(210)은 상기 판단에 기반하여 디바이스 상태 정보를 생성할 수 있다. 일 실시예에 따르면, 디바이스 상태 정보는 상기 나열된 정보에 제한되지 않고, 이미지 처리 속도와 관련된 다양한 정보를 포함할 수 있다. 예를 들어, 디바이스 상태 정보는 신경망 모델(111)을 이용하여 이미지의 열화를 개선하는 처리 속도와 관련된 다양한 정보를 포함할 수 있다.
일 실시예에 따르면, 양자화 레벨 결정 모듈(220)은 적어도 디바이스 상태 판단 모듈(210)을 통해 생성된 디바이스 상태 정보에 기반하여 신경망 모델(111)에 대한 양자화 레벨을 결정할 수 있다. 예를 들어, 양자화 레벨 결정 모듈(220)은 디바이스 상태 정보에 기반하여, 전자 장치(100)의 이미지 처리 속도가 지연될 것으로 판단된 경우, 양자화 레벨의 크기를 기준보다 큰 값으로 결정할 수 있다. 일 실시예에 따르면, 양자화 레벨은 메모리(110)에 저장된 이미지의 열화 개선을 위한 신경망 모델의 양자화 강도에 대한 정보를 포함할 수 있다.
일 실시예에 따르면, 양자화 레벨 결정 모듈(220)은 신경망 모델(111)의 처리 속도, 이미지의 열화 개선과 관련된 필수 처리 속도를 더 고려하여 양자화 레벨을 결정할 수 있다. 예를 들어, 전자 장치(100)는 개선될 열화의 종류에 따라 필수 처리 속도를 미리 결정할 수 있다. 일 실시예에 따르면, 개선될 열화의 종류가 전자 장치(100)에서 실시간으로 처리되어야 하는 열화인 경우, 실시간의 기준이 되는 속도가 필수 처리 속도일 수 있다. 예를 들어, 1초에 처리되어야 할 이미지의 개수가 60장 이라면, 16ms가 이미지 열화 개선과 관련된 필수 처리 속도일 수 있다.
일 실시예에 따르면, 양자화 실행 모듈(230)은 양자화 레벨 결정 모듈(220)을 통해 결정된 양자화 레벨에 기반하여 신경망 모델(111)에 대한 양자화를 수행할 수 있다. 예를 들어, 양자화 실행 모듈(230)은 양자화 레벨의 크기가 큰 경우, 신경망 모델(111)에 대하여 강도 높은 양자화 처리를 수행하고, 양자화된 신경망 모델을 출력할 수 있다. 예를 들어, 양자화 실행 모듈(230)은 양자화 레벨의 크기가 작은 경우, 신경망 모델(111)에 대하여 강도 낮은 양자화 처리를 수행하고, 양자화된 신경망 모델을 출력할 수 있다. 예를 들어, 양자화 실행 모듈(230)은 양자화 레벨이 '0'인 경우, 신경망 모델(111)에 대한 양자화 처리를 수행하지 않고 신경망 모델(111)을 그대로 출력할 수 있다.
일 실시예에 따르면, 양자화 실행 모듈(230)을 통해 생성된 양자화된 신경망 모델은 원본인 신경망 모델(111)에 포함된 레이어(layer)의 가중치, 입력 데이터, 출력 데이터, 내부 처리 비트의 크기 중 적어도 하나가 변경된 신경망 모델을 포함할 수 있다. 예를 들어, 양자화된 신경망 모델은 신경망 모델(111)의 가중치 및 활성함수 출력 값의 비트 크기를 줄여 전체 크기가 축소될 수 있다. 일 실시예에서, 가중치 및 활성함수 출력 값의 비트 크기를 줄이는 것은 적은 비트로 가중치 및 활성함수를 출력하는 것을 나타낼 수 있다. 따라서, 프로세서(120)는 양자화된 신경망 모델을 이용하여 제한된 리소스 환경에서도 처리 속도의 지연 없이 이미지 처리를 수행할 수 있다.
일 실시예에 따르면, 양자화 실행 모듈(230)을 통해 생성된 양자화된 신경망 모델은 양자화 레벨에 따라 16bit, 8bit, 4bit, 2bit 등 다양한 비트로 양자화될 수 있다.
일 실시예에 따르면, 양자화 실행 모듈(230)은 양자화 레벨이 지정된 레벨 이상인 경우, 양자화 처리 정보를 추가로 획득할 수 있다. 일 실시예에 따르면, 양자화 처리 정보는 신경망 모델(111)에 대한 양자화를 수행함에 있어서 고려되는 정보를 포함할 수 있다. 예를 들어, 양자화 처리 정보는 이미지와 관련하여 개선 요청된 열화의 종류(예: 솔루션의 종류)에 따라 이미지의 품질에 영향을 최소화 시킬 수 있는 요소에 대한 정보를 포함할 수 있다. 예를 들어, 양자화 처리 정보는 양자화 처리된 신경망 모델을 이용하여 이미지의 열화를 개선하더라도 품질에 영향을 최소화 시킬 수 있는 다양한 요소에 대한 정보를 포함할 수 있다. 예를 들어, 양자화 처리 정보는 얼굴 영역에 포함된 열화를 개선하기 위한 솔루션 에서는 이미지 내에 포함된 여러 개의 얼굴을 중요도의 순서대로 나열한 정보를 포함할 수 있다. 예를 들어, 양자화 처리 정보는 저조도 열화를 개선하기 위한 솔루션 에서는 신경망 모델(111)의 각 레이어(layer)마다 사용되는 빈도가 높은 값의 범위 정보를 포함할 수 있다.
일 실시예에 따르면, 양자화 실행 모듈(230)은 양자화 레벨 및 양자화 처리 정보를 이용하여 신경망 모델(111)에 대한 양자화를 수행하여 양자화된 신경망 모델을 생성할 수 있다.
일 실시예에 따르면, 이미지 열화 처리 모듈(240)은 양자화 실행 모듈(230)을 통해 생성된 신경망 모델을 이용하여 이미지에 대한 열화를 개선할 수 있다. 예를 들어, 이미지 열화 처리 모듈(240)은 열화 개선이 요청된 이미지(예: 원본 이미지)를 양자화된 신경망 모델에 입력하여 열화가 개선된 이미지를 획득할 수 있다.
일 실시예에 따르면, 이미지 열화 처리 모듈(240)은 이미지의 열화 개선과 관련된 처리 제한 정보를 이용하여 이미지 열화를 개선할 수 있다. 예를 들어, 이미지 열화 처리 모듈(240)은 열화 개선이 요청된 이미지 및 처리 제한 정보를 양자화된 신경망 모델에 입력하여 열화가 개선된 이미지를 획득할 수 있다. 일 실시예에 따르면, 처리 제한 정보는 이미지에 포함된 열화들의 개선 범위에 대한 정보를 포함할 수 있다. 예를 들어, 신경망 모델이 얼굴 영역에 열화를 개선하기 위해 학습된 신경망 모델인 경우, 처리 제한 정보는 처리할 얼굴 수, 열화를 개선할 얼굴 영역의 범위 및/또는 열화를 개선할 얼굴에 대한 정보를 포함할 수 있다. 일 실시예에 따르면, 처리 제한 정보는 양자화 처리 정보에 기반하여 생성될 수 있다. 예를 들어, 양자화 실행 모듈(230) 및/또는 이미지 열화 처리 모듈(240)은 양자화 처리 정보에 기반하여 처리 제한 정보를 생성할 수 있다.
도 3은 일 실시예에 따라 디바이스 상태 정보에 기반하여 양자화된 제2 신경망 모델을 생성하는 것을 도시한 흐름도(300)이다. 도 4는 일 실시예에 따라 결정된 양자화 레벨에 기반하여 양자화된 제2 신경망 모델을 생성하는 것을 도시한 흐름도(400)이다.
도 3을 참조하면, 디바이스 상태 판단 모듈(210), 양자화 레벨 결정 모듈(220), 양자화 실행 모듈(230), 및/또는 이미지 열화 처리 모듈(240)이 도시된다. 상기 소프트웨어 모듈은 프로세서(120)의 동작으로 설명될 수 있다. 상기 나열된 소프트웨어 모듈들은 도 2를 참조하여 설명된 것과 유사한 동작을 통해 양자화된 제2 신경망 모델(313)을 생성할 수 있다. 따라서, 도 2와 중복되거나 유사한 설명은 이하 생략될 수 있다.
도 3및 도 4를 참조하여 설명되는 제1 이미지(301)에 대한 열화 개선은 제1 신경망 모델(309)(예: 도 1의 신경망 모델(111))을 통해 수행되는 것으로 기재되어 있으나, 이에 제한되지 않고 복수의 신경망 모델들을 이용하는 경우에도 본 개시의 동작이 수행될 수 있다.
일 실시예에 따르면, 디바이스 상태 판단 모듈(210)은 디바이스 상태 정보(303)를 생성할 수 있다. 일 실시예에 따르면, 디바이스 상태 판단 모듈(210)은 제1 이미지(301)에 대한 열화 개선 요청에 따라 디바이스 상태 정보(303)를 생성할 수 있다. 일 실시예에서, 디바이스 상태 판단 모듈(210)은 전자 장치(100)의 온도, 전자 장치(100)가 과부하 상태인지 여부, 신경망 모델이 동작하는 하드웨어(예: NPU, GPU, CPU)가 점유되어 있는지 여부, 프로세서(120)의 프로세스 처리량 중 적어도 하나를 포함하는 디바이스 상태 정보(303)를 생성할 수 있다. 일 실시예에 따르면, 디바이스 상태 정보(303)는 이미지 열화 처리의 처리 속도에 영향이 있는 다양한 전자 장치(100)의 상태 정보(예: 속도 저하 배수)를 포함할 수 있다.
일 실시예에 따르면, 디바이스 상태 판단 모듈(210)는 디바이스 상태 정보(303)를 양자화 레벨 결정 모듈(220)로 전달할 수 있다. 다양한 실시예에 따라, 디바이스 상태 판단 모듈(210) 및 양자화 레벨 결정 모듈(220)이 하나의 모듈로 구현된 경우 디바이스 상태 정보(303)를 전달하는 동작은 생략될 수 있다.
일 실시예에 따르면, 양자화 레벨 결정 모듈(220)은 디바이스 상태 정보(303) 및 제1 이미지(301)를 입력 받아 양자화 레벨(305)을 결정할 수 있다. 예를 들어, 양자화 레벨 결정 모듈(220)은 디바이스 상태 정보(303)에 기반하여 제1 이미지(301)의 열화를 개선하기 위해 제1 신경망 모델(309)에 대한 양자화 강도를 결정할 수 있다.
도 4를 참조하면, 양자화 레벨 결정 모듈(220)은 디바이스 상태 정보(303), 신경망 모델의 처리 속도(403) 및/또는 이미지 열화 개선과 관련된 필수 처리 속도(401)를 고려하여 양자화 레벨을 결정할 수 있다. 예를 들어, 양자화 레벨 결정 모듈(220)은 신경망 모델의 처리 속도(403)와 디바이스 상태 정보(303)에 기반하여, 이미지 열화 개선과 관련된 필수 처리 속도(401)를 충족시키기 위한 양자화 강도를 계산하여 양자화 레벨을 결정할 수 있다. 예를 들어, 양자화 레벨 결정 모듈(220)은 디바이스 상태 정보(303)에 기반하여, 전자 장치(100)의 속도 저하가 1배 이하이고, 신경망 모델의 처리 속도(403)가 필수 처리 속도(401)보다 빠른 경우, 양자화 레벨은 '0'으로 양자화 처리를 수행할 필요가 없는 것으로 결정할 수 있다. 예를 들어, 양자화 레벨 결정 모듈(220)은 디바이스 상태 정보(303) 및 신경망 모델의 처리 속도(403)에 기반하여 이미지 열화 개선과 관련된 필수 처리 속도(401)를 충족시킬 수 없다고 판단된 경우, 양자화 레벨을 0보다 큰 값으로 결정할 수 있다. 일 실시예에 따르면, 양자화 레벨 결정 모듈(220)은 지정된 범위(예: 0 내지 3) 내에서 양자화 레벨을 양자화 강도와 비례하게 결정할 수 있다. 예를 들어, 양자화 레벨 결정 모듈(220)은 디바이스 상태 정보(303), 필수 처리 속도(401) 및/또는 신경망 모델의 처리 속도(403)에 기반하여, 제1 신경망 모델(309)에 높은 강도의 양자화가 필요하다고 판단된 경우, 양자화 레벨의 크기를 큰 값(예: 3)으로 결정할 수 있다. 예를 들어, 양자화 레벨 결정 모듈(220)은 제1 신경망 모델(309)에 낮은 강도의 양자화가 필요하다고 판단된 경우, 양자화 레벨의 크기를 비교적 작은 값(예: 1 또는 2)으로 결정할 수 있다.
일 실시예에 따르면, 양자화 강도가 높은 경우, 신경망 모델의 크기 변화는 클 수 있다. 예를 들어, 동일한 신경망 모델에 대하여, 양자화 레벨이 1 또는 2인 경우 보다 양자화 레벨이 3 경우, 양자화된 신경망 모델의 크기는 더 작을 수 있다. 일 실시예에서, 전자 장치(100)는 신경망 모델의 크기가 변화됨에 따라, 신경망 모델을 이용한 이미지 열화 개선의 처리 속도를 제어할 수 있다.
일 실시예에 따르면, 양자화 레벨 결정 모듈(220)은 결정된 양자화 레벨(305)을 양자화 실행 모듈(230)에 전달할 수 있다. 일 실시예에 따르면, 양자화 실행 모듈(230)은 양자화 레벨(305)에 기반하여 제1 신경망 모델(309)에 대한 양자화를 수행할 수 있다. 예를 들어, 양자화 실행 모듈(230)은 제1 신경망 모델(309)에 포함된 레이어(layer)들 각각의 가중치 값의 비트(bit)를 조정하거나 계산 처리 비트를 조정하여 양자화된 제2 신경망 모델(313)을 생성할 수 있다.
일 실시예에 따르면, 양자화 실행 모듈(230)은 양자화 레벨(305)뿐만 아니라 양자화 처리 정보(307)에 기반하여 제1 신경망 모델(309)에 대한 양자화를 수행할 수 있다. 예를 들어, 양자화 실행 모듈(230)은 양자화 레벨(305)에 따라 양자화 처리 정보(307)가 필요하다고 판단된 경우, 양자화 처리 정보(307)를 추가로 고려하여 제1 신경망 모델(309)에 대한 양자화를 수행할 수 있다. 일 실시예에 따르면, 양자화 처리 정보(307)는 이미지와 관련하여 개선 요청된 열화의 종류(예: 솔루션의 종류)에 따라 이미지의 품질에 영향을 최소화할 수 있는 요소에 대한 정보를 포함할 수 있다.
일 실시예에 따르면, 양자화 실행 모듈(230)은 양자화 레벨(305)에 기반하여 제1 신경망 모델(309)에 대한 양자화 강도를 결정하고, 양자화 처리 정보(307)를 통해 양자화 비트의 비중을 높게 가져갈 레이어 구간을 결정하거나 양자화의 강도를 조정할 수 있다.
일 실시예에 따르면, 양자화 실행 모듈(230)은 제1 이미지(301), 양자화 레벨(305) 및 양자화 처리 정보(307)에 기반하여 제1 신경망 모델(309)에 대한 양자화를 수행할 수 있다. 예를 들어, 양자화 실행 모듈(230)은 제1 이미지(301)와 양자화 처리 정보(307)의 상관관계를 이용하여 제1 신경망 모델(309)에 대한 양자화 강도를 결정하여 양자화를 수행할 수 있다. 일 실시예에 따르면, 제1 이미지(301) 및 양자화 처리 정보(307)를 추가로 이용함에 따라, 양자화 실행 모듈(230)은 제1 신경망 모델(309)에 대한 양자화로 이미지 열화의 처리 시간을 감소시키고 열화 개선 솔루션에서 보장되어야 하는 필수 처리 속도(401)를 만족시킬 수 있다.
일 실시예에 따르면, 양자화 실행 모듈(230)은 양자화 레벨(305), 양자화 처리 정보(307) 및/또는 제1 이미지(301)에 기반하여 제1 신경망 모델(309)에 대한 양자화를 수행한 제2 신경망 모델(313)을 생성할 수 있다. 일 실시예에 따르면, 양자화 실행 모듈(230)은 양자화 처리 정보(307) 및/또는 제1 이미지(301)에 기반하여 처리 제한 정보(311)를 생성할 수 있다. 일 실시예에 따르면, 처리 제한 정보(311)는 이미지에 포함된 열화들의 개선 범위에 대한 정보를 포함할 수 있다. 양자화 실행 모듈(230)은 생성된 처리 제한 정보(311) 및 제2 신경망 모델(313)을 이미지 열화 처리 모듈(240)에 전달할 수 있다.
일 실시예에 따르면, 이미지 열화 처리 모듈(240)은 제2 신경망 모델(313)을 통해 제1 이미지(301)의 이미지 열화가 개선된 제2 이미지(315)를 획득할 수 있다. 예를 들어, 이미지 열화 처리 모듈(240)은 제2 신경망 모델(313)에 제1 이미지(301), 처리 제한 정보(311)를 입력하여 이미지 열화가 개선된 제2 이미지(315)를 획득할 수 있다. 일 실시예에서, 이미지 열화 처리 모듈(240)은 양자화된 제2 신경망 모델(313)을 이용하여 제1 이미지(301)의 이미지 열화 개선의 처리 시간을 단축시킬 수 있다.
일 실시예에서, 양자화 실행 모듈(230)은 제1 신경망 모델(309)에 대한 양자화 수행이 불필요한 경우(예: 양자화 레벨이 0인 경우), 제1 신경망 모델(309)에 대한 양자화를 수행하지 않고 이미지 열화 처리 모듈(240)로 제1 신경망 모델(309)을 전달할 수 있다. 일 실시예에서, 이미지 열화 처리 모듈(240)은 제1 신경망 모델(309)을 통해 제1 이미지(301)의 열화가 개선된 제2 이미지(315)를 획득할 수 있다.
도 5는 일 실시예에 따른 전자 장치가 양자화된 신경망 모델을 통해 이미지 열화를 개선하는 것을 도시한 흐름도이다.
도 2 및 도 3을 참조하여 설명된 소프트웨어 모듈들의 동작은 이하 프로세서(120)의 동작으로 설명될 수 있다. 도 5를 참조하면, 프로세서(120)는 동작 501에서, 전자 장치(예: 전자 장치(100))의 이미지 처리 속도와 관련된 디바이스 상태 정보(예: 디바이스 상태 정보(303))를 생성할 수 있다. 일 실시예에 따르면, 디바이스 상태 정보는 전자 장치(100)가 이미지 열화를 개선하는 동작을 수행하는 데에 소요되는 시간에 영향을 주는 다양한 정보를 포함할 수 있다.
일 실시예에 따르면, 동작 503에서, 프로세서(120)는 디바이스 상태 정보에 기반하여 제1 신경망 모델(예: 제1 신경망 모델(309))에 대한 양자화 레벨(예: 양자화 레벨(305))을 결정할 수 있다. 일 실시예에 따르면, 양자화 레벨은 제1 신경망 모델에 대한 양자화 강도에 대한 정보를 포함할 수 있다. 예를 들어, 프로세서(120)는 디바이스 상태 정보에 기반하여 전자 장치(100)가 과부화 상태 것으로 판단되면 양자화 강도를 기준보다 증가시킬 수 있다. 예를 들어, 프로세서(120)는 프로세서(120)와 관련된 처리량 정보에 기반하여, 처리량이 과다한 것으로 판단되면 양자화 강도를 기준보다 증가시킬 수 있다. 예를 들어, 프로세서(120)는 디바이스 상태 정보에 기반하여 전자 장치(100)가 과부하가 아닌 것으로 판단되어 속도 저하가 없는 경우, 신경망 모델을 양자화 하지 않는 것으로 결정할 수 있다.
일 실시예에 따르면, 동작 505에서, 프로세서(120)는 양자화 레벨에 기반하여 제1 신경망 모델에 대한 양자화를 수행함에 따라 제2 신경망 모델(예: 제2 신경망 모델(313))을 생성할 수 있다. 예를 들어, 프로세서(120)는 제1 신경망 모델에 포함된 레이어의 가중치, 입력 데이터, 출력 데이터, 및/또는 내부 처리 비트의 크기 중 적어도 하나를 변경하여 제2 신경망 모델을 생성할 수 있다. 일 실시예에 따르면, 프로세서(120)는 양자화 레벨에 기반하여, 제1 신경망 모델에 대한 양자화 동작이 불필요하다고 판단된 경우, 동작 505를 생략할 수 있다.
일 실시예에 따르면, 동작 507에서, 프로세서(120)는 제2 신경망 모델을 통해 제1 이미지의 열화를 개선한 제2 이미지(예: 제2 이미지(315))를 획득할 수 있다. 예를 들어, 프로세서(120)는 제2 신경망 모델에 제1 이미지를 입력하여, 제1 이미지의 열화가 개선된 제2 이미지를 획득할 수 있다. 일 실시예에 따르면, 프로세서(120)는 동작 505가 생략된 경우, 제1 신경망 모델을 이용하여 제1 이미지의 열화가 개선된 제2 이미지를 획득할 수 있다.
도 6는 일 실시예에 따른 전자 장치의 얼굴 영역 화질 개선을 도시한 흐름도(600)이다.
도 6을 참조하면, 디바이스 상태 판단 모듈(210), 양자화 레벨 결정 모듈(220), 양자화 실행 모듈(230), 및/또는 이미지 열화 처리 모듈(240)이 도시된다. 상기 소프트웨어 모듈은 프로세서(120)의 동작으로 설명될 수 있다. 상기 나열된 소프트웨어 모듈들은 도 2, 도 3 및 도 4를 참조하여 설명된 것과 유사한 동작을 통해 제1 이미지(601)에 포함된 얼굴 영역의 화질을 개선할 수 있다. 따라서, 도 2, 도 3 및 도 4를 참조하여 설명된 것과 중복되거나 유사한 설명은 이하 생략될 수 있다.
도 6을 참조하여 설명되는 제1 이미지(601)에 대한 열화 개선은 제1 신경망 모델(613)(예: 도 1의 신경망 모델(111), 도 3의 제1 신경망 모델(309))을 통해 수행될 수 있다. 일 실시예에 따르면, 제1 신경망 모델(613)은 이미지에 포함된 얼굴 영역을 검출하고, 얼굴 영역의 화질을 개선하도록 학습된 신경망 모델을 포함할 수 있다.
일 실시예에 따르면, 디바이스 상태 판단 모듈(210)은 제1 이미지(601)의 얼굴 영역에 대한 이미지 열화 개선 요청에 따라 디바이스 상태 정보(603)를 생성할 수 있다. 일 실시예에서, 디바이스 상태 판단 모듈(210)은 전자 장치(100)의 온도, 전자 장치(100)가 과부하 상태인지 여부, 신경망 모델이 동작하는 하드웨어(예: NPU, GPU, CPU)가 점유되어 있는지 여부, 프로세서(120)의 프로세스 처리량 중 적어도 하나를 포함하는 디바이스 상태 정보(303)를 생성할 수 있다. 예를 들어, 디바이스 상태 판단 모듈(210)은 이미지 열화 처리에 영향을 미칠 수 있는 디바이스 상태를 판단하고, 디바이스 상태 정보(603)로써 전자 장치(100)의 속도 저하 배수(예: 1.5배)를 생성할 수 있다.
일 실시예에 따르면, 디바이스 상태 판단 모듈(210)는 디바이스 상태 정보(603)를 양자화 레벨 결정 모듈(220)로 전달할 수 있다. 일 실시예에 따르면, 양자화 레벨 결정 모듈(220)은 디바이스 상태 정보(603), 제1 신경망 모델 처리 속도(607) 및/또는 얼굴 영역 솔루션 필수 처리 속도(605)에 기반하여 양자화 레벨(609)을 결정할 수 있다. 일 실시예에 따르면, 얼굴 영역 솔루션 필수 처리 속도(605)는 이미지 내에 포함된 얼굴 영역의 열화를 개선하기 위한 처리 속도를 나타낼 수 있다.
일 실시예에 따르면, 양자화 레벨 결정 모듈(220)은 제1 신경망 모델 처리 속도(607)와 디바이스 상태 정보(603)에 기반하여, 얼굴 영역 솔루션 필수 처리 속도(605)를 충족시키기 위한 양자화 강도를 계산하여 양자화 레벨을 결정할 수 있다. 예를 들어, 양자화 레벨 결정 모듈(220)은 디바이스 상태 정보(603) 및 제1 신경망 모델 처리 속도(607)에 기반하여 얼굴 영역 솔루션 필수 처리 속도(605)를 충족시킬 수 없다고 판단된 경우, 양자화 레벨을 0보다 큰 값으로 결정할 수 있다. 일 실시예에 따르면, 양자화 레벨 결정 모듈(220)은 지정된 범위(예: 0 내지 3) 내에서 양자화 레벨을 양자화 강도와 비례하게 결정할 수 있다. 예를 들어, 양자화 레벨 결정 모듈(220)은 디바이스 상태 정보(603), 얼굴 영역 솔루션 필수 처리 속도(605) 및/또는 제1 신경망 모델 처리 속도(607)에 기반하여, 제1 신경망 모델(613)에 높은 강도의 양자화가 필요하다고 판단된 경우, 양자화 레벨의 크기를 큰 값(예: 3)으로 결정할 수 있다.
일 실시예에 따르면, 양자화 레벨 결정 모듈(220)은 결정된 양자화 레벨(609)을 양자화 실행 모듈(230)에 전달할 수 있다. 일 실시예에 따르면, 양자화 실행 모듈(230)은 양자화 레벨(609)에 기반하여 제1 신경망 모델(613)에 대한 양자화를 수행할 수 있다. 예를 들어, 양자화 실행 모듈(230)은 제1 신경망 모델(613)에 포함된 레이어(layer)들 각각의 가중치 값의 비트(bit)를 조정하거나 계산 처리 비트를 조정하여 양자화된 제2 신경망 모델(617)을 생성할 수 있다.
일 실시예에 따르면, 양자화 실행 모듈(230)은 양자화 레벨(609)뿐만 아니라 최소 얼굴 영역 범위(611)(예: 도 3의 양자화 처리 정보(307))에 기반하여 제1 신경망 모델(613)에 대한 양자화를 수행할 수 있다. 일 실시예에서 최소 얼굴 영역 범위(611)는 이미지 내에 화질 개선을 목표로 하는 최소 얼굴 영역의 범위를 포함할 수 있다.
일 실시예에서, 양자화 실행 모듈(230)은 제1 신경망 모델(613)에 대한 양자화 강도가 커 양자화로 인한 이미지 열화가 클 것으로 판단된 경우, 최소 얼굴 영역 범위(611)에 기반하여 양자화 강도를 조절할 수 있다. 예를 들어, 양자화 실행 모듈(230)은 양자화 레벨(609)이 지정된 크기 이상인 경우, 제1 이미지(601)에 포함된 얼굴의 개수 및 최소 얼굴 영역 범위(611)에 기반하여 양자화 강도를 조절할 수 있다.
예를 들어, 양자화 실행 모듈(230)은 최소 얼굴 영역 범위(611)가 제1 이미지(601)의 얼굴 영역 범위보다 크다면, 제1 이미지(601) 내의 얼굴 영역의 열화를 모두 개선해야 하므로 결정된 양자화 레벨(609)에 따라 제1 신경망 모델(613)을 양자화할 수 있다.
예를 들어, 양자화 실행 모듈(230)은 최소 얼굴 영역 범위(611)(예: 1개의 얼굴 영역)가 제1 이미지(601)의 얼굴 영역 범위(예: 2개의 얼굴 영역)보다 작다면, 제1 이미지(601) 내의 열화를 개선할 얼굴 영역 범위를 줄여 일부 영역에 대한 열화만을 개선할 수 있다. 최소 얼굴 영역 범위는 양자화된 신경망 모델을 통해서 이미지의 열화를 개선할 얼굴 영역의 범위를 정의한 값을 의미할 수 있다. 예를 들어, 최소 얼굴 영역 범위는 이미지 열화의 개선을 수행할 얼굴 영역의 수량을 의미할 수 있다. 따라서, 양자화 실행 모듈(230)은 제1 이미지(601) 내의 열화를 개선할 얼굴 영역이 줄어들어 열화 개선을 위한 처리 속도가 증가될 수 있으므로 양자화 강도를 보다 낮출 수 있다. 일 실시예에 따르면, 양자화 실행 모듈(230)은 제1 이미지(601) 내의 일부 얼굴 영역 범위의 열화를 개선하기로 결정함에 따라, 이미지 열화 처리 모듈(240)로 보정 대상 얼굴 정보(615)를 전달할 수 있다. 일 실시예에서, 보정 대상 얼굴 정보(615)는 제1 이미지(601) 내의 얼굴 영역에 대한 다양한 정보(예: 프로필 정보, 얼굴 영역의 크기)에 기반하여 결정될 수 있다.
일 실시예에 따르면, 양자화 실행 모듈(230)은 제1 이미지(601), 양자화 레벨(609) 및 최소 얼굴 영역 범위(611)에 기반하여 제1 신경망 모델(613)에 대한 양자화를 수행하고 제2 신경망 모델(617)을 생성할 수 있다. 양자화 실행 모듈(230)은 보정 대상 얼굴 정보(615) 및 제2 신경망 모델(617)을 이미지 열화 처리 모듈(240)에 전달할 수 있다.
일 실시예에 따르면, 이미지 열화 처리 모듈(240)은 제2 신경망 모델(617)을 통해 제1 이미지(601)의 얼굴 영역에 대한 열화가 개선된 제2 이미지(619)를 획득할 수 있다. 예를 들어, 이미지 열화 처리 모듈(240)은 제2 신경망 모델(617)에 제1 이미지(601), 보정 대상 얼굴 정보(615)를 입력하여 얼굴 영역의 이미지 열화가 개선된 제2 이미지(619)를 획득할 수 있다.
도 7은 일 실시예에 따른 전자 장치의 저조도 화질 개선을 도시한 흐름도(700)이다.
도 7을 참조하면, 디바이스 상태 판단 모듈(210), 양자화 레벨 결정 모듈(220), 양자화 실행 모듈(230), 및/또는 이미지 열화 처리 모듈(240)이 도시된다. 상기 소프트웨어 모듈은 프로세서(120)의 동작으로 설명될 수 있다. 상기 나열된 소프트웨어 모듈들은 도 2, 도 3 및 도 4를 참조하여 설명된 것과 유사한 동작을 통해 제1 이미지(701)에 포함된 얼굴 영역의 화질(예: 낮은 조도로 인해 열화된 화질)을 개선할 수 있다. 따라서, 도 2, 도 3 및 도 4를 참조하여 설명된 것과 중복되거나 유사한 설명은 이하 생략될 수 있다.
도 7을 참조하여 설명되는 제1 이미지(701)에 대한 열화 개선은 제1 신경망 모델(713)(예: 도 1의 신경망 모델(111), 도 3의 제1 신경망 모델(309))을 통해 수행될 수 있다. 일 실시예에 따르면, 제1 신경망 모델(713)은 제1 이미지(701)의 저조도로 인한 화질 열화를 개선하도록 학습된 신경망 모델을 포함할 수 있다.
일 실시예에 따르면, 디바이스 상태 판단 모듈(210)은 제1 이미지(701)의 저조도로 인한 열화 개선 요청에 따라 디바이스 상태 정보(703)를 생성할 수 있다. 일 실시예에서, 디바이스 상태 판단 모듈(210)은 전자 장치(100)의 온도, 전자 장치(100)가 과부하 상태인지 여부, 신경망 모델이 동작하는 하드웨어(예: NPU, GPU, CPU)가 점유되어 있는지 여부, 프로세서(120)의 프로세스 처리량 중 적어도 하나를 포함하는 디바이스 상태 정보(703)를 생성할 수 있다. 예를 들어, 디바이스 상태 판단 모듈(210)은 이미지 열화 처리에 영향을 미칠 수 있는 디바이스 상태를 판단하고, 디바이스 상태 정보(703)로써 전자 장치(100)의 속도 저하 배수(예: 2배)를 생성할 수 있다.
일 실시예에 따르면, 디바이스 상태 판단 모듈(210)는 디바이스 상태 정보(703)를 양자화 레벨 결정 모듈(220)로 전달할 수 있다. 일 실시예에 따르면, 양자화 레벨 결정 모듈(220)은 디바이스 상태 정보(703), 제1 신경망 모델 처리 속도(707) 및/또는 저조도 개선 솔루션 필수 처리 속도(705)에 기반하여 양자화 레벨(709)을 결정할 수 있다. 일 실시예에 따르면, 저조도 개선 솔루션 필수 처리 속도(705)는 이미지의 저조도를 개선하기 위한 필수 처리 속도를 나타낼 수 있다.
일 실시예에 따르면, 양자화 레벨 결정 모듈(220)은 제1 신경망 모델 처리 속도(707)와 디바이스 상태 정보(703)에 기반하여, 저조도 개선 솔루션 필수 처리 속도(705)를 충족시키기 위한 양자화 강도를 계산하여 양자화 레벨을 결정할 수 있다. 예를 들어, 양자화 레벨 결정 모듈(220)은 디바이스 상태 정보(703) 및 제1 신경망 모델 처리 속도(707)에 기반하여 저조도 개선 솔루션 필수 처리 속도(705)를 충족시킬 수 없다고 판단된 경우, 양자화 레벨을 0보다 큰 값으로 결정할 수 있다. 일 실시예에 따르면, 양자화 레벨 결정 모듈(220)은 지정된 범위(예: 0 내지 3) 내에서 양자화 레벨을 양자화 강도와 비례하게 결정할 수 있다. 예를 들어, 양자화 레벨 결정 모듈(220)은 디바이스 상태 정보(703), 저조도 개선 솔루션 필수 처리 속도(705) 및/또는 제1 신경망 모델 처리 속도(707)에 기반하여, 제1 신경망 모델(713)에 높은 강도의 양자화가 필요하다고 판단된 경우, 양자화 레벨의 크기를 큰 값(예: 3)으로 결정할 수 있다.
일 실시예에 따르면, 양자화 레벨 결정 모듈(220)은 결정된 양자화 레벨(709)을 양자화 실행 모듈(230)에 전달할 수 있다. 일 실시예에 따르면, 양자화 실행 모듈(230)은 양자화 레벨(709)에 기반하여 제1 신경망 모델(713)에 대한 양자화를 수행할 수 있다. 예를 들어, 양자화 실행 모듈(230)은 제1 신경망 모델(713)에 포함된 레이어(layer)들 각각의 가중치 값의 비트(bit)를 조정하거나 계산 처리 비트를 조정하여 양자화된 제2 신경망 모델(717)을 생성할 수 있다.
일 실시예에 따르면, 양자화 실행 모듈(230)은 양자화 레벨(709)뿐만 아니라 보조 이미지(711)(예: 도 3의 양자화 처리 정보(307), 복수의 저조도 이미지들)에 기반하여 제1 신경망 모델(713)에 대한 양자화를 수행할 수 있다. 일 실시예에서, 양자화 실행 모듈(230)은 보조 이미지(711)를 통해 제1 신경망 모델(713)에 포함된 각 레이어의 범위를 판단할 수 있다.
일 실시예에서, 양자화 실행 모듈(230)은 제1 신경망 모델(713)에 대한 양자화 강도가 커 양자화로 인한 이미지 열화가 클 것으로 판단된 경우, 보조 이미지(711)를 이용하여 양자화 비트의 비중을 높게 가져갈 레이어 구간을 결정하거나, 제1 신경망 모델(713)에 포함된 각 레이어 범위의 중간 값이나 평균 값을 크게 벗어나지만 그 수가 매우 적은 일부 값들을 배제하고, 각 레이어의 범위를 정하여 양자화를 수행할 수 있다. 예를 들어, 양자화 실행 모듈(230)은 양자화 레벨(709)이 지정된 크기 이상인 경우, 제1 신경망 모델(713)의 양자화 수행 시 매우 적은 일부 값들을 배제하고 양자화될 수 있도록 보조 이미지(711)를 이용할 수 있다.
일 실시예에 따르면, 양자화 실행 모듈(230)은 제1 이미지(701), 양자화 레벨(709) 및 보조 이미지(711)에 기반하여 제1 신경망 모델(713)에 대한 양자화를 수행하고 제2 신경망 모델(717)을 생성할 수 있다. 양자화 실행 모듈(230)은 제2 신경망 모델(717)을 이미지 열화 처리 모듈(240)에 전달할 수 있다.
일 실시예에 따르면, 이미지 열화 처리 모듈(240)은 제2 신경망 모델(717)을 통해 제1 이미지(701)의 저조도로 인한 화질 열화가 개선된 제2 이미지(719)를 획득할 수 있다.
도 8은 일 실시예에 따라 열화가 개선된 이미지를 표시하는 화면을 도시한 도면이다.
도 8을 참조하면, 전자 장치(100)가 디스플레이(130)를 통해 열화가 개선된 이미지를 표시하는 제1 화면(810), 제2 화면(820) 및 제3 화면(830)이 나타난다.
일 실시예에 따르면, 제1 화면(810)은 이미지에 대한 어플리케이션 실행하는 화면을 나타낸다. 일 실시예에 따르면, 제1 화면(810)은 이미지에 대한 어플리케이션 실행과 관련된 다양한 아이콘들을 포함할 수 있다. 예를 들어, 제1 화면(810)은 이미지에 대한 열화 개선을 위한 아이콘(811)을 포함할 수 있다.
일 실시예에 따르면, 프로세서(120)는 메모리(110)에 저장된 적어도 하나의 이미지 중에서 제1 이미지에 대한 열화 개선과 관련된 요청을 획득할 수 있다. 예를 들어, 프로세서(120)는 디스플레이(130)를 통해 열화 개선을 위한 아이콘(811)을 표시할 수 있다. 일 실시예에 따르면, 전자 장치(100)의 사용자는 열화 개선을 위한 아이콘(811)을 통해 이미지에 대한 품질에 관련된 요청을 할 수 있다.
일 실시예에 따르면, 프로세서(120)는 카메라(140)를 통해 획득되는 이미지(예: 프리뷰 이미지)에 대한 열화 개선과 관련된 요청을 획득할 수 있다. 예를 들어, 프로세서(120)는 디스플레이(130)를 통해 프리뷰 이미지와 열화 개선을 위한 아이콘(811)을 표시할 수 있다. 일 실시예에 따르면, 전자 장치(100)의 사용자는 카메라(140)를 통해 이미지를 획득하는 중에 열화 개선을 위한 아이콘(811)을 통해 이미지에 대한 품질에 관련된 요청을 할 수 있다.
일 실시예에 따르면, 제2 화면(820)은 제1 화면(810)에서 선택된 제1 이미지에 대한 열화 개선 동작과 관련된 열화 개선 안내 화면을 포함할 수 있다. 예를 들어, 프로세서(120)는 디스플레이(130)를 통해 제1 이미지에 대한 열화 개선이 수행되고 있음을 알리는 시각적 객체(821)를 표시할 수 있다. 예를 들어, 프로세서(120)는 이미지에 대한 열화 개선의 수행 상태에 따라 열화 개선이 수행되고 있음을 알리는 시각적 객체(821)를 디스플레이(130)를 통해 표시할 수 있다.
일 실시예에 따르면, 제1 이미지에 대한 열화 개선이 지정된 시간 이하(예: 실시간)으로 수행되는 경우, 프로세서(120)는 제2 화면(820)의 표시를 생략할 수 있다.
일 실시예에 따르면, 제3 화면(830)은 제1 이미지(832) 및 개선이 완료된 제2 이미지(833)를 포함하는 비교 화면(831)을 포함할 수 있다. 일 실시예에 따르면, 프로세서(120)는 제1 이미지에 대한 열화 개선을 제2 신경망 모델을 통해 수행하고, 열화가 개선된 이미지를 획득하여 디스플레이(130)를 통해 표시할 수 있다. 예를 들어, 프로세서(120)는 제1 이미지(832) 및 제1 이미지(832)에 대한 열화를 개선한 제2 이미지(833)를 디스플레이(130)를 통해 표시할 수 있다.
일 실시예에 따라, 전자 장치(100)는 도 1 내지 도 7을 참조하여 설명된 것과 유사한 방법을 통해 제1 이미지(832)에 대한 열화를 개선하여 제2 이미지(833)를 획득하는 할 수 있다. 다양한 실시예들에 따라, 전자 장치(100)는 제1 이미지(832) 및/또는 제2 이미지(833)를 표시할 수 있다. 예를 들어, 전자 장치(100)는 제1 이미지(832)를 표시하지 않고 열화가 개선된 제2 이미지(833)만을 표시할 수 있다. 예를 들어, 전자 장치(100)는 제2 이미지(833)뿐만 아니라 이와 관련하여 함께 표시될 수 있는 다양한 시각적 객체를 함께 표시할 수 있다.
일 실시예에 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))는, 제1 신경망 모델(예: 도 3 또는 4의 제1 신경망 모델(309), 도 6의 제1 신경망 모델(613), 도 7의 제1 신경망 모델(713))을 저장하는 메모리(예: 도 1의 메모리(110), 도 9의 메모리(930)) 및 상기 메모리(예: 도 1의 메모리(110), 도 9의 메모리(930))와 작동적으로 연결된 적어도 하나의 프로세서(예: 도 1 또는 도 2의 프로세서(120), 도 9의 프로세서(920))를 포함할 수 있다. 상기 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))는 상기 적어도 하나의 프로세서(예: 도 1 또는 도 2의 프로세서(120), 도 9의 프로세서(920))가 상기 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))의 이미지 처리 속도와 관련된 디바이스 상태 정보를 생성하도록 구성될 수 있다. 상기 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))는 상기 적어도 하나의 프로세서(예: 도 1 또는 도 2의 프로세서(120), 도 9의 프로세서(920))가 상기 디바이스 상태 정보에 기반하여 상기 제1 신경망 모델에 대한 양자화 레벨을 결정하도록 구성될 수 있다. 상기 양자화 레벨은 상기 제1 신경망 모델에 대한 양자화 강도에 대한 정보를 포함할 수 있다. 상기 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))는 상기 적어도 하나의 프로세서(예: 도 1 또는 도 2의 프로세서(120), 도 9의 프로세서(920))가 상기 양자화 레벨에 기반하여 상기 제1 신경망 모델에 대한 양자화를 수행함에 따라 제2 신경망 모델을 생성하도록 구성될 수 있다. 상기 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))는 상기 적어도 하나의 프로세서(예: 도 1 또는 도 2의 프로세서(120), 도 9의 프로세서(920))가 상기 제2 신경망 모델을 통해 제1 이미지의 열화를 개선한 제2 이미지를 획득하도록 구성될 수 있다.
일 실시예에 따르면, 디바이스 상태 정보는 상기 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))의 과부하(overload) 정보, 상기 적어도 하나의 프로세서와 관련된 처리량(Throughput) 정보 중 적어도 하나를 포함할 수 있다.
일 실시예에 따른 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))는 상기 적어도 하나의 프로세서(예: 도 1 또는 도 2의 프로세서(120), 도 9의 프로세서(920))가 상기 디바이스 상태 정보, 상기 제1 신경망 모델의 처리 속도 및 상기 제1 이미지의 열화 개선과 관련된 필수 처리 속도에 기반하여 상기 양자화 레벨을 결정하도록 구성될 수 있다.
일 실시예에 따른 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))는 상기 적어도 하나의 프로세서(예: 도 1 또는 도 2의 프로세서(120), 도 9의 프로세서(920))가 상기 제1 신경망 모델에 포함된 레이어의 가중치, 입력 데이터, 출력 데이터, 내부 처리 비트의 크기 중 적어도 하나를 변경하여 상기 제2 신경망 모델을 생성하도록 구성될 수 있다.
일 실시예에 따른 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))는 상기 적어도 하나의 프로세서(예: 도 1 또는 도 2의 프로세서(120), 도 9의 프로세서(920))가 상기 양자화 레벨과 지정된 레벨을 비교하고, 상기 비교 결과에 기반하여, 양자화 처리 정보를 획득하도록 구성될 수 있다. 상기 양자화 처리 정보는 상기 제1 이미지에 대한 열화 개선 방법에 기반하여 생성될 수 있다.
일 실시예에 따른 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))는 상기 적어도 하나의 프로세서(예: 도 1 또는 도 2의 프로세서(120), 도 9의 프로세서(920))가 상기 양자화 레벨이 상기 지정된 레벨 이상인 경우, 상기 양자화 처리 정보를 획득하도록 구성될 수 있다. 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))는 상기 적어도 하나의 프로세서(예: 도 1 또는 도 2의 프로세서(120), 도 9의 프로세서(920))가 상기 양자화 레벨 및 상기 양자화 처리 정보에 기반하여, 상기 제1 신경망 모델을 양자화한 상기 제2 신경망 모델을 생성하도록 구성될 수 있다.
일 실시예에 따른 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))는 상기 적어도 하나의 프로세서(예: 도 1 또는 도 2의 프로세서(120), 도 9의 프로세서(920))가 상기 양자화 처리 정보에 기반하여 상기 제1 이미지의 열화 개선과 관련된 처리 제한 정보를 생성하도록 구성될 수 있다. 상기 처리 제한 정보는 상기 제1 이미지에 포함된 열화들의 개선 범위에 대한 정보를 포함할 수 있다.
일 실시예에 따른 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))는 상기 적어도 하나의 프로세서(예: 도 1 또는 도 2의 프로세서(120), 도 9의 프로세서(920))가 상기 처리 제한 정보에 기반하여 상기 제2 신경망 모델을 통해 상기 제1 이미지의 열화를 개선한 상기 제2 이미지를 획득하도록 구성될 수 있다.
일 실시예에 따른 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))는 상기 적어도 하나의 프로세서(예: 도 1 또는 도 2의 프로세서(120), 도 9의 프로세서(920))가 상기 비교 결과에 기반하여, 복수의 보조 이미지들을 획득하도록 구성될 수 있다. 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))는 상기 적어도 하나의 프로세서(예: 도 1 또는 도 2의 프로세서(120), 도 9의 프로세서(920))가 상기 복수의 보조 이미지들을 분석하여 상기 양자화 처리 정보를 생성하도록 구성될 수 있다. 상기 양자화 처리 정보는 상기 복수의 보조 이미지들에 기반하여 결정된 상기 제1 신경망 모델에 포함된 가중치, 입력 데이터, 출력 데이터, 내부 처리 비트 크기 중 적어도 하나와 관련된 정보를 포함할 수 있다.
일 실시예에 따른 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))는 디스플레이를 더 포함할 수 있다. 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))는 상기 적어도 하나의 프로세서(예: 도 1 또는 도 2의 프로세서(120), 도 9의 프로세서(920))가 상기 제1 이미지의 열화를 개선한 상기 제2 이미지를 상기 디스플레이를 통해 표시하도록 구성될 수 잇다.
일 실시예에 따르면, 제1 이미지는 상기 메모리에 저장된 이미지, 상기 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))에 포함된 카메라를 통해 획득된 이미지, 상기 카메라를 통해 획득되는 프리뷰 이미지 중 적어도 하나를 포함할 수 있다.
일 실시예에 따른 제1 신경망 모델을 저장하는 메모리를 포함하는 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))의 동작 방법에 있어서, 상기 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))의 이미지 처리 속도와 관련된 디바이스 상태 정보를 생성하는 동작을 포함할 수 있다. 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))의 동작 방법은 상기 디바이스 상태 정보에 기반하여 상기 제1 신경망 모델에 대한 양자화 레벨을 결정하는 동작을 포함할 수 있다 상기 양자화 레벨은 상기 제1 신경망 모델에 대한 양자화 강도에 대한 정보를 포함할 수 있다. 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))의 동작 방법은 양자화 레벨에 기반하여 상기 제1 신경망 모델에 대한 양자화를 수행함에 따라 제2 신경망 모델을 생성하는 동작을 포함할 수 있다. 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))의 동작 방법은 제2 신경망 모델을 통해 제1 이미지의 열화를 개선한 제2 이미지를 획득하는 동작을 포함할 수 있다.
일 실시예에 따르면, 상기 양자화 레벨을 결정하는 동작은, 상기 디바이스 상태 정보, 상기 제1 신경망 모델의 처리 속도 및 상기 제1 이미지의 열화 개선과 관련된 필수 처리 속도에 기반하여 상기 양자화 레벨을 결정하는 동작을 더 포함할 수 있다. 상기 디바이스 상태 정보는 상기 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))의 과부하 정보, 상기 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))에 포함된 프로세서와 관련된 처리량 정보 중 적어도 하나를 포함할 수 있다.
일 실시예에 따르면, 상기 제2 신경망 모델을 생성하는 동작은, 상기 제1 신경망 모델에 포함된 레이어의 가중치, 입력, 출력, 내부 처리 비트의 크기 중 적어도 하나를 변경하는 동작을 더 포함할 수 있다.
일 실시예에 따른 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))의 동작 방법은 상기 양자화 레벨과 지정된 레벨을 비교하는 동작 및 상기 비교 결과에 따라, 상기 제1 이미지에 대한 열화 개선 방법에 기반하여 양자화 처리 정보를 생성하는 동작을 더 포함할 수 있다.
일 실시예에 따르면, 상기 양자화 처리 정보를 생성하는 동작은 상기 양자화 레벨이 상기 지정된 레벨 이상임에 응답하여 상기 양자화 처리 정보를 생성하는 동작을 더 포함할 수 있다. 상기 제2 신경망 모델을 생성하는 동작은 상기 양자화 레벨 및 상기 양자화 처리 정보에 기반하여 상기 제1 신경망 모델을 양자화한 상기 제2 신경망 모델을 생성하는 동작을 더 포함할 수 있다.
일 실시예에 따르면, 상기 제2 이미지를 획득하는 동작은, 상기 양자화 처리 정보에 기반하여 상기 제1 이미지의 열화 개선과 관련된 처리 제한 정보를 생성하는 동작 및 상기 처리 제한 정보에 기반하여 상기 제2 신경망 모델을 통해 상기 제1 이미지의 열화를 개선한 상기 제2 이미지를 획득하는 동작을 더 포함할 수 있다. 상기 처리 제한 정보는 상기 제1 이미지에 포함된 열화들의 개선 범위에 대한 정보를 포함할 수 있다.
일 실시예에 따르면, 상기 양자화 처리 정보를 생성하는 동작은, 복수의 보조 이미지들을 획득하는 동작 및 상기 복수의 보조 이미지들을 분석하여, 상기 양자화 처리 정보를 생성하는 동작을 더 포함할 수 있다. 상기 양자화 처리 정보는, 상기 복수의 보조 이미지들에 기반하여 결정된 상기 제1 신경망 모델에 포함된 가중치, 입력, 출력, 내부 처리 비트 깊이 중 적어도 하나와 관련된 정보를 포함할 수 있다.
일 실시예에 따른 전자 장치의 동작 방법은, 상기 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))에 포함된 디스플레이를 통해 상기 제1 이미지의 열화를 개선한 상기 제2 이미지를 표시하는 동작을 더 포함할 수 있다.
적어도 하나의 프로그램들을 저장하는 비일시적 컴퓨터 판독가능 저장 매체로서, 상기 하나 이상의 프로그램들은, 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))의 하나 이상의 프로세서들에 의해 실행될 때, 상기 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))로 하여금 일련의 동작들을 수행하도록 할 수 있다. 상기 하나 이상의 프로그램들은, 상기 전자 장치(예: 도 1의 전자 장치(100), 도 9의 전자 장치(901))의 이미지 처리 속도와 관련된 디바이스 상태 정보를 생성하고, 상기 디바이스 상태 정보에 기반하여 제1 신경망 모델에 대한 양자화 레벨을 결정하고, 상기 양자화 레벨은 상기 제1 신경망 모델에 대한 양자화 강도에 대한 정보를 포함하며, 상기 양자화 레벨에 기반하여 상기 제1 신경망 모델에 대한 양자화를 수행함에 따라 제2 신경망 모델을 생성하고, 상기 제2 신경망 모델을 통해 제1 이미지의 열화를 개선한 제2 이미지를 획득하게 하는 명령어들을 포함할 수 있다.
신경망 모델을 통해 이미지에 포함된 화질 열화를 개선하는 경우, 전자 장치가 과부하 상태이거나 또다른 신경망 모델의 사용으로 인해 하드웨어(예: NPU, GPU, CPU)등이 점유된 경우 일반적인 상황 대비 처리 시간이 증가하게 된다. 따라서, 지정된 시간 내에 이미지에 대한 열화를 개선해야 하는 경우 동작이 불가능한 문제가 있다. 또한, 신경망 모델의 처리 시간이 지연되어 또다른 프로세스가 지연되는 문제가 있다. 상기와 같은 상황을 고려하여 신경망 모델의 크기를 조정하여 신경망 모델의 처리 속도를 조정하는 경우, 처리 지연이 없는 경우에도 신경망 모델을 통한 화질 저하를 막을 수 없는 문제가 있다.
이 외에, 본 문서를 통해 직접적 또는 간접적으로 파악되는 다양한 효과들이 제공될 수 있다.
도 9는, 다양한 실시예들에 따른, 네트워크 환경(900) 내의 전자 장치(901)의 블록도이다.
도 9을 참조하면, 네트워크 환경(900)에서 전자 장치(901)는 제 1 네트워크(998)(예: 근거리 무선 통신 네트워크)를 통하여 전자 장치(902)와 통신하거나, 또는 제 2 네트워크(999)(예: 원거리 무선 통신 네트워크)를 통하여 전자 장치(904) 또는 서버(908) 중 적어도 하나와 통신할 수 있다. 일실시예에 따르면, 전자 장치(901)는 서버(908)를 통하여 전자 장치(904)와 통신할 수 있다. 일실시예에 따르면, 전자 장치(901)는 프로세서(920), 메모리(930), 입력 모듈(950), 음향 출력 모듈(955), 디스플레이 모듈(960), 오디오 모듈(970), 센서 모듈(976), 인터페이스(977), 연결 단자(978), 햅틱 모듈(979), 카메라 모듈(980), 전력 관리 모듈(988), 배터리(989), 통신 모듈(990), 가입자 식별 모듈(996), 또는 안테나 모듈(997)을 포함할 수 있다. 어떤 실시예에서는, 전자 장치(901)에는, 이 구성요소들 중 적어도 하나(예: 연결 단자(978))가 생략되거나, 하나 이상의 다른 구성요소가 추가될 수 있다. 어떤 실시예에서는, 이 구성요소들 중 일부들(예: 센서 모듈(976), 카메라 모듈(980), 또는 안테나 모듈(997))은 하나의 구성요소(예: 디스플레이 모듈(960))로 통합될 수 있다.
프로세서(920)는, 예를 들면, 소프트웨어(예: 프로그램(940))를 실행하여 프로세서(920)에 연결된 전자 장치(901)의 적어도 하나의 다른 구성요소(예: 하드웨어 또는 소프트웨어 구성요소)를 제어할 수 있고, 다양한 데이터 처리 또는 연산을 수행할 수 있다. 일실시예에 따르면, 데이터 처리 또는 연산의 적어도 일부로서, 프로세서(920)는 다른 구성요소(예: 센서 모듈(976) 또는 통신 모듈(990))로부터 수신된 명령 또는 데이터를 휘발성 메모리(932)에 저장하고, 휘발성 메모리(932)에 저장된 명령 또는 데이터를 처리하고, 결과 데이터를 비휘발성 메모리(934)에 저장할 수 있다. 일실시예에 따르면, 프로세서(920)는 메인 프로세서(921)(예: 중앙 처리 장치 또는 어플리케이션 프로세서) 또는 이와는 독립적으로 또는 함께 운영 가능한 보조 프로세서(923)(예: 그래픽 처리 장치, 신경망 처리 장치(NPU: neural processing unit), 이미지 시그널 프로세서, 센서 허브 프로세서, 또는 커뮤니케이션 프로세서)를 포함할 수 있다. 예를 들어, 전자 장치(901)가 메인 프로세서(921) 및 보조 프로세서(923)를 포함하는 경우, 보조 프로세서(923)는 메인 프로세서(921)보다 저전력을 사용하거나, 지정된 기능에 특화되도록 설정될 수 있다. 보조 프로세서(923)는 메인 프로세서(921)와 별개로, 또는 그 일부로서 구현될 수 있다.
보조 프로세서(923)는, 예를 들면, 메인 프로세서(921)가 인액티브(예: 슬립) 상태에 있는 동안 메인 프로세서(921)를 대신하여, 또는 메인 프로세서(921)가 액티브(예: 어플리케이션 실행) 상태에 있는 동안 메인 프로세서(921)와 함께, 전자 장치(901)의 구성요소들 중 적어도 하나의 구성요소(예: 디스플레이 모듈(960), 센서 모듈(976), 또는 통신 모듈(990))와 관련된 기능 또는 상태들의 적어도 일부를 제어할 수 있다. 일실시예에 따르면, 보조 프로세서(923)(예: 이미지 시그널 프로세서 또는 커뮤니케이션 프로세서)는 기능적으로 관련 있는 다른 구성요소(예: 카메라 모듈(980) 또는 통신 모듈(990))의 일부로서 구현될 수 있다. 일실시예에 따르면, 보조 프로세서(923)(예: 신경망 처리 장치)는 인공지능 모델의 처리에 특화된 하드웨어 구조를 포함할 수 있다. 인공지능 모델은 기계 학습을 통해 생성될 수 있다. 이러한 학습은, 예를 들어, 인공지능 모델이 수행되는 전자 장치(901) 자체에서 수행될 수 있고, 별도의 서버(예: 서버(908))를 통해 수행될 수도 있다. 학습 알고리즘은, 예를 들어, 지도형 학습(supervised learning), 비지도형 학습(unsupervised learning), 준지도형 학습(semi-supervised learning) 또는 강화 학습(reinforcement learning)을 포함할 수 있으나, 전술한 예에 한정되지 않는다. 인공지능 모델은, 복수의 인공 신경망 레이어들을 포함할 수 있다. 인공 신경망은 심층 신경망(DNN: deep neural network), CNN(convolutional neural network), RNN(recurrent neural network), RBM(restricted boltzmann machine), DBN(deep belief network), BRDNN(bidirectional recurrent deep neural network), 심층 Q-네트워크(deep Q-networks) 또는 상기 중 둘 이상의 조합 중 하나일 수 있으나, 전술한 예에 한정되지 않는다. 인공지능 모델은 하드웨어 구조 이외에, 추가적으로 또는 대체적으로, 소프트웨어 구조를 포함할 수 있다.
메모리(930)는, 전자 장치(901)의 적어도 하나의 구성요소(예: 프로세서(920) 또는 센서 모듈(976))에 의해 사용되는 다양한 데이터를 저장할 수 있다. 데이터는, 예를 들어, 소프트웨어(예: 프로그램(940)) 및, 이와 관련된 명령에 대한 입력 데이터 또는 출력 데이터를 포함할 수 있다. 메모리(930)는, 휘발성 메모리(932) 또는 비휘발성 메모리(934)를 포함할 수 있다.
프로그램(940)은 메모리(930)에 소프트웨어로서 저장될 수 있으며, 예를 들면, 운영 체제(942), 미들 웨어(944) 또는 어플리케이션(946)을 포함할 수 있다.
입력 모듈(950)은, 전자 장치(901)의 구성요소(예: 프로세서(920))에 사용될 명령 또는 데이터를 전자 장치(901)의 외부(예: 사용자)로부터 수신할 수 있다. 입력 모듈(950)은, 예를 들면, 마이크, 마우스, 키보드, 키(예: 버튼), 또는 디지털 펜(예: 스타일러스 펜)을 포함할 수 있다.
음향 출력 모듈(955)은 음향 신호를 전자 장치(901)의 외부로 출력할 수 있다. 음향 출력 모듈(955)은, 예를 들면, 스피커 또는 리시버를 포함할 수 있다. 스피커는 멀티미디어 재생 또는 녹음 재생과 같이 일반적인 용도로 사용될 수 있다. 리시버는 착신 전화를 수신하기 위해 사용될 수 있다. 일실시예에 따르면, 리시버는 스피커와 별개로, 또는 그 일부로서 구현될 수 있다.
디스플레이 모듈(960)은 전자 장치(901)의 외부(예: 사용자)로 정보를 시각적으로 제공할 수 있다. 디스플레이 모듈(960)은, 예를 들면, 디스플레이, 홀로그램 장치, 또는 프로젝터 및 해당 장치를 제어하기 위한 제어 회로를 포함할 수 있다. 일실시예에 따르면, 디스플레이 모듈(960)은 터치를 감지하도록 설정된 터치 센서, 또는 상기 터치에 의해 발생되는 힘의 세기를 측정하도록 설정된 압력 센서를 포함할 수 있다.
오디오 모듈(970)은 소리를 전기 신호로 변환시키거나, 반대로 전기 신호를 소리로 변환시킬 수 있다. 일실시예에 따르면, 오디오 모듈(970)은, 입력 모듈(950)을 통해 소리를 획득하거나, 음향 출력 모듈(955), 또는 전자 장치(901)와 직접 또는 무선으로 연결된 외부 전자 장치(예: 전자 장치(902))(예: 스피커 또는 헤드폰)를 통해 소리를 출력할 수 있다.
센서 모듈(976)은 전자 장치(901)의 작동 상태(예: 전력 또는 온도), 또는 외부의 환경 상태(예: 사용자 상태)를 감지하고, 감지된 상태에 대응하는 전기 신호 또는 데이터 값을 생성할 수 있다. 일실시예에 따르면, 센서 모듈(976)은, 예를 들면, 제스처 센서, 자이로 센서, 기압 센서, 마그네틱 센서, 가속도 센서, 그립 센서, 근접 센서, 컬러 센서, IR(infrared) 센서, 생체 센서, 온도 센서, 습도 센서, 또는 조도 센서를 포함할 수 있다.
인터페이스(977)는 전자 장치(901)가 외부 전자 장치(예: 전자 장치(902))와 직접 또는 무선으로 연결되기 위해 사용될 수 있는 하나 이상의 지정된 프로토콜들을 지원할 수 있다. 일실시예에 따르면, 인터페이스(977)는, 예를 들면, HDMI(high definition multimedia interface), USB(universal serial bus) 인터페이스, SD카드 인터페이스, 또는 오디오 인터페이스를 포함할 수 있다.
연결 단자(978)는, 그를 통해서 전자 장치(901)가 외부 전자 장치(예: 전자 장치(902))와 물리적으로 연결될 수 있는 커넥터를 포함할 수 있다. 일실시예에 따르면, 연결 단자(978)는, 예를 들면, HDMI 커넥터, USB 커넥터, SD 카드 커넥터, 또는 오디오 커넥터(예: 헤드폰 커넥터)를 포함할 수 있다.
햅틱 모듈(979)은 전기적 신호를 사용자가 촉각 또는 운동 감각을 통해서 인지할 수 있는 기계적인 자극(예: 진동 또는 움직임) 또는 전기적인 자극으로 변환할 수 있다. 일실시예에 따르면, 햅틱 모듈(979)은, 예를 들면, 모터, 압전 소자, 또는 전기 자극 장치를 포함할 수 있다.
카메라 모듈(980)은 정지 영상 및 동영상을 촬영할 수 있다. 일실시예에 따르면, 카메라 모듈(980)은 하나 이상의 렌즈들, 이미지 센서들, 이미지 시그널 프로세서들, 또는 플래시들을 포함할 수 있다.
전력 관리 모듈(988)은 전자 장치(901)에 공급되는 전력을 관리할 수 있다. 일실시예에 따르면, 전력 관리 모듈(988)은, 예를 들면, PMIC(power management integrated circuit)의 적어도 일부로서 구현될 수 있다.
배터리(989)는 전자 장치(901)의 적어도 하나의 구성요소에 전력을 공급할 수 있다. 일실시예에 따르면, 배터리(989)는, 예를 들면, 재충전 불가능한 1차 전지, 재충전 가능한 2차 전지 또는 연료 전지를 포함할 수 있다.
통신 모듈(990)은 전자 장치(901)와 외부 전자 장치(예: 전자 장치(902), 전자 장치(904), 또는 서버(908)) 간의 직접(예: 유선) 통신 채널 또는 무선 통신 채널의 수립, 및 수립된 통신 채널을 통한 통신 수행을 지원할 수 있다. 통신 모듈(990)은 프로세서(920)(예: 어플리케이션 프로세서)와 독립적으로 운영되고, 직접(예: 유선) 통신 또는 무선 통신을 지원하는 하나 이상의 커뮤니케이션 프로세서를 포함할 수 있다. 일실시예에 따르면, 통신 모듈(990)은 무선 통신 모듈(992)(예: 셀룰러 통신 모듈, 근거리 무선 통신 모듈, 또는 GNSS(global navigation satellite system) 통신 모듈) 또는 유선 통신 모듈(994)(예: LAN(local area network) 통신 모듈, 또는 전력선 통신 모듈)을 포함할 수 있다. 이들 통신 모듈 중 해당하는 통신 모듈은 제1 네트워크(998)(예: 블루투스, WiFi(wireless fidelity) direct 또는 IrDA(infrared data association)와 같은 근거리 통신 네트워크) 또는 제 2 네트워크(999)(예: 레거시 셀룰러 네트워크, 5G 네트워크, 차세대 통신 네트워크, 인터넷, 또는 컴퓨터 네트워크(예: LAN 또는 WAN)와 같은 원거리 통신 네트워크)를 통하여 외부의 전자 장치(904)와 통신할 수 있다. 이런 여러 종류의 통신 모듈들은 하나의 구성요소(예: 단일 칩)로 통합되거나, 또는 서로 별도의 복수의 구성요소들(예: 복수 칩들)로 구현될 수 있다. 무선 통신 모듈(992)은 가입자 식별 모듈(996)에 저장된 가입자 정보(예: 국제 모바일 가입자 식별자(IMSI))를 이용하여 제 1 네트워크(998) 또는 제 2 네트워크(999)와 같은 통신 네트워크 내에서 전자 장치(901)를 확인 또는 인증할 수 있다.
무선 통신 모듈(992)은 4G 네트워크 이후의 5G 네트워크 및 차세대 통신 기술, 예를 들어, NR 접속 기술(new radio access technology)을 지원할 수 있다. NR 접속 기술은 고용량 데이터의 고속 전송(eMBB(enhanced mobile broadband)), 단말 전력 최소화와 다수 단말의 접속(mMTC(massive machine type communications)), 또는 고신뢰도와 저지연(URLLC(ultra-reliable and low-latency communications))을 지원할 수 있다. 무선 통신 모듈(992)은, 예를 들어, 높은 데이터 전송률 달성을 위해, 고주파 대역(예: mmWave 대역)을 지원할 수 있다. 무선 통신 모듈(992)은 고주파 대역에서의 성능 확보를 위한 다양한 기술들, 예를 들어, 빔포밍(beamforming), 거대 배열 다중 입출력(massive MIMO(multiple-input and multiple-output)), 전차원 다중입출력(FD-MIMO: full dimensional MIMO), 어레이 안테나(array antenna), 아날로그 빔형성(analog beam-forming), 또는 대규모 안테나(large scale antenna)와 같은 기술들을 지원할 수 있다. 무선 통신 모듈(992)은 전자 장치(901), 외부 전자 장치(예: 전자 장치(904)) 또는 네트워크 시스템(예: 제 2 네트워크(999))에 규정되는 다양한 요구사항을 지원할 수 있다. 일실시예에 따르면, 무선 통신 모듈(992)은 eMBB 실현을 위한 Peak data rate(예: 20Gbps 이상), mMTC 실현을 위한 손실 Coverage(예: 164dB 이하), 또는 URLLC 실현을 위한 U-plane latency(예: 다운링크(DL) 및 업링크(UL) 각각 0.5ms 이하, 또는 라운드 트립 1ms 이하)를 지원할 수 있다.
안테나 모듈(997)은 신호 또는 전력을 외부(예: 외부의 전자 장치)로 송신하거나 외부로부터 수신할 수 있다. 일실시예에 따르면, 안테나 모듈(997)은 서브스트레이트(예: PCB) 위에 형성된 도전체 또는 도전성 패턴으로 이루어진 방사체를 포함하는 안테나를 포함할 수 있다. 일실시예에 따르면, 안테나 모듈(997)은 복수의 안테나들(예: 어레이 안테나)을 포함할 수 있다. 이런 경우, 제 1 네트워크(998) 또는 제 2 네트워크(999)와 같은 통신 네트워크에서 사용되는 통신 방식에 적합한 적어도 하나의 안테나가, 예를 들면, 통신 모듈(990)에 의하여 상기 복수의 안테나들로부터 선택될 수 있다. 신호 또는 전력은 상기 선택된 적어도 하나의 안테나를 통하여 통신 모듈(990)과 외부의 전자 장치 간에 송신되거나 수신될 수 있다. 어떤 실시예에 따르면, 방사체 이외에 다른 부품(예: RFIC(radio frequency integrated circuit))이 추가로 안테나 모듈(997)의 일부로 형성될 수 있다.
다양한 실시예에 따르면, 안테나 모듈(997)은 mmWave 안테나 모듈을 형성할 수 있다. 일실시예에 따르면, mmWave 안테나 모듈은 인쇄 회로 기판, 상기 인쇄 회로 기판의 제 1 면(예: 아래 면)에 또는 그에 인접하여 배치되고 지정된 고주파 대역(예: mmWave 대역)을 지원할 수 있는 RFIC, 및 상기 인쇄 회로 기판의 제 2 면(예: 윗 면 또는 측 면)에 또는 그에 인접하여 배치되고 상기 지정된 고주파 대역의 신호를 송신 또는 수신할 수 있는 복수의 안테나들(예: 어레이 안테나)을 포함할 수 있다.
상기 구성요소들 중 적어도 일부는 주변 기기들간 통신 방식(예: 버스, GPIO(general purpose input and output), SPI(serial peripheral interface), 또는 MIPI(mobile industry processor interface))을 통해 서로 연결되고 신호(예: 명령 또는 데이터)를 상호간에 교환할 수 있다.
일실시예에 따르면, 명령 또는 데이터는 제 2 네트워크(999)에 연결된 서버(908)를 통해서 전자 장치(901)와 외부의 전자 장치(904)간에 송신 또는 수신될 수 있다. 외부의 전자 장치(902, 또는 904) 각각은 전자 장치(901)와 동일한 또는 다른 종류의 장치일 수 있다. 일실시예에 따르면, 전자 장치(901)에서 실행되는 동작들의 전부 또는 일부는 외부의 전자 장치들(902, 904, 또는 908) 중 하나 이상의 외부의 전자 장치들에서 실행될 수 있다. 예를 들면, 전자 장치(901)가 어떤 기능이나 서비스를 자동으로, 또는 사용자 또는 다른 장치로부터의 요청에 반응하여 수행해야 할 경우에, 전자 장치(901)는 기능 또는 서비스를 자체적으로 실행시키는 대신에 또는 추가적으로, 하나 이상의 외부의 전자 장치들에게 그 기능 또는 그 서비스의 적어도 일부를 수행하라고 요청할 수 있다. 상기 요청을 수신한 하나 이상의 외부의 전자 장치들은 요청된 기능 또는 서비스의 적어도 일부, 또는 상기 요청과 관련된 추가 기능 또는 서비스를 실행하고, 그 실행의 결과를 전자 장치(901)로 전달할 수 있다. 전자 장치(901)는 상기 결과를, 그대로 또는 추가적으로 처리하여, 상기 요청에 대한 응답의 적어도 일부로서 제공할 수 있다. 이를 위하여, 예를 들면, 클라우드 컴퓨팅, 분산 컴퓨팅, 모바일 에지 컴퓨팅(MEC: mobile edge computing), 또는 클라이언트-서버 컴퓨팅 기술이 이용될 수 있다. 전자 장치(901)는, 예를 들어, 분산 컴퓨팅 또는 모바일 에지 컴퓨팅을 이용하여 초저지연 서비스를 제공할 수 있다. 다른 실시예에 있어서, 외부의 전자 장치(904)는 IoT(internet of things) 기기를 포함할 수 있다. 서버(908)는 기계 학습 및/또는 신경망을 이용한 지능형 서버일 수 있다. 일실시예에 따르면, 외부의 전자 장치(904) 또는 서버(908)는 제 2 네트워크(999) 내에 포함될 수 있다. 전자 장치(901)는 5G 통신 기술 및 IoT 관련 기술을 기반으로 지능형 서비스(예: 스마트 홈, 스마트 시티, 스마트 카, 또는 헬스 케어)에 적용될 수 있다.
본 문서에 개시된 다양한 실시예들에 따른 전자 장치는 다양한 형태의 장치가 될 수 있다. 전자 장치는, 예를 들면, 휴대용 통신 장치(예: 스마트폰), 컴퓨터 장치, 휴대용 멀티미디어 장치, 휴대용 의료 기기, 카메라, 웨어러블 장치, 또는 가전 장치를 포함할 수 있다. 본 문서의 실시예에 따른 전자 장치는 전술한 기기들에 한정되지 않는다.
본 문서의 다양한 실시예들 및 이에 사용된 용어들은 본 문서에 기재된 기술적 특징들을 특정한 실시예들로 한정하려는 것이 아니며, 해당 실시예의 다양한 변경, 균등물, 또는 대체물을 포함하는 것으로 이해되어야 한다. 도면의 설명과 관련하여, 유사한 또는 관련된 구성요소에 대해서는 유사한 참조 부호가 사용될 수 있다. 아이템에 대응하는 명사의 단수 형은 관련된 문맥상 명백하게 다르게 지시하지 않는 한, 상기 아이템 한 개 또는 복수 개를 포함할 수 있다. 본 문서에서, "A 또는 B", "A 및 B 중 적어도 하나", "A 또는 B 중 적어도 하나", "A, B 또는 C", "A, B 및 C 중 적어도 하나", 및 "A, B, 또는 C 중 적어도 하나"와 같은 문구들 각각은 그 문구들 중 해당하는 문구에 함께 나열된 항목들 중 어느 하나, 또는 그들의 모든 가능한 조합을 포함할 수 있다. "제 1", "제 2", 또는 "첫째" 또는 "둘째"와 같은 용어들은 단순히 해당 구성요소를 다른 해당 구성요소와 구분하기 위해 사용될 수 있으며, 해당 구성요소들을 다른 측면(예: 중요성 또는 순서)에서 한정하지 않는다. 어떤(예: 제 1) 구성요소가 다른(예: 제 2) 구성요소에, "기능적으로" 또는 "통신적으로"라는 용어와 함께 또는 이런 용어 없이, "커플드" 또는 "커넥티드"라고 언급된 경우, 그것은 상기 어떤 구성요소가 상기 다른 구성요소에 직접적으로(예: 유선으로), 무선으로, 또는 제 3 구성요소를 통하여 연결될 수 있다는 것을 의미한다.
본 문서의 다양한 실시예들에서 사용된 용어 "모듈"은 하드웨어, 소프트웨어 또는 펌웨어로 구현된 유닛을 포함할 수 있으며, 예를 들면, 로직, 논리 블록, 부품, 또는 회로와 같은 용어와 상호 호환적으로 사용될 수 있다. 모듈은, 일체로 구성된 부품 또는 하나 또는 그 이상의 기능을 수행하는, 상기 부품의 최소 단위 또는 그 일부가 될 수 있다. 예를 들면, 일실시예에 따르면, 모듈은 ASIC(application-specific integrated circuit)의 형태로 구현될 수 있다.
본 문서의 다양한 실시예들은 기기(machine)(예: 전자 장치(901)) 의해 읽을 수 있는 저장 매체(storage medium)(예: 내장 메모리(936) 또는 외장 메모리(938))에 저장된 하나 이상의 명령어들을 포함하는 소프트웨어(예: 프로그램(940))로서 구현될 수 있다. 예를 들면, 기기(예: 전자 장치(901))의 프로세서(예: 프로세서(920))는, 저장 매체로부터 저장된 하나 이상의 명령어들 중 적어도 하나의 명령을 호출하고, 그것을 실행할 수 있다. 이것은 기기가 상기 호출된 적어도 하나의 명령어에 따라 적어도 하나의 기능을 수행하도록 운영되는 것을 가능하게 한다. 상기 하나 이상의 명령어들은 컴파일러에 의해 생성된 코드 또는 인터프리터에 의해 실행될 수 있는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장 매체는, 비일시적(non-transitory) 저장 매체의 형태로 제공될 수 있다. 여기서, ‘비일시적’은 저장 매체가 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장 매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다.
일실시예에 따르면, 본 문서에 개시된 다양한 실시예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory(CD-ROM))의 형태로 배포되거나, 또는 어플리케이션 스토어(예: 플레이 스토어™)를 통해 또는 두 개의 사용자 장치들(예: 스마트 폰들) 간에 직접, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.
다양한 실시예들에 따르면, 상기 기술한 구성요소들의 각각의 구성요소(예: 모듈 또는 프로그램)는 단수 또는 복수의 개체를 포함할 수 있으며, 복수의 개체 중 일부는 다른 구성요소에 분리 배치될 수도 있다. 다양한 실시예들에 따르면, 전술한 해당 구성요소들 중 하나 이상의 구성요소들 또는 동작들이 생략되거나, 또는 하나 이상의 다른 구성요소들 또는 동작들이 추가될 수 있다. 대체적으로 또는 추가적으로, 복수의 구성요소들(예: 모듈 또는 프로그램)은 하나의 구성요소로 통합될 수 있다. 이런 경우, 통합된 구성요소는 상기 복수의 구성요소들 각각의 구성요소의 하나 이상의 기능들을 상기 통합 이전에 상기 복수의 구성요소들 중 해당 구성요소에 의해 수행되는 것과 동일 또는 유사하게 수행할 수 있다. 다양한 실시예들에 따르면, 모듈, 프로그램 또는 다른 구성요소에 의해 수행되는 동작들은 순차적으로, 병렬적으로, 반복적으로, 또는 휴리스틱하게 실행되거나, 상기 동작들 중 하나 이상이 다른 순서로 실행되거나, 생략되거나, 또는 하나 이상의 다른 동작들이 추가될 수 있다.
도 10는, 다양한 실시예들에 따른, 카메라 모듈(980)을 예시하는 블럭도(1000)이다. 도 10를 참조하면, 카메라 모듈(980)은 렌즈 어셈블리(1010), 플래쉬(1020), 이미지 센서(1030), 이미지 스태빌라이저(1040), 메모리(1050)(예: 버퍼 메모리), 또는 이미지 시그널 프로세서(1060)를 포함할 수 있다. 렌즈 어셈블리(1010)는 이미지 촬영의 대상인 피사체로부터 방출되는 빛을 수집할 수 있다. 렌즈 어셈블리(1010)는 하나 또는 그 이상의 렌즈들을 포함할 수 있다. 일실시예에 따르면, 카메라 모듈(980)은 복수의 렌즈 어셈블리(1010)들을 포함할 수 있다. 이런 경우, 카메라 모듈(980)은, 예를 들면, 듀얼 카메라, 360도 카메라, 또는 구형 카메라(spherical camera)를 형성할 수 있다. 복수의 렌즈 어셈블리(1010)들 중 일부는 동일한 렌즈 속성(예: 화각, 초점 거리, 자동 초점, f 넘버(f number), 또는 광학 줌)을 갖거나, 또는 적어도 하나의 렌즈 어셈블리는 다른 렌즈 어셈블리의 렌즈 속성들과 다른 하나 이상의 렌즈 속성들을 가질 수 있다. 렌즈 어셈블리(1010)는, 예를 들면, 광각 렌즈 또는 망원 렌즈를 포함할 수 있다.
플래쉬(1020)는 피사체로부터 방출 또는 반사되는 빛을 강화하기 위하여 사용되는 빛을 방출할 수 있다. 일실시예에 따르면, 플래쉬(1020)는 하나 이상의 발광 다이오드들(예: RGB(red-green-blue) LED, white LED, infrared LED, 또는 ultraviolet LED), 또는 xenon lamp를 포함할 수 있다. 이미지 센서(1030)는 피사체로부터 방출 또는 반사되어 렌즈 어셈블리(1010) 를 통해 전달된 빛을 전기적인 신호로 변환함으로써, 상기 피사체에 대응하는 이미지를 획득할 수 있다. 일실시예에 따르면, 이미지 센서(1030)는, 예를 들면, RGB 센서, BW(black and white) 센서, IR 센서, 또는 UV 센서와 같이 속성이 다른 이미지 센서들 중 선택된 하나의 이미지 센서, 동일한 속성을 갖는 복수의 이미지 센서들, 또는 다른 속성을 갖는 복수의 이미지 센서들을 포함할 수 있다. 이미지 센서(1030)에 포함된 각각의 이미지 센서는, 예를 들면, CCD(charged coupled device) 센서 또는 CMOS(complementary metal oxide semiconductor) 센서를 이용하여 구현될 수 있다.
이미지 스태빌라이저(1040)는 카메라 모듈(980) 또는 이를 포함하는 전자 장치(901)의 움직임에 반응하여, 렌즈 어셈블리(1010)에 포함된 적어도 하나의 렌즈 또는 이미지 센서(1030)를 특정한 방향으로 움직이거나 이미지 센서(1030)의 동작 특성을 제어(예: 리드 아웃(read-out) 타이밍을 조정 등)할 수 있다. 이는 촬영되는 이미지에 대한 상기 움직임에 의한 부정적인 영향의 적어도 일부를 보상하게 해 준다. 일실시예에 따르면, 이미지 스태빌라이저(1040)는, 일실시예에 따르면, 이미지 스태빌라이저(1040)은 카메라 모듈(980)의 내부 또는 외부에 배치된 자이로 센서(미도시) 또는 가속도 센서(미도시)를 이용하여 카메라 모듈(980) 또는 전자 장치(901)의 그런 움직임을 감지할 수 있다. 일실시예에 따르면, 이미지 스태빌라이저(1040)는, 예를 들면, 광학식 이미지 스태빌라이저로 구현될 수 있다. 메모리(1050)는 이미지 센서(1030)을 통하여 획득된 이미지의 적어도 일부를 다음 이미지 처리 작업을 위하여 적어도 일시 저장할 수 있다. 예를 들어, 셔터에 따른 이미지 획득이 지연되거나, 또는 복수의 이미지들이 고속으로 획득되는 경우, 획득된 원본 이미지(예: Bayer-patterned 이미지 또는 높은 해상도의 이미지)는 메모리(1050)에 저장이 되고, 그에 대응하는 사본 이미지(예: 낮은 해상도의 이미지)는 디스플레이 모듈(960)을 통하여 프리뷰될 수 있다. 이후, 지정된 조건이 만족되면(예: 사용자 입력 또는 시스템 명령) 메모리(1050)에 저장되었던 원본 이미지의 적어도 일부가, 예를 들면, 이미지 시그널 프로세서(1060)에 의해 획득되어 처리될 수 있다. 일실시예에 따르면, 메모리(1050)는 메모리(930)의 적어도 일부로, 또는 이와는 독립적으로 운영되는 별도의 메모리로 구성될 수 있다.
이미지 시그널 프로세서(1060)는 이미지 센서(1030)을 통하여 획득된 이미지 또는 메모리(1050)에 저장된 이미지에 대하여 하나 이상의 이미지 처리들을 수행할 수 있다. 상기 하나 이상의 이미지 처리들은, 예를 들면, 깊이 지도(depth map) 생성, 3차원 모델링, 파노라마 생성, 특징점 추출, 이미지 합성, 또는 이미지 보상(예: 노이즈 감소, 해상도 조정, 밝기 조정, 블러링(blurring), 샤프닝(sharpening), 또는 소프트닝(softening)을 포함할 수 있다. 추가적으로 또는 대체적으로, 이미지 시그널 프로세서(1060)는 카메라 모듈(980)에 포함된 구성 요소들 중 적어도 하나(예: 이미지 센서(1030))에 대한 제어(예: 노출 시간 제어, 또는 리드 아웃 타이밍 제어 등)를 수행할 수 있다. 이미지 시그널 프로세서(1060)에 의해 처리된 이미지는 추가 처리를 위하여 메모리(1050)에 다시 저장되거나 카메라 모듈(980)의 외부 구성 요소(예: 메모리(930), 디스플레이 모듈(960), 전자 장치(902), 전자 장치(904), 또는 서버(908))로 제공될 수 있다. 일실시예에 따르면, 이미지 시그널 프로세서(1060)는 프로세서(920)의 적어도 일부로 구성되거나, 프로세서(920)와 독립적으로 운영되는 별도의 프로세서로 구성될 수 있다. 이미지 시그널 프로세서(1060)이 프로세서(920)과 별도의 프로세서로 구성된 경우, 이미지 시그널 프로세서(1060)에 의해 처리된 적어도 하나의 이미지는 프로세서(920)에 의하여 그대로 또는 추가의 이미지 처리를 거친 후 디스플레이 모듈(960)를 통해 표시될 수 있다.
일실시예에 따르면, 전자 장치(901)는 각각 다른 속성 또는 기능을 가진 복수의 카메라 모듈(980)들을 포함할 수 있다. 이런 경우, 예를 들면, 상기 복수의 카메라 모듈(980)들 중 적어도 하나는 광각 카메라이고, 적어도 다른 하나는 망원 카메라일 수 있다. 유사하게, 상기 복수의 카메라 모듈(980)들 중 적어도 하나는 전면 카메라이고, 적어도 다른 하나는 후면 카메라일 수 있다.

Claims (15)

  1. 전자 장치에 있어서,
    제1 신경망 모델을 저장하는 메모리; 및
    상기 메모리와 작동적으로 연결된 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서는:
    상기 전자 장치의 이미지 처리 속도와 관련된 디바이스 상태 정보를 생성하고,
    상기 디바이스 상태 정보에 기반하여 상기 제1 신경망 모델에 대한 양자화 레벨을 결정하고, 상기 양자화 레벨은 상기 제1 신경망 모델에 대해 양자화를 수행하는 강도에 대한 정보를 포함하며,
    상기 양자화 레벨에 기반하여 상기 제1 신경망 모델에 대한 양자화를 수행함에 따라 제2 신경망 모델을 생성하고,
    상기 제2 신경망 모델을 통해 제1 이미지의 열화를 개선한 제2 이미지를 획득하는 전자 장치.
  2. 청구항 1에 있어서,
    상기 디바이스 상태 정보는 상기 전자 장치의 과부하(overload) 정보, 상기 적어도 하나의 프로세서와 관련된 처리량(Throughput) 정보 중 적어도 하나를 포함하는 전자 장치.
  3. 청구항 1에 있어서,
    상기 적어도 하나의 프로세서는, 상기 디바이스 상태 정보, 상기 제1 신경망 모델의 처리 속도 및 상기 제1 이미지의 열화 개선과 관련된 필수 처리 속도에 기반하여 상기 양자화 레벨을 결정하는 전자 장치.
  4. 청구항 1에 있어서,
    상기 적어도 하나의 프로세서는, 상기 제1 신경망 모델에 포함된 레이어의 가중치, 입력 데이터, 출력 데이터, 또는 내부 처리 비트의 크기 중 적어도 하나를 변경하여 상기 제2 신경망 모델을 생성하는 전자 장치.
  5. 청구항 1에 있어서,
    상기 적어도 하나의 프로세서는,
    상기 양자화 레벨과 지정된 레벨을 비교하고,
    상기 비교 결과에 기반하여, 양자화 처리 정보를 획득하고,
    상기 양자화 처리 정보는 상기 제1 이미지에 대한 열화 개선 방법에 기반하여 생성되는 전자 장치.
  6. 청구항 5에 있어서,
    상기 적어도 하나의 프로세서는,
    상기 양자화 레벨이 상기 지정된 레벨 이상인 경우, 상기 양자화 처리 정보를 획득하고,
    상기 양자화 레벨 및 상기 양자화 처리 정보에 기반하여, 상기 제1 신경망 모델을 양자화한 상기 제2 신경망 모델을 생성하는 전자 장치.
  7. 청구항 5에 있어서,
    상기 적어도 하나의 프로세서는 상기 양자화 처리 정보에 기반하여 상기 제1 이미지의 열화 개선과 관련된 처리 제한 정보를 생성하고, 상기 처리 제한 정보는 상기 제1 이미지에 포함된 열화들의 개선 범위에 대한 정보를 포함하는 전자 장치.
  8. 청구항 7에 있어서,
    상기 적어도 하나의 프로세서는 상기 처리 제한 정보에 기반하여 상기 제2 신경망 모델을 통해 상기 제1 이미지의 열화를 개선한 상기 제2 이미지를 획득하는 전자 장치.
  9. 청구항 5에 있어서,
    상기 적어도 하나의 프로세서는,
    상기 비교 결과에 기반하여, 복수의 보조 이미지들을 획득하고,
    상기 복수의 보조 이미지들을 분석하여 상기 양자화 처리 정보를 생성하고,
    상기 양자화 처리 정보는 상기 복수의 보조 이미지들에 기반하여 결정된 상기 제1 신경망 모델에 포함된 가중치, 입력 데이터, 출력 데이터, 내부 처리 비트 크기 중 적어도 하나와 관련된 정보를 포함하는 전자 장치.
  10. 청구항 1에 있어서,
    상기 전자 장치는 디스플레이를 더 포함하고,
    상기 적어도 하나의 프로세서는, 상기 제1 이미지의 열화를 개선한 상기 제2 이미지를 상기 디스플레이를 통해 표시하는 전자 장치.
  11. 청구항 1에 있어서,
    상기 제1 이미지는 상기 메모리에 저장된 이미지, 상기 전자 장치에 포함된 카메라를 통해 획득된 이미지, 상기 카메라를 통해 획득되는 프리뷰 이미지 중 적어도 하나를 포함하는 전자 장치.
  12. 제1 신경망 모델을 저장하는 메모리를 포함하는 전자 장치의 동작 방법에 있어서,
    상기 전자 장치의 이미지 처리 속도와 관련된 디바이스 상태 정보를 생성하는 동작;
    상기 디바이스 상태 정보에 기반하여 상기 제1 신경망 모델에 대한 양자화 레벨을 결정하는 동작, 상기 양자화 레벨은 상기 제1 신경망 모델에 대해 양자화를 수행하는 강도에 대한 정보를 포함함;
    상기 양자화 레벨에 기반하여 상기 제1 신경망 모델에 대한 양자화를 수행함에 따라 제2 신경망 모델을 생성하는 동작; 및
    상기 제2 신경망 모델을 통해 제1 이미지의 열화를 개선한 제2 이미지를 획득하는 동작을 포함하는 전자 장치의 동작 방법.
  13. 청구항 12에 있어서,
    상기 양자화 레벨을 결정하는 동작은,
    상기 디바이스 상태 정보, 상기 제1 신경망 모델의 처리 속도 및 상기 제1 이미지의 열화 개선과 관련된 필수 처리 속도에 기반하여 상기 양자화 레벨을 결정하는 동작을 더 포함하고,
    상기 디바이스 상태 정보는 상기 전자 장치의 과부하 정보, 상기 전자 장치에 포함된 프로세서와 관련된 처리량 정보 중 적어도 하나를 포함하는 전자 장치의 동작 방법.
  14. 청구항 12에 있어서,
    상기 제2 신경망 모델을 생성하는 동작은,
    상기 제1 신경망 모델에 포함된 레이어의 가중치, 입력, 출력, 또는 내부 처리 비트의 크기 중 적어도 하나를 변경하는 동작을 더 포함하는 전자 장치의 동작 방법.
  15. 적어도 하나의 프로그램들을 저장하는 비일시적 컴퓨터 판독가능 저장 매체로서, 상기 하나 이상의 프로그램들은, 전자 장치의 하나 이상의 프로세서들에 의해 실행될 때, 상기 전자 장치로 하여금;
    상기 전자 장치의 이미지 처리 속도와 관련된 디바이스 상태 정보를 생성하고;
    상기 디바이스 상태 정보에 기반하여 제1 신경망 모델에 대한 양자화 레벨을 결정하고, 상기 양자화 레벨은 상기 제1 신경망 모델에 대해 양자화를 수행하는 강도에 대한 정보를 포함하며;
    상기 양자화 레벨에 기반하여 상기 제1 신경망 모델에 대한 양자화를 수행함에 따라 제2 신경망 모델을 생성하고;
    상기 제2 신경망 모델을 통해 제1 이미지의 열화를 개선한 제2 이미지를 획득하게 하는 명령어들을 포함하는, 비일시적 컴퓨터 판독가능 저장 매체.
PCT/KR2023/012115 2022-08-22 2023-08-16 신경망을 통해 이미지를 처리하는 방법 및 그 전자 장치 WO2024043604A1 (ko)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR10-2022-0104564 2022-08-22
KR20220104564 2022-08-22
KR1020220122524A KR20240026816A (ko) 2022-08-22 2022-09-27 신경망을 통해 이미지를 처리하는 방법 및 그 전자 장치
KR10-2022-0122524 2022-09-27

Publications (1)

Publication Number Publication Date
WO2024043604A1 true WO2024043604A1 (ko) 2024-02-29

Family

ID=90013577

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2023/012115 WO2024043604A1 (ko) 2022-08-22 2023-08-16 신경망을 통해 이미지를 처리하는 방법 및 그 전자 장치

Country Status (1)

Country Link
WO (1) WO2024043604A1 (ko)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101821285B1 (ko) * 2016-08-05 2018-01-23 한국과학기술원 열화상 이미지 개선 장치 및 방법
CN113112009A (zh) * 2020-01-13 2021-07-13 中科寒武纪科技股份有限公司 用于神经网络数据量化的方法、装置和计算机可读存储介质
CN113422876A (zh) * 2021-06-24 2021-09-21 广西电网有限责任公司 基于ai的电力客服中心辅助管理方法、系统及介质
KR20220027436A (ko) * 2020-08-27 2022-03-08 한국전자기술연구원 송신, 수신 장치 및 방법

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101821285B1 (ko) * 2016-08-05 2018-01-23 한국과학기술원 열화상 이미지 개선 장치 및 방법
CN113112009A (zh) * 2020-01-13 2021-07-13 中科寒武纪科技股份有限公司 用于神经网络数据量化的方法、装置和计算机可读存储介质
KR20220027436A (ko) * 2020-08-27 2022-03-08 한국전자기술연구원 송신, 수신 장치 및 방법
CN113422876A (zh) * 2021-06-24 2021-09-21 广西电网有限责任公司 基于ai的电力客服中心辅助管理方法、系统及介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WANG KUAN; LIU ZHIJIAN; LIN YUJUN; LIN JI; HAN SONG: "HAQ: Hardware-Aware Automated Quantization With Mixed Precision", 2019 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR), IEEE, 15 June 2019 (2019-06-15), pages 8604 - 8612, XP033687500, DOI: 10.1109/CVPR.2019.00881 *

Similar Documents

Publication Publication Date Title
WO2021086040A1 (en) Method for providing preview and electronic device for displaying preview
WO2022114801A1 (ko) 복수의 카메라를 포함하는 전자 장치 및 그 전자 장치의 제어 방법
WO2022108235A1 (ko) 슬로우 셔터를 제공하기 위한 방법, 장치 및 저장 매체
WO2022235075A1 (ko) 전자 장치 및 전자 장치의 동작 방법
WO2022149812A1 (ko) 카메라 모듈을 포함하는 전자 장치 및 그 전자 장치의 동작 방법
WO2022244970A1 (ko) 전자 장치의 촬영 방법 및 그 전자 장치
WO2024043604A1 (ko) 신경망을 통해 이미지를 처리하는 방법 및 그 전자 장치
WO2023277585A1 (ko) 신경망을 통해 이미지를 처리하는 방법 및 그 전자 장치
WO2022203175A1 (ko) 전자 장치 및 최대 양자화 값 가감을 통한 인코딩 방법
WO2022245148A1 (ko) 이미지 처리 방법 및 그 전자 장치
WO2024106746A1 (ko) 디지털 보케 이미지의 해상도를 높이기 위한 전자 장치 및 방법
WO2022203355A1 (ko) 복수의 카메라들을 포함하는 전자 장치
WO2023033396A1 (ko) 연속된 촬영 입력을 처리하는 전자 장치 및 그의 동작 방법
WO2023054913A1 (ko) 포스 터치를 확인하는 전자 장치와 이의 동작 방법
WO2022231270A1 (ko) 전자 장치 및 그의 이미지 처리 방법
WO2024122913A1 (ko) 기계 학습 모델을 이용하여 영상을 획득하는 전자 장치 및 그 동작 방법
WO2023075112A1 (ko) 촬영 시 흔들림을 보정하는 방법 및 그 전자 장치
WO2024111795A1 (ko) 이미지 프레임들 내에서 피사체를 크롭하기 위한 전자 장치 및 그 방법
WO2023013894A1 (ko) 촬영된 영상에 시각 효과를 적용하고 태그를 설정하는 방법 및 장치
WO2022031050A1 (ko) 이미지를 생성하는 전자 장치 및 방법
WO2022186495A1 (ko) 복수의 렌즈들을 구비하는 전자 장치 및 그 제어 방법
WO2022196916A1 (ko) 사용자 인증을 위한 방법, 장치 및 저장 매체
WO2024080767A1 (ko) 카메라를 이용하여 영상을 획득하는 전자 장치 및 그 동작 방법
WO2022220590A1 (ko) 영상을 처리하는 방법 및 이를 수행하는 전자 장치
WO2022240186A1 (ko) 이미지 왜곡을 보정하는 방법 및 그 전자 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23857638

Country of ref document: EP

Kind code of ref document: A1