WO2023149649A1 - 전자 장치 및 이미지 화질 개선 방법 - Google Patents

전자 장치 및 이미지 화질 개선 방법 Download PDF

Info

Publication number
WO2023149649A1
WO2023149649A1 PCT/KR2022/020254 KR2022020254W WO2023149649A1 WO 2023149649 A1 WO2023149649 A1 WO 2023149649A1 KR 2022020254 W KR2022020254 W KR 2022020254W WO 2023149649 A1 WO2023149649 A1 WO 2023149649A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
electronic device
input image
face
quality
Prior art date
Application number
PCT/KR2022/020254
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 KR1020220165095A external-priority patent/KR20230119589A/ko
Application filed by 삼성전자 주식회사 filed Critical 삼성전자 주식회사
Publication of WO2023149649A1 publication Critical patent/WO2023149649A1/ko

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/98Detection or correction of errors, e.g. by rescanning the pattern or by human intervention; Evaluation of the quality of the acquired patterns
    • G06V10/993Evaluation of the quality of the acquired pattern
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions

Definitions

  • the technical spirit of the present disclosure relates to an electronic device, and more particularly, to a method of improving image quality using an electronic device.
  • An artificial intelligence (AI) system is a computer system that implements human-level intelligence, and unlike existing rule-based smart systems, a machine learns and judges itself and derives a desired result or performs a desired action.
  • AI artificial intelligence
  • Existing rule-based smart systems are gradually being replaced by deep learning-based AI systems.
  • Machine learning is an algorithm technology that classifies/learns the characteristics of input data by itself, and consists of technical fields such as linguistic understanding, visual understanding, reasoning/prediction, knowledge expression, and motion control by utilizing machine learning algorithms such as deep learning. do.
  • the elemental technologies for implementing artificial intelligence technology are linguistic understanding technology that recognizes human language/characters, visual understanding technology that recognizes objects as human eyes, and reasoning/prediction technology that logically infers and predicts information by judging information. , at least one of knowledge expression technology for processing human experience information into knowledge data and motion control technology for controlling autonomous vehicle driving and robot movement.
  • An electronic device for improving the quality of an input image including a memory in which at least one instruction is stored, and at least one processor, wherein the at least one processor executes the at least one instruction To calculate the degree of degradation of the input image, detect at least one face image included in the input image in response to determining that the degree of degradation of the input image is greater than a predetermined value, and in the at least one face image Area information indicating the location and type of at least one included area is generated, and an artificial neural network (ANN) using the input image and the area information as inputs is used to generate a face image with improved quality. and generating an output image by synthesizing the face image with improved image quality and the input image.
  • ANN artificial neural network
  • the at least one processor may perform at least one deterioration indicating image quality of each of the at least one face image based on characteristic information including color information and noise information of the input image.
  • a degree of degradation may be calculated, and it may be determined whether the image quality of the input image needs to be improved based on the calculated degree of degradation.
  • the at least one processor calculates that the ratio of the sum of the at least one degree of degradation to the total number of the at least one face image is greater than a predetermined value, in response to calculating, It may be determined that the quality of the input image needs to be improved.
  • the at least one processor may determine that the face image corresponding to the degree of degradation needs to be improved in response to determining that the degree of degradation is greater than a predetermined value.
  • the at least one processor determines the quality of the input image when the ratio of the number of face images determined to require image quality improvement to the total number of the at least one face image is greater than a predetermined value. You may decide that improvement is needed.
  • the at least one processor generates array data having the same size as color data including RGB information of each pixel of the input image and all elements having a value of 0; Region information may be generated by assigning a value of 1 to at least one element of the array data corresponding to at least one region included in the face image.
  • the at least one processor determines the type of at least one region of the face image, and generates array data having the same size as the color data and all elements having a value of 0. and generating region information by assigning a value indicating the type of the determined at least one region to at least one element of the array data corresponding to at least one region included in the face image.
  • the at least one processor generates region information indicating at least one of an outline of at least one region included in the at least one face image and an inside of the at least one region. can do.
  • the at least one processor detects a background image excluding the at least one face image from the input image, and a combination ratio of the face image and the background image having improved quality. is determined, and based on the synthesis ratio, an output image may be generated by synthesizing the face image with improved image quality and the background image.
  • the at least one processor may determine the synthesis ratio based on a user input.
  • the color data may include information about R, G, and B of each pixel of the input image.
  • the at least one processor obtains a ground truth (GT) image, generates a test image by adding noise to the GT image, and converts the test image into an adversarial image having a predetermined weight.
  • GT ground truth
  • the at least one processor calculates a total variance (TV) value of a chroma channel of the color domain-converted output image, and the TV value of the chroma channel is The weight may be changed in response to confirming that it is greater than a predetermined value.
  • TV total variance
  • the degree of degradation of the input image is calculated, and the degree of degradation of the input image is determined to be greater than a predetermined value
  • an operation of detecting at least one face image included in the input image, an operation of generating region information indicating the position and type of at least one region included in the at least one face image, the input image and An operation of generating a face image with improved quality by using an Artificial Neural Network (ANN) that takes the area information as an input, and generating an output image by synthesizing the face image with improved quality and the input image action may be included.
  • ANN Artificial Neural Network
  • the operation of generating the output image may include at least one of indicating a quality of each of the at least one face image based on characteristic information including color information and noise information of the input image.
  • the calculated degree of deterioration it may include an operation of determining whether the image quality of the input image needs to be improved.
  • the operation of generating the area information generates array data having the same size as color data including RGB information of each pixel of the input image and all elements having values of 0; , generating region information by assigning a value of 1 to at least one element of the array data corresponding to at least one region included in the face image.
  • the operation of generating the region information determines the type of at least one region of the face image, has the same size as the color data, and has an array in which all element values are 0.
  • generating data and generating region information by assigning a value indicating the type of the determined at least one region to at least one element of the array data corresponding to at least one region included in the face image; can include more.
  • the operation of generating the output image may include an operation of detecting a background image excluding the at least one face image from the input image, and an operation of detecting the face image and the background image having improved quality.
  • An operation of generating an output image by synthesizing may be further included.
  • an operation of acquiring a ground truth (GT) image, an operation of generating a test image by adding noise to the GT image, and inputting the test image into an adversarial generation neural network having a predetermined weight Obtaining an output image, converting color domains of the output image and the test image, calculating pixel-wise errors of the color domain-converted output image and the test image, the pixel
  • An operation of changing the weight based on a wise error may be further included.
  • FIG. 1 is a flowchart of a method of improving the quality of a deteriorated image by an electronic device according to an embodiment of the present disclosure.
  • FIG. 2 is a flowchart illustrating a process of determining an input image as a deteriorated image by an electronic device according to an embodiment of the present disclosure.
  • 3A and 3B are diagrams for explaining a method for an electronic device to receive a degraded image and output an image with improved quality, according to an embodiment of the present disclosure.
  • FIG. 4 is a diagram for explaining a method of synthesizing a face area and a background area by an electronic device according to an embodiment of the present disclosure.
  • FIG. 5 is a diagram for explaining an embodiment of region information generated by an electronic device according to an embodiment of the present disclosure.
  • FIG. 6 is a diagram for explaining an embodiment of region information generated by an electronic device according to an embodiment of the present disclosure.
  • FIG. 7 is a block diagram of an electronic device for improving the quality of a deteriorated image according to an embodiment of the present disclosure.
  • FIG. 8 is a diagram illustrating a classification network according to an embodiment of the present disclosure.
  • FIG. 9 is a diagram for explaining a method of outputting a color loss image by an electronic device according to an embodiment of the present disclosure.
  • FIG. 10 is a diagram for explaining an embodiment in which an electronic device adjusts a ratio of combining a face image and a background image with improved image quality according to an embodiment of the present disclosure.
  • FIG. 11 is a diagram for explaining a method of improving image quality by using a second input image by an electronic device according to an embodiment of the present disclosure.
  • An electronic device may include a processor, an artificial neural network module, and a memory.
  • the artificial neural network module may perform neural network calculations such as neural network model inference and/or pattern matching functions using locally collected data.
  • the artificial neural network module may be a chip for efficiently performing an AI algorithm.
  • Artificial intelligence accelerators include, for example, Central Processing Units (CPUs), Graphics Processing Units (GPUs), Field-Programmable Gate Arrays (FPGAs), System-on-Chips (SoCs), Application-Specific Integrated Circuits (ASICs), and VPCs. (Vision Processing Units), neuromorphic ICs, and the like, but are not limited thereto.
  • the memory may temporarily or permanently store various data, including volatile memory and non-volatile memory.
  • the memory may store various instructions that may be executed by the processor. These instructions may include control instructions such as arithmetic and logical operations, data movement, input/output, and the like that can be recognized by the processor.
  • the processor may, for example, execute software to control at least one other component (eg, hardware or software component) of an electronic device connected to the processor, and may perform various data processing or calculations.
  • the processor stores instructions or data received from other components in volatile memory, processes the instructions or data stored in volatile memory, and transfers the resulting data to non-volatile memory.
  • the processor may include a main processor (eg, a central processing unit or an application processor) or an auxiliary processor (eg, a graphic processing unit, a neural processing unit (NPU)) that may operate independently of or together with the main processor, an image signal processor, sensor hub processor, or communication processor).
  • the processor may be an embedded CPU or an application processor capable of outputting peripheral component interconnect express (PCIe) signals.
  • PCIe peripheral component interconnect express
  • the processor is operatively, functionally, and/or electrically connected to each component of the electronic device (eg, an artificial neural network module and a memory), and is connected to each component. It may be a component capable of performing calculations or data processing related to control and/or communication of elements.
  • FIG. 1 is a flowchart of a method of improving the quality of a deteriorated image by an electronic device according to an embodiment of the present disclosure.
  • the electronic device may obtain an input image.
  • the electronic device may determine whether the acquired input image is a deteriorated image. When it is determined that the acquired input image is a deteriorated image, the electronic device may generate region information of at least one face image included in the input image.
  • the electronic device may generate a face image with improved image quality by using the generated area information.
  • the electronic device may generate an output image by synthesizing a face image with improved image quality and an input image.
  • the electronic device may obtain an input image.
  • the electronic device may obtain an input image by taking a picture using a camera.
  • An input image acquired by the electronic device may be a photograph of a deteriorated picture.
  • a deteriorated photo means that the photo is damaged through physical/chemical damage.
  • the user in order to restore the image of the degraded photo, the user may acquire the degraded image by taking a degraded photo using an electronic device.
  • the electronic device may acquire a degraded image through excessive compression or downsizing. For example, even in the digital state, excessive compression or downsizing can degrade an image.
  • the input image that can be acquired by the electronic device may be data in the form of an array of a predetermined size (eg, 512X512px), and each element of the array includes RGB information (eg, Red value, Green value, Blue value) can include
  • RGB information eg, Red value, Green value, Blue value
  • Array data refers to a data structure that is composed of a predetermined number of columns and rows and contains data for each element where each column and row meet.
  • the input image and region information may be expressed as array data having 512 rows and 512 columns and consisting of 512*512 elements.
  • each element of the array data of the input image may include a color code corresponding to RGB information.
  • the data of the input image may include red, green, and blue values assigned to each pixel, or color codes corresponding to the red, green, and blue values assigned to each pixel.
  • the input image may include at least one face (or person) image.
  • the face image may include the entire face of the person or at least a part of the face.
  • the electronic device may determine whether the input image is a deteriorated image. In an embodiment, since an unintended error may occur when a non-degraded image is input to the image quality improvement algorithm, whether the image is deteriorated or not is determined prior to the image quality improvement process. For example, since the electronic device performs an operation for improving the quality of a deteriorated image, the quality improvement process is not performed when a non-degraded image is acquired.
  • the electronic device may analyze at least one face image included in the input image to determine whether the image quality needs to be improved because the input image is a deteriorated image.
  • the electronic device may calculate a degree of degradation of at least one face image included in the input image in order to determine whether the input image is a deteriorated image.
  • the degree of degradation may indicate a degree of deterioration of the image quality of the face image. Accordingly, the higher the degree of degradation, the higher the need for image quality improvement.
  • the electronic device may perform image processing on the input image to obtain image characteristic information including whether light fading is included in the input image and noise information of the input image.
  • the electronic device may determine whether the input image is a deteriorated image by using the acquired characteristic information and classification network.
  • the classification network may be an Old/New 2-class classifier that classifies an input image into two types.
  • the classification network may include a Visual Geometry Group Network (VGGNet) including a plurality of layers.
  • VGGNet Visual Geometry Group Network
  • the VGG network is a main model of the CNN algorithm that increases the depth of the network, and can have various numbers (eg, 11, 13, 16, 19) of layers.
  • Electronic devices can better extract features of images and classify images with high accuracy by using a VGG network in which the kernel size is fixed to 3x3, which is the minimum unit, and the number of convolution operations is increased.
  • the electronic device may determine whether an input image is a deteriorated image by using a VGG network.
  • the electronic device may separately calculate the degree of degradation for each face image included in the input image. For example, when the input image includes a first face image, a second face image, and a third face image, the electronic device determines the first degree of degradation corresponding to the first face image and the second face image corresponding to the second face image. The second degree of degradation and the third degree of degradation corresponding to the third face image may be respectively calculated. For example, when the first face image is deteriorated more than the second face image and the second face image is more deteriorated than the third face image, the first degree of degradation calculated by the electronic device is higher than the second degree of degradation, and The degree of deterioration may be higher than the third degree of deterioration.
  • the electronic device may calculate the degree of deterioration with various values depending on the calculation method, but hereinafter, for convenience, the degree of deterioration will be described as having a value between 0 and 1.
  • the electronic device may determine whether the quality of the input image needs to be improved based on the calculated degree of deterioration of each face image.
  • the electronic device may determine whether the quality of an input image needs to be improved by using various logics. For example, the electronic device may determine whether the quality of an input image needs to be improved by using the Old/New 2-class classifier.
  • the Old/New 2-class classifier may determine the input image as a degraded image (Old) or a normal image (New) based on the degree of deterioration of at least one face image included in the input image.
  • the electronic device may determine the input image as the degraded image.
  • the degraded face image may refer to a face image determined to be degraded among the face images included in the input image.
  • the electronic device may determine at least some of the face images included in the input image as degraded face images in various ways.
  • the electronic device may determine the corresponding face image as a degraded face image. For example, when the first and second degrees of degradation are greater than the predetermined value and the third degree of degradation is less than the predetermined value, the electronic device may determine the first facial image and the second facial image as the degraded facial images. . Since the number of degraded face images is greater than half of the total number of face images, the electronic device may determine the input image as the degraded image. Conversely, when only the first degree of degradation is greater than the predetermined value and the second degree of degradation and the third degree of degradation are less than the predetermined value, the electronic device may determine only the first face image as the deteriorated face image. Since the number of degraded face images is less than half of the total number of face images, the electronic device may determine that the input image is not a degraded image.
  • the electronic device may determine whether the input image is a deteriorated image based on the total sum of the calculated degrees of degradation. For example, the electronic device may determine the input image as a degraded image when the total sum of the calculated degrees of degradation is greater than half of the number of face images included in the input image.
  • the electronic device may determine whether an input image is a deteriorated image by combining various conditions. For example, the electronic device simultaneously sets a condition in which the number of degraded face images is greater than half of the total number of face images and a condition in which the total sum of the calculated deterioration degrees is greater than half of the number of face images included in the input image. If satisfied, the input image may be determined as a degraded image. Conditions for determining the input image as the degraded image by the electronic device are not limited to those described above, and may be determined as the degraded image in various ways based on the degree of deterioration of each face image included in the input image.
  • the electronic device may generate region information including information about at least one face image included in the input image.
  • the area information is array data having the same size (eg, 512X512px) as the input image, and includes at least one body part (eg, eyes, eyebrows, nose, mouth, ears, chin, head) and information about the region and its contour.
  • the area information may indicate types and locations of body parts included in the face image.
  • the electronic device may generate region information by assigning a predetermined value to each pixel of array data corresponding to the contour of a body part included in a face image.
  • the electronic device generates region information by assigning a value of 1 to each element corresponding to the contours of the eyes, nose, mouth, ear, and chin of the input image and assigning a value of 0 to the remaining elements in the array data.
  • Region information generated in the above manner can be used to improve the image quality of a face by indicating the outline of the area where each body part is located in the face image.
  • the electronic device may generate region information by assigning a predetermined value to each pixel of the array data corresponding to the contour of the body part included in the face image and the inside thereof. For example, in the array data, the electronic device assigns a value determined for each body part to the contours of the eyes, nose, mouth, ears, and chin of the input image and each element corresponding to the inside thereof, and assigns a value of 0 to the remaining elements. area information can be created.
  • a method of generating region information by the electronic device is not limited thereto. A method for generating region information by an electronic device will be described in detail with reference to FIGS. 5 and 6 later.
  • the electronic device may generate a face image with improved image quality using the region information generated in operation 120.
  • the electronic device may generate a face image with improved image quality by inputting RGB values and area information of each pixel of the input image to the artificial neural network. Since the electronic device can determine the region in which each body part of the face image is included using the region information, it can create a face image with improved image quality.
  • the electronic device may generate an output image by synthesizing a face image with improved image quality and an input image.
  • the input image may include a face image and a background image. Since the input image has a data format of a 2D array, the input image may include a face image and a background image. The background image means a part of the input image excluding the face image.
  • the electronic device may generate an output image by combining a face image with improved image quality with a background image. A method of generating an output image by naturally synthesizing a face image with improved image quality with a background image by the electronic device will be described in detail with reference to FIG. 4 later.
  • FIG. 2 is a flowchart illustrating a process of determining an input image as a deteriorated image by an electronic device according to an embodiment of the present disclosure.
  • the electronic device may detect at least one face image from the input image.
  • the input image may include at least one person and/or face.
  • the electronic device may detect at least one face image included in the input image by using a predetermined algorithm.
  • the electronic device may calculate the degree of degradation of each detected face image.
  • the electronic device may calculate the degree of degradation of at least one face image in various ways.
  • the degree of deterioration may indicate the degree to which image quality of each face image needs to be improved.
  • the electronic device may calculate a degree of degradation for each detected face image.
  • the electronic device may determine whether the quality of the input image needs to be improved. Based on the degree of deterioration of each face image calculated in operation 210, the electronic device may determine whether the quality of the input image needs to be improved. For example, if the sum of the deterioration degrees of at least one face image is greater than the value obtained by dividing the total number of face images by half, the electronic device may determine that the quality of the input image needs to be improved. For example, if the number of face images determined to require image quality improvement is greater than a value obtained by dividing the total number of face images by half, the electronic device may determine that image quality of the input image needs improvement.
  • 3A and 3B are diagrams for explaining a method for an electronic device to receive a degraded image and output an image with improved quality, according to an embodiment of the present disclosure.
  • a generative adversarial network may include a generator, a discriminator, and a loss function.
  • GAN is a model in which generators and discriminators compete against each other by improving each other's performance through learning.
  • Each of the generator and discriminator may include at least one layer.
  • a layer may include a filter composed of weight information for extracting features from input data.
  • the generator may be trained to take a Data Set (DS) as an input and output Fake Data (FD).
  • the data set may be a set of data including at least one of image, text, and voice. Fake data may be fake image data, fake text data, or fake voice data.
  • Real Data (RD) DB may include a set of real data.
  • Real data can counter fake data.
  • the real data may be real image data.
  • the discriminator may be trained to determine whether fake data or real data is fake by taking fake data or real data as an input.
  • the loss function may calculate a loss function value based on the discrimination result.
  • Loss function values can be passed to discriminators and generators via backpropagation. Weights of at least one layer included in the discriminator and generator may be updated based on the value of the loss function.
  • the generator may include a plurality of sub-generators according to the type of data set and output data.
  • the first sub generator may be trained to output fake voice data by taking a data set, which is a set of image data, as an input.
  • the second sub generator may be trained to output fake text data by taking a data set, which is a set of image data, as an input.
  • the third sub generator may be trained to output fake voice data by taking a data set, which is a set of image data and text data, as an input.
  • the generator may include the type of data set (eg, a set of data including at least one of image, text, and voice) and output data (eg, fake image data, fake text data, or fake text data). voice data).
  • type of data set eg, a set of data including at least one of image, text, and voice
  • output data eg, fake image data, fake text data, or fake text data. voice data
  • the discriminator may include a plurality of sub discriminators according to the type of output data output by the generator, that is, fake data.
  • the first sub discriminator may be trained to determine whether the fake voice data or the real voice data is fake, by taking fake voice data or real voice data as an input.
  • the second sub discriminator may be trained to determine whether the fake image data or the real image data is fake by taking the fake image data or the real image data as an input.
  • the third sub-discriminator may be trained to determine whether the fake text data or the real text data is fake by taking the fake text data or the real text data as an input.
  • the generator may be learned through the GAN learning process described above.
  • 3A is a diagram for explaining a method of generating an improved face image by compressing and restoring face information using an adversarial generation neural network by an electronic device according to an embodiment.
  • the adversarial generative neural network may include a compression module 310 , a convolution module 320 and a reconstruction module 330 .
  • the number of stages that can be included in the compression module 310 and the restoration module 330 of the adversarial neural network is not limited, but hereinafter, for convenience, it will be described as including three compression stages and restoration stages.
  • the adversarial generative neural network may acquire the degraded image as the input image 300 and compress the input image 300 through several steps.
  • the compression module 310 may include a first compression stage, a second compression stage, and a third compression stage.
  • the adversarial generation neural network may sequentially compress the input image 300 by passing through a plurality of compression stages.
  • the adversarial generative neural network receives the input image 300 in a first compression stage, outputs a first compressed image, receives the first compressed image in a second compression stage, outputs a second compressed image, and outputs a second compressed image.
  • a third compressed image may be output.
  • the adversarial generative neural network may extract semantic information of the input image 300 or the compressed image at each compression stage.
  • the first compression stage extracts the first semantic information of the first compressed image
  • the second compression stage extracts the second semantic information of the second compressed image
  • the third compression stage extracts the third compressed image.
  • Third semantic information may be extracted.
  • Each compression stage may transmit the extracted semantic information to each restoration stage of the restoration module 330 .
  • the third compression stage transmits the third semantic information to the first decompression stage
  • the second compression stage transmits the second semantic information to the second decompression stage
  • the first compression stage transmits the third decompression stage.
  • the first semantic information may be transmitted.
  • the convolution module 320 may transmit a result of performing a convolution operation on the input image 300 to the first restoration stage.
  • the first restoration stage may perform restoration of a compressed image based on a result of performing a convolution operation on the input image 300 .
  • the reconstruction module 330 of the adversarial generative neural network may output an improved image by restoring the compressed image through several steps.
  • the restoration module 330 may include a first restoration stage, a second restoration stage, and a third restoration stage.
  • the adversarial generative neural network may sequentially restore compressed images by going through a plurality of restoration stages.
  • the adversarial generation neural network generates a first restored image by receiving a third compressed image from a first restoration stage, receives the first restored image from a second restoration stage, generates a second restored image, and generates a third compressed image.
  • the restoration stage may generate the output image 340 by receiving the second restoration image.
  • the adversarial generation neural network may reconstruct an image based on semantic information received from each compression stage in each restoration stage. For example, the first restoration stage outputs a first restored image based on the received third semantic information, the second restoration stage outputs a second restored image based on the received second semantic information, and the third restoration stage outputs a second restoration image based on the received second semantic information.
  • the restoration unit may output the output image 340 based on the received first semantic information.
  • FIG. 3B illustrates a process in which an electronic device according to an embodiment of the present disclosure performs quality improvement of an input image 300 by inputting four channels to the algorithm described in FIG. 3A.
  • a description of parts similar to those of the algorithm of FIG. 3A will be omitted.
  • three channels of R value, G value, and B value of the input image 300 may be input to the compression module 310 .
  • the algorithm of FIG. 3B may input 4 channels of R value, G value, B value and area information of the input image 300 .
  • the adversarial generative neural network may generate an output image 340 that is more improved than the algorithm of FIG. 3A using 3-channel information by using 4-channel information.
  • FIG. 4 is a diagram for explaining a method of synthesizing a face area and a background area by an electronic device according to an embodiment of the present disclosure.
  • the electronic device may detect at least one face image in the input image and determine a region of the input image in which the face image is not included as a background image. After performing a quality improvement process on the face image, the electronic device may synthesize the face image whose quality is improved and the background image according to Equation 1 below with respect to the boundary area of the face image.
  • the electronic device has a composition ratio for natural synthesis of a face image and a background image with improved image quality ( ) can be determined.
  • the synthesis ratio may refer to a ratio at which a face image with improved image quality is reflected in an output image. As the synthesis ratio increases, the ratio in which the face image with improved image quality is reflected in the output image may increase, and the ratio in which the background image is reflected may decrease.
  • the electronic device may set the synthesis ratio to decrease towards the boundary of the improved face image in order to naturally process the boundary between the improved face image and the background image. For example, the electronic device may determine an area including the center of the face image with improved image quality as the center area, and determine an area including the edge of the face image as the edge area.
  • the electronic device sets the synthesis ratio to 1 (reflecting the improved face image) in the central area, and decreases the synthesis ratio as it gets closer to the background image in the border area so that the synthesis ratio approaches 0 at the boundary with the background image. You can set (reflect the background image).
  • the speed at which the synthesis ratio decreases toward the boundary of the face is small because the outline of the face is not clear (400). That is, the size of the central area 402 was small and the edge area 404 was wide. Therefore, there is a problem in that the output image has a wide area where the face image and the background image overlap, resulting in artifacts.
  • the electronic device according to the present disclosure can clearly grasp the outline of the face by using the area information, it can increase the rate at which the synthesis rate decreases toward the boundary of the improved face image (410). For example, an output image having a large center area 412 and a narrow edge area 414 may be generated. Accordingly, the electronic device according to the present disclosure may generate an output image in which an overlapping area between a face image with improved image quality and a background image is minimized. The electronic device can naturally synthesize the face image and the background image without artifacts while clearly reflecting the boundary between them.
  • FIG. 5 is a diagram for explaining an embodiment of region information generated by an electronic device according to an embodiment of the present disclosure.
  • the electronic device may generate area information of the input image.
  • Area information of the input image may include information about a body part included in at least one face image included in the input image.
  • Area information that can be generated by the electronic device is not limited to information about body parts and may include information about various objects (eg, background, animals, objects) that may be included in an input image. information about it should be explained.
  • the electronic device may generate face-segmentation information including information on locations and types of body parts included in the face image.
  • the electronic device may recognize at least one body part in the input image in order to generate area information.
  • area information including information about the positions and types of eyebrows 502, eyes 504, nose 506, and mouth 508 included in a face image.
  • the electronic device may generate array data having the same size as the input image and assign a predetermined value to each element of the array data corresponding to an area including the recognized body part.
  • the electronic device may assign different values to each element of the array data according to the type of each body part. For example, the electronic device has 1 for each element of the array data corresponding to the region including the eyebrow 502, 2 for each element of the array data corresponding to the region including the eye 504, and 2 for the nose 506. 3 may be assigned to each element of the array data corresponding to the included area, and 4 may be assigned to each element of the array data corresponding to the area including the mouth 508 .
  • the electronic device may assign 0 to each element of the array data corresponding to a region in which a body part is not recognized.
  • An artificial neural network can recognize the location and type of each body part in a face image by receiving region information.
  • FIG. 6 is a diagram for explaining an embodiment of region information generated by an electronic device according to an embodiment of the present disclosure.
  • the electronic device may generate region information indicating the contour 602 of at least one region of the face image 600 .
  • the electronic device may generate region information indicating the contour 602 of at least one body part included in the face.
  • the electronic device may generate region information by assigning predetermined values to elements corresponding to the contours 602 of the eyebrows, eyes, nose, mouth, and chin in generated array data.
  • the electronic device generates region information by assigning 1 to elements corresponding to the contours 602 of the eyebrows, eyes, nose, mouth, and chin in the array data and assigning 0 to the remaining elements of the array data. can do.
  • the electronic device may arbitrarily generate an overall face contour by extending a chin contour in order to reflect the overall contour of the face in region information. For example, the electronic device may draw a semicircle having diameters of both end points of the chin contour toward the forehead, and may set a combined portion of the drawn semicircle and the chin contour as the overall contour of the face. The electronic device may generate region information by assigning predetermined values to elements corresponding to the overall contour of the face and the contour of the body part inside the face in the data array.
  • the electronic device may input region information generated as described in FIGS. 5 and 6 to an artificial neural network to generate an output image whose image quality is more improved than image quality improvement using only RGB values.
  • FIG. 7 is a block diagram of an electronic device for improving the quality of a deteriorated image according to an embodiment of the present disclosure.
  • an electronic device includes an input unit 700, a deteriorated image detector 710, a face image detector 722, a face image restorer 724, a background restorer 726, and A degraded image processing unit 720 including a region combining unit 728 may be included.
  • the input unit 700 receives an input image.
  • the degraded image detector 710 may determine whether or not the received input image is a degraded image. For example, the degraded image detector 710 performs image processing on the input image to determine whether or not light fading is included in the input image, color distribution information of the input image, noise information of the input image, and the like. Characteristic information of an image may be acquired. The degraded image detector 710 may determine whether the input image is a degraded image based on acquired characteristic information of the input image.
  • the degraded image detector 710 may determine whether the input image is a degraded image by using a classification network (not shown).
  • the classification network will be described in detail with reference to FIG. 8 .
  • FIG. 8 is a diagram illustrating a classification network according to an embodiment of the present disclosure.
  • the classification network 810 may be a 2-class classification model that classifies an input image into two types. For example, it may be a model that classifies an input image as a degraded image or a normal image.
  • the classification network 810 includes a plurality of convolutional layers 812, a plurality of pooling layers 814, and a plurality of fully connected layers. layers, 816).
  • the classification network 810 is not limited thereto and may include various structures.
  • the degraded image processing unit 720 may be implemented as an artificial intelligence algorithm, for example, using an adversarial generative neural network (GAN).
  • GAN adversarial generative neural network
  • the degraded image processor 720 may include a face image detector 722 , a face image restorer 724 , a background restorer 726 , and a region combiner 728 .
  • the face image detector 722 may detect a face region using various algorithms and various models. For example, the face image detector 722 may detect a face region using a Histogram of Oriented Gradient (HoG) based feature detection algorithm. In an embodiment, the face image detector 722 may divide an input image into regions of a certain size and calculate a gradient of pixels for each region. For example, for each region, the face image detector 722 calculates a histogram of directions of pixels having a gradient greater than or equal to a predetermined value among pixels included in one region, and based on the calculated histogram, the corresponding region is It can be determined whether it is a face area. In an embodiment, the face image detector 722 may detect a face region using the classification network 810, but is not limited thereto.
  • HoG Histogram of Oriented Gradient
  • the face image restoration unit 724 performs image processing to restore the image quality of the face region included in the input image using the face restoration model, can be printed out.
  • the background restoration unit 726 may perform image processing for restoring the image quality of a background area other than the face region included in the input image using the background restoration model, and output the background region with the restored image quality.
  • the region synthesizer 728 may combine the face region whose image quality is restored by the face image restorer 724 and the background region whose image quality is restored by the background restorer 726 to obtain a restored image.
  • the input image when the input image is classified as a normal image rather than a deteriorated image in the degraded image detector 710, the input image may not be input to the degraded image processor 720.
  • the degraded image restoration model, the face restoration model, and the background restoration model may include an image processing network having a similar structure, and the image processing network may include one or more networks.
  • FIG. 9 is a diagram for explaining a method of outputting a color loss image by an electronic device according to an embodiment of the present disclosure.
  • unintended color noise may occur in a process of restoring a degraded image by an electronic device.
  • the electronic device may generate the second image 910 by restoring the first image 900, which is a deteriorated image.
  • unintended color noise 912 may appear in the middle of the second image 910 .
  • the electronic device may intentionally cause color loss to generate the third image 920 without color noise 912 .
  • a method for the electronic device to output an image without color noise 912 will be described.
  • the electronic device may learn an adversarial generative neural network to restore a degraded image.
  • the electronic device may determine a weight for at least one node of an adversarial generation neural network in order to effectively reconstruct a degraded image.
  • the electronic device may determine weights of the adversarial generation neural network using a ground truth (GT) image having a very low degradation degree.
  • GT image is an arbitrary image with a very low degree of degradation, and may be real environment data for training and testing output values of an adversarial generation neural network.
  • the electronic device may generate a test image by artificially adding noise to the GT image and input the test image to the adversarial generation neural network.
  • the electronic device compares the output image generated by inputting the test image into the adversarial generative neural network with the original GT image, and calculates pixel-wise errors (e.g., L1 loss, L2 loss) between the output image and the GT image. can be calculated
  • the pixelwise error is a value reflecting the difference between values of the output image and the GT image at each pixel.
  • the L1 loss can be calculated by adding all the differences between the values of the output image and the GT image at each pixel
  • the L2 loss can be calculated by adding all the squares of the difference between the values of the output image and the GT image at each pixel. there is.
  • the electronic device may convert color domains of the output image and the GT image, and calculate a pixelwise error of the color domain-converted output image and the GT image.
  • the electronic device may convert the output image and the GT image, which were originally in RGB format, into a YUV format (or HSV format), and calculate pixelwise errors of the output image and the GT image in the YUV format.
  • the electronic device may calculate a total variation (TV) value of the output image and the GT image.
  • the total variance value is a value representing the color variance of each image, and may be less than a predetermined value in the case of a natural image (eg, GT image).
  • the total variation value may be calculated to be greater than a predetermined value.
  • the electronic device may calculate a total variance value of the color domain-converted output image.
  • the electronic device may calculate a total variation value using information of a chroma channel.
  • the chroma channel is a channel including color information among three channels of an image, and may be a UV channel in the case of a YUV format or an H channel in the case of an HSV format.
  • the electronic device may determine the weight of the adversarial generative neural network based on the calculated pixelwise error and the total variance value.
  • the electronic device may determine (or correct) weights so that pixelwise errors and TV values are reduced.
  • FIG. 10 is a diagram for explaining an embodiment in which an electronic device adjusts a ratio of combining a face image and a background image with improved image quality according to an embodiment of the present disclosure.
  • an electronic device adjusts a ratio of combining a face image and a background image with improved image quality according to an embodiment of the present disclosure.
  • the electronic device may determine a synthesis ratio 1010 for synthesizing a face image and a background image with improved image quality.
  • the region synthesis unit 728 may determine the synthesis ratio 1010 based on a user input.
  • the region combining unit 728 may provide the user interface 1000 to select the combining ratio 1010 and determine the combining ratio 1010 based on a user's touch input to the interface 1000. there is.
  • the region synthesis unit 728 synthesizes a face image and a background image with improved image quality to a synthesis ratio of 0.5 or less. You can create an output image with a ratio.
  • the electronic device may determine the synthesis ratio to be 0.5 even if the optimum value of the synthesis ratio for the synthesis of the face image and the background image with improved image quality is determined to be 0.7.
  • FIG. 11 is a diagram for explaining a method of improving image quality by using a second input image by an electronic device according to an embodiment of the present disclosure. For brevity of description, descriptions overlapping those described in FIGS. 7 and 8 will be omitted.
  • the face image restoration unit 724 may obtain the second input image 1110 .
  • the second input image 1110 is an image different from the input image input through the input unit 700 and may be a different photo of the same person or a different person.
  • the face image restoration unit 724 may restore the face image of the input image by referring to the second input image 1110 .
  • the face image restoration unit 724 may provide the user interface 1100 and obtain a second input image 1110 based on a user input to the user interface 1100 .
  • the face image reconstructor 724 acquires the second input image 1110 before the input image is input to the input unit 700, and generates a face reconstruction model reflecting the second input image 1110. can learn When learning the face restoration model, the face image restoration unit 724 may use a new loss function to restore a face similar to the style of the second input image 1110 .
  • the face image reconstructor 724 may extract features of the face region of the second input image 1110 and calculate a new loss function using Equation 2 below.
  • the facial image reconstructor 724 may use a new loss function to reconstruct the degraded input image in a direction similar to the features or texture of the second input image 1110 .
  • An electronic device for improving the quality of an input image including a memory in which at least one instruction is stored, and at least one processor, wherein the at least one processor executes the at least one instruction To calculate the degree of degradation of the input image, detect at least one face image included in the input image in response to determining that the degree of degradation of the input image is greater than a predetermined value, and in the at least one face image Area information indicating the location and type of at least one included area is generated, and an artificial neural network (ANN) using the input image and the area information as inputs is used to generate a face image with improved quality. and generating an output image by synthesizing the face image with improved image quality and the input image.
  • ANN artificial neural network
  • the at least one processor may perform at least one deterioration indicating image quality of each of the at least one face image based on characteristic information including color information and noise information of the input image.
  • a degree of degradation may be calculated, and it may be determined whether the image quality of the input image needs to be improved based on the calculated degree of degradation.
  • the at least one processor calculates that the ratio of the sum of the at least one degree of degradation to the total number of the at least one face image is greater than a predetermined value, in response to calculating, It may be determined that the quality of the input image needs to be improved.
  • the at least one processor may determine that the face image corresponding to the degree of degradation needs to be improved in response to determining that the degree of degradation is greater than a predetermined value.
  • the at least one processor determines the quality of the input image when the ratio of the number of face images determined to require image quality improvement to the total number of the at least one face image is greater than a predetermined value. You may decide that improvement is needed.
  • the at least one processor generates array data having the same size as color data including RGB information of each pixel of the input image and all elements having a value of 0; Region information may be generated by assigning a value of 1 to at least one element of the array data corresponding to at least one region included in the face image.
  • the at least one processor determines the type of at least one region of the face image, and generates array data having the same size as the color data and all elements having a value of 0. and generating region information by assigning a value indicating the type of the determined at least one region to at least one element of the array data corresponding to at least one region included in the face image.
  • the at least one processor generates region information indicating at least one of an outline of at least one region included in the at least one face image and an inside of the at least one region. can do.
  • the at least one processor detects a background image excluding the at least one face image from the input image, and a combination ratio of the face image and the background image having improved quality. is determined, and based on the synthesis ratio, an output image may be generated by synthesizing the face image with improved image quality and the background image.
  • the at least one processor may determine the synthesis ratio based on a user input.
  • the color data may include information about R, G, and B of each pixel of the input image.
  • the at least one processor obtains a ground truth (GT) image, generates a test image by adding noise to the GT image, and converts the test image into an adversarial image having a predetermined weight.
  • GT ground truth
  • the at least one processor calculates a total variance (TV) value of a chroma channel of the color domain-converted output image, and the TV value of the chroma channel is The weight may be changed in response to confirming that it is greater than a predetermined value.
  • TV total variance
  • the degree of degradation of the input image is calculated, and the degree of degradation of the input image is determined to be greater than a predetermined value
  • an operation of detecting at least one face image included in the input image, an operation of generating region information indicating the position and type of at least one region included in the at least one face image, the input image and An operation of generating a face image with improved quality by using an Artificial Neural Network (ANN) that takes the area information as an input, and generating an output image by synthesizing the face image with improved quality and the input image action may be included.
  • ANN Artificial Neural Network
  • the operation of generating the output image may include at least one of indicating a quality of each of the at least one face image based on characteristic information including color information and noise information of the input image.
  • the calculated degree of deterioration it may include an operation of determining whether the image quality of the input image needs to be improved.
  • the operation of generating the area information generates array data having the same size as color data including RGB information of each pixel of the input image and all elements having values of 0; , generating region information by assigning a value of 1 to at least one element of the array data corresponding to at least one region included in the face image.
  • the operation of generating the region information determines the type of at least one region of the face image, has the same size as the color data, and has an array in which all element values are 0.
  • generating data and generating region information by assigning a value indicating the type of the determined at least one region to at least one element of the array data corresponding to at least one region included in the face image; can include more.
  • the operation of generating the output image may include an operation of detecting a background image excluding the at least one face image from the input image, and an operation of detecting the face image and the background image having improved quality.
  • An operation of generating an output image by synthesizing may be further included.
  • an operation of acquiring a ground truth (GT) image, an operation of generating a test image by adding noise to the GT image, and inputting the test image into an adversarial generation neural network having a predetermined weight Obtaining an output image, converting color domains of the output image and the test image, calculating pixel-wise errors of the color domain-converted output image and the test image, the pixel
  • An operation of changing the weight based on a wise error may be further included.

Landscapes

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

Abstract

본 개시의 기술적 사상에 따른 입력 이미지의 화질을 개선하기 위한 전자 장치에 있어서, 적어도 하나의 인스트럭션이 저장된 메모리, 및 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서는 상기 적어도 하나의 인스트럭션을 실행하여, 상기 입력 이미지의 열화도를 계산하고, 상기 입력 이미지의 열화도가 정해진 값보다 큰 것으로 결정함에 대응하여 상기 입력 이미지에 포함된 적어도 하나의 얼굴 이미지를 검출하고, 상기 적어도 하나의 얼굴 이미지에 포함된 적어도 하나의 영역의 위치 및 종류를 지시하는 영역 정보를 생성하고, 상기 입력 이미지 및 상기 영역 정보를 입력으로 하는 인공 신경망(Artificial Neural Network; ANN)을 이용하여, 화질이 개선된 얼굴 이미지를 생성하고, 및 상기 화질이 개선된 얼굴 이미지 및 상기 입력 이미지를 합성하여 출력 이미지를 생성할 수 있다.

Description

전자 장치 및 이미지 화질 개선 방법
본 개시의 기술적 사상은 전자 장치에 관한 것이며, 더욱 상세하게는, 전자 장치를 이용하여 이미지 화질을 개선하는 방법에 관한 것이다.
인공지능(Artificial Intelligence, AI) 시스템은 인간 수준의 지능을 구현하는 컴퓨터 시스템이며, 기존 Rule 기반 스마트 시스템과 달리 기계가 스스로 학습하고 판단하며 목적하는 결과를 도출하거나 목적하는 동작을 수행하는 시스템이다. 인공지능 시스템은 사용할수록 인식률이 향상되고 사용자 취향을 보다 정확하게 이해할 수 있게 되어, 기존 Rule 기반 스마트 시스템은 점차 딥러닝 기반 인공지능 시스템으로 대체되고 있다.
인공지능 기술은 기계학습(딥러닝) 및 기계학습을 활용한 요소 기술들로 구성된다. 기계학습은 입력 데이터들의 특징을 스스로 분류/학습하는 알고리즘 기술이며, 딥러닝 등의 기계학습 알고리즘을 활용하여, 언어적 이해, 시각적 이해, 추론/예측, 지식 표현, 동작 제어 등의 기술 분야로 구성된다.
인공지능 기술을 구현하기 위한 요소 기술들은, 인간의 언어/문자를 인식하는 언어적 이해 기술, 사물을 인간의 시각처럼 인식하는 시각적 이해 기술, 정보를 판단하여 논리적으로 추론하고 예측하는 추론/예측 기술, 인간의 경험 정보를 지식데이터로 처리하는 지식 표현 기술 및 차량의 자율 주행, 로봇의 움직임을 제어하는 동작 제어 기술 중 적어도 하나를 포함할 수 있다.
한편, 인공 신경망(Artificial Neural Network)을 이용하여 열화된 이미지의 화질을 개선하는 기술의 경우, 인물의 얼굴 부분에 대한 복원이 어려우며, 배경 부분과의 블랜딩(blending)이 부자연스럽게 이루어져 아티팩트(artifact)가 발생할 수 있다. 이에 따라, 얼굴 화질을 효과적으로 향상시키며 배경과 자연스럽게 합성되어 이질감을 느끼지 않을 수 있는 기술이 요구된다.
본 개시의 기술적 사상에 따른 입력 이미지의 화질을 개선하기 위한 전자 장치에 있어서, 적어도 하나의 인스트럭션이 저장된 메모리, 및 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서는 상기 적어도 하나의 인스트럭션을 실행하여, 상기 입력 이미지의 열화도를 계산하고, 상기 입력 이미지의 열화도가 정해진 값보다 큰 것으로 결정함에 대응하여 상기 입력 이미지에 포함된 적어도 하나의 얼굴 이미지를 검출하고, 상기 적어도 하나의 얼굴 이미지에 포함된 적어도 하나의 영역의 위치 및 종류를 지시하는 영역 정보를 생성하고, 상기 입력 이미지 및 상기 영역 정보를 입력으로 하는 인공 신경망(Artificial Neural Network; ANN)을 이용하여, 화질이 개선된 얼굴 이미지를 생성하고, 및 상기 화질이 개선된 얼굴 이미지 및 상기 입력 이미지를 합성하여 출력 이미지를 생성할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, 상기 입력 이미지의 색상 정보 및 노이즈 정보를 포함하는 특성 정보에 기초하여 상기 적어도 하나의 얼굴 이미지 각각의 화질을 지시하는 적어도 하나의 열화도를 계산하고, 및 계산한 상기 적어도 하나의 열화도에 기반하여 상기 입력 이미지의 화질 개선이 필요한지 여부를 결정할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, 상기 적어도 하나의 열화도를 합산한 값과 상기 적어도 하나의 얼굴 이미지의 총 개수의 비율이 정해진 값보다 큰 것으로 계산함에 대응하여, 상기 입력 이미지의 화질 개선이 필요한 것으로 결정할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, 열화도가 정해진 값보다 큰 것으로 결정함에 대응하여, 상기 열화도에 대응하는 얼굴 이미지를 화질 개선이 필요한 것으로 결정할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, 상기 화질 개선이 필요한 것으로 결정한 얼굴 이미지의 수와 상기 적어도 하나의 얼굴 이미지의 총 개수의 비율이 정해진 값보다 크면 상기 입력 이미지의 화질 개선이 필요한 것으로 결정할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, 입력 이미지의 각 픽셀의 RGB 정보를 포함하는 컬러 데이터와 같은 크기를 갖고, 모든 요소의 값이 0인 어레이 데이터를 생성하고, 상기 얼굴 이미지에 포함된 적어도 하나의 영역에 대응하는 상기 어레이 데이터의 적어도 하나의 요소에 1 값을 부여하여 영역 정보를 생성할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, 상기 얼굴 이미지의 적어도 하나의 영역의 종류를 결정하고, 상기 컬러 데이터와 같은 크기를 갖고, 모든 요소의 값이 0인 어레이 데이터를 생성하고, 상기 얼굴 이미지에 포함된 적어도 하나의 영역에 대응하는 상기 어레이 데이터의 적어도 하나의 요소에, 상기 결정한 적어도 하나의 영역의 종류를 지시하는 값을 부여하여 영역 정보를 생성할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, 상기 적어도 하나의 얼굴 이미지에 포함된 적어도 하나의 영역의 윤곽 및 상기 적어도 하나의 영역의 내부 중 적어도 하나를 지시하는 영역 정보를 생성할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, 상기 입력 이미지에서 상기 적어도 하나의 얼굴 이미지를 제외한 배경 이미지를 검출하고, 및 상기 화질이 개선된 얼굴 이미지 및 상기 배경 이미지의 합성 비율을 결정하고, 상기 합성 비율에 기초하여, 상기 화질이 개선된 얼굴 이미지 및 상기 배경이미지를 합성하여 출력 이미지를 생성할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, 상기 합성 비율을 사용자 입력에 기초하여 결정할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 컬러 데이터는, 상기 입력 이미지의 각 픽셀의 R, G, B에 대한 정보를 포함할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, GT(ground truth) 영상을 획득하고, 상기 GT 영상에 노이즈를 추가한 테스트 영상을 생성하고, 상기 테스트 영상을 정해진 웨이트를 갖는 적대적 생성 신경망에 입력하여 출력 영상을 획득하고, 상기 출력 영상 및 상기 테스트 영상의 색상 도메인을 변환하고, 상기 색상 도메인을 변환한 출력 영상 및 테스트 영상의 픽셀와이즈 에러(pixel-wise error)를 계산하고, 상기 픽셀와이즈 에러에 기초하여 상기 웨이트를 변경할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, 상기 색상 도메인을 변환한 출력 영상의 크로마 채널(chroma channel)의 TV(total variance) 값을 계산하고, 상기 크로마 채널의 TV 값이 정해진 값보다 큰 것으로 확인함에 대응하여 상기 웨이트를 변경할 수 있다.
본 개시의 기술적 사상에 따른 입력 이미지의 화질을 개선하기 위한 전자 장치를 이용한 이미지 화질 개선 방법에 있어서, 상기 입력 이미지의 열화도를 계산하고, 상기 입력 이미지의 열화도가 정해진 값보다 큰 것으로 결정함에 대응하여, 상기 입력 이미지에 포함된 적어도 하나의 얼굴 이미지를 검출하는 동작, 상기 적어도 하나의 얼굴 이미지에 포함된 적어도 하나의 영역의 위치 및 종류를 지시하는 영역 정보를 생성하는 동작, 상기 입력 이미지 및 상기 영역 정보를 입력으로 하는 인공 신경망(Artificial Neural Network; ANN)을 이용하여, 화질이 개선된 얼굴 이미지를 생성하는 동작, 및 상기 화질이 개선된 얼굴 이미지 및 상기 입력 이미지를 합성하여 출력 이미지를 생성하는 동작을 포함할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 출력 이미지를 생성하는 동작은, 상기 입력 이미지의 색상 정보 및 노이즈 정보를 포함하는 특성 정보에 기초하여 상기 적어도 하나의 얼굴 이미지 각각의 화질을 지시하는 적어도 하나의 열화도를 계산하는 동작, 및
계산한 적어도 하나의 열화도에 기반하여 상기 입력 이미지의 화질 개선이 필요한지 여부를 결정하는 동작을 포함할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 영역 정보를 생성하는 동작은, 입력 이미지의 각 픽셀의 RGB 정보를 포함하는 컬러 데이터와 같은 크기를 갖고, 모든 요소의 값이 0인 어레이 데이터를 생성하고, 상기 얼굴 이미지에 포함된 적어도 하나의 영역에 대응하는 상기 어레이 데이터의 적어도 하나의 요소에 1 값을 부여하여 영역 정보를 생성하는 동작을 더 포함할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 영역 정보를 생성하는 동작은, 상기 얼굴 이미지의 적어도 하나의 영역의 종류를 결정하고, 상기 컬러 데이터와 같은 크기를 갖고, 모든 요소의 값이 0인 어레이 데이터를 생성하고, 상기 얼굴 이미지에 포함된 적어도 하나의 영역에 대응하는 상기 어레이 데이터의 적어도 하나의 요소에, 상기 결정한 적어도 하나의 영역의 종류를 지시하는 값을 부여하여 영역 정보를 생성하는 동작을 더 포함할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 출력 이미지를 생성하는 동작은, 상기 입력 이미지에서 상기 적어도 하나의 얼굴 이미지를 제외한 배경 이미지를 검출하는 동작, 및 상기 화질이 개선된 얼굴 이미지 및 상기 배경 이미지를 합성하여 출력 이미지를 생성하는 동작을 더 포함할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, GT(ground truth) 영상을 획득하는 동작, 상기 GT 영상에 노이즈를 추가한 테스트 영상을 생성하는 동작, 상기 테스트 영상을 정해진 웨이트를 갖는 적대적 생성 신경망에 입력하여 출력 영상을 획득하는 동작, 상기 출력 영상 및 상기 테스트 영상의 색상 도메인을 변환하는 동작, 상기 색상 도메인을 변환한 출력 영상 및 테스트 영상의 픽셀와이즈 에러(pixel-wise error)를 계산하는 동작, 상기 픽셀와이즈 에러에 기초하여 상기 웨이트를 변경하는 동작을 더 포함할 수 있다.
도 1은 본 개시의 일 실시예에 따른 전자 장치가 열화된 이미지의 화질을 개선하는 방법에 대한 순서도이다.
도 2는 본 개시의 일 실시예에 따른 전자 장치가 입력 이미지를 열화된 이미지로 판단하는 과정을 설명하기 위한 순서도이다.
도 3a 및 도 3b는 본 개시의 일 실시예에 따른 전자 장치가 열화된 이미지를 입력 받아 화질이 개선된 이미지를 출력하는 방법을 설명하기 위한 도면이다.
도 4는 본 개시의 일 실시예에 따른 전자 장치가 얼굴 영역 및 배경 영역을 합성하는 방법을 설명하기 위한 도면이다.
도 5는 본 개시의 일 실시예에 따른 전자 장치가 생성하는 영역 정보에 대한 실시예를 설명하기 위한 도면이다.
도 6은 본 개시의 일 실시예에 따른 전자 장치가 생성하는 영역 정보에 대한 실시예를 설명하기 위한 도면이다.
도 7은 본 개시의 일 실시예에 따른 열화된 이미지의 화질을 개선하는 전자 장치의 블록도이다.
도 8은 본 개시의 일 실시예에 따른 분류 네트워크를 나타내는 도면이다.
도 9는 본 개시의 일 실시예에 따른 전자 장치가 컬러 손실된 이미지를 출력하는 방법을 설명하기 위한 도면이다.
도 10은 본 개시의 일 실시예에 따른 전자 장치가 화질이 개선된 얼굴 이미지 및 배경 이미지를 합성하는 비율을 조절하는 실시예를 설명하기 위한 도면이다.
도 11은 본 개시의 일 실시예에 따른 전자 장치가 제2 입력 이미지를 이용하여 이미지 화질을 개선하는 방법을 설명하기 위한 도면이다.
본 실시예들에서 사용되는 용어는 본 실시예들에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나, 이는 당 분야에 종사하는 기술자의 의도 또는 판례, 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한, 특정한 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 부분에서 상세히 그 의미를 기재할 것이다. 따라서, 본 실시예들에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 실시예들 전반에 걸친 내용을 토대로 정의되어야 한다.
본 실시예들은 다양한 변경을 가할 수 있고 여러 가지 형태를 가질 수 있는바, 일부 실시예들을 도면에 예시하고 상세하게 설명하고자 한다. 그러나, 이는 본 실시예들을 특정한 개시형태에 대해 한정하려는 것이 아니며, 본 실시예들의 사상 및 기술범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 본 명세서에서 사용한 용어들은 단지 실시예들의 설명을 위해 사용된 것으로, 본 실시예들을 한정하려는 의도가 아니다.
본 실시예들에 사용되는 용어들은 다르게 정의되지 않는 한, 본 실시예들이 속하는 기술분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미가 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 실시예들에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않아야 한다.
이하에서는 후술하는 본 발명에 대한 상세한 설명은, 본 발명이 실시될 수 있는 특정 실시예를 예시로서 도시하는 첨부 도면을 참조한다. 이러한 실시예는 당업자가 본 발명을 실시할 수 있기에 충분하도록 상세히 설명된다. 본 발명의 다양한 실시예는 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 본 명세서에 기재되어 있는 특정 형상, 구조 및 특성은 본 발명의 정신과 범위를 벗어나지 않으면서 일 실시예로부터 다른 실시예로 변경되어 구현될 수 있다. 또한, 각각의 실시예 내의 개별 구성요소의 위치 또는 배치도 본 발명의 정신과 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 행하여지는 것이 아니며, 본 발명의 범위는 특허청구범위의 청구항들이 청구하는 범위 및 그와 균등한 모든 범위를 포괄하는 것으로 받아들여져야 한다. 도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 구성요소를 나타낸다. 첨부 도면에 있어서 일부 구성요소는 과장되거나 생략되거나 또는 개략적으로 도시되었으며, 각 구성요소의 크기는 실제 크기를 전적으로 반영하는 것이 아니다. 따라서 본 발명은 첨부한 도면에 그려진 상대적인 크기나 간격에 의해 제한되지 않는다.
이하에서는, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명을 용이하게 실시할 수 있도록 하기 위하여, 본 발명의 여러 실시예에 관하여 첨부된 도면을 참조하여 상세히 설명하기로 한다.
전자 장치는 프로세서, 인공 신경망 모듈 및 메모리를 포함할 수 있다. 인공 신경망 모듈은 로컬에서 수집된 데이터를 이용하여, 신경망 모델의 추론 및/또는 패턴 매칭 기능 등의 신경망 연산을 수행할 수 있다. 인공 신경망 모듈은 AI 알고리즘을 효율적으로 수행하기 위한 칩(chip)일 수 있다. 인공지능 가속기는 예를 들어, CPU(Central Processing Units), GPU(Graphics Processing Units), FPGA(Field-Programmable Gate Arrays), SoC(System-on-Chips), ASIC(Application-Specific Integrated Circuits), VPC(Vision Processing Units), 뉴로모픽 IC 등일 수 있으나, 이에 한정되는 것은 아니다.
다양한 실시예에 따르면, 메모리는 휘발성 메모리 및 비휘발성 메모리를 포함하여, 다양한 데이터들을 일시적 또는 영구적으로 저장할 수 있다. 메모리는 프로세서에서 수행될 수 있는 다양한 인스트럭션(instruction)들을 저장할 수 있다. 이와 같은 인스트럭션들은 프로세서에 의해 인식될 수 있는 산술 및 논리 연산, 데이터 이동, 입출력 등과 같은 제어 명령을 포함할 수 있다.
프로세서는, 예를 들면, 소프트웨어를 실행하여 프로세서에 연결된 전자 장치의 적어도 하나의 다른 구성요소(예: 하드웨어 또는 소프트웨어 구성요소)를 제어할 수 있고, 다양한 데이터 처리 또는 연산을 수행할 수 있다. 일 실시예에 따르면, 데이터 처리 또는 연산의 적어도 일부로서, 프로세서는 다른 구성요소로부터 수신된 명령 또는 데이터를 휘발성 메모리에 저장하고, 휘발성 메모리에 저장된 명령 또는 데이터를 처리하고, 결과 데이터를 비휘발성 메모리에 저장할 수 있다. 일 실시예에 따르면, 프로세서는 메인 프로세서(예: 중앙 처리 장치 또는 어플리케이션 프로세서) 또는 이와는 독립적으로 또는 함께 운영 가능한 보조 프로세서(예: 그래픽 처리 장치, 신경망 처리 장치(NPU: neural processing unit), 이미지 시그널 프로세서, 센서 허브 프로세서, 또는 커뮤니케이션 프로세서)를 포함할 수 있다. 일 실시예에 따르면, 프로세서는 PCIe(peripheral component interconnect express) 신호를 출력할 수 있는 임베디드 CPU(embedded CPU) 또는 어플리케이션 프로세서(application processor)일 수 있다.
다양한 실시예에 따르면, 프로세서는 전자 장치 각 구성요소들(예: 인공 신경망 모듈 및 메모리)과 작동적으로(operatively), 기능적으로(functionally), 및/또는 전기적으로(electrically) 연결되어, 각 구성요소들의 제어 및/또는 통신에 관한 연산이나 데이터 처리를 수행할 수 있는 구성일 수 있다.
프로세서가 전자 장치 상에서 구현할 수 있는 연산 및 데이터 처리 기능에는 한정됨이 없을 것이나, 이하에서는 입력 이미지의 열화된 화질을 개선하는 방법에 대한 다양한 실시예에 대해 설명하기로 한다.
도 1은 본 개시의 일 실시예에 따른 전자 장치가 열화된 이미지의 화질을 개선하는 방법에 대한 순서도이다.
전자 장치는 입력 이미지를 획득할 수 있다. 전자 장치는 획득한 입력 이미지가 열화된 이미지인지 여부를 결정할 수 있다. 획득한 입력 이미지를 열화된 이미지로 결정한 경우, 전자 장치는 입력 이미지에 포함된 적어도 하나의 얼굴 이미지의 영역 정보를 생성할 수 있다. 전자 장치는 생성한 영역 정보를 이용하여 화질이 개선된 얼굴 이미지를 생성할 수 있다. 전자 장치는 화질이 개선된 얼굴 이미지 및 입력 이미지를 합성하여 출력 이미지를 생성할 수 있다. 이하, 전자 장치의 동작에 대하여 상세히 설명하도록 한다.
동작 100에서, 전자 장치는, 입력 이미지를 획득할 수 있다. 일 실시예에서, 전자 장치는 카메라를 이용하여 사진을 촬영하여 입력 이미지를 획득할 수 있다. 전자 장치가 획득한 입력 이미지는 열화된 사진을 촬영한 것일 수 있다. 일 실시예에서, 열화된 사진은 사진이 물리적/화학적 손상을 입어 훼손된 것을 의미한다. 일 실시예에서, 사용자는 열화된 사진의 이미지를 복원하기 위하여, 전자 장치를 이용하여 열화된 사진을 촬영하여 열화된 이미지를 획득 할 수 있다. 일 실시예에 따르면, 전자 장치는 과도한 압축 또는 다운사이징을 거쳐서 열화된 이미지를 획득할 수도 있다. 예를 들어, 디지털 상태에서도 과도한 압축 또는 다운사이징을 거치면 이미지가 열화 될 수 있다.
일 실시예에서, 전자 장치가 획득할 수 있는 입력 이미지는 정해진 크기(예: 512X512px)의 어레이 형태인 데이터일 수 있고, 어레이의 각 요소는 RGB정보 (예: Red 값, Green 값, Blue 값)를 포함할 수 있다. 어레이 데이터는 정해진 개수의 열과 행으로 이루어지고, 각 열과 행이 만나는 요소(element)마다 데이터를 담고 있는 데이터 구조(data structure)를 의미한다. 입력 이미지와 영역 정보는 512개의 행과 512개의 열을 갖고, 512*512개의 요소로 이루어진 어레이 데이터로 표현될 수 있다. 또는, 입력 이미지의 어레이 데이터의 각 요소는 RGB 정보에 대응하는 색상 코드를 포함할 수 있다. 예를 들어, 입력 이미지의 데이터는 각 픽셀에 할당된 Red 값, Green 값, Blue 값을 포함하거나, 또는 각 픽셀에 할당된 Red 값, Green 값, Blue 값에 대응하는 색상 코드를 포함할 수 있다. 입력 이미지는 적어도 하나의 얼굴(또는 인물) 이미지를 포함할 수 있다. 얼굴 이미지는 인물의 얼굴 전체를 포함하거나, 또는 얼굴의 적어도 일부를 포함할 수 있다.
동작 110에서, 전자 장치는 입력 이미지가 열화된 이미지인지 여부를 결정할 수 있다. 일 실시예에서, 열화되지 않은 이미지를 화질 개선 알고리즘에 입력하는 경우 의도하지 않은 오류가 발생할 수 있기 때문에, 화질 개선 프로세스에 앞서 열화된 이미지인지 여부를 결정 한다. 예를 들어, 전자 장치는 열화된 이미지의 화질 개선을 위한 동작을 수행하므로, 열화되지 않은 이미지를 획득한 경우에는 화질 개선 프로세스를 수행하지 않는다.
일 실시예에서, 전자 장치는 입력 이미지에 포함된 적어도 하나의 얼굴 이미지를 분석하여, 입력 이미지가 열화된 이미지이기 때문에 화질 개선이 필요한지 여부를 결정할 수 있다.
일 실시예에서, 전자 장치는 입력 이미지가 열화된 이미지인지 여부를 결정하기 위하여 입력 이미지에 포함된 적어도 하나의 얼굴 이미지에 대한 열화도를 계산할 수 있다. 일 실시예에서, 열화도는 얼굴 이미지의 화질이 떨어진 정도를 나타낼 수 있다. 따라서, 열화도가 높을수록 이미지의 화질 개선이 필요하다는 것을 나타낼 수 있다.
전자 장치는 입력 이미지에 대한 영상 처리를 수행하여, 입력 이미지에 빛 바램이 포함되는지 여부, 입력 이미지의 노이즈 정보를 포함하는 이미지의 특성 정보를 획득할 수 있다. 전자 장치는 획득한 특성 정보 및 분류 네트워크를 이용하여, 입력 이미지가 열화된 이미지인지 아닌지 결정할 수 있다. 분류 네트워크는 입력 이미지를 2가지로 분류하는 Old/New 2-class classifier일 수 있다. 예를 들어, 분류 네트워크는 복수의 레이어를 포함하는 VGG 네트워크(Visual Geometry Group Network; VGGNet)를 포함할 수 있다. VGG 네트워크는 네트워크의 깊이(depth)를 증가시킨 CNN 알고리즘의 주요 모델로, 다양한 수(예: 11, 13, 16, 19)의 레이어를 가질 수 있다. 전자 장치는 커널 사이즈를 최소 단위인 3x3으로 고정하고 컨볼루션 연산의 개수를 늘린 VGG 네트워크를 사용하여 이미지의 특징(feature)을 더 잘 추출할 수 있으며, 높은 정확도로 이미지를 분류할 수 있다. 예를 들어, 전자 장치는 VGG 네트워크를 이용하여, 입력 이미지가 열화된 이미지인지 여부를 결정할 수 있다.
일 실시예에서, 전자 장치는 입력 이미지에 포함된 각 얼굴 이미지에 대하여 열화도를 별도로 계산할 수 있다. 예를 들어, 입력 이미지에 제1 얼굴 이미지, 제2 얼굴 이미지 및 제3 얼굴 이미지가 포함되어 있는 경우, 전자 장치는 제1 얼굴 이미지에 대응하는 제1 열화도, 제2 얼굴 이미지에 대응하는 제2 열화도 및 제3 얼굴 이미지에 대응하는 제3 열화도를 각각 계산할 수 있다. 예를 들어, 제1 얼굴 이미지가 제2 얼굴 이미지보다 열화되었고, 제2 얼굴 이미지가 제3 얼굴 이미지보다 열화된 경우, 전자 장치가 계산한 제1 열화도는 제2 열화도보다 높고, 제2 열화도는 제3 열화도보다 높을 수 있다. 전자 장치는 계산 방식에 따라서 다양한 값으로 열화도를 계산할 수 있으나, 이하에서는 편의상 열화도가 0에서 1 사이의 값을 갖는 것으로 설명한다.
전자 장치는 계산한 각 얼굴 이미지의 열화도에 기반하여 입력 이미지의 화질 개선이 필요한지 여부를 결정할 수 있다. 전자 장치는 다양한 로직을 이용하여 입력 이미지의 화질 개선 필요 여부를 결정할 수 있다. 예를 들어, 전자 장치는 Old/New 2-class classifier를 이용하여 입력 이미지의 화질 개선 필요 여부를 결정할 수 있다. Old/New 2-class classifier는 입력 이미지에 포함된 적어도 하나의 얼굴 이미지의 열화도에 기반하여, 입력 이미지를 열화된 이미지(Old) 또는 일반 이미지(New)로 결정할 수 있다.
일 실시예에 따르면, 전자 장치는 열화된 얼굴 이미지의 개수가 입력 이미지에 포함된 얼굴 이미지의 총 개수의 절반보다 크면, 입력 이미지를 열화된 이미지로 결정할 수 있다. 일 실시예에서, 열화된 얼굴 이미지는 입력 이미지에 포함된 얼굴 이미지 중에서 열화된 것으로 결정한 얼굴 이미지를 의미할 수 있다. 전자 장치는 다양한 방식으로 입력 이미지에 포함된 얼굴 이미지들 중 적어도 일부를 열화된 얼굴 이미지로 결정할 수 있다.
일 실시예에 따르면, 전자 장치는 얼굴 이미지의 열화도가 정해진 값보다 크면 해당 얼굴 이미지를 열화된 얼굴 이미지로 결정할 수 있다. 예를 들어, 제1 열화도 및 제2 열화도는 정해진 값보다 크고 제3 열화도는 정해진 값보다 작은 경우, 전자 장치는 제1 얼굴 이미지 및 제2 얼굴 이미지를 열화된 얼굴 이미지로 결정할 수 있다. 열화된 얼굴 이미지의 개수가 얼굴 이미지의 총 개수의 절반보다 크므로, 전자 장치는 입력 이미지를 열화된 이미지로 결정할 수 있다. 반대로, 제1 열화도만 정해진 값보다 크고 제2 열화도 및 제3 열화도는 정해진 값보다 작은 경우, 전자 장치는 제1 얼굴 이미지만을 열화된 얼굴 이미지로 결정할 수 있다. 열화된 얼굴 이미지의 개수가 얼굴 이미지의 총 개수의 절반보다 작으므로, 전자 장치는 입력 이미지를 열화된 이미지가 아닌 것으로 결정할 수 있다.
일 실시예에 따르면, 전자 장치는 계산한 열화도의 총 합에 기반하여 입력 이미지가 열화된 이미지인지 결정할 수 있다. 예를 들어, 전자 장치는 계산한 열화도의 총 합이 입력 이미지에 포함된 얼굴 이미지의 개수의 절반보다 크면, 입력 이미지를 열화된 이미지로 결정할 수 있다.
일 실시예에 따르면, 전자 장치는 다양한 조건을 결합하여 입력 이미지가 열화된 이미지인지 결정할 수 있다. 예를 들어, 전자 장치는 열화된 얼굴 이미지의 개수가 얼굴 이미지의 총 개수의 절반보다 큰 조건 및, 계산한 열화도의 총 합이 입력 이미지에 포함된 얼굴 이미지의 개수의 절반보다 큰 조건을 동시에 만족하는 경우에 입력 이미지를 열화된 이미지로 결정할 수 있다. 전자 장치가 입력 이미지를 열화된 이미지로 결정하는 조건은 상기 설명한 바에 제한되지 않으며, 입력 이미지에 포함된 각 얼굴 이미지의 열화도에 기반하여 다양한 방식으로 열화된 이미지로 결정할 수 있다.
동작 120에서, 전자 장치는, 입력 이미지에 포함된 적어도 하나의 얼굴 이미지에 대한 정보를 포함하는 영역 정보를 생성할 수 있다. 일 실시예에서, 영역 정보는 입력 이미지와 동일한 크기(예: 512X512px)를 갖는 어레이 데이터이며, 입력 이미지에 포함된 적어도 하나의 얼굴 이미지의 신체 부위(예: 눈, 눈썹, 코, 입, 귀, 턱, 머리)가 포함된 영역 및 그 윤곽에 대한 정보를 포함할 수 있다. 일 실시예에서, 영역 정보는 얼굴 이미지에 포함된 신체 부위의 종류 및 위치를 지시할 수 있다. 일 실시예에 따르면, 전자 장치는 얼굴 이미지에 포함된 신체 부위의 윤곽에 대응하는 어레이 데이터의 각 픽셀에 정해진 값을 부여하여 영역 정보를 생성할 수 있다. 예를 들어, 전자 장치는 어레이 데이터에서, 입력 이미지의 눈, 코, 입, 귀, 턱의 윤곽에 대응하는 각 요소에 1 값을 부여하고, 나머지 요소에는 0 값을 부여하여 영역 정보를 생성할 수 있다. 상기와 같은 방식으로 생성된 영역 정보는 얼굴 이미지에서 각 신체 부위가 위치하는 영역의 윤곽을 나타내어 얼굴의 화질 개선에 사용될 수 있다.
일 실시예에 따르면, 전자 장치는 얼굴 이미지에 포함된 신체 부위의 윤곽 및 그 내부에 대응하는 어레이 데이터의 각 픽셀에 정해진 값을 부여하여 영역 정보를 생성할 수 있다. 예를 들어, 전자 장치는 어레이 데이터에서, 입력 이미지의 눈, 코, 입, 귀, 턱의 윤곽 및 그 내부에 대응하는 각 요소에 신체 부위별로 정해진 값을 부여하고, 나머지 요소에는 0 값을 부여하여 영역 정보를 생성할 수 있다. 전자 장치가 영역 정보를 생성하는 방법은 이에 제한되지 않는다. 전자 장치가 영역 정보를 생성하는 방법에 대해서는 추후 도 5 및 도 6에서 자세하게 설명하도록 한다.
동작 130에서, 전자 장치는 동작 120에서 생성한 영역 정보를 이용하여 화질이 개선된 얼굴 이미지를 생성할 수 있다. 전자 장치는 인공 신경망에 입력 이미지의 각 픽셀의 RGB값 및 영역 정보를 입력하여, 화질이 개선된 얼굴 이미지를 생성할 수 있다. 전자 장치는 영역 정보를 이용하여 얼굴 이미지의 각 신체 부위가 포함되는 영역을 결정할 수 있기 때문에 화질이 개선된 얼굴 이미지를 생성할 수 있다.
동작 140에서, 전자 장치는, 화질이 개선된 얼굴 이미지 및 입력 이미지를 합성하여 출력 이미지를 생성할 수 있다. 일 실시예에서, 입력 이미지는 얼굴 이미지 및 배경 이미지를 포함할 수 있다. 입력 이미지는 2D 어레이 형태의 데이터 형식을 갖기 때문에, 입력 이미지는 얼굴 이미지와 배경 이미지를 포함할 수 있다. 배경 이미지는 입력 이미지에서 얼굴 이미지를 제외한 부분을 의미한다. 일 실시예에서, 전자 장치는 화질이 개선된 얼굴 이미지를 배경 이미지와 합성하여 출력 이미지를 생성할 수 있다. 전자 장치가 화질이 개선된 얼굴 이미지를 배경 이미지와 자연스럽게 합성하여 출력 이미지를 생성하는 방법에 대해서는 추후 도 4에서 상세하게 설명하도록 한다.
도 2는 본 개시의 일 실시예에 따른 전자 장치가 입력 이미지를 열화된 이미지로 판단하는 과정을 설명하기 위한 순서도이다.
동작 200에서, 전자 장치는 입력 이미지에서 적어도 하나의 얼굴 이미지를 검출할 수 있다. 입력 이미지는 적어도 하나의 인물 및/또는 얼굴을 포함할 수 있다. 일 실시예에서, 전자 장치는 정해진 알고리즘을 이용하여, 입력 이미지에 포함되어 있는 적어도 하나의 얼굴 이미지를 검출할 수 있다.
동작 210에서, 전자 장치는, 검출한 각 얼굴 이미지의 열화도를 계산할 수 있다. 전자 장치는 다양한 방식으로 적어도 하나의 얼굴 이미지의 열화도를 계산할 수 있다. 열화도는 각 얼굴 이미지의 화질 개선이 필요한 정도를 나타낼 수 있다. 전자 장치는 검출한 얼굴 이미지 각각에 대한 열화도를 계산할 수 있다.
동작 220에서, 전자 장치는, 입력 이미지의 화질 개선이 필요한지 여부를 결정할 수 있다. 전자 장치는 동작 210에서 계산한 얼굴 이미지 각각에 대한 열화도에 기반하여, 입력 이미지의 화질 개선이 필요한지 여부를 결정할 수 있다. 예를 들어, 전자 장치는 적어도 하나의 얼굴 이미지의 열화도를 합산한 값이, 얼굴 이미지의 총 개수를 반으로 나눈 값보다 크면, 입력 이미지의 화질 개선이 필요한 것으로 결정할 수 있다. 예를 들어, 전자 장치는 화질 개선이 필요한 것으로 결정한 얼굴 이미지의 수가 얼굴 이미지의 총 개수를 반으로 나눈 값보다 크면, 입력 이미지의 화질 개선이 필요한 것으로 결정할 수 있다.
도 3a 및 도 3b는 본 개시의 일 실시예에 따른 전자 장치가 열화된 이미지를 입력 받아 화질이 개선된 이미지를 출력하는 방법을 설명하기 위한 도면이다.
적대적 생성 신경망(generative adversarial network; GAN)은 생성기(generator), 판별기(discriminator), 및 손실 함수(loss function)을 포함할 수 있다. GAN은 학습을 통해 생성기와 판별기가 서로의 성능을 개선해 적대적으로 경쟁해 나가는 모델이다. 생성기 및 판별기 각각은 적어도 하나의 레이어를 포함할 수 있다. 레이어는 입력 데이터로부터 특징을 추출하기 위한 가중치 정보들로 구성된 필터를 포함할 수 있다.
생성기는 데이터 셋(Data Set: DS)을 입력으로 하여, 가짜 데이터(Fake Data: FD)를 출력하도록 학습될 수 있다. 데이터 셋은 이미지, 텍스트, 및 음성 중 적어도 하나를 포함하는 데이터의 집합일 수 있다. 가짜 데이터는 가짜 이미지 데이터, 가짜 텍스트 데이터 또는 가짜 음성 데이터일 수 있다.
실제 데이터(Real Data: RD) DB는 실제 데이터의 집합을 포함할 수 있다. 실제 데이터는 가짜 데이터에 대응할 수 있다. 예를 들어, 가짜 데이터가 가짜 이미지 데이터인 경우, 실제 데이터는 실제 이미지 데이터일 수 있다.
판별기는 가짜 데이터 또는 실제 데이터를 입력으로 하여, 가짜 데이터 또는 실제 데이터의 가짜 여부를 판별하도록 학습될 수 있다.
손실 함수는 판별 결과에 기초하여 손실 함수 값을 계산할 수 있다. 손실 함수 값은 역전파를 통해 판별기 및 생성기에 전달될 수 있다. 판별기 및 생성기에 포함되는 적어도 하나의 레이어의 가중치는 손실 함수 값에 기초하여 업데이트될 수 있다.
일 실시 예에 있어서, 생성기는 데이터 셋의 유형 및 출력 데이터에 따라 복수 개의 서브 생성기들을 포함할 수 있다. 예를 들어, 제1 서브 생성기는 이미지 데이터의 집합인 데이터 셋을 입력으로 하여, 가짜 음성 데이터를 출력하도록 학습될 수 있다. 예를 들어, 제2 서브 생성기는 이미지 데이터의 집합인 데이터 셋을 입력으로 하여, 가짜 텍스트 데이터를 출력하도록 학습될 수 있다. 예를 들어, 제3 서브 생성기는 이미지 데이터 및 텍스트 데이터의 집합인 데이터 셋을 입력으로 하여, 가짜 음성 데이터를 출력하도록 학습될 수 있다. 그러나 본 개시는 이에 제한되지 않으며, 생성기는, 데이터 셋의 유형(예컨대, 이미지, 텍스트, 및 음성 중 적어도 하나를 포함하는 데이터의 집합) 및 출력 데이터(예컨대, 가짜 이미지 데이터, 가짜 텍스트 데이터 또는 가짜 음성 데이터)의 임의의 조합을 특징으로 하는 서브 생성기들을 포함할 수 있다.
일 실시 예에 있어서, 판별기는 생성기가 출력하는 출력 데이터, 즉 가짜 데이터의 유형에 따라 복수 개의 서브 판별기들을 포함할 수 있다. 예를 들어, 제1 서브 판별기는 가짜 음성 데이터 또는 실제 음성 데이터를 입력으로 하여, 가짜 음성 데이터 또는 실제 음성 데이터의 가짜 여부를 판별하도록 학습될 수 있다. 제2 서브 판별기는 가짜 이미지 데이터 또는 실제 이미지 데이터를 입력으로 하여, 가짜 이미지 데이터 또는 실제 이미지 데이터의 가짜 여부를 판별하도록 학습될 수 있다. 제3 서브 판별기는 가짜 텍스트 데이터 또는 실제 텍스트 데이터를 입력으로 하여, 가짜 텍스트 데이터 또는 실제 텍스트 데이터의 가짜 여부를 판별하도록 학습될 수 있다. 생성기는 상술한 GAN의 학습 과정을 통해 학습될 수 있다.
도 3a는 일 실시 예에 따른 전자 장치가 적대적 생성 신경망을 이용하여 얼굴 정보를 압축 및 복원하여 개선된 얼굴 이미지를 생성하는 방법을 설명하기 위한 도면이다.
적대적 생성 신경망은 압축 모듈(310), 컨볼루션 모듈(320) 및 복원 모듈(330)을 포함할 수 있다. 적대적 생성 신경망의 압축 모듈(310) 및 복원 모듈(330)이 포함할 수 있는 단(stage)의 개수는 제한되지 않으나, 이하에서는 편의상 3개의 압축단 및 복원단을 포함하는 것으로 설명한다.
적대적 생성 신경망은 열화된 이미지를 입력 이미지(300)로 획득하고, 여러 단을 거쳐 입력 이미지(300)를 압축할 수 있다. 예를 들어, 압축 모듈(310)은 제1 압축단, 제2 압축단, 및 제3 압축단을 포함할 수 있다. 적대적 생성 신경망은 복수의 압축단을 거치며, 입력 이미지(300)를 순차적으로 압축할 수 있다. 예를 들어, 적대적 생성 신경망은 제1 압축단에서 입력 이미지(300)를 입력 받아 제1 압축 이미지를 출력하고, 제2 압축단에서 제1 압축 이미지를 입력 받아 제2 압축 이미지를 출력하고, 제3 압축단에서 제3 압축 이미지를 출력할 수 있다.
일 실시예에서, 적대적 생성 신경망은 각 압축단에서, 입력 이미지(300) 또는 압축 이미지의 시멘틱 정보를 추출할 수 있다. 예를 들어, 제1 압축단에서 제1 압축 이미지의 제1 시멘틱 정보를 추출하고, 제2 압축단에서 제2 압축 이미지의 제2 시멘틱 정보를 추출하고, 제3 압축단에서 제3 압축 이미지의 제3 시멘틱 정보를 추출할 수 있다. 각 압축단은 추출한 시멘틱 정보를 복원 모듈(330)의 각 복원단으로 전송할 수 있다. 예를 들어, 제3 압축단은 제1 복원단으로 제3 시멘틱 정보를 전송하고, 제2 압축단은 제2 복원단으로 제2 시멘틱 정보를 전송하고, 제1 압축단은 제3 복원단으로 제1 시멘틱 정보를 전송할 수 있다.
일 실시예에서, 컨볼루션 모듈(320)은 입력 이미지(300)에 대하여 컨볼루션 연산을 수행한 결과를 제1 복원단으로 전송할 수 있다. 제1 복원단은 입력 이미지(300)에 대한 컨볼루션 연산을 수행한 결과에 기반하여 압축된 이미지의 복원을 수행할 수 있다.
일 실시예에서, 적대적 생성 신경망의 복원 모듈(330)은 여러 단을 거쳐, 압축된 이미지를 복원하여 개선된 이미지를 출력할 수 있다. 예를 들어, 복원 모듈(330)은 제1 복원단, 제2 복원단 및 제3 복원단을 포함할 수 있다. 적대적 생성 신경망은 복수의 복원단을 거치며, 압축된 이미지를 순차적으로 복원할 수 있다. 예를 들어, 적대적 생성 신경망은 제1 복원단에서 제3 압축 이미지를 입력 받아 제1 복원 이미지를 생성하고, 제2 복원단에서 제1 복원 이미지를 입력 받아 제2 복원 이미지를 생성하고, 제3 복원단에서 제2 복원 이미지를 입력 받아 출력 이미지(340)를 생성할 수 있다.
일 실시예에서, 적대적 생성 신경망은 각 복원단에서, 각 압축단으로부터 수신한 시멘틱 정보에 기반하여 이미지를 복원할 수 있다. 예를 들어, 제1 복원단은 수신한 제3 시멘틱 정보에 기반하여 제1 복원 이미지를 출력하고, 제2 복원단은 수신한 제2 시멘틱 정보에 기반하여 제2 복원 이미지를 출력하고, 제3 복원단은 수신한 제1 시멘틱 정보에 기반하여 출력 이미지(340)를 출력할 수 있다.
도 3b는 본 개시의 일 실시예에 따른 전자 장치가 도 3a에서 설명한 알고리즘에 4개의 채널을 입력하여 입력 이미지(300)의 화질 개선을 수행하는 과정을 도시한 것이다. 도 3b 알고리즘의 이미지 화질 개선 동작에서 도 3a 알고리즘과 유사한 부분에 대한 설명은 생략하도록 한다. 도 3a의 알고리즘에는 압축 모듈(310)에 입력 이미지(300)의 R값, G값, B값의 3 채널을 입력할 수 있다. 도 3b의 알고리즘에는 입력 이미지(300)의 R값, G값, B값 및 영역 정보의 4 채널이 입력될 수 있다. 적대적 생성 신경망은 4 채널 정보를 이용하여, 3 채널 정보를 활용한 도 3a의 알고리즘보다 더 개선된 출력 이미지(340)를 생성할 수 있다.
도 4는 본 개시의 일 실시예에 따른 전자 장치가 얼굴 영역 및 배경 영역을 합성하는 방법을 설명하기 위한 도면이다.
전자 장치는 입력 이미지에서 적어도 하나의 얼굴 이미지를 검출하고, 입력 이미지에서 얼굴 이미지가 포함되지 않은 영역을 배경 이미지로 결정할 수 있다. 전자 장치는 얼굴 이미지에 대해 화질 개선 프로세스를 수행한 이후, 얼굴 이미지의 경계 영역에 대하여 아래 수학식 1에 따라 화질이 개선된 얼굴 이미지와 배경 이미지를 합성할 수 있다.
Figure PCTKR2022020254-appb-img-000001
Figure PCTKR2022020254-appb-img-000002
: 출력 이미지
Figure PCTKR2022020254-appb-img-000003
: 얼굴 이미지
Figure PCTKR2022020254-appb-img-000004
: 배경 이미지
Figure PCTKR2022020254-appb-img-000005
: 합성 비율
전자 장치는 화질이 개선된 얼굴 이미지 및 배경 이미지의 자연스러운 합성을 위한 합성 비율(
Figure PCTKR2022020254-appb-img-000006
)을 결정할 수 있다. 합성 비율은 출력 이미지에서 화질이 개선된 얼굴 이미지가 반영된 비율을 의미할 수 있다. 합성 비율이 클수록 출력 이미지에서 화질이 개선된 얼굴 이미지가 반영된 비율이 증가하고, 배경 이미지가 반영된 비율이 감소할 수 있다. 전자 장치는 화질이 개선된 얼굴 이미지와 배경 이미지 사이의 경계를 자연스럽게 처리하기 위하여, 합성 비율이 개선된 얼굴 이미지의 경계로 갈수록 감소하도록 설정할 수 있다. 예를 들어, 전자 장치는 화질이 개선된 얼굴 이미지의 가운데를 포함하는 영역을 중앙 영역으로 결정하고, 얼굴 이미지의 가장자리를 포함하는 영역을 테두리 영역으로 결정할 수 있다. 전자 장치는 중앙 영역에서는 합성 비율을 1로 설정(개선된 얼굴 이미지를 반영)하고, 테두리 영역에서는 배경 이미지와 가까워질수록 합성 비율을 감소시켜 배경 이미지와의 경계 부분에서는 합성 비율이 0에 가깝게 되도록 설정(배경 이미지를 반영)할 수 있다. 기존 기술의 경우 얼굴의 윤곽이 확실하지 않아 얼굴의 경계로 갈수록 합성 비율이 감소하는 속도가 작았다(400). 즉, 중앙 영역(402)의 크기가 작고 테두리 영역(404)이 넓었다. 따라서 출력 이미지에서 얼굴 이미지와 배경 이미지가 중첩되는 영역이 넓게 생겨나 아티팩트가 발생하는 문제가 있었다. 그러나 본 개시에 따른 전자 장치는 영역 정보를 활용하여 얼굴의 윤곽을 명확하게 파악할 수 있으므로, 개선된 얼굴 이미지의 경계로 갈수록 합성 비율이 감소하는 속도를 증가시킬 수 있다(410). 예를 들어, 중앙 영역(412)의 크기가 크고 테두리 영역(414)이 좁은 출력 이미지를 생성할 수 있다. 따라서 본 개시에 따른 전자 장치는 화질이 개선된 얼굴 이미지와 배경 이미지가 중첩되는 영역이 최소화된 출력 이미지를 생성할 수 있다. 전자 장치는 얼굴 이미지와 배경 이미지 사이의 경계를 명확하게 반영하면서도 아티팩트가 발생하지 않도록 자연스럽게 합성할 수 있다.
도 5는 본 개시의 일 실시예에 따른 전자 장치가 생성하는 영역 정보에 대한 실시예를 설명하기 위한 도면이다.
전자 장치는 입력 이미지의 영역 정보를 생성할 수 있다. 입력 이미지의 영역 정보는 입력 이미지에 포함된 적어도 하나의 얼굴 이미지에 포함된 신체 부위에 대한 정보를 포함할 수 있다. 전자 장치가 생성할 수 있는 영역 정보는 신체 부위에 대한 정보에 제한되지 않고 입력 이미지에 포함될 수 있는 다양한 오브젝트(예: 배경, 동물, 사물)에 대한 정보를 포함할 수 있으나, 이하에서는 신체 부위에 대한 정보에 한하여 설명하도록 한다.
일 실시예에 따르면, 전자 장치는 얼굴 이미지에 포함된 신체 부위의 위치 및 종류에 대한 정보를 포함하는 얼굴 영역 정보(face-segmentation information)를 생성할 수 있다. 전자 장치는 영역 정보를 생성하기 위하여 입력 이미지에서 적어도 하나의 신체 부위를 인식할 수 있다. 예를 들어, 도 5를 참조하면, 전자 장치는 얼굴 이미지에 포함된 눈썹(502), 눈(504), 코(506), 입(508)의 위치 및 종류에 대한 정보를 포함하는 영역 정보를 생성할 수 있다.
일 실시예에 따르면, 전자 장치는 입력 이미지와 같은 크기의 어레이 데이터를 생성하고, 인식한 신체 부위를 포함하는 영역에 대응하는 어레이 데이터의 각 요소에 정해진 값을 부여할 수 있다. 전자 장치는 각 신체 부위의 종류에 따라 서로 다른 값을 어레이 데이터의 각 요소에 부여할 수 있다. 예를 들어, 전자 장치는 눈썹(502)이 포함된 영역에 대응하는 어레이 데이터의 각 요소에는 1, 눈(504)이 포함된 영역에 대응하는 어레이 데이터의 각 요소에는 2, 코(506)가 포함된 영역에 대응하는 어레이 데이터의 각 요소에는 3, 입(508)이 포함된 영역에 대응하는 어레이 데이터의 각 요소에는 4를 부여할 수 있다. 전자 장치는 신체 부위가 인식되지 않은 영역에 대응하는 어레이 데이터의 각 요소에는 0을 부여할 수 있다. 인공 신경망은 영역 정보를 입력 받아 얼굴 이미지에서 각 신체 부위의 위치 및 종류를 인식할 수 있다.
도 6은 본 개시의 일 실시예에 따른 전자 장치가 생성하는 영역 정보에 대한 실시예를 설명하기 위한 도면이다.
전자 장치는 얼굴 이미지(600)의 적어도 하나의 영역의 윤곽(602)을 지시하는 영역 정보를 생성할 수 있다. 예를 들어, 전자 장치는 얼굴에 포함된 적어도 하나의 신체 부위의 윤곽(602)을 지시하는 영역 정보를 생성할 수 있다. 도 6을 참조하면, 전자 장치는 생성한 어레이 데이터에서 눈썹, 눈, 코, 입, 턱의 윤곽(602)에 대응하는 요소에 정해진 값을 부여하여 영역 정보를 생성할 수 있다. 예를 들어, 전자 장치는 어레이 데이터에서 눈썹, 눈, 코, 입, 턱의 윤곽(602)에 대응하는 요소들에 1을 부여하고, 어레이 데이터의 나머지 요소들에 0을 부여하여 영역 정보를 생성할 수 있다.
일 실시예에 따르면, 전자 장치는 얼굴의 전체적인 윤곽을 영역 정보에 반영하기 위하여, 턱 윤곽을 연장하여 얼굴의 전체적인 윤곽을 임의로 생성할 수 있다. 예를 들어, 전자 장치는 턱 윤곽의 양 끝 점을 지름으로 하는 반원을 이마 쪽으로 그리고, 그린 반원과 턱 윤곽을 합친 부분을 얼굴의 전체적인 윤곽으로 설정할 수 있다. 전자 장치는 데이터 어레이에서 얼굴의 전체적인 윤곽 및 얼굴 내부의 신체 부위의 윤곽에 대응하는 요소들에 정해진 값을 부여하여 영역 정보를 생성할 수 있다.
전자 장치는 도 5 및 도 6에서 설명한 바와 같이 생성한 영역 정보를 인공 신경망에 입력하여, RGB값만을 이용한 이미지 화질 개선보다 더 화질이 개선된 출력 이미지를 생성할 수 있다.
도 7은 본 개시의 일 실시예에 따른 열화된 이미지의 화질을 개선하는 전자 장치의 블록도이다.
도 7을 참조하면, 일 실시예에 따른 전자 장치는 입력부(700), 열화된 이미지 검출부(710) 및, 얼굴 이미지 검출부(722), 얼굴 이미지 복원부(724), 배경 복원부(726) 및 영역 합성부(728)를 포함하는 열화된 이미지 처리부(720)를 포함할 수 있다.
입력부(700)는 입력 이미지를 수신한다.
열화된 이미지 검출부(710)는 수신된 입력 이미지가 열화된 이미지인지 아닌지를 결정할 수 있다. 예를 들어, 열화된 이미지 검출부(710)는 입력 이미지에 대한 영상 처리를 수행하여, 입력 이미지에 빛 바램이 포함되는 지 여부, 입력 이미지의 색상 분포 정보, 입력 이미지의 노이즈 정보 등을 포함하는 입력 이미지의 특성 정보를 획득할 수 있다. 열화된 이미지 검출부(710)는 획득한 입력 이미지의 특성 정보에 기초하여, 입력 이미지가 열화된 이미지인지 아닌지를 결정할 수 있다.
또는, 열화된 이미지 검출부(710)는 분류 네트워크(도시되지 않음)를 이용하여, 입력 이미지가 열화된 이미지인지 아닌지를 결정할 수 있다. 분류 네트워크에 대해서는 도 8을 참조하여 자세히 설명하기로 한다.
도 8은 본 개시의 일 실시예에 따른 분류 네트워크를 나타내는 도면이다.
일 실시예에 따른 분류 네트워크(810)는 입력 이미지를 2가지로 분류하는 2-class 분류 모델일 수 있다. 예를 들어, 입력 이미지를 열화된 이미지 또는 일반 이미지로 분류하는 모델일 수 있다. 예를 들어, 도 8을 참조하면, 분류 네트워크(810)는 복수의 컨볼루션 레이어들(convolutional layers, 812), 복수의 풀링 레이어들(pooling layers, 814) 및 복수의 완전 연결 레이어들(fully connected layers, 816)을 포함하는 VGG 네트워크를 포함할 수 있다. 분류 네트워크(810)는 이에 한정되지 않으며 다양한 구조를 포함할 수 있다.
다시 도 7을 참조하면, 열화된 이미지 검출부(710)에서 입력 이미지가 열화된 이미지로 분류되는 경우, 입력 이미지는 열화된 이미지 처리부(720)에 의해 영상 처리가 수행될 수 있다. 일 실시예에서, 열화된 이미지 처리부(720)는 인공지능 알고리즘으로 구현될 수 있으며, 예를 들어, 적대적 생성 신경망(GAN)을 이용하여 구현될 수 있다.
일 실시예에 따른 열화된 이미지 처리부(720)는 얼굴 이미지 검출부(722), 얼굴 이미지 복원부(724), 배경 복원부(726), 및 영역 합성부(728)를 포함할 수 있다.
얼굴 이미지 검출부(722)는 다양한 알고리즘, 다양한 모델을 이용하여, 얼굴 영역을 검출할 수 있다. 예를 들어, 얼굴 이미지 검출부(722)는 HoG(Histogram of Oriented Gradient) 기반 특징 검출 알고리즘을 이용하여, 얼굴 영역을 검출할 수 있다. 일 실시예에서, 얼굴 이미지 검출부(722)는 입력된 영상을 일정한 크기의 영역들로 분할하고, 영역 별로 픽셀들의 그래디언트를 계산할 수 있다. 예를 들어, 얼굴 이미지 검출부(722)는 각 영역에 대하여, 하나의 영역에 포함된 픽셀들 중 그래디언트가 일정 값 이상인 픽셀들의 방향에 대한 히스토그램을 계산하고, 계산된 히스토그램에 기초하여, 해당 영역이 얼굴 영역인지 결정할 수 있다. 일 실시예에서, 얼굴 이미지 검출부(722)는 분류 네트워크(810)를 이용하여, 얼굴 영역을 검출할 수 있으며, 이에 한정되지 않는다.
입력 이미지에 얼굴 영역이 포함되는 경우, 얼굴 이미지 복원부(724)는 얼굴 복원 모델을 이용하여, 입력 이미지에 포함되는 얼굴 영역의 화질을 복원하는 영상 처리를 수행하고, 화질이 복원된 얼굴 영역을 출력할 수 있다.
배경 복원부(726)는 배경 복원 모델을 이용하여, 입력 이미지에 포함된 얼굴 영역이 아닌 배경 영역의 화질을 복원하는 영상 처리를 수행하여, 화질이 복원된 배경 영역을 출력 할 수 있다.
영역 합성부(728) 는 얼굴 이미지 복원부(724)에서 화질이 복원된 얼굴 영역과 배경 복원부(726)에서 화질이 복원된 배경 영역을 합성하여, 복원된 이미지 획득할 수 있다.
한편, 열화된 이미지 검출부(710)에서 입력 이미지가 열화된 이미지가 아닌 일반 이미지로 분류되는 경우, 입력 이미지는 열화된 이미지 처리부(720)에 입력되지 않을 수 있다.
일 실시예에 따른 열화된 이미지 복원 모델, 얼굴 복원 모델, 배경 복원 모델들은 동일 유사한 구조를 가지는 영상 처리 네트워크를 포함할 수 있으며, 상기 영상 처리 네트워크는 하나 이상의 네트워크들로 구성될 수 있다.
도 9는 본 개시의 일 실시예에 따른 전자 장치가 컬러 손실된 이미지를 출력하는 방법을 설명하기 위한 도면이다.
도 9를 참조하면, 전자 장치가 열화된 이미지를 복원하는 과정에서 의도하지 않은 색상 노이즈가 발생할 수 있다. 예를 들어, 전자 장치는 열화된 이미지인 제1 이미지(900)를 복원하여 제2 이미지(910)를 생성할 수 있다. 전자 장치의 이미지 복원 과정에서 제2 이미지(910)의 중간 부분에 의도하지 않은 색상 노이즈(912)가 나타날 수 있다. 전자 장치는 의도적으로 컬러 손실을 발생시켜, 색상 노이즈(912)가 없는 제3 이미지(920)를 생성할 수 있다. 이하, 전자 장치가 색상 노이즈(912)가 없는 이미지를 출력하는 방법을 설명하도록 한다.
전자 장치는 열화된 이미지를 복원하기 위하여 적대적 생성 신경망을 학습할 수 있다. 일 실시예에 따르면, 전자 장치는 열화된 이미지를 효과적으로 복원하기 위하여 적대적 생성 신경망의 적어도 하나의 노드에 대한 가중치를 결정할 수 있다. 예를 들어, 전자 장치는 열화도가 매우 낮은 GT(ground truth) 영상을 이용하여 적대적 생성 신경망의 가중치를 결정할 수 있다. GT 영상은 열화도가 매우 낮은 임의의 영상으로, 적대적 생성 신경망의 출력값을 훈련 및 테스트하기 위한 실제 환경의 데이터일 수 있다.
일 실시예에서, 전자 장치는 GT 영상에 인위적으로 노이즈를 추가한 테스트 영상을 생성하고, 테스트 영상을 적대적 생성 신경망에 입력할 수 있다. 전자 장치는 테스트 영상을 적대적 생성 신경망에 입력해서 생성된 출력 영상을 원본인 GT 영상과 비교하고, 출력 영상과 GT 영상의 픽셀와이즈 에러(pixel-wise error)(예: L1 loss, L2 loss)를 계산할 수 있다. 픽셀와이즈 에러는 출력 영상 및 GT 영상이 각 픽셀에서 갖는 값의 차이를 반영한 값이다. 예를 들어, L1 loss는 출력 영상 및 GT 영상이 각 픽셀에서 갖는 값의 차이를 모두 더하여 계산할 수 있고, L2 loss는 출력 영상 및 GT 영상이 각 픽셀에서 갖는 값의 차이의 제곱을 모두 더하여 계산할 수 있다.
일 실시예에 따르면, 전자 장치는 출력 영상 및 GT 영상의 색상 도메인을 변환하고, 색상 도메인이 변환된 출력 영상 및 GT 영상의 픽셀와이즈 에러를 계산할 수 있다. 예를 들어, 전자 장치는 원래 RGB 포맷이었던 출력 영상 및 GT 영상을 YUV 포맷(또는 HSV 포맷)으로 변경하고, YUV 포맷 상에서 출력 영상 및 GT 영상의 픽셀와이즈 에러를 계산할 수 있다.
일 실시예에서, 전자 장치는 출력 영상 및 GT 영상의 총 변동(total variation: TV)값을 계산할 수 있다. 총 변동값은 각 영상의 색 편차(variance)를 나타내는 값으로, 자연 영상(예: GT 영상)의 경우 정해진 값 미만일 수 있다. 반면, 편집된 사진이거나 복원 과정에서 에러가 발생한 경우에는 총 변동값이 정해진 값보다 크게 계산될 수 있다. 전자 장치는 색상 도메인이 변환된 출력 영상의 총 변동 값을 계산할 수 있다. 일 실시예에 따르면, 전자 장치는 크로마 채널(chroma channel)의 정보를 이용하여 총 변동 값을 계산할 수 있다. 크로마 채널은 영상의 3개 채널 중 색에 대한 정보를 포함하는 채널로, YUV 포맷의 경우 UV 채널, HSV 포맷의 경우 H 채널일 수 있다.
전자 장치는 계산된 픽셀와이즈 에러 및 총 변동 값에 기초하여 적대적 생성 신경망의 가중치를 결정할 수 있다. 전자 장치는 픽셀와이즈 에러 및 TV값이 작아지도록 가중치를 결정(또는 수정)할 수 있다.
도 10은 본 개시의 일 실시예에 따른 전자 장치가 화질이 개선된 얼굴 이미지 및 배경 이미지를 합성하는 비율을 조절하는 실시예를 설명하기 위한 도면이다. 설명의 간략을 위해, 도 7에서 이미 설명된 기능 블록에 대한 설명은 생략하도록 한다.
전자 장치는 화질이 개선된 얼굴 이미지 및 배경 이미지를 합성하기 위한 합성 비율(1010)을 결정할 수 있다.
일 실시예에 따르면, 영역 합성부(728)는 사용자 입력에 기초하여 합성 비율(1010)을 결정할 수 있다. 예를 들어, 영역 합성부(728)는 합성 비율(1010)을 선택할 수 있는 사용자 인터페이스(1000)를 제공하고, 인터페이스(1000)에 대한 사용자의 터치 입력에 기초하여 합성 비율(1010)을 결정할 수 있다. 예를 들어, 사용자가 인터페이스(1000)를 통하여 합성 비율(1010)의 최대값을 0.5로 결정하면, 영역 합성부(728)는 화질이 개선된 얼굴 이미지 및 배경 이미지를 합성할 때 0.5 이하의 합성 비율로 출력 이미지를 생성할 수 있다. 전자 장치는 화질이 개선된 얼굴 이미지 및 배경 이미지의 합성을 위한 합성 비율의 최적값을 0.7로 결정했다고 하더라도 합성 비율을 0.5로 결정할 수 있다.
도 11은 본 개시의 일 실시예에 따른 전자 장치가 제2 입력 이미지를 이용하여 이미지 화질을 개선하는 방법을 설명하기 위한 도면이다. 설명의 간략을 위해, 도 7 및 도 8에서 설명한 내용과 중복되는 내용은 생략하도록 한다.
일 실시예에서, 얼굴 이미지 복원부(724)는 제2 입력 이미지(1110)를 획득할 수 있다. 제2 입력 이미지(1110)는 입력부(700)로 입력된 입력 이미지와 다른 이미지로, 동일 인물의 다른 사진이거나, 다른 인물의 사진일 수 있다. 일 실시예에서, 얼굴 이미지 복원부(724)는 제2 입력 이미지(1110)를 참조하여 입력 이미지의 얼굴 이미지를 복원할 수 있다. 얼굴 이미지 복원부(724)는 사용자 인터페이스(1100)를 제공하고, 사용자 인터페이스(1100)에 대한 사용자 입력에 기초하여 제2 입력 이미지(1110)를 획득할 수 있다.
일 실시예에 따르면, 얼굴 이미지 복원부(724)는 입력부(700)에 입력 이미지가 입력되기 이전에 제2 입력 이미지(1110)를 획득하고, 제2 입력 이미지(1110)를 반영한 얼굴 복원 모델을 학습할 수 있다. 얼굴 이미지 복원부(724)는 얼굴 복원 모델을 학습할 때 제2 입력 이미지(1110)의 스타일과 비슷하게 얼굴을 복원할 수 있도록 하는 새로운 손실 함수를 이용할 수 있다. 얼굴 이미지 복원부(724)는 제2 입력 이미지(1110)의 얼굴 영역에 대한 특징을 추출하고, 아래 수학식 2를 이용하여 새로운 손실 함수를 계산할 수 있다.
Figure PCTKR2022020254-appb-img-000007
Figure PCTKR2022020254-appb-img-000008
: 제2 입력 이미지의 스타일을 반영한 새로운 손실 함수
Figure PCTKR2022020254-appb-img-000009
: 기존 손실 함수
Figure PCTKR2022020254-appb-img-000010
: 제2 입력 이미지의 스타일에 대한 손실 함수
예를 들어, 얼굴 이미지 복원부(724)는 새로운 손실 함수를 활용하여, 열화된 이미지인 입력 이미지를 제2 입력 이미지(1110)의 이목구비 또는 텍스처와 유사한 방향으로 복원할 수 있다.
본 개시의 기술적 사상에 따른 입력 이미지의 화질을 개선하기 위한 전자 장치에 있어서, 적어도 하나의 인스트럭션이 저장된 메모리, 및 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서는 상기 적어도 하나의 인스트럭션을 실행하여, 상기 입력 이미지의 열화도를 계산하고, 상기 입력 이미지의 열화도가 정해진 값보다 큰 것으로 결정함에 대응하여 상기 입력 이미지에 포함된 적어도 하나의 얼굴 이미지를 검출하고, 상기 적어도 하나의 얼굴 이미지에 포함된 적어도 하나의 영역의 위치 및 종류를 지시하는 영역 정보를 생성하고, 상기 입력 이미지 및 상기 영역 정보를 입력으로 하는 인공 신경망(Artificial Neural Network; ANN)을 이용하여, 화질이 개선된 얼굴 이미지를 생성하고, 및 상기 화질이 개선된 얼굴 이미지 및 상기 입력 이미지를 합성하여 출력 이미지를 생성할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, 상기 입력 이미지의 색상 정보 및 노이즈 정보를 포함하는 특성 정보에 기초하여 상기 적어도 하나의 얼굴 이미지 각각의 화질을 지시하는 적어도 하나의 열화도를 계산하고, 및 계산한 상기 적어도 하나의 열화도에 기반하여 상기 입력 이미지의 화질 개선이 필요한지 여부를 결정할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, 상기 적어도 하나의 열화도를 합산한 값과 상기 적어도 하나의 얼굴 이미지의 총 개수의 비율이 정해진 값보다 큰 것으로 계산함에 대응하여, 상기 입력 이미지의 화질 개선이 필요한 것으로 결정할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, 열화도가 정해진 값보다 큰 것으로 결정함에 대응하여, 상기 열화도에 대응하는 얼굴 이미지를 화질 개선이 필요한 것으로 결정할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, 상기 화질 개선이 필요한 것으로 결정한 얼굴 이미지의 수와 상기 적어도 하나의 얼굴 이미지의 총 개수의 비율이 정해진 값보다 크면 상기 입력 이미지의 화질 개선이 필요한 것으로 결정할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, 입력 이미지의 각 픽셀의 RGB 정보를 포함하는 컬러 데이터와 같은 크기를 갖고, 모든 요소의 값이 0인 어레이 데이터를 생성하고, 상기 얼굴 이미지에 포함된 적어도 하나의 영역에 대응하는 상기 어레이 데이터의 적어도 하나의 요소에 1 값을 부여하여 영역 정보를 생성할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, 상기 얼굴 이미지의 적어도 하나의 영역의 종류를 결정하고, 상기 컬러 데이터와 같은 크기를 갖고, 모든 요소의 값이 0인 어레이 데이터를 생성하고, 상기 얼굴 이미지에 포함된 적어도 하나의 영역에 대응하는 상기 어레이 데이터의 적어도 하나의 요소에, 상기 결정한 적어도 하나의 영역의 종류를 지시하는 값을 부여하여 영역 정보를 생성할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, 상기 적어도 하나의 얼굴 이미지에 포함된 적어도 하나의 영역의 윤곽 및 상기 적어도 하나의 영역의 내부 중 적어도 하나를 지시하는 영역 정보를 생성할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, 상기 입력 이미지에서 상기 적어도 하나의 얼굴 이미지를 제외한 배경 이미지를 검출하고, 및 상기 화질이 개선된 얼굴 이미지 및 상기 배경 이미지의 합성 비율을 결정하고, 상기 합성 비율에 기초하여, 상기 화질이 개선된 얼굴 이미지 및 상기 배경이미지를 합성하여 출력 이미지를 생성할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, 상기 합성 비율을 사용자 입력에 기초하여 결정할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 컬러 데이터는, 상기 입력 이미지의 각 픽셀의 R, G, B에 대한 정보를 포함할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, GT(ground truth) 영상을 획득하고, 상기 GT 영상에 노이즈를 추가한 테스트 영상을 생성하고, 상기 테스트 영상을 정해진 웨이트를 갖는 적대적 생성 신경망에 입력하여 출력 영상을 획득하고, 상기 출력 영상 및 상기 테스트 영상의 색상 도메인을 변환하고, 상기 색상 도메인을 변환한 출력 영상 및 테스트 영상의 픽셀와이즈 에러(pixel-wise error)를 계산하고, 상기 픽셀와이즈 에러에 기초하여 상기 웨이트를 변경할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 적어도 하나의 프로세서는, 상기 색상 도메인을 변환한 출력 영상의 크로마 채널(chroma channel)의 TV(total variance) 값을 계산하고, 상기 크로마 채널의 TV 값이 정해진 값보다 큰 것으로 확인함에 대응하여 상기 웨이트를 변경할 수 있다.
본 개시의 기술적 사상에 따른 입력 이미지의 화질을 개선하기 위한 전자 장치를 이용한 이미지 화질 개선 방법에 있어서, 상기 입력 이미지의 열화도를 계산하고, 상기 입력 이미지의 열화도가 정해진 값보다 큰 것으로 결정함에 대응하여, 상기 입력 이미지에 포함된 적어도 하나의 얼굴 이미지를 검출하는 동작, 상기 적어도 하나의 얼굴 이미지에 포함된 적어도 하나의 영역의 위치 및 종류를 지시하는 영역 정보를 생성하는 동작, 상기 입력 이미지 및 상기 영역 정보를 입력으로 하는 인공 신경망(Artificial Neural Network; ANN)을 이용하여, 화질이 개선된 얼굴 이미지를 생성하는 동작, 및 상기 화질이 개선된 얼굴 이미지 및 상기 입력 이미지를 합성하여 출력 이미지를 생성하는 동작을 포함할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 출력 이미지를 생성하는 동작은, 상기 입력 이미지의 색상 정보 및 노이즈 정보를 포함하는 특성 정보에 기초하여 상기 적어도 하나의 얼굴 이미지 각각의 화질을 지시하는 적어도 하나의 열화도를 계산하는 동작, 및
계산한 적어도 하나의 열화도에 기반하여 상기 입력 이미지의 화질 개선이 필요한지 여부를 결정하는 동작을 포함할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 영역 정보를 생성하는 동작은, 입력 이미지의 각 픽셀의 RGB 정보를 포함하는 컬러 데이터와 같은 크기를 갖고, 모든 요소의 값이 0인 어레이 데이터를 생성하고, 상기 얼굴 이미지에 포함된 적어도 하나의 영역에 대응하는 상기 어레이 데이터의 적어도 하나의 요소에 1 값을 부여하여 영역 정보를 생성하는 동작을 더 포함할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 영역 정보를 생성하는 동작은, 상기 얼굴 이미지의 적어도 하나의 영역의 종류를 결정하고, 상기 컬러 데이터와 같은 크기를 갖고, 모든 요소의 값이 0인 어레이 데이터를 생성하고, 상기 얼굴 이미지에 포함된 적어도 하나의 영역에 대응하는 상기 어레이 데이터의 적어도 하나의 요소에, 상기 결정한 적어도 하나의 영역의 종류를 지시하는 값을 부여하여 영역 정보를 생성하는 동작을 더 포함할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, 상기 출력 이미지를 생성하는 동작은, 상기 입력 이미지에서 상기 적어도 하나의 얼굴 이미지를 제외한 배경 이미지를 검출하는 동작, 및 상기 화질이 개선된 얼굴 이미지 및 상기 배경 이미지를 합성하여 출력 이미지를 생성하는 동작을 더 포함할 수 있다.
또한, 본 개시의 기술적 사상에 따르면, GT(ground truth) 영상을 획득하는 동작, 상기 GT 영상에 노이즈를 추가한 테스트 영상을 생성하는 동작, 상기 테스트 영상을 정해진 웨이트를 갖는 적대적 생성 신경망에 입력하여 출력 영상을 획득하는 동작, 상기 출력 영상 및 상기 테스트 영상의 색상 도메인을 변환하는 동작, 상기 색상 도메인을 변환한 출력 영상 및 테스트 영상의 픽셀와이즈 에러(pixel-wise error)를 계산하는 동작, 상기 픽셀와이즈 에러에 기초하여 상기 웨이트를 변경하는 동작을 더 포함할 수 있다.
이상에서와 같이 도면과 명세서에서 예시적인 실시예들이 개시되었다. 본 명세서에서 특정한 용어를 사용하여 실시예들을 설명되었으나, 이는 단지 본 개시의 기술적 사상을 설명하기 위한 목적에서 사용된 것이지 의미 한정이나 특허청구범위에 기재된 본 개시의 범위를 제한하기 위하여 사용된 것은 아니다. 그러므로 본 기술분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다. 따라서, 본 개시의 진정한 기술적 보호범위는 첨부된 특허청구범위의 기술적 사상에 의해 정해져야 할 것이다.

Claims (15)

  1. 입력 이미지의 화질을 개선하기 위한 전자 장치에 있어서,
    적어도 하나의 인스트럭션이 저장된 메모리; 및
    적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서는 상기 적어도 하나의 인스트럭션을 실행하여,
    상기 입력 이미지의 열화도를 계산하고,
    상기 입력 이미지의 열화도가 정해진 값보다 큰 것으로 결정함에 대응하여 상기 입력 이미지에 포함된 적어도 하나의 얼굴 이미지를 검출하고,
    상기 적어도 하나의 얼굴 이미지에 포함된 적어도 하나의 영역의 위치 및 종류를 지시하는 영역 정보를 생성하고,
    상기 입력 이미지 및 상기 영역 정보를 입력으로 하는 인공 신경망(Artificial Neural Network; ANN)을 이용하여, 화질이 개선된 얼굴 이미지를 생성하고, 및
    상기 화질이 개선된 얼굴 이미지 및 상기 입력 이미지를 합성하여 출력 이미지를 생성하는 전자 장치.
  2. 제1 항에 있어서,
    상기 적어도 하나의 프로세서는,
    상기 입력 이미지의 색상 정보 및 노이즈 정보를 포함하는 특성 정보에 기초하여 상기 적어도 하나의 얼굴 이미지 각각의 화질을 지시하는 적어도 하나의 열화도를 계산하고, 및
    계산한 상기 적어도 하나의 열화도에 기반하여 상기 입력 이미지의 화질 개선이 필요한지 여부를 결정하는 전자 장치.
  3. 제2 항에 있어서,
    상기 적어도 하나의 프로세서는,
    상기 적어도 하나의 열화도를 합산한 값과 상기 적어도 하나의 얼굴 이미지의 총 개수의 비율이 정해진 값보다 큰 것으로 계산함에 대응하여, 상기 입력 이미지의 화질 개선이 필요한 것으로 결정하는 전자 장치.
  4. 제2 항 또는 제3 항에 있어서,
    상기 적어도 하나의 프로세서는,
    열화도가 정해진 값보다 큰 것으로 결정함에 대응하여, 상기 열화도에 대응하는 얼굴 이미지를 화질 개선이 필요한 것으로 결정하는 전자 장치.
  5. 제4 항에 있어서,
    상기 적어도 하나의 프로세서는,
    상기 화질 개선이 필요한 것으로 결정한 얼굴 이미지의 수와 상기 적어도 하나의 얼굴 이미지의 총 개수의 비율이 정해진 값보다 크면 상기 입력 이미지의 화질 개선이 필요한 것으로 결정하는 전자 장치.
  6. 제1 항 내지 제5 항 중 어느 한 항에 있어서,
    상기 적어도 하나의 프로세서는,
    입력 이미지의 각 픽셀의 RGB 정보를 포함하는 컬러 데이터와 같은 크기를 갖고, 모든 요소의 값이 0인 어레이 데이터를 생성하고,
    상기 얼굴 이미지에 포함된 적어도 하나의 영역에 대응하는 상기 어레이 데이터의 적어도 하나의 요소에 1 값을 부여하여 영역 정보를 생성하는 전자 장치.
  7. 제1 항 내지 제6 항 중 어느 한 항에 있어서,
    상기 적어도 하나의 프로세서는,
    상기 얼굴 이미지의 적어도 하나의 영역의 종류를 결정하고,
    상기 컬러 데이터와 같은 크기를 갖고, 모든 요소의 값이 0인 어레이 데이터를 생성하고,
    상기 얼굴 이미지에 포함된 적어도 하나의 영역에 대응하는 상기 어레이 데이터의 적어도 하나의 요소에, 상기 결정한 적어도 하나의 영역의 종류를 지시하는 값을 부여하여 영역 정보를 생성하는 전자 장치.
  8. 제1 항 내지 제7 항 중 어느 한 항에 있어서,
    상기 적어도 하나의 프로세서는,
    상기 적어도 하나의 얼굴 이미지에 포함된 적어도 하나의 영역의 윤곽 및 상기 적어도 하나의 영역의 내부 중 적어도 하나를 지시하는 영역 정보를 생성하는 전자 장치.
  9. 제1 항 내지 제8 항 중 어느 한 항에 있어서,
    상기 적어도 하나의 프로세서는,
    상기 입력 이미지에서 상기 적어도 하나의 얼굴 이미지를 제외한 배경 이미지를 검출하고, 및
    상기 화질이 개선된 얼굴 이미지 및 상기 배경 이미지의 합성 비율을 결정하고,
    상기 합성 비율에 기초하여, 상기 화질이 개선된 얼굴 이미지 및 상기 배경이미지를 합성하여 출력 이미지를 생성하는 전자 장치.
  10. 제1 항 내지 제9 항 중 어느 한 항에 있어서,
    상기 적어도 하나의 프로세서는,
    GT(ground truth) 영상을 획득하고,
    상기 GT 영상에 노이즈를 추가한 테스트 영상을 생성하고,
    상기 테스트 영상을 정해진 웨이트를 갖는 적대적 생성 신경망에 입력하여 출력 영상을 획득하고,
    상기 출력 영상 및 상기 테스트 영상의 색상 도메인을 변환하고,
    상기 색상 도메인을 변환한 출력 영상 및 테스트 영상의 픽셀와이즈 에러(pixel-wise error)를 계산하고,
    상기 픽셀와이즈 에러에 기초하여 상기 웨이트를 변경하는 전자 장치.
  11. 제10 항에 있어서,
    상기 적어도 하나의 프로세서는,
    상기 색상 도메인을 변환한 출력 영상의 크로마 채널(chroma channel)의 TV(total variance) 값을 계산하고,
    상기 크로마 채널의 TV 값이 정해진 값보다 큰 것으로 확인함에 대응하여 상기 웨이트를 변경하는 전자 장치.
  12. 입력 이미지의 화질을 개선하기 위한 전자 장치를 이용한 이미지 화질 개선 방법에 있어서,
    상기 입력 이미지의 열화도를 계산하고, 상기 입력 이미지의 열화도가 정해진 값보다 큰 것으로 결정함에 대응하여, 상기 입력 이미지에 포함된 적어도 하나의 얼굴 이미지를 검출하는 동작,
    상기 적어도 하나의 얼굴 이미지에 포함된 적어도 하나의 영역의 위치 및 종류를 지시하는 영역 정보를 생성하는 동작,
    상기 입력 이미지 및 상기 영역 정보를 입력으로 하는 인공 신경망(Artificial Neural Network; ANN)을 이용하여, 화질이 개선된 얼굴 이미지를 생성하는 동작, 및
    상기 화질이 개선된 얼굴 이미지 및 상기 입력 이미지를 합성하여 출력 이미지를 생성하는 동작을 포함하는 방법.
  13. 제12 항에 있어서,
    상기 출력 이미지를 생성하는 동작은,
    상기 입력 이미지의 색상 정보 및 노이즈 정보를 포함하는 특성 정보에 기초하여 상기 적어도 하나의 얼굴 이미지 각각의 화질을 지시하는 적어도 하나의 열화도를 계산하는 동작, 및
    계산한 적어도 하나의 열화도에 기반하여 상기 입력 이미지의 화질 개선이 필요한지 여부를 결정하는 동작을 포함하는 방법.
  14. 제12 항 또는 제13 항 에 있어서,
    상기 영역 정보를 생성하는 동작은,
    입력 이미지의 각 픽셀의 RGB 정보를 포함하는 컬러 데이터와 같은 크기를 갖고, 모든 요소의 값이 0인 어레이 데이터를 생성하고,
    상기 얼굴 이미지에 포함된 적어도 하나의 영역에 대응하는 상기 어레이 데이터의 적어도 하나의 요소에 1 값을 부여하여 영역 정보를 생성하는 동작을 더 포함하는 방법.
  15. 제12 항 내지 제14 항 중 어느 한 항의 방법을 컴퓨터에서 수행하기 위한 프로그램이 기록된 컴퓨터로 읽을 수 있는 기록매체.
PCT/KR2022/020254 2022-02-07 2022-12-13 전자 장치 및 이미지 화질 개선 방법 WO2023149649A1 (ko)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR20220015763 2022-02-07
KR10-2022-0015763 2022-02-07
KR1020220165095A KR20230119589A (ko) 2022-02-07 2022-11-30 전자 장치 및 이미지 화질 개선 방법
KR10-2022-0165095 2022-11-30

Publications (1)

Publication Number Publication Date
WO2023149649A1 true WO2023149649A1 (ko) 2023-08-10

Family

ID=87552521

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2022/020254 WO2023149649A1 (ko) 2022-02-07 2022-12-13 전자 장치 및 이미지 화질 개선 방법

Country Status (1)

Country Link
WO (1) WO2023149649A1 (ko)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013054457A (ja) * 2011-09-01 2013-03-21 Nikon Corp 画像処理装置、画像処理方法、およびプログラム
JP5513960B2 (ja) * 2010-04-12 2014-06-04 株式会社メガチップス 画像処理装置
JP2014527778A (ja) * 2011-08-29 2014-10-16 アイ.シー.ブイ.ティー リミテッド ビデオコンテンツシステムの制御
KR101653038B1 (ko) * 2014-05-12 2016-09-12 주식회사 칩스앤미디어 이미지 패치를 이용한 해상도 스케일링 장치 및 그 방법

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5513960B2 (ja) * 2010-04-12 2014-06-04 株式会社メガチップス 画像処理装置
JP2014527778A (ja) * 2011-08-29 2014-10-16 アイ.シー.ブイ.ティー リミテッド ビデオコンテンツシステムの制御
JP2013054457A (ja) * 2011-09-01 2013-03-21 Nikon Corp 画像処理装置、画像処理方法、およびプログラム
KR101653038B1 (ko) * 2014-05-12 2016-09-12 주식회사 칩스앤미디어 이미지 패치를 이용한 해상도 스케일링 장치 및 그 방법

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
RUAN SHUAI, TANG CHAOWEI, ZHOU XU, JIN ZHUOYI, CHEN SHIYU, WEN HAOTIAN, LIU HONGBIN, TANG DONG: "Multi-Pose Face Recognition Based on Deep Learning in Unconstrained Scene", APPLIED SCIENCES, vol. 10, no. 13, 7 July 2020 (2020-07-07), pages 4669, XP093083182, DOI: 10.3390/app10134669 *

Similar Documents

Publication Publication Date Title
WO2019164232A1 (ko) 전자 장치, 이의 영상 처리 방법 및 컴퓨터 판독가능 기록 매체
US7580587B2 (en) Device and method for correcting image including person area
WO2017010695A1 (en) Three dimensional content generating apparatus and three dimensional content generating method thereof
WO2021201422A1 (ko) Ar에 적용 가능한 의미적인 분할 방법 및 시스템
WO2019074195A1 (ko) 딥러닝 기반 이미지 비교 장치, 방법 및 컴퓨터 판독가능매체에 저장된 컴퓨터 프로그램
US20030174869A1 (en) Image processing apparatus, image processing method, program and recording medium
WO2022260386A1 (ko) 딥러닝 네트워크를 이용한 배경 및 얼굴 합성 방법 및 장치
WO2021045599A1 (ko) 비디오 영상에 보케 효과를 적용하는 방법 및 기록매체
WO2020027519A1 (ko) 영상 처리 장치 및 그 동작방법
WO2020027584A1 (en) Method and an apparatus for performing object illumination manipulation on an image
WO2020055181A1 (ko) 영상 처리 장치 및 그 동작방법
WO2020149601A1 (ko) 3d cnn을 이용한 고속 영상 인식 방법 및 장치
WO2021261727A1 (ko) 캡슐 내시경 영상 판독 시스템 및 방법
WO2022050668A1 (ko) 깊이 영상을 이용한 착용형 증강현실 장치의 손동작 검출 방법 및 깊이 영상을 이용한 손동작 검출이 가능한 착용형 증강현실 장치
WO2023149649A1 (ko) 전자 장치 및 이미지 화질 개선 방법
WO2022097766A1 (ko) 가려진 영역 복원 방법 및 장치
WO2024071884A1 (ko) 민머리 인물 이미지 생성 장치 및 방법, 및 민머리 인물 이미지 생성 장치를 포함하는 가상 헤어 스타일링 체험 장치 및 이를 이용한 가상 헤어 스타일링 방법
WO2023075508A1 (ko) 전자 장치 및 그 제어 방법
WO2012053811A2 (ko) 텐서 보팅에 기반을 둔 컬러 클러스터링 시스템 및 그 방법
WO2020141907A1 (ko) 키워드에 기초하여 이미지를 생성하는 이미지 생성 장치 및 이미지 생성 방법
WO2020122513A1 (ko) 2차원 이미지 처리 방법 및 이 방법을 실행하는 디바이스
WO2022019389A1 (ko) 데이터 증강 기반 공간 분석 모델 학습 장치 및 방법
WO2022255523A1 (ko) 멀티 스케일 객체 이미지 복원 방법 및 장치
WO2022050742A1 (ko) 깊이 영상을 이용한 착용형 증강현실 장치의 손동작 검출 방법 및 깊이 영상을 이용한 손동작 검출이 가능한 착용형 증강현실 장치
WO2022004970A1 (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: 22925116

Country of ref document: EP

Kind code of ref document: A1