KR102556777B1 - Efficient image restoration method and device based k-NN search - Google Patents

Efficient image restoration method and device based k-NN search Download PDF

Info

Publication number
KR102556777B1
KR102556777B1 KR1020220010766A KR20220010766A KR102556777B1 KR 102556777 B1 KR102556777 B1 KR 102556777B1 KR 1020220010766 A KR1020220010766 A KR 1020220010766A KR 20220010766 A KR20220010766 A KR 20220010766A KR 102556777 B1 KR102556777 B1 KR 102556777B1
Authority
KR
South Korea
Prior art keywords
unit
image
distorted image
patches
patch
Prior art date
Application number
KR1020220010766A
Other languages
Korean (ko)
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
Application filed by 이화여자대학교 산학협력단 filed Critical 이화여자대학교 산학협력단
Priority to KR1020220010766A priority Critical patent/KR102556777B1/en
Application granted granted Critical
Publication of KR102556777B1 publication Critical patent/KR102556777B1/en

Links

Images

Classifications

    • G06T5/006
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T5/001
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning

Landscapes

  • Physics & Mathematics (AREA)
  • Geometry (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

본 발명은 k-NN 탐색기반 영상복원장치 및 방법에 관한 것으로서, k-NN탐색 기반으로 왜곡된 영상을 복원하는 영상복원장치에 있어서, 왜곡영상을 입력받는 입력부; 상기 입력부에서 입력 받은 상기 왜곡영상을 토대로 하여 상기 왜곡영상에 대해 복원된 잔여영상을 예측하는 프로세서부 및 상기 프로세서부를 통해 예측된 상기 잔여영상을 상기 왜곡영상에 적용하여 상기 왜곡영상을 복원하여 출력하는 출력부를 포함하고, 상기 프로세서부는, 다수 개의 스테이지로 구성되며 상기 입력부에서 입력 받은 상기 왜곡영상을 다운샘플링하는 인코더부; 하나의 스테이지로 구성되며, 상기 인코더부에서 다운샘플링된 상기 왜곡영상을 가공하는 보틀넥부 및 다수 개의 스테이지로 구성되며 상기 보틀넥부에서 가공된 상기 왜곡영상을 초기 해상도로 업샘플링하는 디코더부를 포함하는 영상복원장치를 제공할 수 있다. The present invention relates to an image restoration apparatus and method based on a k-NN search, and an image restoration apparatus for restoring a distorted image based on a k-NN search, comprising: an input unit for receiving a distorted image; A processor unit predicting a residual image restored for the distorted image based on the distorted image input from the input unit, and applying the residual image predicted through the processor unit to the distorted image to restore and output the distorted image An encoder unit including an output unit, wherein the processor unit includes a plurality of stages and downsamples the distorted image received from the input unit; An image comprising a bottleneck unit comprising one stage and processing the distorted image downsampled by the encoder unit, and a decoder unit comprising a plurality of stages and upsampling the distorted image processed by the bottleneck unit to an initial resolution. Restoration equipment can be provided.

Figure R1020220010766
Figure R1020220010766

Description

k-NN 탐색기반 영상복원장치 및 방법{Efficient image restoration method and device based k-NN search}k-NN search based image restoration device and method {Efficient image restoration method and device based k-NN search}

본 발명은 k-NN 탐색기반 영상복원장치 및 방법에 관한 것으로, 보다 상세하게는 서로 다른 두 패치 간의 지역주의를 적용하는 방법으로 유사한 패치들 간의 쌍별 지역주의를 사용하여 지역성을 고려한 연산과 낮은 계산 복잡도를 가지며 넓은 수용영역을 가지는 k-NN 탐색기반 영상복원장치 및 방법에 관한 것이다.The present invention relates to an image restoration apparatus and method based on a k-NN searcher, and more particularly, as a method of applying localism between two different patches, operation considering locality and low computation by using pairwise localism between similar patches. It relates to a k-NN search based image restoration apparatus and method having complexity and wide receptive field.

전자 통신 기술의 비약적인 발달과 관련 영상 장비의 고도화에 따라 동영상 서비스가 유무선 통신을 통해 곳곳에서 제공되고 있으며, 일상에서도 스마트폰, 블랙박스 등을 통해 고화질의 동영상 촬영이 가능하다.With the rapid development of electronic communication technology and the advancement of related imaging equipment, video services are provided in many places through wired and wireless communication, and high-quality video recording is possible through smartphones and black boxes in everyday life.

다만, 영상이 흐릿하거나 눈, 비 등에 의한 영상 노이즈로 영상 왜곡이 발생된 경우, 필연적으로 영상 식별에 어려움이 따르기 마련이다. 이에, 영상 왜곡을 효과적으로 수정하고 복원하는 방법이 필요한 실정이다.However, when an image is blurry or image distortion occurs due to image noise caused by snow or rain, difficulties in image identification inevitably follow. Accordingly, there is a need for a method of effectively correcting and restoring image distortion.

이에, 다양한 기술들이 영상복원 분야에서 매우 뛰어난 성능을 보이는 추세이다. Accordingly, various technologies are trending to show very excellent performance in the field of image restoration.

그 중 전역주의(Global attention)을 사용하여 영상 복원을 하는 경우, 입력 영상을 서로 겹치지 않는 일정 크기의 패치로 나눈 후, 모든 패치 간의 관계를 고려함으로써 뛰어난 성능을 보였으나, 입력 영상 해상도의 제곱에 비례하는 높은 계산 복잡도를 가지므로, 높은 해상도를 가지는 영상을 출력으로 하는 태스크에는 적용하기 어려울 뿐만 아니라 지역성 또한 고려되지 않는 문제가 있다.Among them, in the case of image restoration using global attention, excellent performance was shown by dividing the input image into patches of a certain size that do not overlap each other and considering the relationship between all patches, but the square of the input image resolution Since it has proportionally high computational complexity, it is not only difficult to apply to a task outputting an image having a high resolution, but also has a problem in that locality is not considered.

또한, 지역주의(Local attention)은 입력 영상을 서로 겹치지 않는 일정 크기의 패치로 나눈 후, 패치 내의 픽셀 간의 관계 만을 고려하여 영상을 복원함으로써 다양한 태스크에서 뛰어난 성능을 보였으나, 비교적 좁은 수용 영역을 가지므로 영상 복원에 적합하지 않는 문제가 있다.In addition, local attention showed excellent performance in various tasks by dividing the input image into non-overlapping patches of a certain size and then restoring the image by considering only the relationship between pixels in the patch, but had a relatively narrow receptive field. Therefore, there is a problem that is not suitable for image restoration.

따라서, 넓은 수용 지역을 가지면서 낮은 계산량을 통해 왜곡된 영상을 복원하는 기술이 요구되고 있다.Accordingly, there is a demand for a technique for restoring a distorted image with a large accommodation area and a low amount of computation.

종래기술로는 대한민국 등록특허 제 10-2013777호 "동영상 왜곡 복원 방법 및 이를 적용한 장치"가 있다.As a prior art, there is Korean Patent Registration No. 10-2013777 entitled "Video Distortion Restoration Method and Apparatus Applying the Same".

상기와 같은 문제를 해결하고자, 본 발명은 유사한 패치들 간의 쌍별 지역주의를 사용하여 지역성을 고려한 연산과 낮은 계산 복잡도를 가지며 넓은 수용영역을 가지는 k-NN 탐색기반 영상복원장치 및 방법을 제공하는데 목적이 있다.In order to solve the above problems, the present invention aims to provide a k-NN search-based image restoration apparatus and method having a wide receptive field, low computational complexity and operation considering locality using pairwise localism between similar patches. there is

상기와 같은 과제를 해결하기 위하여, 본 발명의 실시예에 따른 k-NN 탐색 기반 영상복원장치 k-NN탐색 기반으로 왜곡된 영상을 복원하는 영상복원장치에 있어서, 왜곡영상을 입력받는 입력부; 상기 입력부에서 입력 받은 상기 왜곡영상을 토대로 하여 상기 왜곡영상에 대해 복원된 잔여영상 예측하는 프로세서부 및 상기 프로세서부를 통해 예측된 상기 잔여영상을 상기 왜곡영상에 적용하여 상기 왜곡영상을 복원하여 출력하는 출력부를 포함하고, 상기 프로세서부는, 다수 개의 스테이지로 구성되며 상기 입력부에서 입력 받은 상기 왜곡영상을 다운샘플링하는 인코더부; 하나의 스테이지로 구성되며, 상기 인코더부에서 다운샘플링된 상기 왜곡영상을 가공하는 보틀넥부 및 다수 개의 스테이지로 구성되며 상기 보틀넥부에서 가공된 상기 왜곡영상을 초기 해상도로 업샘플링하는 디코더부를 포함할 수 있다.In order to solve the above problem, an image restoration apparatus based on k-NN search according to an embodiment of the present invention An image restoration apparatus for restoring a distorted image based on k-NN search, comprising: an input unit for receiving a distorted image; A processor unit that predicts the restored residual image for the distorted image based on the distorted image received from the input unit, and an output that restores and outputs the distorted image by applying the residual image predicted through the processor unit to the distorted image and an encoder unit comprising a plurality of stages and downsampling the distorted image received from the input unit; It may include a bottleneck part that is composed of one stage and processes the distorted image downsampled by the encoder part, and a decoder part that is composed of a plurality of stages and upsamples the distorted image processed by the bottleneck part to an initial resolution. there is.

또한, 상기 각각의 스테이지는, 상기 왜곡영상을 일정 크기의 패치로 나누는 패치파티션(Patch partition)부 및 상기 패치파티션부에서 나눠진 각각의 상기 패치에 대해 유사한 패치를 찾아 유사도를 구하여 가중치 합을 도출하는 KTB(k-NN Transformer Block)부를 포함할 수 있다.In addition, each of the stages includes a patch partition unit that divides the distorted image into patches of a certain size, and a similar patch for each of the patches divided by the patch partition unit, finds a similarity, and derives a sum of weights. It may include a k-NN Transformer Block (KTB) unit.

또한, 상기 KTB(k-NN Transformer Block)부는, 상기 패치를 정규화하는 LN(Layer Normalization)부; 상기 정규화된 패치 간의 유사도를 통해 가중치 합을 도출하는 KLA(k-NN Local Attention)부 및 상기 패치 간의 지역성을 강조하고 학습하기 위해 수행되는 FFN(Feed-Forward Network)부를 포함할 수 있다.The k-NN Transformer Block (KTB) unit may include a Layer Normalization (LN) unit normalizing the patch; A k-NN Local Attention (KLA) unit for deriving a weighted sum through similarity between the normalized patches and a Feed-Forward Network (FFN) unit for emphasizing and learning locality between the patches may be included.

또한, 상기 KLA(k-NN Local Attention)부는, 상기 각각의 패치에 대해 지역 민감 해싱(LSH, Locality sensitive hashing)을 이용하여 k-NN 매칭을 통해 유사한 유사패치를 찾는 매칭부; 상기 매칭부에서 찾은 상기 유사패치를 정렬하여 그룹화하고, 그룹화된 유사패치를 청크로 분할하는 그룹화부 및 상기 청크에 포함되는 상기 유사패치들 간의 쌍별(Pair-wise) 지역주의를 수행하여 상기 유사패치들 사이의 유사도를 통해 가중치 합을 구하는 유사도도출부를 포함할 수 있다.In addition, the k-NN Local Attention (KLA) unit may include a matching unit that finds similar similar patches through k-NN matching using Locality Sensitive Hashing (LSH) for each patch; A grouping unit that sorts and groups the similar patches found in the matching unit, divides the grouped similar patches into chunks, and performs pair-wise regionalism between the similar patches included in the chunks to obtain the similar patches It may include a similarity derivation unit for obtaining a weighted sum through the similarity between them.

또한, 상기 지역 민감 해싱(LSH, Locality sensitive hashing)은, 다수 개로 분할된 버킷이 형성된 맵에 대하여, 상기 패치를 적용하고 랜덤 회전 행렬을 통해 상기 맵을 회전하여 동일한 상기 버킷에 속하는 상기 패치들은 동일한 해시값을 갖는 것을 특징으로 한다.In addition, the locality sensitive hashing (LSH) applies the patch to a map in which a plurality of buckets are formed and rotates the map through a random rotation matrix so that the patches belonging to the same bucket are identical. It is characterized by having a hash value.

또한, 상기 쌍별지역주의는, 인접하게 위치하는 두개의 상기 유사패치에 대하여, 상기 유사패치를 구성하는 픽셀 간의 유사도를 구하는 것을 특징으로 한다.In addition, the pairwise regionalism is characterized by obtaining a degree of similarity between pixels constituting the similar patches for two adjacent similar patches.

또한, k-NN탐색 기반으로 왜곡된 영상을 복원하는 영상복원방법에 있어서, 왜곡영상을 입력받는 입력단계; 상기 왜곡영상을 토대로 하여 상기 왜곡영상에 대해 복원된 잔여영상을 예측하는 예측단계 및 상기 잔여영상을 상기 왜곡영상에 적용하여 상기 왜곡영상을 복원하여 출력하는 출력단계를 포함하고, 상기 예측단계는, 다수 개의 스테이지로 구성되는 인코더부에서 상기 왜곡영상을 다운샘플링하는 단계; 하나의 스테이지로 구성되는 보틀넥부에서 다운샘플링된 상기 왜곡영상을 가공하는 단계 및 다수 개의 스테이지로 구성되는 디코더부에서 가공된 상기 왜곡영상을 초기 해상도로 업샘플링하는 단계를 포함하고, 상기 스테이지는, 상기 왜곡영상을 일정 크기의 패치로 나누는 패치파티션(Patch partition)단계 및 상기 패치파티션단계에서 나눠진 상기 패치를 k-근접지역주의(K-NN local attention, KLA)에 적용하여 각각의 상기 패치에 대해 유사한 패치를 찾아 유사도를 구하여 가중치 합을 도출하는 도출단계를 포함하는 영상복원방법을 제공할 수 있다.In addition, in the image restoration method for restoring a distorted image based on k-NN search, the input step of receiving a distorted image; A prediction step of predicting a reconstructed residual image for the distorted image based on the distorted image and an output step of restoring and outputting the distorted image by applying the residual image to the distorted image, wherein the predicting step, downsampling the distorted image in an encoder unit composed of a plurality of stages; Processing the distorted image downsampled in a bottleneck unit composed of one stage and upsampling the distorted image processed in a decoder unit composed of a plurality of stages to an initial resolution, the stage comprising: A patch partition step of dividing the distorted image into patches of a certain size and applying K-NN local attention (KLA) to the patch divided in the patch partition step for each patch It is possible to provide an image restoration method including a derivation step of finding a similar patch, obtaining a similarity, and deriving a weighted sum.

본 발명에 의하면 k-NN 탐색기반 영상복원장치 및 방법은 지역성을 고려한 연산과 낮은 계산 복잡도를 가지며 영상의 세밀한 디테일을 복원할 수 있기 때문에, 왜곡된 영상으로부터 높은 품질의 영상을 획득할 수 있다.According to the present invention, the k-NN search-based image restoration apparatus and method has operation considering locality and low computational complexity and can restore fine details of an image, so that a high quality image can be obtained from a distorted image.

또한, 패치 간의 연결성을 부여하기 때문에 전역주의의 장점인 넓은 수용영역을 가지는 장점이 있다.In addition, since it provides connectivity between patches, it has the advantage of having a wide reception area, which is an advantage of globalism.

또한, k-NN 탐색에서 유사한 패치의 개수인 k의 개수에 따라 계산량과 성능 사이의 균형을 조절할 수 있다.In addition, the balance between the amount of computation and performance can be adjusted according to the number of k, which is the number of similar patches in k-NN search.

또한, 본 발명에 따른 k-NN 탐색기반 영상복원장치 및 방법을 통해 획득된 영상은 다양한 영상 기반 태스크(영상 인식, 객체 검출, 의미론적 분할 등)의 입력으로 활용되어 왜곡에 의한 성능 저하를 방지할 수 있어 다양한 분야에서 활용이 가능한 장점이 있다.In addition, the image obtained through the k-NN search-based image restoration apparatus and method according to the present invention is used as an input for various image-based tasks (image recognition, object detection, semantic segmentation, etc.) to prevent performance degradation due to distortion. It has the advantage that it can be used in various fields.

도 1은 본 발명의 실시예에 따른 k-NN 탐색 기반 영상복원장치의 블록도.
도 2는 본 발명의 실시예에 따른 k-NN 탐색 기반 영상복원장치 및 방법에서의 전체적인 구조를 개략적으로 나타낸 도면.
도 3은 도 2의 각 스테이지의 구조를 개략적으로 나타낸 도면.
도 4는 도 3의 KTB부의 구조를 개략적으로 나타낸 도면.
도 5는 도 4의 KTB부의 구조를 구체적으로 나타낸 도면.
도 6은 본 발명의 실시예에 따른 k-NN 탐색 기반 영상복원방법의 흐름도.
도 7 내지 9는 실시예에 따른 k-NN 탐색 기반 영상복원방법의 정성적 평가를 위하여 기존방법과 본 발명을 적용한 영상을 개략적으로 나타낸 예시도.
1 is a block diagram of an image restoration apparatus based on k-NN search according to an embodiment of the present invention.
2 is a diagram schematically showing the overall structure of an image restoration apparatus and method based on k-NN search according to an embodiment of the present invention.
FIG. 3 is a diagram schematically showing the structure of each stage of FIG. 2;
Figure 4 is a view schematically showing the structure of the KTB unit of Figure 3;
5 is a view showing the structure of the KTB unit of FIG. 4 in detail;
6 is a flowchart of an image restoration method based on k-NN search according to an embodiment of the present invention.
7 to 9 are exemplary diagrams schematically showing an image to which an existing method and the present invention are applied for qualitative evaluation of a k-NN search based image restoration method according to an embodiment.

이하, 도면을 참조한 본 발명의 설명은 특정한 실시 형태에 대해 한정되지 않으며, 다양한 변환을 가할 수 있고 여러 가지 실시예를 가질 수 있다. 또한, 이하에서 설명하는 내용은 본 발명의 사상 및 기술 범위에 포함되는 모든 변환, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.Hereinafter, the description of the present invention with reference to the drawings is not limited to specific embodiments, and various transformations may be applied and various embodiments may be applied. In addition, the content described below should be understood to include all conversions, equivalents, or substitutes included in the spirit and scope of the present invention.

이하의 설명에서 제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용되는 용어로서, 그 자체에 의미가 한정되지 아니하며, 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.In the following description, terms such as first and second are terms used to describe various components, and are not limited in meaning per se, and are used only for the purpose of distinguishing one component from another.

본 명세서 전체에 걸쳐 사용되는 동일한 참조번호는 동일한 구성요소를 나타낸다.Like reference numbers used throughout this specification indicate like elements.

본 발명에서 사용되는 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 또한, 이하에서 기재되는 "포함하다", "구비하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것으로 해석되어야 하며, 하나 또는 그 이상의 다른 특징들이나, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.Singular expressions used in the present invention include plural expressions unless the context clearly dictates otherwise. In addition, terms such as "include", "include" or "have" described below are intended to designate that features, numbers, steps, operations, components, parts, or combinations thereof described in the specification exist. should be construed, and understood not to preclude the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.

이하, 본 발명의 실시 예를 첨부한 도 1 내지 9를 참조하여 상세히 설명하기로 한다.Hereinafter, an embodiment of the present invention will be described in detail with reference to FIGS. 1 to 9 attached.

도 1은 본 발명의 실시예에 따른 k-NN 탐색 기반 영상복원장치의 블록도이고, 도 2는 본 발명의 실시예에 따른 k-NN 탐색 기반 영상복원장치 및 방법에서의 전체적인 구조를 개략적으로 나타낸 도면이고, 도 3은 도 2의 각 스테이지의 구조를 개략적으로 나타낸 도면이고, 도 4는 도 3의 KTB부의 구조를 개략적으로 나타낸 도면이며, 도 5는 도 4의 KTB부의 구조를 구체적으로 나타낸 도면이다.1 is a block diagram of an image restoration apparatus based on k-NN search according to an embodiment of the present invention, and FIG. 2 schematically shows the overall structure of an apparatus and method for image restoration based on a k-NN search according to an embodiment of the present invention. FIG. 3 is a diagram schematically showing the structure of each stage of FIG. 2, FIG. 4 is a view schematically showing the structure of the KTB unit of FIG. 3, and FIG. 5 is a detailed view of the structure of the KTB unit of FIG. it is a drawing

도 1 내지 4를 참조하면, 본 발명의 실시예에 따른 k-NN 탐색기반 영상복원장치(이하 간략히 '영상복원장치'라 함)(1)는 입력부(10), 프로세서부(20) 및 출력부(30)를 포함할 수 있다.Referring to FIGS. 1 to 4, a k-NN search-based image restoration device (hereinafter simply referred to as 'image restoration device') 1 according to an embodiment of the present invention includes an input unit 10, a processor unit 20 and an output unit. A portion 30 may be included.

입력부(10)는 왜곡영상을 입력받는다. 입력부(10)로 입력된 왜곡영상은 프로세서부(20)로 전달할 수 있다.The input unit 10 receives a distorted image. The distorted image input through the input unit 10 may be transmitted to the processor unit 20 .

프로세서부(20)는 입력부(10)로부터 전달받은 왜곡영상을 토대로 하여 왜곡영상에 대해 복원된 잔여영상을 예측할 수 있다. 인코더, 보틀넥 및 디코더에 대한 컨볼루션을 수행할 수 있다.The processor unit 20 may predict a reconstructed residual image for the distorted image based on the distorted image transmitted from the input unit 10 . It can perform convolution on the encoder, bottleneck and decoder.

도 2를 참조하면, 프로세서부(20)는 다양한 규모의 패턴을 고려하기 위해 U자형 계층구조를 가질 수 있다.Referring to FIG. 2 , the processor unit 20 may have a U-shaped hierarchical structure in order to consider patterns of various scales.

보다 구체적으로, 프로세서부(20)는 인코더부(21), 보틀넥부(22) 및 디코더부(23)를 포함할 수 있다.More specifically, the processor unit 20 may include an encoder unit 21, a bottleneck unit 22 and a decoder unit 23.

인코더부(21)는 다수 개의 스테이지로 구성되며, 입력부(10)에서 입력 받은 왜곡영상을 다운샘플링 할 수 있다.The encoder unit 21 is composed of a plurality of stages and can downsample the distorted image input from the input unit 10 .

보틀넥부(22)는 하나의 스테이지로 구성되며, 인코더부(21)에서 다운샘플링된 왜곡영상을 가공할 수 있다.The bottleneck unit 22 is composed of one stage and can process a distorted image downsampled by the encoder unit 21 .

디코더부(23)는 다수 개의 스테이지로 구성되며 보틀넥부(22)에서 가공된 왜곡영상을 초기 해상도로 업샘플링 할 수 있다.The decoder unit 23 is composed of a plurality of stages and can upsample the distorted image processed in the bottleneck unit 22 to an initial resolution.

도 3을 참조하면, 각각의 스테이지는 패치파티션(Patch partition)부(201), 및 KTB(k-NN Transformer Block)부(202)를 포함할 수 있다.Referring to FIG. 3 , each stage may include a patch partition unit 201 and a k-NN Transformer Block (KTB) unit 202 .

이때, 인코더부(21)와 디코더부(23)는 각각 다운샘플링 및 업샘플링을 위해 보간부(203)를 더 포함할 수 있다.In this case, the encoder unit 21 and the decoder unit 23 may further include an interpolator 203 for downsampling and upsampling, respectively.

먼저, 패치파티션부(201)는 왜곡영상을 서로 겹치지 않는 일정 크기의 패치로 나눌 수 있다.First, the patch partition unit 201 may divide the distorted image into patches of a certain size that do not overlap each other.

KTB부(202)는 패치파티션부(201)에서 나눠진 각각의 패치에 대해 유사한 패치를 찾아 유사도를 구하여 가중치 합을 도출할 수 있다.The KTB unit 202 may derive a sum of weights by finding a similar patch for each patch divided by the patch partition unit 201 and obtaining a similarity.

보다 구체적으로, 도 4를 참조하면 KTB부(202)는 LN(Layer Normalization)부(202a), KLA(k-NN Local Attention)부(202b) 및 FFN (Feed-Forward Network)부(202c)를 포함할 수 있다.More specifically, referring to FIG. 4, the KTB unit 202 includes a Layer Normalization (LN) unit 202a, a k-NN Local Attention (KLA) unit 202b, and a Feed-Forward Network (FFN) unit 202c. can include

LN(Layer Normalization)부(202a)는 패치파티션부(201)에서 나눠진 패치를 정규화할 수 있다. 이때, LN부(202a)는 본 기술분야에서 통상적으로 이용하고 있는 기술을 의미할 수 있으며, 이에 한정하지 않는다.The LN (Layer Normalization) unit 202a may normalize the patches divided in the patch partition unit 201 . At this time, the LN unit 202a may refer to a technology commonly used in the art, but is not limited thereto.

KLA(k-NN Local Attention)부(202b)는 정규화된 패치 간의 유사도를 통해 가중치 합을 도출할 수 있으며, 매칭부, 청크분할부 및 유사도도출부를 통해 수행될 수 있다.The KLA (k-NN Local Attention) unit 202b may derive a weighted sum through similarities between normalized patches, and may be performed through a matching unit, a chunk division unit, and a similarity derivation unit.

매칭부는 각각의 패치에 대해 지역 민감 해싱(LSH, Locality sensitive hashing)을 이용하여 k-NN매칭을 통해 각각의 패치와 유사한 유사패치를 찾을 수 있다.The matching unit may find similar patches similar to each patch through k-NN matching using locality sensitive hashing (LSH) for each patch.

보다 구체적으로, 매칭부는 k-NN매칭을 위해 두 패치 사이의 쌍별 거리(a pair-wise distance)를 계산해야 한다. 이때, 매칭부는 쌍별 거리가 입력 길이에 대한 2차 복잡성을 포함하므로, 선형 계산 복잡성을 가지는 지역 민감 해싱을 이용하여 쌍별 거리를 계산하고, k-NN매칭을 수행할 수 있다.More specifically, the matching unit must calculate a pair-wise distance between two patches for k-NN matching. In this case, since the pairwise distance includes the quadratic complexity of the input length, the matching unit may calculate the pairwise distance using region sensitive hashing having a linear calculation complexity and perform k-NN matching.

여기서, 지역 민감 해싱(LSH, Locality sensitive hashing)은 다수 개로 분할된 버킷이 형성된 맵에 대하여, 랜덤 회전 행렬을 통해 맵을 회전한다. 이후, 지역 민감 해싱은 회전이 끝나고 멈춘 맵에서 동일한 버킷에 속하는 패치가 동일한 해시값을 가지도록 한다.Here, locality sensitive hashing (LSH) rotates a map through a random rotation matrix with respect to a map in which a plurality of divided buckets are formed. Afterwards, region-sensitive hashing ensures that patches belonging to the same bucket have the same hash value in the stopped map after rotation.

지역 민감 해싱에 대하여, m개의 버킷이 있다고 가정하면 랜덤 회전 행렬

Figure 112022009427471-pat00001
을 구형으로 투영된 패치
Figure 112022009427471-pat00002
에 곱하면 다음의 식과 같이 해시값
Figure 112022009427471-pat00003
이 할당될 수 있다.For region sensitive hashing, assuming there are m buckets, a random rotation matrix
Figure 112022009427471-pat00001
patch as a spherical projection of
Figure 112022009427471-pat00002
When multiplied by , the hash value is as follows
Figure 112022009427471-pat00003
can be assigned.

Figure 112022009427471-pat00004
Figure 112022009427471-pat00004

여기서 [;]는 두 원소의 연접을 나타낼 수 있으며, N은 패치의 개수를 나타낼 수 있다. Here, [;] may indicate the concatenation of two elements, and N may indicate the number of patches.

이때, 매칭부는 지역 민감 해싱을 여러 번 수행하여 단일 수행 시 비슷한 패치가 서로 다른 버킷에 속하거나, 서로 다른 패치가 동일한 버킷에 속하는 확률을 줄이도록 할 수 있다.In this case, the matching unit may perform region-sensitive hashing several times to reduce the probability that similar patches belong to different buckets or that different patches belong to the same bucket in a single execution.

도 5를 참조하면, 그룹화부는 매칭부에서 찾은 유사패치를 정렬하여 그룹화하고, 그룹화된 유사패치를 청크로 분할할 수 있다.Referring to FIG. 5 , the grouping unit may sort and group similar patches found in the matching unit, and divide the grouped similar patches into chunks.

보다 구체적으로, 그룹화부는 해시값이 동일한 패치만 쿼리 패치에 효율적으로 기여할 수 있도록 먼저 패치를 해시값에 따라 정렬한 다음 정렬된 패치를 일괄 처리를 위해 각각 k개의 패치를 포함하는 청크로 분할하여 쌍별지역주의(Local Attention)가 동일한 청크에 속한 패치끼리만 수행되도록 할 수 있다.More specifically, the grouping unit first sorts the patches according to their hash value so that only patches with the same hash value can efficiently contribute to the query patch, and then divides the sorted patches into chunks each containing k patches for batch processing. Local Attention can be performed only between patches belonging to the same chunk.

즉, 그룹화부는 동일한 해시값을 갖는 유사패치들을 하나의 청크에 포함되도록 하여 그룹화된 유사패치를 다수 개의 청크로 분할할 수 있다.That is, the grouping unit divides the grouped similar patches into a plurality of chunks by including similar patches having the same hash value in one chunk.

여기서, k값은 지역 민감 해싱을 통해 구한 유사패치의 개수를 의미할 수 있다. 예컨대, 하나의 패치를 입력패치로 선정하여 지역 민감 해싱을 통해 유사패치가 3개가 도출된다면, k값은 3을 의미할 수 있다. 이때, 유사패치에는 입력패치와 가장 유사한 입력패치가 포함될 수 있으므로, 3개의 유사패치 중 하나는 입력패치가 될 수 있다. Here, the k value may mean the number of similar patches obtained through region sensitive hashing. For example, if one patch is selected as an input patch and three similar patches are derived through region sensitive hashing, the k value may mean 3. In this case, since the similar patches may include an input patch most similar to the input patch, one of the three similar patches may be an input patch.

다음의 식과 같이

Figure 112022009427471-pat00005
이 해시값의 오름차순으로 패치를 정렬하는 순열을 나타낼 수 있다.as in the following expression
Figure 112022009427471-pat00005
A permutation of arranging patches in ascending order of this hash value may be indicated.

Figure 112022009427471-pat00006
Figure 112022009427471-pat00006

또한, 상기의 단순화를 위해 다음의 식과 같이

Figure 112022009427471-pat00007
Figure 112022009427471-pat00008
Figure 112022009427471-pat00009
와 같은 정렬된 패치로 정의할 수 있다. 이때,
Figure 112022009427471-pat00010
에 대한
Figure 112022009427471-pat00011
번째 청크
Figure 112022009427471-pat00012
Figure 112022009427471-pat00013
개의 패치가 포함되어 있다. In addition, for the above simplification, as
Figure 112022009427471-pat00007
cast
Figure 112022009427471-pat00008
go
Figure 112022009427471-pat00009
It can be defined as an ordered patch such as At this time,
Figure 112022009427471-pat00010
for
Figure 112022009427471-pat00011
th chunk
Figure 112022009427471-pat00012
Is
Figure 112022009427471-pat00013
Patches are included.

Figure 112022009427471-pat00014
Figure 112022009427471-pat00014

유사도도출부는 청크에 포함되는 유사패치들 간의 쌍별지역주의를 수행하여 유사패치들 사이의 유사도를 통해 가중치 합을 구할 수 있다.The similarity deriving unit may perform pairwise regionalism between similar patches included in a chunk to obtain a weighted sum through the similarity between similar patches.

이때, 유사도도출부는 유사패치들 사이의 유사도를 구하는 것에 있어서, 각 유사패치를 구성하는 픽셀 간의 유사도를 구할 수 있다. At this time, the similarity deriving unit may obtain a similarity between pixels constituting each similar patch in obtaining a similarity between similar patches.

보다 구체적으로, 유사도도출부는 두 패치간 유사도를 구할 경우, 동일한 위치에 존재하는 픽셀 간 유사도를 구할 수 있다. More specifically, when obtaining a similarity between two patches, the similarity deriving unit may obtain a similarity between pixels existing at the same location.

또한, 정렬되어 입력된 패치들

Figure 112022009427471-pat00015
는 쿼리(Query), 키(Key) 및 밸류(Value) 값으로 입력되어 각각 학습가능한 투영 함수
Figure 112022009427471-pat00016
Figure 112022009427471-pat00017
가 수행될 수 있다. 이때, 하나의 청크 안에 있는 k개의 패치들은 k 2 회 만큼 쌍별지역주의가 수행될 수 있다. 또한, 쌍별지역주의는 다음의 식과 같이 p번째 패치가 쿼리로 출력되고, q번째 패치가 키와 밸류로 사용될 수 있다. Also, sorted and input patches
Figure 112022009427471-pat00015
is a projection function that can be learned by entering it as a query, key, and value value
Figure 112022009427471-pat00016
and
Figure 112022009427471-pat00017
can be performed. At this time, k patches in one chunk may be subjected to pairwise regionalism k 2 times. In addition, in the pairwise regionalism, the p -th patch is output as a query and the q -th patch can be used as a key and value as in the following equation.

Figure 112022009427471-pat00018
Figure 112022009427471-pat00018

예컨대, 도 5를 참조하면 청크

Figure 112022009427471-pat00019
에서 쿼리패치로서
Figure 112022009427471-pat00020
로 나타내고,
Figure 112022009427471-pat00021
과 같이 k개의 출력 패치가 있다.For example, referring to FIG. 5, the chunk
Figure 112022009427471-pat00019
As a query patch in
Figure 112022009427471-pat00020
represented by,
Figure 112022009427471-pat00021
There are k output patches as

이처럼, 유사도도출부는 지역성을 향상시키기 위해 쌍별(Pair-wise) 방식으로 쿼리 및 키의 두 패치 간의 유사도 행렬을 k번 계산하여 유사도를 도출할 수 있다.As such, the similarity derivation unit may derive a similarity by calculating a similarity matrix between two patches of a query and a key k times in a pair-wise manner in order to improve locality.

쿼리 패치에 대한 k출력 패치가 계산될 때, 쌍별 출력을 쿼리 패치로 집계할 수 있으며, 입력패치

Figure 112022009427471-pat00022
에 대한 출력패치
Figure 112022009427471-pat00023
는 가중 합계로 다음과 같이 계산될 수 있다.When k output patches are computed for a query patch, the pairwise outputs can be aggregated into a query patch, and the input patch
Figure 112022009427471-pat00022
output patch for
Figure 112022009427471-pat00023
is a weighted sum and can be calculated as:

Figure 112022009427471-pat00024
Figure 112022009427471-pat00024

여기서,

Figure 112022009427471-pat00025
는 패치 간의 쌍별 상대적 유사도이고, N p 는 쿼리패치
Figure 112022009427471-pat00026
가 속한 청크의 패치 인덱스 집합을 의미할 수 있다.here,
Figure 112022009427471-pat00025
is the pairwise relative similarity between patches, and N p is the query patch
Figure 112022009427471-pat00026
This may mean a patch index set of chunks to which is included.

Figure 112022009427471-pat00027
Figure 112022009427471-pat00027

또한, 여기서

Figure 112022009427471-pat00028
는 평탄화된 패치인
Figure 112022009427471-pat00029
를 나타낼 수 있다.Also, here
Figure 112022009427471-pat00028
is the flattened patch
Figure 112022009427471-pat00029
can represent

실제로 버킷의 패치 수는 청크 크기에 따라 나눌 수 없는 경우가 많기 때문에 동일한 해시값을 가진 패치는 근처의 청크로 분류될 수 있다.In practice, since the number of patches in a bucket is often not divisible by the chunk size, patches with the same hash value can be classified into nearby chunks.

이를 처리하기 위해 이전 청크가 쿼리패치를 포함하는 현재 청크(예:

Figure 112022009427471-pat00030
)에 기여할 수 있도록 한다. To handle this, the current chunk where the previous chunk contains the query patch (e.g.
Figure 112022009427471-pat00030
) to contribute to

따라서, 지역주의는 각 쿼리패치마다 2k회 수행될 수 있다.Therefore, localism can be performed 2 k times for each query patch.

FFN (Feed-Forward Network)부(202c)는 패치 간의 지역성을 강조하고 학습하기 위해 수행되는 것으로, 본 기술분야에서 통상적으로 이용하고 있는 기술을 의미할 수 있으며, 이에 한정하지 않는다.The FFN (Feed-Forward Network) unit 202c is performed to emphasize and learn locality between patches, and may mean a technique commonly used in the art, but is not limited thereto.

보간부(203)는 인코더부(21)의 경우 다운샘플링, 디코더부(23)의 경우 업샘플링을 통해 해상도를 조절할 수 있다. The interpolator 203 may adjust the resolution through downsampling in the case of the encoder unit 21 and upsampling in the case of the decoder unit 23 .

이처럼 프로세서부(20)는 패치파티션부(201), KTB부(202) 및 보간부(203)를 통해 왜곡영상에 대한 잔여영상을 예측할 수 있다.As such, the processor unit 20 may predict a residual image for a distorted image through the patch partition unit 201, the KTB unit 202, and the interpolation unit 203.

마지막으로 출력부(30)는 프로세서부(20)를 통해 예측된 잔여영상을 왜곡영상에 적용하여 왜곡영상을 복원하여 출력할 수 있다.Finally, the output unit 30 may restore and output the distorted image by applying the residual image predicted through the processor unit 20 to the distorted image.

이를 통해 출력부(30)는

Figure 112022009427471-pat00031
를 만족시키는 영상복원이 이루어지도록 한다.Through this, the output unit 30
Figure 112022009427471-pat00031
image restoration that satisfies the

여기서,

Figure 112022009427471-pat00032
는 복원된 영상을 의미하고,
Figure 112022009427471-pat00033
는 왜곡영상,
Figure 112022009427471-pat00034
는 잔여영상을 의미할 수 있다.here,
Figure 112022009427471-pat00032
denotes a restored image,
Figure 112022009427471-pat00033
is a distorted image,
Figure 112022009427471-pat00034
may mean a residual image.

이때, 출력부(30)는 본 발명의 영상복원장치를 최적화하기 At this time, the output unit 30 optimizes the image restoration device of the present invention.

위해 샤르보니에 손실(Charbonnier loss)

Figure 112022009427471-pat00035
과 엣지손실
Figure 112022009427471-pat00036
(Edge loss)을 활용할 수 있다.Charbonnier loss for
Figure 112022009427471-pat00035
and edge loss
Figure 112022009427471-pat00036
(Edge loss) can be used.

Figure 112022009427471-pat00037
Figure 112022009427471-pat00037

여기서

Figure 112022009427471-pat00038
는 경험적으로 모든 실험에 대해 10-3으로 설정되고 △는 라플라시안 함수를 나타낸다.here
Figure 112022009427471-pat00038
is empirically set to 10 -3 for all experiments and Δ represents the Laplacian function.

또한, 총 손실

Figure 112022009427471-pat00039
은 초 매개 변수 λ가 두 손실의 비율을 제어하는
Figure 112022009427471-pat00040
Figure 112022009427471-pat00041
로 정의될 수 있다.Also, the total loss
Figure 112022009427471-pat00039
where the hyperparameter λ controls the ratio of the two losses
Figure 112022009427471-pat00040
and
Figure 112022009427471-pat00041
can be defined as

이러한 k-NN 탐색 기반 영상복원장치를 이용한 k-NN 탐색 기반 영상복원방법에 대하여 하기에서 구체적으로 설명하기로 한다.A k-NN search-based image restoration method using the k-NN search-based image restoration apparatus will be described in detail below.

도 6은 본 발명의 실시예에 따른 k-NN 탐색 기반 영상복원방법의 흐름도이고. 도 7 내지 9는 실시예에 따른 k-NN 탐색 기반 영상복원방법의 정성적 평가를 위하여 기존방법과 본 발명을 적용한 영상을 개략적으로 나타낸 예시도이다.6 is a flowchart of an image restoration method based on k-NN search according to an embodiment of the present invention. 7 to 9 are exemplary diagrams schematically showing images to which an existing method and the present invention are applied for qualitative evaluation of a k-NN search based image restoration method according to an embodiment.

도 6을 참조하면, 본 발명의 실시예에 따른 k-NN 탐색 기반 영상복원방법은 입력단계(S10), 예측단계(S20) 및 출력단계(S30)를 포함할 수 있다.Referring to FIG. 6 , the image restoration method based on k-NN search according to an embodiment of the present invention may include an input step (S10), a prediction step (S20), and an output step (S30).

입력단계(S10)는 왜곡영상을 입력 받을 수 있다.In the input step (S10), a distorted image may be input.

예측단계(S20)는 입력단계(S10)에서 입력 받은 왜곡영상에 대해 복원된 잔여영상을 예측할 수 있다.In the prediction step (S20), a residual image restored with respect to the distorted image received in the input step (S10) may be predicted.

보다 구체적으로, 예측단계(S20)는 인코더부에서 왜곡영상을 다운샘플링하는 단계, 보틀넥부에서 다운샘플링된 왜곡영상을 가공하는 단계 및 디코더부에서 가공된 왜곡영상을 초기 해상도로 업샘플링하는 단계를 포함할 수 있다.More specifically, the prediction step (S20) includes downsampling the distorted image in the encoder unit, processing the downsampled distorted image in the bottleneck unit, and upsampling the processed distorted image to the initial resolution in the decoder unit. can include

이때, 인코더부와 디코더부는 다수 개의 스테이지로 구성되며, 보틀넥부는 하나의 스테이지로 구성될 수 있다.In this case, the encoder unit and the decoder unit may be configured with a plurality of stages, and the bottleneck unit may be configured with one stage.

여기서, 스테이지는 각각 패치파티션단계 및 도출단계를 포함할 수 있다.Here, each stage may include a patch partition step and a derivation step.

패치파티션단계는 왜곡영상을 일정 크기의 패치로 나눌 수 있다.In the patch partitioning step, the distorted image may be divided into patches of a certain size.

도출단계는 패치파티션단계에서 나눠진 패치를 k-근접지역주의(K-NN local attention, KLA)에 적용하여 각각의 패치에 대해 유사한 패치를 찾아 유사도를 구하여 가중치 합을 도출할 수 있다.In the derivation step, the patch partitioned in the patch partition step is applied to k-nearest local attention (K-NN local attention, KLA) to find similar patches for each patch, and the similarity can be obtained to derive the sum of weights.

이때, 인코더부와 디코더부의 경우 도출단계 이후 인코더부의 경우 다운샘플링, 디코더부의 경우 업샘플링을 통해 해상도를 조절하는 보간단계를 더 포함할 수 있다.In this case, in the case of the encoder unit and the decoder unit, after the derivation step, an interpolation step of adjusting the resolution through downsampling in the case of the encoder unit and upsampling in the case of the decoder unit may be further included.

마지막으로 출력단계(S30)는 예측단계(S20)를 통해 예측된 잔여영상을 왜곡영상에 적용하여 왜곡영상을 복원하여 출력할 수 있다.Finally, in the output step (S30), the distorted image may be restored and output by applying the residual image predicted through the prediction step (S20) to the distorted image.

이에 대해서는 상기 장치에서 설명하였으므로, 자세한 설명은 생략하기로 한다.Since this has been described in the above device, a detailed description thereof will be omitted.

본 발명에 따른 영상복원방법의 비교실험결과는 다음과 같으며, PyTorch에서 구현하였다.The comparative experiment results of the image restoration method according to the present invention are as follows and implemented in PyTorch.

본 기술분야에서 통상적으로 사용되는 AdamW optimizer을 통해 전체 네트워크를 128x128의 해상도를 가지는 16개의 이미지 배치에 대해 80만번 훈련하였다.The entire network was trained 800,000 times for a batch of 16 images with a resolution of 128x128 through the AdamW optimizer commonly used in this field.

학습 속도는 처음에 1x10-4로 설정되었고, 안정적인 학습을 위한 선형 준비 전략과 코사인 어닐링이 채택되었다.The learning rate was initially set to 1x10 -4 , and a linear preparation strategy and cosine annealing were adopted for stable learning.

기본적으로 청크 크기 k와 패치 크기 r를 4로 설정하였고, 보틀넥부에서는 패치가 거의 없기 때문에 k를 1로 설정하였다.(예: HW가 256 x 256일 때 패치 수는 4x4). Basically, the chunk size k and the patch size r are set to 4, and k is set to 1 because there are almost no patches in the bottleneck (eg, the number of patches is 4x4 when the HW is 256 x 256).

각 스테이지 b의 KTB 수는 모든 스테이지에서 2로 설정하였다.The number of KTBs in each stage b was set to 2 in all stages.

KLA단계에서 다중 라운드 지역 민감 해싱(LSH)의 해시 수는 4로 설정하였다.In the KLA step, the number of hashes for multi-round region sensitive hashing (LSH) is set to 4.

상기와 같이 설정된 영상복원방법은 이미지 노이즈 제거, 디블러링 및 디어링과 같은 다양한 이미지 복원 작업에서 제안된 방법의 성능을 검증하였다. 성능 평가를 위해 잡음 제거 및 디블러링을 위한 RGB 공간에서 PSNR과 SSIM을 측정하였으며, 평가는 YCbCr 색상 공간의 Y 채널에서 수행하였다.The performance of the proposed method was verified in various image restoration tasks such as image noise removal, deblurring, and dearing. For performance evaluation, PSNR and SSIM were measured in the RGB space for noise removal and deblurring, and the evaluation was performed in the Y channel of the YCbCr color space.

[실험예1] Image Denoising[Experimental Example 1] Image Denoising

실제로 노이즈가 있는 320개의 고해상도 이미지가 포함된 SIDD 데이터 세트를 사용하여 전체 네트워크를 훈련시켰다.In practice, the entire network was trained using the SIDD data set containing 320 high-resolution images with noise.

표 1은 SIDD 및 DND 데이터 세트에 대한 실제 노이즈 제거에 대한 정량적 평가를 보여준다. Table 1 shows the quantitative evaluation of the actual noise rejection for the SIDD and DND data sets.

Figure 112022009427471-pat00042
Figure 112022009427471-pat00042

표 1의 BM3D, DnCNN, MLP, CBDNet, RIDNet, AINDNet, VDN, SADNet, DANet, CycleISP, MPRNet, MIRNet, NBNet, DAGL 및 Uformer은 기존의 노이즈 제거방법이며, KiT는 본 발명에 따른 영상복원방법이다.BM3D, DnCNN, MLP, CBDNet, RIDNet, AINDNet, VDN, SADNet, DANet, CycleISP, MPRNet, MIRNet, NBNet, DAGL, and Uformer in Table 1 are conventional noise removal methods, and KiT is an image restoration method according to the present invention. .

DND 데이터 세트는 실제 상황 라벨을 제공하지 않기 때문에, 결과는 공식 벤치마크에서 얻었다. 본 발명에 따른 영상복원방법은 SIDD 데이터 세트 모두에서 최첨단 방법을 능가하며 DND 데이터 세트에서 경쟁력 있는 성능을 달성할 수 있다.Since the DND data set does not provide real-world labels, the results were obtained from official benchmarks. The image restoration method according to the present invention outperforms state-of-the-art methods in both SIDD data sets and can achieve competitive performance in DND data sets.

DND 데이터 집합은 교육 데이터를 제공하지 않기 때문에 Tab의 성능일 수 있다.Since the DND dataset does not provide training data, it could be Tab's performance.

표1에 나타난 바와 같이 SIDD 데이터 세트에 대해 훈련된 네트워크를 사용하여 달성되며, 본 발명인 KiT 가 수치가 높게 나온 것을 확인할 수 있듯이 제안된 방법의 견고성을 입증할 수 있다.As shown in Table 1, it is achieved using a network trained on the SIDD data set, and the robustness of the proposed method can be demonstrated as confirmed by the present invention's KiT with high numbers.

이어서 도 7을 참조하여 정성적 결과를 설명하면 다음과 같다.Subsequently, the qualitative results are described with reference to FIG. 7 as follows.

도 7은 SIDD 데이터 세트에 대한 다양한 노이즈 제거 방법의 노이즈 제거 영상을 보여준다. 7 shows denoising images of various denoising methods for the SIDD data set.

보다 구체적으로 도 7을 참조하면, 기존 방법은 세부 정보가 손실된 상태로 복원된 이미지를 출력하는 반면, 본 발명의 영상복원방법은 로컬이 아닌 연결로 인접성을 캡처할 수 있는 기능 덕분에 세밀한 구조로 성능이 저하된 이미지를 성공적으로 복원한 것을 확인할 수 있다.More specifically, referring to FIG. 7 , the existing method outputs a reconstructed image with details lost, whereas the image restoration method of the present invention has a detailed structure thanks to the ability to capture adjacency with a non-local connection. You can see that the image with degraded performance was successfully restored.

[실험예2] Image Deblurring[Experimental Example 2] Image Deblurring

표 2는 GoPro 데이터 세트의 번짐 현상을 제거하는 이미지 디블러링 성능을 보여줄 수 있다. Table 2 can show the performance of image deblurring to remove smearing on the GoPro data set.

GoPro 데이터 세트는 연속적인 선명한 이미지의 평균을 내서 각 이미지를 얻을 수 있는 합성 흐릿한 이미지를 제공한다.The GoPro data set provides a composite blur image from which each image is obtained by averaging successive sharp images.

훈련을 위해 2,103개의 GoPro 데이터 세트 이미지를 사용했으며, 1,111개의 Go-Pro 이미지, 3,758개의 RealBlur 이미지, 2,025개의 HIDE 데이터 세트 이미지가 평가되었다. For training, 2,103 GoPro dataset images were used, 1,111 Go-Pro images, 3,758 RealBlur images, and 2,025 HIDE dataset images were evaluated.

Figure 112022009427471-pat00043
Figure 112022009427471-pat00043

표 2에 나타난 바와 같이 PSNR 및 SSIM 메트릭의 뛰어난 성능은 본 발명의 영상복원방법인 KiT가 흐릿한 이미지를 복원하는 데도 도움이 된다는 것을 검증하였다.As shown in Table 2, the excellent performance of the PSNR and SSIM metrics verified that KiT, the image restoration method of the present invention, is also helpful in restoring blurry images.

도 8을 참조하면, (a)는 MPRNet, (b)는 MIMO-Net, (c)는 본 발명에 따른 영상복원방법인 KiT로 GoPro데이터 세트의 흐릿한 이미지에서 복원된 이미지를 보여준다. 도 8과 같이, 다른 방법으로는 디테일한 정보를 포착하지 못하는 반면, 본 발명의 영상복원방법은 미세한 세부 정보를 포착한다는 것을 쉽게 발견할 수 있다.Referring to FIG. 8, (a) shows MPRNet, (b) MIMO-Net, and (c) shows an image restored from a blurry image of a GoPro data set with KiT, an image restoration method according to the present invention. As shown in FIG. 8, it can be easily found that the image restoration method of the present invention captures fine detail information, whereas other methods fail to capture detailed information.

[실험예3] Image Deraining[Experimental Example 3] Image Deraining

여러 데이터 세트에서 샘플링 된 13,712개의 클린 레인(Clean rain) 이미지 쌍을 사용하여 이미지 처리를 위한 네트워크를 훈련시켰다. A network for image processing was trained using 13,712 pairs of clean rain images sampled from multiple data sets.

Test100, Rain100H, Rain100L, Test2800, Test1200의 5개 데이터 세트에 대해 이미지에 존재하는 빛줄기 제거하는 디레이닝(Deraining) 성능을 평가하였다. The deraining performance of removing light streaks present in images was evaluated for five data sets of Test100, Rain100H, Rain100L, Test2800, and Test1200.

Figure 112022009427471-pat00044
Figure 112022009427471-pat00044

표 3에 나타난 바와 같이, MPRNet은 일부에서 높은 값을 가지지만, 본 발명의 영상복원방법인 KiT가 보다 더 많은 항목에서 높은 값을 나타난 것을 확인하였고, 평균 점수를 통해 KiT는 MPRNet에 비해 0.21dB의 성능 이득을 얻은 것을 확인할 수 있었다. As shown in Table 3, MPRNet has high values in some parts, but it was confirmed that KiT, the image restoration method of the present invention, showed high values in more items, and through the average score, KiT was 0.21dB compared to MPRNet. It was confirmed that a performance gain of

도 9를 참조하면, (a)는 DerainNet, (b)는 PreNet, (c)는 RESCAN, (d)는 MPRNet, (e)는 본 발명에 따른 영상복원방법인 KiT를 통해 이미지 도출 결과로 이미지의 질적 비교를 보여준다. Referring to FIG. 9, (a) is DerainNet, (b) is PreNet, (c) is RESCAN, (d) is MPRNet, and (e) is an image derivation result through KiT, an image restoration method according to the present invention. shows a qualitative comparison of

도 9에 나타난 바와 같이 본 발명인 KiT가 가장 우수한 것을 확인할 수 있었다.As shown in FIG. 9, it was confirmed that KiT, the present invention, was the most excellent.

뿐만 아니라, 상기에서 설명한 도 7과 도9의 결과와 같이, 본 발명은 KLA가 유사한 패턴의 패치를 집계함에 따라 반복되는 질감을 처리할 수 있는 장점이 있다. In addition, as shown in the results of FIGS. 7 and 9 described above, the present invention has the advantage of being able to process repeated textures as KLA aggregates patches of similar patterns.

특히, 빛줄기가 존재하는 이미지에서는 유사한 패턴을 가진 패치가 이미지에 많이 존재하므로 본 발명은 비교된 방법과 비교하여 양적, 질적으로 뛰어난 성능을 보여줄 수 있다고 판단하였다.In particular, since there are many patches with similar patterns in the image where light streaks exist, it was determined that the present invention can show superior performance in terms of quantity and quality compared to the compared methods.

이상에서 설명하는 본 발명의 실시예는 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러가지 치환, 변형 및 변경하여 구현할 수 있으며, 이러한 구현은 앞서 설명한 실시예의 기재로부터 본 발명이 속하는 기술분야의 전문가라면 쉽게 구현할 수 있는 것이다.The embodiments of the present invention described above can be implemented by various substitutions, modifications, and changes without departing from the technical spirit of the present invention, and such implementation can be performed by experts in the technical field to which the present invention belongs from the description of the above-described embodiments. that can be easily implemented.

1: 영상복원장치
10: 입력부
20: 프로세서부
21: 인코더부
22: 보틀넥부
23: 디코더부
200: 스테이지
201: 패치파티션부
202: KTB부
202a: LN부
202b:KLA부
202c: FFN부
203: 보간부
30: 출력부
1: Image Restoration Device
10: input unit
20: processor unit
21: encoder unit
22: bottle neck part
23: decoder unit
200: stage
201: patch partition unit
202: KTB part
202a: LN part
202b: KLA part
202c: FFN part
203: interpolation unit
30: output unit

Claims (7)

k-NN탐색 기반으로 왜곡된 영상을 복원하는 영상복원장치에 있어서,
왜곡영상을 입력받는 입력부;
상기 입력부에서 입력 받은 상기 왜곡영상을 토대로 하여 상기 왜곡영상에 대해 복원된 잔여영상을 예측하는 프로세서부 및
상기 프로세서부를 통해 예측된 상기 잔여영상을 상기 왜곡영상에 적용하여 상기 왜곡영상을 복원하여 출력하는 출력부를 포함하고,
상기 프로세서부는,
다수 개의 스테이지로 구성되며 상기 입력부에서 입력 받은 상기 왜곡영상을 다운샘플링하는 인코더부;
하나의 스테이지로 구성되며, 상기 인코더부에서 다운샘플링된 상기 왜곡영상을 가공하는 보틀넥부 및
다수 개의 스테이지로 구성되며 상기 보틀넥부에서 가공된 상기 왜곡영상을 초기 해상도로 업샘플링하는 디코더부를 포함하고,
상기 스테이지는,
상기 왜곡영상을 일정 크기의 패치로 나누는 패치파티션(Patch partition)부 및
상기 패치파티션부에서 나눠진 각각의 상기 패치에 대해 유사한 패치를 찾아 유사도를 구하여 가중치 합을 도출하는 KTB(k-NN Transformer Block)부를 포함하는 영상복원장치.
In the image restoration apparatus for restoring a distorted image based on k-NN search,
an input unit for receiving a distorted image;
A processor unit predicting a residual image reconstructed for the distorted image based on the distorted image input from the input unit; and
An output unit for restoring and outputting the distorted image by applying the residual image predicted through the processor unit to the distorted image;
The processor unit,
an encoder unit comprising a plurality of stages and downsampling the distorted image received from the input unit;
A bottleneck unit configured as one stage and processing the distorted image downsampled by the encoder unit; and
A decoder comprising a plurality of stages and upsampling the distorted image processed in the bottleneck to an initial resolution;
The stage is
A patch partition unit dividing the distorted image into patches of a certain size; and
and a KTB (k-NN Transformer Block) unit for deriving a sum of weights by finding similar patches for each of the patches divided by the patch partition unit and obtaining a similarity.
삭제delete 제1항에 있어서,
상기 KTB(k-NN Transformer Block)부는,
상기 패치를 정규화하는 LN(Layer Normalization)부;
상기 정규화된 패치 간의 유사도를 통해 가중치 합을 도출하는 KLA(k-NN Local Attention)부 및
상기 패치 간의 지역성을 강조하고 학습하기 위해 수행되는 FFN(Feed-Forward Network)부를 포함하는 영상복원장치.
According to claim 1,
The KTB (k-NN Transformer Block) unit,
a layer normalization (LN) unit normalizing the patch;
A KLA (k-NN Local Attention) unit for deriving a weighted sum through the similarity between the normalized patches; and
Image restoration apparatus including a feed-forward network (FFN) unit that is performed to emphasize and learn the locality between the patches.
제3항에 있어서,
상기 KLA(k-NN Local Attention)부는,
상기 각각의 패치에 대해 지역 민감 해싱(LSH, Locality sensitive hashing)을 이용하여 k-NN 매칭을 통해 유사한 유사패치를 찾는 매칭부;
상기 매칭부에서 찾은 상기 유사패치를 정렬하여 그룹화하고, 그룹화된 유사패치를 청크로 분할하는 그룹화부 및
상기 청크에 포함되는 상기 유사패치들 간의 쌍별지역주의(Pair-wise local attention)를 수행하여 상기 유사패치들 사이의 유사도를 통해 가중치 합을 구하는 유사도도출부를 포함하는 영상복원장치.
According to claim 3,
The KLA (k-NN Local Attention) unit,
a matching unit for finding similar similar patches through k-NN matching using locality sensitive hashing (LSH) for each patch;
a grouping unit that sorts and groups the similar patches found in the matching unit, and divides the grouped similar patches into chunks; and
and a similarity derivation unit that performs pair-wise local attention between the similar patches included in the chunk to obtain a weighted sum through the similarity between the similar patches.
제4항에 있어서,
상기 지역 민감 해싱(LSH, Locality sensitive hashing)은,
다수 개로 분할된 버킷이 형성된 맵에 대하여, 상기 패치를 적용하고 랜덤 회전 행렬을 통해 상기 맵을 회전하여 동일한 상기 버킷에 속하는 상기 패치들은 동일한 해시값을 갖는 것을 특징으로 하는 영상복원장치.
According to claim 4,
The locality sensitive hashing (LSH, Locality sensitive hashing),
An image restoration apparatus according to claim 1 , wherein the patches belonging to the same bucket have the same hash value by applying the patch and rotating the map through a random rotation matrix to a map in which a plurality of divided buckets are formed.
제4항에 있어서,
상기 쌍별지역주의는,
인접하게 위치하는 두 개의 상기 유사패치에 대하여, 상기 유사패치를 구성하는 픽셀 간의 유사도를 구하는 것을 특징으로 하는 영상복원장치.
According to claim 4,
The pairwise regionalism,
An image restoration apparatus characterized in that for the two similar patches positioned adjacent to each other, a degree of similarity between pixels constituting the similar patches is obtained.
k-NN탐색 기반으로 왜곡된 영상을 복원하는 영상복원방법에 있어서,
왜곡영상을 입력받는 입력단계;
상기 왜곡영상을 토대로 하여 상기 왜곡영상에 대해 복원된 잔여영상을 예측하는 예측단계 및
상기 잔여영상을 상기 왜곡영상에 적용하여 상기 왜곡영상을 복원하여 출력하는 출력단계를 포함하고,
상기 예측단계는,
다수 개의 스테이지로 구성되는 인코더부에서 상기 왜곡영상을 다운샘플링하는 단계;
하나의 스테이지로 구성되는 보틀넥부에서 다운샘플링된 상기 왜곡영상을 가공하는 단계 및
다수 개의 스테이지로 구성되는 디코더부에서 가공된 상기 왜곡영상을 초기 해상도로 업샘플링하는 단계를 포함하고,
상기 스테이지는,
상기 왜곡영상을 일정 크기의 패치로 나누는 패치파티션(Patch partition)단계 및
상기 패치파티션단계에서 나눠진 상기 패치를 k-근접지역주의(K-NN local attention, KLA)에 적용하여 각각의 상기 패치에 대해 유사한 패치를 찾아 유사도를 구하여 가중치 합을 도출하는 도출단계를 포함하는 영상복원방법.
In the image restoration method for restoring a distorted image based on k-NN search,
an input step of receiving a distorted image;
A prediction step of predicting a residual image reconstructed for the distorted image based on the distorted image; and
An output step of restoring and outputting the distorted image by applying the residual image to the distorted image;
The prediction step is
downsampling the distorted image in an encoder unit composed of a plurality of stages;
Processing the distorted image down-sampled in a bottleneck unit composed of one stage; and
Upsampling the distorted image processed in a decoder unit composed of a plurality of stages to an initial resolution;
The stage is
A patch partition step of dividing the distorted image into patches of a certain size; and
An image including a derivation step of deriving a weight sum by finding a similar patch for each patch by applying K-NN local attention (KLA) to the patch divided in the patch partition step and obtaining a similarity. restoration method.
KR1020220010766A 2022-01-25 2022-01-25 Efficient image restoration method and device based k-NN search KR102556777B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020220010766A KR102556777B1 (en) 2022-01-25 2022-01-25 Efficient image restoration method and device based k-NN search

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020220010766A KR102556777B1 (en) 2022-01-25 2022-01-25 Efficient image restoration method and device based k-NN search

Publications (1)

Publication Number Publication Date
KR102556777B1 true KR102556777B1 (en) 2023-07-17

Family

ID=87430184

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220010766A KR102556777B1 (en) 2022-01-25 2022-01-25 Efficient image restoration method and device based k-NN search

Country Status (1)

Country Link
KR (1) KR102556777B1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200101713A (en) * 2019-02-20 2020-08-28 숭실대학교산학협력단 Image restoration apparatus and method
KR20210066240A (en) * 2019-11-28 2021-06-07 인천대학교 산학협력단 Apparatus and Method for Processing Image Using Dense Layer

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200101713A (en) * 2019-02-20 2020-08-28 숭실대학교산학협력단 Image restoration apparatus and method
KR20210066240A (en) * 2019-11-28 2021-06-07 인천대학교 산학협력단 Apparatus and Method for Processing Image Using Dense Layer

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Zhendong Wang ET AL: "Uformer: A general u-shaped transformer for image restoration", Computer Science_Computer Vision and Pattern Recognition, 25 Nov. 2021(2021.11.25.) 1부.* *

Similar Documents

Publication Publication Date Title
Liu et al. Image-adaptive YOLO for object detection in adverse weather conditions
US10582205B2 (en) Enhancing visual data using strided convolutions
US10681361B2 (en) Training end-to-end video processes
CN111223034B (en) High-capacity anti-printing/shooting blind watermarking system and method based on deep learning
US20230281763A1 (en) Generating an image mask for a digital image by utilizing a multi-branch masking pipeline with neural networks
US20120230591A1 (en) Image restoration system, image restoration method, and image restoration program
Tian et al. Vehicle license plate super-resolution using soft learning prior
CN115034982A (en) Underwater image enhancement method based on multi-scale attention mechanism fusion
Huang et al. Single image snow removal using sparse representation and particle swarm optimizer
Hallabia et al. An optimal use of SCE-UA method cooperated with superpixel segmentation for pansharpening
Zhou et al. Sparse representation with enhanced nonlocal self-similarity for image denoising
WO2000046749A1 (en) Color image processing method and apparatus thereof
KR102556777B1 (en) Efficient image restoration method and device based k-NN search
Chen et al. Eigen-patch: Position-patch based face hallucination using eigen transformation
Zhang et al. Noise removal in embedded image with bit approximation
Chen et al. Robust video content alignment and compensation for clear vision through the rain
Delon et al. A patch-based approach for random-valued impulse noise removal
CN117423116B (en) Training method of text detection model, text detection method and device
Goel et al. Enhanced modified decision-based unsymmetric trimmed adaptive neighborhood winsorized mean filter for removing 1–99% levels of salt-and-pepper noise
Kezzoula et al. Bi-ESRGAN: A New Approach of Document Image Super-Resolution Based on Dual Deep Transfer Learning
CN116503294B (en) Cultural relic image restoration method, device and equipment based on artificial intelligence
Takagi Image Quality Recovery for Image Recognition with Deep Learning
Anand et al. Tackling multiple visual artifacts: Blind image restoration using conditional adversarial networks
Titoun et al. Bi-ESRGAN: A New Approach of Document Image Super-Resolution Based on Dual Deep Transfer Learning
Lone et al. Computer and Information Sciences

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant