KR102514531B1 - Apparatus and method for improving images in poor weather - Google Patents

Apparatus and method for improving images in poor weather Download PDF

Info

Publication number
KR102514531B1
KR102514531B1 KR1020220089240A KR20220089240A KR102514531B1 KR 102514531 B1 KR102514531 B1 KR 102514531B1 KR 1020220089240 A KR1020220089240 A KR 1020220089240A KR 20220089240 A KR20220089240 A KR 20220089240A KR 102514531 B1 KR102514531 B1 KR 102514531B1
Authority
KR
South Korea
Prior art keywords
weather
image
model
transformer
snow
Prior art date
Application number
KR1020220089240A
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 KR1020220089240A priority Critical patent/KR102514531B1/en
Application granted granted Critical
Publication of KR102514531B1 publication Critical patent/KR102514531B1/en

Links

Images

Classifications

    • G06T5/001
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06T5/005
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30181Earth observation
    • G06T2207/30192Weather; Meteorology
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

An apparatus for improving images in poor weather (100) includes: a first model learning part (110); a second model learning part (120); a weather classification part (130); and an image improvement part (140). By improving images taken in poor weather, it is possible to easily identify traffic conditions, crime situations, and the like and improve accuracy when applying artificial intelligence techniques such as object detection and object tracking.

Description

열악한 날씨의 영상 개선 장치 및 방법{APPARATUS AND METHOD FOR IMPROVING IMAGES IN POOR WEATHER}Apparatus and method for improving images in poor weather {APPARATUS AND METHOD FOR IMPROVING IMAGES IN POOR WEATHER}

본 발명은 영상 개선 장치 및 방법에 관한 것으로서, 보다 구체적으로는 인공지능 모델을 이용한 열악한 날씨의 영상 개선 장치 및 방법에 관한 것이다.The present invention relates to an image enhancement device and method, and more particularly, to an image enhancement device and method in bad weather using an artificial intelligence model.

최근 자연어 처리(natural language processing; NLP) 분야에서 성공적인 결과를 가져온 트랜스포머(transformer) 구조는 컴퓨터 비전에도 적용되고 있다. NLP가 문장을 여러 단어로 나누고 트랜스포머 모델이 각 단어 간의 연관성을 학습할 수 있도록 하는 것과 같은 방식으로 컴퓨터 비전에서 트랜스포머는 이미지를 분할하여 이미지 패치 간의 연관성을 학습한다.The transformer structure, which has recently had successful results in the field of natural language processing (NLP), is also applied to computer vision. In the same way that NLP breaks a sentence into words and allows Transformer models to learn associations between each word, in computer vision Transformers learn associations between image patches by segmenting images.

최근에는, 비전 분야에서 많이 사용되던 CNN(Convolutional Neural Network) 구조보다 트랜스포머 구조가 결과적으로 더 나은 성능을 보인다는 것이 여러 연구를 통해 보고되면서 비전 분야에서도 트랜스포머 모델을 적용하는 연구가 적극적으로 이루어지고 있다.Recently, several studies have reported that the transformer structure shows better performance than the CNN (Convolutional Neural Network) structure, which was widely used in the field of vision, and research on applying the transformer model is being actively conducted in the field of vision .

한편, 카메라에 의해 촬영 및 기록되는 영상은 다양한 용도로 사용될 수 있다. 예를 들어, CCTV 카메라에서 촬영되는 영상은 실시간 분석을 통해 교통상황을 파악할 수 있고, 범죄 상황이나 범죄 관련자의 이동 동선 등을 파악하고 조사하는데 활용될 수도 있다.Meanwhile, images captured and recorded by a camera may be used for various purposes. For example, an image captured by a CCTV camera can be used to understand traffic conditions through real-time analysis, and can be used to identify and investigate crime situations or movement lines of criminals.

이러한 카메라 촬영 영상은 날씨에 따라 그 화질이 달라지는데, 열악한 날씨, 예를 들어 비, 눈, 안개 등에 따라 영상이 왜곡될 수 있다. 이같이 날씨로 인해 왜곡된 영상은 저하된 화질로 인해 교통상황, 범죄 상황 등의 파악에 사용하기가 어렵고, 객체 탐지, 객체 추적 등의 인공지능 기술을 적용하는 데에도 한계가 있다. 따라서 이러한 열악한 날씨에 촬영된 영상을 개선할 수 있는 기술의 개발이 필요한 실정이다.The quality of the camera-captured image varies depending on the weather, and the image may be distorted due to bad weather, such as rain, snow, or fog. Such weather-distorted images are difficult to use for traffic and criminal situations due to degraded image quality, and there are limitations in applying artificial intelligence technologies such as object detection and object tracking. Therefore, it is necessary to develop a technology capable of improving images captured in such poor weather.

본 발명과 관련된 선행기술로, 등록특허 제10-1649256호(발명의 명칭: 악천후감지 및 악천후감지에 따른 영상개선이 가능한 영상감시시스템, 등록일자: 2016년 08월 11일) 등이 개시된 바 있다.As a prior art related to the present invention, Patent Registration No. 10-1649256 (Title of Invention: Bad Weather Detection and Video Surveillance System Capable of Image Improvement According to Bad Weather Detection, Registration Date: August 11, 2016) has been disclosed. .

본 발명은 기존에 제안된 방법들의 상기와 같은 문제점들을 해결하기 위해 제안된 것으로서, 딥러닝 기반 날씨 분류 모델과 영상 개선용 트랜스포머 모델을 구성하고, 딥러닝 기반 날씨 분류 모델을 사용해 실시간으로 촬영되는 입력 영상의 날씨를 분류하고, 분류 결과에 따라 서로 다른 헤드 및 테일을 영상 개선용 트랜스포머 모델에 적용해 날씨 정보를 제거해 개선된 영상을 출력함으로써, 열악한 날씨에 촬영된 영상을 개선해 교통상황, 범죄 상황 등을 쉽게 파악할 수 있고, 객체 탐지, 객체 추적 등의 인공지능 기술 적용 시 정확도를 높일 수 있는, 열악한 날씨의 영상 개선 장치 및 방법을 제공하는 것을 그 목적으로 한다.The present invention is proposed to solve the above problems of the previously proposed methods, and constitutes a deep learning-based weather classification model and a transformer model for image enhancement, and inputs captured in real time using the deep learning-based weather classification model. By classifying the weather of the video and applying different heads and tails to the transformer model for image improvement according to the classification result, weather information is removed and the improved video is output, improving the video captured in bad weather to improve traffic conditions, crime situations, etc. Its purpose is to provide an image improvement device and method in bad weather that can easily identify and increase accuracy when applying artificial intelligence technology such as object detection and object tracking.

상기한 목적을 달성하기 위한 본 발명의 특징에 따른 열악한 날씨의 영상 개선 장치는,An image enhancement device in bad weather according to the features of the present invention for achieving the above object,

영상 개선 장치로서,As an image enhancement device,

비, 눈 및 안개를 포함하는 열악한 날씨와 보통 상태(normal condition) 날씨의 영상에 데이터 증강(Data Augmentation)을 적용해 구성한 학습 데이터를 사용하여, 영상에서 날씨 특징을 추출해 영상의 날씨를 비, 눈, 안개 및 보통 상태의 멀티 클래스로 분류하는 딥러닝 기반 날씨 분류 모델을 생성하는 제1 모델 학습부;Using training data constructed by applying data augmentation to images of poor weather and normal conditions including rain, snow, and fog, weather features are extracted from the image and the weather of the image is classified as rain or snow. a first model learning unit that generates a deep learning-based weather classification model that classifies weather into multi-classes of , fog, and normal conditions;

날씨 분류별 헤드(head) 및 테일(tail)을 포함하는 어텐션 기반의 영상 개선용 트랜스포머 모델을 구성하는 제2 모델 학습부;a second model learning unit constituting an attention-based transformer model for image improvement including a head and a tail for each weather classification;

상기 제1 모델 학습부에서 생성한 날씨 분류 모델을 사용해, 실시간으로 촬영되는 입력 영상의 날씨를 분류하는 날씨 분류부; 및a weather classification unit classifying the weather of the input image captured in real time using the weather classification model generated by the first model learning unit; and

상기 제2 모델 학습부에서 구성한 영상 개선용 트랜스포머 모델을 사용해 상기 입력 영상에서 날씨 정보를 제거해 개선된 영상을 출력하되, 상기 날씨 분류부에서 출력된 날씨 분류에 따라 서로 다른 헤드 및 테일을 사용하는 영상 개선부를 포함하는 것을 그 구성상의 특징으로 한다.An improved image is output by removing weather information from the input image using the transformer model for image improvement configured in the second model learning unit, but an image using different heads and tails according to the weather classification output from the weather classification unit. It is characterized in its configuration that it includes an improvement part.

바람직하게는, 상기 영상 개선용 트랜스포머 모델은,Preferably, the transformer model for image enhancement,

비, 눈 및 안개를 포함하는 열악한 날씨의 영상에서 비, 눈 및 안개에 해당하는 날씨 정보를 제거해 상기 개선된 영상을 출력하며,Outputting the improved image by removing weather information corresponding to rain, snow, and fog from an image of poor weather including rain, snow, and fog;

상기 날씨 분류부는,The weather classification unit,

분류 결과가 보통 상태이면 상기 영상 개선부에 영상 개선을 요청하지 않고, 분류 결과가 비, 눈 및 안개를 포함하는 열악한 날씨이면 상기 영상 개선부에 상기 입력 영상을 전달하고 영상 개선을 요청할 수 있다.If the classification result is normal, the image enhancement unit is not requested to be improved, and if the classification result is poor weather including rain, snow, and fog, the input image may be transmitted to the image enhancement unit and image enhancement may be requested.

더욱 바람직하게는, 상기 영상 개선용 트랜스포머 모델은,More preferably, the transformer model for image enhancement,

비, 눈 및 안개의 3개의 날씨별로 구성되며, 상기 입력 영상에서 특징 맵을 추출하는 헤드;a head composed of three weather conditions of rain, snow, and fog, and extracting a feature map from the input image;

상기 입력 영상에서 추출된 특징 맵을 입력받고, 영상의 시퀀스 정보를 압축하는 트랜스포머 인코더;a transformer encoder that receives the feature map extracted from the input image and compresses sequence information of the image;

상기 트랜스포머 인코더로부터 영상의 시퀀스 정보를 전달받아 상기 입력 영상에서 열악한 날씨에 의해 누락된 정보를 복구하는 트랜스포머 디코더; 및a transformer decoder receiving sequence information of an image from the transformer encoder and restoring information missing from the input image due to bad weather; and

비, 눈 및 안개의 3개의 날씨 분류별로 구성되며, 상기 트랜스포머 디코더에서 복구된 정보를 매핑해 개선된 영상을 생성해 출력하는 테일을 포함하여 구성될 수 있다.It is configured according to three weather categories of rain, snow, and fog, and may include a tail that generates and outputs an improved image by mapping the information recovered from the transformer decoder.

더욱 바람직하게는, 상기 헤드는,More preferably, the head,

날씨 분류별로 날씨의 시계열 특징 및 영상 패턴을 압축해 보유하여, 상기 입력 영상에서 날씨의 특성이 반영된 특징 벡터를 추출할 수 있다.Time-series features and image patterns of weather for each weather category are compressed and retained, and a feature vector reflecting weather characteristics may be extracted from the input image.

더더욱 바람직하게는, 상기 테일은,Even more preferably, the tail,

날씨 분류별로 날씨의 영상 패턴에 따른 3개의 테일로 구성되며, 날씨 분류별 테일을 사용해 날씨의 영상 패턴에 따라 복구된 정보를 매핑할 수 있다.Each weather category is composed of three tails according to weather image patterns, and the recovered information can be mapped according to weather image patterns using the tails for each weather category.

바람직하게는, 상기 날씨 분류 모델은,Preferably, the weather classification model,

복합 스케일링(compound scaling)을 통해 모델의 깊이(depth), 넓이(width) 및 해상도(resolution) 값을 설정해 최적화될 수 있다.It can be optimized by setting the depth, width, and resolution values of the model through compound scaling.

상기한 목적을 달성하기 위한 본 발명의 특징에 따른 열악한 날씨의 영상 개선 방법은,In order to achieve the above object, an image improvement method in bad weather according to a feature of the present invention,

컴퓨터에서 각 단계가 수행되는 영상 개선 방법으로서,As an image enhancement method in which each step is performed on a computer,

(1) 비, 눈 및 안개를 포함하는 열악한 날씨와 보통 상태(normal condition) 날씨의 영상에 데이터 증강(Data Augmentation)을 적용해 구성한 학습 데이터를 사용하여, 영상에서 날씨 특징을 추출해 영상의 날씨를 비, 눈, 안개 및 보통 상태의 멀티 클래스로 분류하는 딥러닝 기반 날씨 분류 모델을 생성하는 단계;(1) Using training data constructed by applying Data Augmentation to images of poor weather and normal conditions including rain, snow, and fog, weather features are extracted from the image to determine the weather of the image. Creating a deep learning-based weather classification model that classifies rain, snow, fog, and normal conditions into multi-classes;

(2) 날씨 분류별 헤드(head) 및 테일(tail)을 포함하는 어텐션 기반의 영상 개선용 트랜스포머 모델을 구성하는 단계;(2) constructing an attention-based image enhancement transformer model including a head and a tail for each weather category;

(3) 상기 날씨 분류 모델을 사용해, 실시간으로 촬영되는 입력 영상의 날씨를 분류하는 단계; 및(3) classifying the weather of an input image captured in real time using the weather classification model; and

(4) 상기 영상 개선용 트랜스포머 모델을 사용해 상기 입력 영상에서 날씨 정보를 제거해 개선된 영상을 출력하되, 상기 날씨 분류부에서 출력된 날씨 분류에 따라 서로 다른 헤드 및 테일을 사용하는 단계를 포함하는 것을 그 구성상의 특징으로 한다.(4) outputting an improved image by removing weather information from the input image using the transformer model for image enhancement, and using different heads and tails according to the weather classification output from the weather classification unit. characterized by its composition.

바람직하게는, 상기 영상 개선용 트랜스포머 모델은,Preferably, the transformer model for image enhancement,

비, 눈 및 안개를 포함하는 열악한 날씨의 영상에서 비, 눈 및 안개에 해당하는 날씨 정보를 제거해 상기 개선된 영상을 출력하며,Outputting the improved image by removing weather information corresponding to rain, snow, and fog from an image of poor weather including rain, snow, and fog;

상기 단계 (3)에서는,In the step (3),

분류 결과가 보통 상태이면 상기 단계 (4)를 진행하지 않고, 분류 결과가 비, 눈 및 안개를 포함하는 열악한 날씨이면 상기 단계 (4)에 상기 입력 영상을 전달하고 영상 개선을 요청할 수 있다.If the classification result is normal, the step (4) is not performed, and if the classification result is poor weather including rain, snow, and fog, the input image may be transmitted to step (4) and image improvement may be requested.

본 발명에서 제안하고 있는 열악한 날씨의 영상 개선 장치 및 방법에 따르면, 딥러닝 기반 날씨 분류 모델과 영상 개선용 트랜스포머 모델을 구성하고, 딥러닝 기반 날씨 분류 모델을 사용해 실시간으로 촬영되는 입력 영상의 날씨를 분류하고, 분류 결과에 따라 서로 다른 헤드 및 테일을 영상 개선용 트랜스포머 모델에 적용해 날씨 정보를 제거해 개선된 영상을 출력함으로써, 열악한 날씨에 촬영된 영상을 개선해 교통상황, 범죄 상황 등을 쉽게 파악할 수 있고, 객체 탐지, 객체 추적 등의 인공지능 기술 적용 시 정확도를 높일 수 있다.According to the image enhancement apparatus and method for bad weather proposed by the present invention, a deep learning-based weather classification model and a transformer model for image enhancement are configured, and the weather of an input image captured in real time is measured using the deep learning-based weather classification model. According to the classification result, different heads and tails are applied to the transformer model for image improvement, and weather information is removed to output an improved image. It can improve accuracy when applying artificial intelligence technologies such as object detection and object tracking.

도 1은 본 발명의 일실시예에 따른 열악한 날씨의 영상 개선 장치의 구성을 도시한 도면.
도 2는 본 발명의 일실시예에 따른 열악한 날씨의 영상 개선 장치의 제1 모델 학습부를 설명하기 위해 도시한 도면.
도 3은 본 발명의 일실시예에 따른 열악한 날씨의 영상 개선 장치에서 생성한 날씨 분류 모델을 사용한 날씨 분류를 설명하기 위해 도시한 도면.
도 4는 본 발명의 일실시예에 따른 열악한 날씨의 영상 개선 장치의 영상 개선용 트랜스포머 모델을 설명하기 위해 도시한 도면.
도 5는 본 발명의 일실시예에 따른 열악한 날씨의 영상 개선 방법의 흐름을 도시한 도면.
1 is a diagram showing the configuration of an image enhancement device in bad weather according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating a first model learning unit of an image improving device in bad weather according to an embodiment of the present invention.
3 is a diagram for explaining weather classification using a weather classification model generated by an image enhancement apparatus for bad weather according to an embodiment of the present invention;
4 is a diagram illustrating a transformer model for image improvement of an image enhancement device in bad weather according to an embodiment of the present invention.
5 is a flow diagram illustrating a method for improving an image in bad weather according to an embodiment of the present invention.

이하, 첨부된 도면을 참조하여 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명을 용이하게 실시할 수 있도록 바람직한 실시예를 상세히 설명한다. 다만, 본 발명의 바람직한 실시예를 상세하게 설명함에 있어, 관련된 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략한다. 또한, 유사한 기능 및 작용을 하는 부분에 대해서는 도면 전체에 걸쳐 동일한 부호를 사용한다.Hereinafter, preferred embodiments will be described in detail so that those skilled in the art can easily practice the present invention with reference to the accompanying drawings. However, in describing a preferred embodiment of the present invention in detail, if it is determined that a detailed description of a related known function or configuration may unnecessarily obscure the gist of the present invention, the detailed description will be omitted. In addition, the same reference numerals are used throughout the drawings for parts having similar functions and actions.

덧붙여, 명세서 전체에서, 어떤 부분이 다른 부분과 ‘연결’ 되어 있다고 할 때, 이는 ‘직접적으로 연결’ 되어 있는 경우뿐만 아니라, 그 중간에 다른 소자를 사이에 두고 ‘간접적으로 연결’ 되어 있는 경우도 포함한다. 또한, 어떤 구성요소를 ‘포함’ 한다는 것은, 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있다는 것을 의미한다.In addition, throughout the specification, when a part is said to be 'connected' to another part, this is not only the case where it is 'directly connected', but also the case where it is 'indirectly connected' with another element in between. include In addition, 'including' a certain component means that other components may be further included, rather than excluding other components unless otherwise specified.

본 발명은 열악한 날씨의 영상 개선 장치(100) 및 방법에 관한 것으로서, 본 발명의 특징에 따른 열악한 날씨의 영상 개선 장치(100) 및 방법은, 메모리 및 프로세서를 포함한 하드웨어에서 기록되는 소프트웨어로 구성될 수 있다. 예를 들어, 본 발명의 열악한 날씨의 영상 개선 장치(100) 및 방법은, 개인용 컴퓨터, 노트북 컴퓨터, 서버 컴퓨터, PDA, 스마트폰, 태블릿 PC 등에 저장 및 구현될 수 있다.The present invention relates to an image improving device 100 and method for bad weather. can For example, the apparatus 100 and method for improving an image in bad weather according to the present invention may be stored and implemented in a personal computer, a notebook computer, a server computer, a PDA, a smart phone, a tablet PC, and the like.

도 1은 본 발명의 일실시예에 따른 열악한 날씨의 영상 개선 장치(100)의 구성을 도시한 도면이다. 도 1에 도시된 바와 같이, 본 발명의 일실시예에 따른 열악한 날씨의 영상 개선 장치(100)는, 제1 모델 학습부(110), 제2 모델 학습부(120), 날씨 분류부(130) 및 영상 개선부(140)를 포함하여 구성될 수 있다.1 is a diagram showing the configuration of an image improving device 100 in bad weather according to an embodiment of the present invention. As shown in FIG. 1 , the apparatus 100 for improving an image of bad weather according to an embodiment of the present invention includes a first model learning unit 110, a second model learning unit 120, and a weather classification unit 130. ) and an image enhancement unit 140.

제1 모델 학습부(110)는, 비, 눈 및 안개를 포함하는 열악한 날씨와 보통 상태(normal condition) 날씨의 영상에 데이터 증강(Data Augmentation)을 적용해 구성한 학습 데이터를 사용하여, 영상에서 날씨 특징을 추출해 영상의 날씨를 비, 눈, 안개 및 보통 상태의 멀티 클래스로 분류하는 딥러닝 기반 날씨 분류 모델(10)을 생성할 수 있다. 여기서, 보통 상태는, 맑거나 흐린 날씨 등 영상의 화질 등에 영향이 적은 날씨로, 영상에 영향을 미치는 열악한 날씨에 반대되는 의미로 사용되었다.The first model learning unit 110 uses training data configured by applying data augmentation to images of bad weather and normal condition weather including rain, snow, and fog, and the weather in the image. It is possible to create a deep learning-based weather classification model 10 that extracts features and classifies the weather of an image into multi-classes of rain, snow, fog, and normal conditions. Here, the normal condition is weather that has little effect on image quality, such as clear or cloudy weather, and is used as the opposite meaning of bad weather that affects the image.

도 2는 본 발명의 일실시예에 따른 열악한 날씨의 영상 개선 장치(100)의 제1 모델 학습부(110)를 설명하기 위해 도시한 도면이다. 도 2에 도시된 바와 같이, 본 발명의 일실시예에 따른 열악한 날씨의 영상 개선 장치(100)의 제1 모델 학습부(110)는, 대량의 날씨 영상 데이터를 사용해 분류 모델의 학습을 수행하되, 데이터 증강을 통해 증강된 데이터를 포함해 학습 데이터를 구성하여 학습에 사용할 수 있다. 여기서, 데이터 증강은 입력 데이터에 각종 변환을 적용해 데이터양을 늘리고 노이즈에 강한 모델을 얻기 위한 기술로, 원본 이미지에 flipping, rotation, shifting, cropping 등의 변환을 적용할 수 있다.2 is a diagram for explaining the first model learning unit 110 of the image improving device 100 in bad weather according to an embodiment of the present invention. As shown in FIG. 2 , the first model learning unit 110 of the image improvement apparatus 100 in bad weather according to an embodiment of the present invention performs learning of a classification model using a large amount of weather image data, , It is possible to configure learning data including augmented data through data augmentation and use it for learning. Here, data augmentation is a technique for increasing the amount of data by applying various transformations to input data and obtaining a noise-resistant model, and transformations such as flipping, rotation, shifting, and cropping can be applied to the original image.

제1 모델 학습부(110)는, 날씨 영상에서 특징 벡터를 추출하고, 특징 벡터를 사용해 비(rain), 눈(snow), 안개(haze) 및 보통 상태(normal)의 4개의 클래스로 분류하는 멀티 클래스 분류 모델을 학습 데이터로 학습시켜 날씨 분류 모델(10)을 생성할 수 있다. 여기서, 멀티 클래스 분류 모델로는 CNN(Convolutional neural network), 랜덤 포레스트(Random Forest) 등 영상 분류에 강점을 보이는 다양한 알고리즘을 사용할 수 있으며, yolo, ResNet, MobileNet 등 경량화된 알고리즘을 사용해 실시간으로 날씨를 분류하도록 구성할 수 있다.The first model learning unit 110 extracts a feature vector from the weather image and classifies it into four classes of rain, snow, haze, and normal using the feature vector. The weather classification model 10 may be created by learning a multi-class classification model as training data. Here, as a multi-class classification model, various algorithms that show strength in image classification, such as CNN (Convolutional neural network) and Random Forest, can be used. It can be configured to classify.

한편, 제1 모델 학습부(110)는, 복합 스케일링(compound scaling)을 통해 날씨 분류 모델(10)을 최적화할 수 있다. 즉, 날씨 분류 모델(10)은, 복합 스케일링(compound scaling)을 통해 모델의 깊이(depth), 넓이(width) 및 해상도(resolution) 값을 설정해 최적화된 것일 수 있다.Meanwhile, the first model learning unit 110 may optimize the weather classification model 10 through compound scaling. That is, the weather classification model 10 may be optimized by setting depth, width, and resolution values of the model through compound scaling.

복합 스케일링은 모델 스케일링(model scaling)의 한 종류로, 모델의 크기와 연산량을 줄이면서도 모델이 최적의 성능을 내도록 하기 위한 최적화 방법이다. 이때, 모델의 레이어 수를 나타내는 깊이(depth), 채널을 나타내는 넓이(width) 및 입력 영상의 해상도(resolution) 값을 최적화할 수 있다. 이러한 깊이, 넓이 및 해상도는 독립적이지 않고 서로 연관되어 있는데, 복합 스케일링을 통해 깊이, 넓이 및 해상도 값이 조화(balance)되도록 최적값을 찾을 수 있다. 이러한 복합 스케일링을 통해 빠르게 높은 정확도로 날씨 영상을 분류할 수 있는 최적의 레이어 수와 채널로 분류기를 구성하고, 최적의 해상도로 입력 날씨 영상을 전처리해 분류기에 입력하도록 날씨 분류 모델(10)을 생성할 수 있다.Composite scaling is a type of model scaling, and is an optimization method for making the model perform optimally while reducing the size and computation amount of the model. At this time, the depth indicating the number of layers of the model, the width indicating the channel, and the resolution value of the input image may be optimized. These depth, width, and resolution are not independent but are related to each other, and optimal values may be found so that depth, width, and resolution values are balanced through complex scaling. Through this complex scaling, a classifier is constructed with the optimal number of layers and channels that can quickly classify weather images with high accuracy, and a weather classification model (10) is created to preprocess input weather images with optimal resolution and input them to the classifier. can do.

도 3은 본 발명의 일실시예에 따른 열악한 날씨의 영상 개선 장치(100)에서 생성한 날씨 분류 모델(10)을 사용한 날씨 분류를 설명하기 위해 도시한 도면이다. 도 3에 도시된 바와 같이, 본 발명의 일실시예에 따른 열악한 날씨의 영상 개선 장치(100)에서는, 제1 모델 학습부(110)에서 생성한 학습 완료된 날씨 분류 모델(10)에 실시간으로 입력되는 날씨 영상(도 3에서 live 날씨 이미지 데이터)을 입력하여, 비, 눈, 안개 및 보통 상태 중 어느 하나의 분류 결과를 출력으로 얻을 수 있다. 이와 같이 학습 완료된 날씨 분류 모델(10)의 실행에 따른 날씨 영상의 분류는 추후 상세히 설명할 날씨 분류부(130)에서 수행될 수 있다.3 is a diagram illustrating weather classification using the weather classification model 10 generated by the image enhancement device 100 of bad weather according to an embodiment of the present invention. As shown in FIG. 3 , in the image improving apparatus 100 of bad weather according to an embodiment of the present invention, the first model learning unit 110 inputs data to the trained weather classification model 10 in real time. By inputting a weather image (live weather image data in FIG. 3), a classification result of any one of rain, snow, fog, and normal conditions may be obtained as an output. Classification of the weather image according to the execution of the learned weather classification model 10 may be performed by the weather classification unit 130, which will be described in detail later.

제2 모델 학습부(120)는, 날씨 분류별 헤드(head) 및 테일(tail)을 포함하는 어텐션 기반의 영상 개선용 트랜스포머 모델(20)을 구성할 수 있다. 여기서, 영상 개선용 트랜스포머 모델(20)은, 비, 눈 및 안개를 포함하는 열악한 날씨의 영상에서 비, 눈 및 안개에 해당하는 날씨 정보를 제거해 개선된 영상을 출력할 수 있다. 즉, 영상에서 비, 눈, 안개에 의해 왜곡된 부분을 복구하여 개선된 영상을 출력할 수 있다. 여기서 개선된 영상은 날씨가 보통 상태(normal condition)일 때의 영상일 수 있다.The second model learning unit 120 may configure the attention-based transformer model 20 for image improvement including a head and a tail for each weather category. Here, the transformer model 20 for image enhancement may output an improved image by removing weather information corresponding to rain, snow, and fog from an image of poor weather including rain, snow, and fog. That is, an improved image may be output by restoring a part distorted by rain, snow, or fog in the image. Here, the improved image may be an image when the weather is in a normal condition.

도 4는 본 발명의 일실시예에 따른 열악한 날씨의 영상 개선 장치(100)의 영상 개선용 트랜스포머 모델(20)을 설명하기 위해 도시한 도면이다. 도 4에 도시된 바와 같이, 본 발명의 일실시예에 따른 열악한 날씨의 영상 개선 장치(100)의 영상 개선용 트랜스포머 모델(20)은, 헤드, 트랜스포머 인코더, 트랜스포머 디코더 및 테일로 구성될 수 있다. 여기서, 헤드와 테일은 비, 눈 및 안개의 3개의 날씨별로 구성될 수 있다.4 is a diagram illustrating a transformer model 20 for image improvement of the image enhancement device 100 in bad weather according to an embodiment of the present invention. As shown in FIG. 4, the transformer model 20 for image improvement of the image enhancement device 100 in bad weather according to an embodiment of the present invention may be composed of a head, a transformer encoder, a transformer decoder, and a tail. . Here, the head and tail may be configured according to three weather conditions of rain, snow, and fog.

헤드는, 비, 눈 및 안개의 3개의 날씨별로 구성되며(도 4에서 Desnowing Head, Deraining Head 및 Dehazing Head), 입력 영상에서 특징 맵을 추출할 수 있다. 또한, 헤드는, 날씨 분류별로 날씨의 시계열 특징 및 영상 패턴을 압축해 보유하여, 입력 영상에서 날씨의 특성이 반영된 특징 벡터를 추출할 수 있다. 즉, 헤드는 영상 개선용 트랜스포머 모델(20)의 백본 역할을 하는 것으로, CNN 기반의 알고리즘을 사용해 특징 맵을 추출할 수 있다.The head is composed of three weather conditions of rain, snow, and fog (Desnowing Head, Deraining Head, and Dehazing Head in FIG. 4), and a feature map can be extracted from an input image. In addition, the head compresses and retains weather time-series features and image patterns for each weather category, and extracts a feature vector in which weather characteristics are reflected from an input image. That is, the head serves as the backbone of the transformer model 20 for image enhancement, and a feature map can be extracted using a CNN-based algorithm.

트랜스포머 인코더는, 입력 영상에서 추출된 특징 맵을 입력받고, 영상의 시퀀스 정보를 압축할 수 있다. 즉, 도 4에 도시된 바와 같이, 트랜스포머 인코더는 어텐션(attention) 기법(보다 구체적으로, 셀프-어텐션(self-attention) 기법)을 적용하며, 헤드에서 전달받은 특징 맵을 여러 개의 패치로 분할하고, 각 패치를 특징 시퀀스 벡터로 변환해 각 패치 사이의 연관성을 학습할 수 있다.The transformer encoder may receive a feature map extracted from an input image and compress sequence information of the image. That is, as shown in FIG. 4, the transformer encoder applies an attention technique (more specifically, a self-attention technique), divides the feature map received from the head into several patches, , the association between each patch can be learned by converting each patch into a feature sequence vector.

트랜스포머 디코더는, 트랜스포머 인코더로부터 영상의 시퀀스 정보를 전달받아 입력 영상에서 열악한 날씨에 의해 누락된 정보를 복구할 수 있다. 예를 들어, 트랜스포머 디코더가 비가 오는 영상의 시퀀스 정보를 전달받으면, 시퀀스 정보에서 비 오는 특징을 보통 상태의 특징으로 변환해 개선된 시퀀스 벡터를 출력할 수 있다.The transformer decoder may receive sequence information of an image from the transformer encoder and restore information missing from the input image due to bad weather. For example, when the transformer decoder receives sequence information of a rainy image, it can output an improved sequence vector by converting a rainy feature in the sequence information into a normal state feature.

테일은, 비, 눈 및 안개의 3개의 날씨 분류별로 구성되며, 트랜스포머 디코더에서 복구된 정보를 매핑해 개선된 영상을 생성해 출력할 수 있다. 즉, 테일은 디코더로부터 개선된 시퀀스 벡터를 전달받아서 개선된 영상으로 재구성할 수 있다. 도 4에 도시된 바와 같이, 테일은, 날씨 분류별로 날씨의 영상 패턴에 따른 3개의 테일로 구성되며(Desnowing Tail, Deraining Tail 및 Dehazing Tail), 날씨 분류별 테일을 사용해 날씨의 영상 패턴에 따라 복구된 정보를 매핑할 수 있다.The tail is composed of three weather categories of rain, snow, and fog, and can generate and output an improved image by mapping the information recovered from the transformer decoder. That is, the tail may receive an improved sequence vector from the decoder and reconstruct it into an improved image. As shown in FIG. 4, the tail consists of three tails (desnowing tail, deraining tail, and dehazing tail) according to the image pattern of weather for each weather category, and the tail for each weather category is used to recover the weather image pattern. Information can be mapped.

제2 모델 학습부(120)는, 사전 학습된 트랜스포머 모델을 열악한 날씨 개선용으로 최적화하기 위한 추가 학습을 수행해 영상 개선용 트랜스포머 모델(20)을 구성할 수 있다. 따라서 적은 데이터 세트로도 우수한 학습 결과를 얻을 수 있다. 또한, 멀티-어텐션, 셀프-어텐션 기법이 적용된 트랜스포머 모델을 사용함으로써, 입력 영상의 복구 시에 배경의 날씨에 주의(attention)를 집중해 효과적으로 날씨에 의해 왜곡 또는 손상된 부분을 복구하여 개선된 영상을 얻을 수 있다.The second model learning unit 120 may configure the transformer model 20 for image improvement by performing additional learning to optimize the pre-trained transformer model for improvement in bad weather. Therefore, good learning results can be obtained even with a small data set. In addition, by using a transformer model with multi-attention and self-attention techniques, attention is focused on the weather in the background when restoring the input video, effectively restoring the distorted or damaged part due to the weather, and improving the video. You can get it.

전술한 바와 같이, 제1 모델 학습부(110) 및 제2 모델 학습부(120)에서 날씨 분류 모델(10)과 영상 개선용 트랜스포머 모델(20)을 구성한 다음, 날씨 분류부(130) 및 영상 개선부(140)는 구성된 모델을 사용해 실시간으로 촬영되는 입력 영상을 복구해 개선된 영상을 출력할 수 있다.As described above, after configuring the weather classification model 10 and the transformer model 20 for image improvement in the first model learning unit 110 and the second model learning unit 120, the weather classification unit 130 and the image The enhancement unit 140 may output an improved image by restoring an input image captured in real time using the configured model.

날씨 분류부(130)는, 제1 모델 학습부(110)에서 생성한 날씨 분류 모델(10)을 사용해, 실시간으로 촬영되는 입력 영상의 날씨를 분류할 수 있다. 보다 구체적으로, 날씨 분류부(130)는, 분류 결과가 보통 상태이면 영상 개선부(140)에 영상 개선을 요청하지 않고, 분류 결과가 비, 눈 및 안개를 포함하는 열악한 날씨이면 영상 개선부(140)에 입력 영상을 전달하고 영상 개선을 요청할 수 있다. 즉, 날씨 분류 모델(10)의 분류 결과, 날씨가 보통 상태이면 날씨에 의한 영상 왜곡, 훼손, 손상이 없는 경우이므로, 영상 개선부(140)는 동작하지 않을 수 있다. 따라서 불필요한 영상 처리로 인한 시간 지연, 계산 자원 낭비 등을 막을 수 있다.The weather classification unit 130 may classify the weather of the input image captured in real time using the weather classification model 10 generated by the first model learning unit 110 . More specifically, the weather classification unit 130 does not request image improvement from the image improvement unit 140 when the classification result is normal, and when the classification result is bad weather including rain, snow, and fog, the image improvement unit ( 140) and may request image improvement. That is, as a result of the classification of the weather classification model 10, if the weather is normal, there is no image distortion, damage, or damage caused by the weather, and thus the image improving unit 140 may not operate. Accordingly, time delay and waste of computational resources due to unnecessary image processing can be prevented.

영상 개선부(140)는, 제2 모델 학습부(120)에서 구성한 영상 개선용 트랜스포머 모델(20)을 사용해 입력 영상에서 날씨 정보를 제거해 개선된 영상을 출력하되, 날씨 분류부(130)에서 출력된 날씨 분류에 따라 서로 다른 헤드 및 테일을 사용할 수 있다. 즉, 영상 개선부(140)는, 비, 눈 또는 안개의 열악한 날씨일 때 영상 복구를 위해 동작하는데, 날씨 분류 모델(10)이 입력 영상의 날씨를 비로 분류하면, Deraining Head와 Deraining Tail을 사용하는 것과 같이, 분류 결과에 따라 헤드와 테일을 선택해 사용하여, 각 날씨에 최적화된 알고리즘을 사용할 수 있다. 여기서, 입력 영상에서 날씨 정보를 제거한다는 것은, 비, 눈, 안개 등과 같이 열악한 날씨에 의해 왜곡 또는 손상된 부분 또는 픽셀을 보통 상태의 부분 또는 픽셀로 교체하여, 보통 상태 날씨에서 촬영된 영상처럼 변환하는 것을 의미할 수 있다.The image enhancement unit 140 outputs an improved image by removing weather information from the input image using the transformer model 20 for image improvement configured in the second model learning unit 120, and the weather classification unit 130 outputs the image. Different heads and tails are available for different weather classifications. That is, the image enhancement unit 140 operates for image restoration in bad weather such as rain, snow, or fog. When the weather classification model 10 classifies the weather of the input image as rain, the deraining head and deraining tail are used. In the same way, it is possible to use an algorithm optimized for each weather by selecting and using the head and tail according to the classification result. Here, removing the weather information from the input image means replacing parts or pixels distorted or damaged by poor weather such as rain, snow, fog, etc. with parts or pixels in normal conditions and converting them to images captured in normal conditions. that can mean

도 5는 본 발명의 일실시예에 따른 열악한 날씨의 영상 개선 방법의 흐름을 도시한 도면이다. 도 5에 도시된 바와 같이, 본 발명의 일실시예에 따른 열악한 날씨의 영상 개선 방법은, 본 발명의 일실시예에 따른 열악한 날씨의 영상 개선 장치(100)에서 각 단계가 수행될 수 있으며, 딥러닝 기반 날씨 분류 모델(10)을 생성하는 단계(S110), 영상 개선용 트랜스포머 모델(20)을 구성하는 단계(S120), 날씨 분류 모델(10)을 사용해 실시간으로 촬영되는 입력 영상의 날씨를 분류하는 단계(S130) 및 영상 개선용 트랜스포머 모델(20)을 사용해 입력 영상에서 날씨 정보를 제거해 개선된 영상을 출력하는 단계(S140)를 포함하여 구현될 수 있다.5 is a flow diagram illustrating a method for improving an image in bad weather according to an embodiment of the present invention. As shown in FIG. 5, in the method for improving an image in bad weather according to an embodiment of the present invention, each step may be performed in the apparatus 100 for improving an image in bad weather according to an embodiment of the present invention, Creating a deep learning-based weather classification model 10 (S110), configuring a transformer model 20 for image improvement (S120), and using the weather classification model 10 to determine the weather of an input image captured in real time. It can be implemented including a step of classifying (S130) and outputting an improved image by removing weather information from the input image using the transformer model 20 for image enhancement (S140).

보다 구체적으로, 본 발명의 일실시예에 따른 열악한 날씨의 영상 개선 방법은, 컴퓨터에서 각 단계가 수행되는 영상 개선 방법으로서, 비, 눈 및 안개를 포함하는 열악한 날씨와 보통 상태(normal condition) 날씨의 영상에 데이터 증강(Data Augmentation)을 적용해 구성한 학습 데이터를 사용하여, 영상에서 날씨 특징을 추출해 영상의 날씨를 비, 눈, 안개 및 보통 상태의 멀티 클래스로 분류하는 딥러닝 기반 날씨 분류 모델(10)을 생성하는 단계(S100), 날씨 분류별 헤드(head) 및 테일(tail)을 포함하는 어텐션 기반의 영상 개선용 트랜스포머 모델(20)을 구성하는 단계(S200), 날씨 분류 모델(10)을 사용해, 실시간으로 촬영되는 입력 영상의 날씨를 분류하는 단계(S300) 및 영상 개선용 트랜스포머 모델(20)을 사용해 입력 영상에서 날씨 정보를 제거해 개선된 영상을 출력하되, 날씨 분류부(130)에서 출력된 날씨 분류에 따라 서로 다른 헤드 및 테일을 사용하는 단계(S400)를 포함하여 구현될 수 있다.More specifically, an image enhancement method in bad weather according to an embodiment of the present invention is an image enhancement method in which each step is performed in a computer, and poor weather including rain, snow and fog and normal condition weather A deep learning-based weather classification model that extracts weather features from images and classifies the weather of images into multi-classes of rain, snow, fog, and normal conditions using learning data constructed by applying data augmentation to images of 10), a step of constructing a transformer model 20 for image improvement based on attention including a head and a tail for each weather classification (S200), and a weather classification model 10 Classifying the weather of the input image captured in real time (S300) and outputting an improved image by removing weather information from the input image using the transformer model 20 for image improvement, and outputting the image in the weather classification unit 130. It can be implemented including a step (S400) of using different heads and tails according to the classified weather.

여기서, 영상 개선용 트랜스포머 모델(20)은, 비, 눈 및 안개를 포함하는 열악한 날씨의 영상에서 비, 눈 및 안개에 해당하는 날씨 정보를 제거해 개선된 영상을 출력하며, 단계 S300에서는, 분류 결과가 보통 상태이면 단계 S400을 진행하지 않고, 분류 결과가 비, 눈 및 안개를 포함하는 열악한 날씨이면 단계 S400에 입력 영상을 전달하고 영상 개선을 요청할 수 있다.Here, the transformer model 20 for image enhancement removes weather information corresponding to rain, snow, and fog from an image of poor weather including rain, snow, and fog to output an improved image, and in step S300, the classification result If is in a normal state, step S400 is not performed, and if the classification result is poor weather including rain, snow, and fog, an input image may be transmitted to step S400 and image improvement may be requested.

각각의 단계들과 관련된 상세한 내용들은, 앞서 본 발명의 일실시예에 따른 열악한 날씨의 영상 개선 장치(100)와 관련하여 충분히 설명되었으므로, 상세한 설명은 생략하기로 한다.Since the details related to each step have been sufficiently described in relation to the image improving apparatus 100 in bad weather according to an embodiment of the present invention, a detailed description thereof will be omitted.

전술한 바와 같이, 본 발명에서 제안하고 있는 열악한 날씨의 영상 개선 장치(100) 및 방법에 따르면, 딥러닝 기반 날씨 분류 모델(10)과 영상 개선용 트랜스포머 모델(20)을 구성하고, 딥러닝 기반 날씨 분류 모델(10)을 사용해 실시간으로 촬영되는 입력 영상의 날씨를 분류하고, 분류 결과에 따라 서로 다른 헤드 및 테일을 영상 개선용 트랜스포머 모델(20)에 적용해 날씨 정보를 제거해 개선된 영상을 출력함으로써, 열악한 날씨에 촬영된 영상을 개선해 교통상황, 범죄 상황 등을 쉽게 파악할 수 있고, 객체 탐지, 객체 추적 등의 인공지능 기술 적용 시 정확도를 높일 수 있다.As described above, according to the image improvement apparatus 100 and method for bad weather proposed in the present invention, the deep learning-based weather classification model 10 and the transformer model 20 for image improvement are configured, and the deep learning-based The weather classification model 10 is used to classify the weather of the input image captured in real time, and according to the classification result, different heads and tails are applied to the image enhancement transformer model 20 to remove weather information and output an improved image. By doing so, it is possible to easily understand traffic conditions and crime situations by improving images taken in poor weather, and increase accuracy when applying artificial intelligence technologies such as object detection and object tracking.

한편, 본 발명은 다양한 통신 단말기로 구현되는 동작을 수행하기 위한 프로그램 명령을 포함하는 컴퓨터에서 판독 가능한 매체를 포함할 수 있다. 예를 들어, 컴퓨터에서 판독 가능한 매체는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD_ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media) 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치를 포함할 수 있다.Meanwhile, the present invention may include a computer-readable medium including program instructions for performing operations implemented in various communication terminals. For example, computer-readable media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical media such as CD_ROMs and DVDs, and floptical disks. It may include hardware devices specially configured to store and execute program instructions, such as magneto-optical media and ROM, RAM, flash memory, and the like.

이와 같은 컴퓨터에서 판독 가능한 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 이때, 컴퓨터에서 판독 가능한 매체에 기록되는 프로그램 명령은 본 발명을 구현하기 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 예를 들어, 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해 실행될 수 있는 고급 언어 코드를 포함할 수 있다.Such computer-readable media may include program instructions, data files, data structures, etc. alone or in combination. At this time, program instructions recorded on a computer-readable medium may be specially designed and configured to implement the present invention, or may be known and usable to those skilled in computer software. For example, it may include high-level language codes that can be executed by a computer using an interpreter, as well as machine language codes generated by a compiler.

이상 설명한 본 발명은 본 발명이 속한 기술분야에서 통상의 지식을 가진 자에 의하여 다양한 변형이나 응용이 가능하며, 본 발명에 따른 기술적 사상의 범위는 아래의 특허청구범위에 의하여 정해져야 할 것이다.The present invention described above can be variously modified or applied by those skilled in the art to which the present invention belongs, and the scope of the technical idea according to the present invention should be defined by the claims below.

10: 날씨 분류 모델
20: 영상 개선용 트랜스포머 모델
100: 영상 개선 장치
110: 제1 모델 학습부
120: 제2 모델 학습부
130: 날씨 분류부
140: 영상 개선부
S110: 딥러닝 기반 날씨 분류 모델을 생성하는 단계
S120: 영상 개선용 트랜스포머 모델을 구성하는 단계
S130: 날씨 분류 모델을 사용해 실시간으로 촬영되는 입력 영상의 날씨를 분류하는 단계
S140: 영상 개선용 트랜스포머 모델을 사용해 입력 영상에서 날씨 정보를 제거해 개선된 영상을 출력하는 단계
10: Weather Classification Model
20: Transformer model for image enhancement
100: image enhancement device
110: first model learning unit
120: second model learning unit
130: weather classification unit
140: image improvement unit
S110: Step of generating a deep learning-based weather classification model
S120: Step of constructing a transformer model for image enhancement
S130: Step of classifying the weather of the input image captured in real time using the weather classification model
S140: Outputting an improved image by removing weather information from an input image using a transformer model for image enhancement

Claims (8)

CCTV 카메라에서 촬영되는 영상의 실시간 분석을 위한, 영상 개선 장치(100)로서,
비, 눈 및 안개를 포함하는 열악한 날씨와 보통 상태(normal condition) 날씨의 영상에 데이터 증강(Data Augmentation)을 적용해 구성한 학습 데이터를 사용하여, 영상에서 날씨 특징을 추출해 영상의 날씨를 비, 눈, 안개 및 보통 상태의 멀티 클래스로 분류하는 딥러닝 기반 날씨 분류 모델(10)을 생성하는 제1 모델 학습부(110);
날씨 분류별 헤드(head) 및 테일(tail)을 포함하는 어텐션 기반의 영상 개선용 트랜스포머 모델(20)을 구성하되, 사전 학습된 트랜스포머 모델을 열악한 날씨 개선용으로 최적화하기 위한 추가 학습을 수행해 영상 개선용 트랜스포머 모델(20)을 구성하는 제2 모델 학습부(120);
상기 제1 모델 학습부(110)에서 생성한 날씨 분류 모델(10)을 사용해, 실시간으로 촬영되는 입력 영상의 날씨를 분류하는 날씨 분류부(130); 및
상기 제2 모델 학습부(120)에서 구성한 영상 개선용 트랜스포머 모델(20)을 사용해 상기 입력 영상에서 날씨 정보를 제거해 개선된 영상을 출력하되, 상기 날씨 분류부(130)에서 출력된 날씨 분류에 따라 서로 다른 헤드 및 테일을 사용하는 영상 개선부(140)를 포함하며,
상기 데이터 증강은,
원본 이미지에 flipping, rotation, shifting 및 cropping을 포함하는 변환을 적용해 증강된 데이터를 생성하는 것이며,
상기 날씨 분류 모델(10)은,
실시간으로 날씨를 분류하는 경량화된 알고리즘을 사용하며, 복합 스케일링(compound scaling)을 통해 모델의 깊이(depth), 넓이(width) 및 해상도(resolution) 값을 설정해 최적화된 것이며,
상기 영상 개선용 트랜스포머 모델(20)은,
비, 눈 및 안개를 포함하는 열악한 날씨의 영상에서 비, 눈 및 안개에 해당하는 날씨 정보를 제거해 상기 개선된 영상을 출력하며,
상기 날씨 분류부(130)는,
분류 결과가 보통 상태이면 상기 영상 개선부(140)에 영상 개선을 요청하지 않고, 분류 결과가 비, 눈 및 안개를 포함하는 열악한 날씨이면 상기 영상 개선부(140)에 상기 입력 영상을 전달하고 영상 개선을 요청하며,
상기 영상 개선용 트랜스포머 모델(20)은,
비, 눈 및 안개의 3개의 날씨별로 구성되며, 상기 입력 영상에서 특징 맵을 추출하는 헤드;
상기 입력 영상에서 추출된 특징 맵을 입력받고, 영상의 시퀀스 정보를 압축하되, 셀프-어텐션(self-attention) 기법을 적용하며, 헤드에서 전달받은 특징 맵을 복수 개의 패치로 분할하고, 각 패치를 특징 시퀀스 벡터로 변환해 각 패치 사이의 연관성을 학습하는 트랜스포머 인코더;
상기 트랜스포머 인코더로부터 영상의 시퀀스 정보를 전달받아 상기 입력 영상에서 열악한 날씨에 의해 누락된 정보를 복구하는 트랜스포머 디코더; 및
비, 눈 및 안개의 3개의 날씨 분류별로 구성되며, 상기 트랜스포머 디코더에서 복구된 정보를 매핑해 개선된 영상을 생성해 출력하는 테일을 포함하여 구성되고,
상기 헤드는,
날씨 분류별로 날씨의 시계열 특징 및 영상 패턴을 압축해 보유하여, 상기 입력 영상에서 날씨의 특성이 반영된 특징 벡터를 추출하며,
상기 테일은,
날씨 분류별로 날씨의 영상 패턴에 따른 3개의 테일로 구성되며, 날씨 분류별 테일을 사용해 날씨의 영상 패턴에 따라 복구된 정보를 매핑하는 것을 특징으로 하는, 열악한 날씨의 영상 개선 장치(100).
As an image improvement device 100 for real-time analysis of images captured by CCTV cameras,
Using training data constructed by applying data augmentation to images of poor weather and normal conditions including rain, snow, and fog, weather features are extracted from the image and the weather of the image is classified as rain or snow. a first model learning unit 110 that generates a deep learning-based weather classification model 10 that classifies into multi-classes of , fog and normal conditions;
Construct the transformer model 20 for image improvement based on attention, including the head and tail for each weather classification, and perform additional learning to optimize the pre-trained transformer model for poor weather improvement to improve the image. a second model learning unit 120 constituting the transformer model 20;
a weather classification unit 130 that classifies the weather of an input image captured in real time using the weather classification model 10 generated by the first model learning unit 110; and
Weather information is removed from the input image using the transformer model 20 for image improvement configured in the second model learning unit 120 to output an improved image, and according to the weather classification output from the weather classification unit 130 It includes an image enhancement unit 140 using different heads and tails,
The data augmentation is
It is to generate augmented data by applying transformations including flipping, rotation, shifting, and cropping to the original image,
The weather classification model 10,
It uses a lightweight algorithm that classifies weather in real time, and is optimized by setting the depth, width, and resolution values of the model through compound scaling.
The transformer model 20 for image improvement,
Outputting the improved image by removing weather information corresponding to rain, snow, and fog from an image of poor weather including rain, snow, and fog;
The weather classification unit 130,
If the classification result is in a normal state, the image enhancement unit 140 is not requested to improve the image, and if the classification result is poor weather including rain, snow, and fog, the input image is transmitted to the image enhancement unit 140 and the image ask for improvement,
The transformer model 20 for image improvement,
a head composed of three weather conditions of rain, snow, and fog, and extracting a feature map from the input image;
A feature map extracted from the input image is received, sequence information of the image is compressed, a self-attention technique is applied, the feature map received from the head is divided into a plurality of patches, and each patch is a transformer encoder that converts into a feature sequence vector and learns correlation between patches;
a transformer decoder receiving sequence information of an image from the transformer encoder and restoring information missing from the input image due to bad weather; and
It is composed of three weather categories of rain, snow, and fog, and includes a tail that generates and outputs an improved image by mapping the information recovered from the transformer decoder,
the head,
Time-series features and image patterns of weather are compressed and retained for each weather category, and feature vectors reflecting weather characteristics are extracted from the input image;
The tail,
An image enhancement device (100) for bad weather, characterized in that it consists of three tails according to weather image patterns for each weather category, and uses the tails for each weather category to map the restored information according to the weather image pattern.
삭제delete 삭제delete 삭제delete 삭제delete 삭제delete CCTV 카메라에서 촬영되는 영상의 실시간 분석을 위한, 컴퓨터에서 각 단계가 수행되는 영상 개선 방법으로서,
(1) 비, 눈 및 안개를 포함하는 열악한 날씨와 보통 상태(normal condition) 날씨의 영상에 데이터 증강(Data Augmentation)을 적용해 구성한 학습 데이터를 사용하여, 영상에서 날씨 특징을 추출해 영상의 날씨를 비, 눈, 안개 및 보통 상태의 멀티 클래스로 분류하는 딥러닝 기반 날씨 분류 모델(10)을 생성하는 단계;
(2) 날씨 분류별 헤드(head) 및 테일(tail)을 포함하는 어텐션 기반의 영상 개선용 트랜스포머 모델(20)을 구성하되, 사전 학습된 트랜스포머 모델을 열악한 날씨 개선용으로 최적화하기 위한 추가 학습을 수행해 영상 개선용 트랜스포머 모델(20)을 구성하는 단계;
(3) 상기 날씨 분류 모델(10)을 사용해, 실시간으로 촬영되는 입력 영상의 날씨를 분류하는 단계; 및
(4) 상기 영상 개선용 트랜스포머 모델(20)을 사용해 상기 입력 영상에서 날씨 정보를 제거해 개선된 영상을 출력하되, 상기 단계 (3)에서 출력된 날씨 분류에 따라 서로 다른 헤드 및 테일을 사용하는 단계를 포함하며,
상기 데이터 증강은,
원본 이미지에 flipping, rotation, shifting 및 cropping을 포함하는 변환을 적용해 증강된 데이터를 생성하는 것이며,
상기 날씨 분류 모델(10)은,
실시간으로 날씨를 분류하는 경량화된 알고리즘을 사용하며, 복합 스케일링(compound scaling)을 통해 모델의 깊이(depth), 넓이(width) 및 해상도(resolution) 값을 설정해 최적화된 것이며,
상기 영상 개선용 트랜스포머 모델(20)은,
비, 눈 및 안개를 포함하는 열악한 날씨의 영상에서 비, 눈 및 안개에 해당하는 날씨 정보를 제거해 상기 개선된 영상을 출력하며,
상기 단계 (3)에서는,
분류 결과가 보통 상태이면 상기 단계 (4)를 진행하지 않고, 분류 결과가 비, 눈 및 안개를 포함하는 열악한 날씨이면 상기 단계 (4)에 상기 입력 영상을 전달하고 영상 개선을 요청하며,
상기 영상 개선용 트랜스포머 모델(20)은,
비, 눈 및 안개의 3개의 날씨별로 구성되며, 상기 입력 영상에서 특징 맵을 추출하는 헤드;
상기 입력 영상에서 추출된 특징 맵을 입력받고, 영상의 시퀀스 정보를 압축하되, 셀프-어텐션(self-attention) 기법을 적용하며, 헤드에서 전달받은 특징 맵을 복수 개의 패치로 분할하고, 각 패치를 특징 시퀀스 벡터로 변환해 각 패치 사이의 연관성을 학습하는 트랜스포머 인코더;
상기 트랜스포머 인코더로부터 영상의 시퀀스 정보를 전달받아 상기 입력 영상에서 열악한 날씨에 의해 누락된 정보를 복구하는 트랜스포머 디코더; 및
비, 눈 및 안개의 3개의 날씨 분류별로 구성되며, 상기 트랜스포머 디코더에서 복구된 정보를 매핑해 개선된 영상을 생성해 출력하는 테일을 포함하여 구성되고,
상기 헤드는,
날씨 분류별로 날씨의 시계열 특징 및 영상 패턴을 압축해 보유하여, 상기 입력 영상에서 날씨의 특성이 반영된 특징 벡터를 추출하며,
상기 테일은,
날씨 분류별로 날씨의 영상 패턴에 따른 3개의 테일로 구성되며, 날씨 분류별 테일을 사용해 날씨의 영상 패턴에 따라 복구된 정보를 매핑하는 것을 특징으로 하는, 열악한 날씨의 영상 개선 방법.
As an image improvement method in which each step is performed in a computer for real-time analysis of images captured by CCTV cameras,
(1) Using training data constructed by applying Data Augmentation to images of poor weather and normal conditions including rain, snow, and fog, weather features are extracted from the image to determine the weather of the image. Creating a deep learning-based weather classification model 10 that classifies rain, snow, fog, and normal conditions into multi-classes;
(2) Construct an attention-based image improvement transformer model 20 including a head and a tail for each weather classification, and perform additional learning to optimize the pre-trained transformer model for poor weather improvement. configuring a transformer model 20 for image enhancement;
(3) classifying the weather of an input image captured in real time using the weather classification model 10; and
(4) Outputting an improved image by removing weather information from the input image using the transformer model 20 for image enhancement, using different heads and tails according to the weather classification output in step (3). Including,
The data augmentation is
It is to generate augmented data by applying transformations including flipping, rotation, shifting, and cropping to the original image,
The weather classification model 10,
It uses a lightweight algorithm that classifies weather in real time, and is optimized by setting the depth, width, and resolution values of the model through compound scaling.
The transformer model 20 for image improvement,
Outputting the improved image by removing weather information corresponding to rain, snow, and fog from an image of poor weather including rain, snow, and fog;
In the step (3),
If the classification result is normal, the step (4) is not performed, and if the classification result is bad weather including rain, snow, and fog, the input image is transmitted to the step (4) and image improvement is requested,
The transformer model 20 for image improvement,
a head composed of three weather conditions of rain, snow, and fog, and extracting a feature map from the input image;
A feature map extracted from the input image is received, sequence information of the image is compressed, a self-attention technique is applied, the feature map received from the head is divided into a plurality of patches, and each patch is a transformer encoder that converts into a feature sequence vector and learns correlation between patches;
a transformer decoder receiving sequence information of an image from the transformer encoder and restoring information missing from the input image due to bad weather; and
It is composed of three weather categories of rain, snow, and fog, and includes a tail that generates and outputs an improved image by mapping the information recovered from the transformer decoder,
the head,
Time-series features and image patterns of weather are compressed and retained for each weather category, and feature vectors reflecting weather characteristics are extracted from the input image;
The tail,
An image improvement method for bad weather, comprising three tails according to weather image patterns for each weather category, and mapping recovered information according to weather image patterns using the tails for each weather category.
삭제delete
KR1020220089240A 2022-07-19 2022-07-19 Apparatus and method for improving images in poor weather KR102514531B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020220089240A KR102514531B1 (en) 2022-07-19 2022-07-19 Apparatus and method for improving images in poor weather

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020220089240A KR102514531B1 (en) 2022-07-19 2022-07-19 Apparatus and method for improving images in poor weather

Publications (1)

Publication Number Publication Date
KR102514531B1 true KR102514531B1 (en) 2023-03-27

Family

ID=85799861

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220089240A KR102514531B1 (en) 2022-07-19 2022-07-19 Apparatus and method for improving images in poor weather

Country Status (1)

Country Link
KR (1) KR102514531B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102599330B1 (en) * 2023-06-13 2023-11-08 컨트롤에프 주식회사 Image-based fog area detection and visibility calculation system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102119687B1 (en) * 2020-03-02 2020-06-05 엔에이치네트웍스 주식회사 Learning Apparatus and Method of Image
KR20220032409A (en) * 2020-09-07 2022-03-15 (주)지앤티솔루션 Apparatus and Method for Learning and Utilizing Object Detection Model through Virtual Weather Condition Implement
KR102393095B1 (en) * 2021-10-06 2022-05-02 가온플랫폼 주식회사 A system for predicting and diagnosing malfunctions in rotating equipment based on artificial intelligence using vibration, sound, and image data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102119687B1 (en) * 2020-03-02 2020-06-05 엔에이치네트웍스 주식회사 Learning Apparatus and Method of Image
KR20220032409A (en) * 2020-09-07 2022-03-15 (주)지앤티솔루션 Apparatus and Method for Learning and Utilizing Object Detection Model through Virtual Weather Condition Implement
KR102393095B1 (en) * 2021-10-06 2022-05-02 가온플랫폼 주식회사 A system for predicting and diagnosing malfunctions in rotating equipment based on artificial intelligence using vibration, sound, and image data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Hanting Chen et al., Pre-Trained Image Processing Transformer, arXiv preprint arXiv:2012.00364, 8 Nov. 2021(2021.11.08.) 1부.* *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102599330B1 (en) * 2023-06-13 2023-11-08 컨트롤에프 주식회사 Image-based fog area detection and visibility calculation system

Similar Documents

Publication Publication Date Title
Li et al. Single image dehazing via conditional generative adversarial network
Bappy et al. Exploiting spatial structure for localizing manipulated image regions
CN111444881A (en) Fake face video detection method and device
Zheng et al. Single image cloud removal using U-Net and generative adversarial networks
CN112395951B (en) Complex scene-oriented domain-adaptive traffic target detection and identification method
CN113065645B (en) Twin attention network, image processing method and device
CN113592736A (en) Semi-supervised image deblurring method based on fusion attention mechanism
CN111274987B (en) Facial expression recognition method and facial expression recognition device
CN114764868A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
KR102514531B1 (en) Apparatus and method for improving images in poor weather
Huang et al. Learning spatio-temporal representations with temporal squeeze pooling
Jemilda et al. Moving object detection and tracking using genetic algorithm enabled extreme learning machine
CN114549369A (en) Data restoration method and device, computer and readable storage medium
Devi et al. Feature extraction and object detection using fast-convolutional neural network for remote sensing satellite image
Guo et al. Application: Image-based visual perception
CN118038381A (en) YOLOv 5-based anti-shielding vehicle detection method
Zhao et al. End‐to‐End Retinex‐Based Illumination Attention Low‐Light Enhancement Network for Autonomous Driving at Night
CN112733714B (en) VGG network-based automatic crowd counting image recognition method
Abdiyeva et al. Capacity limits of fully binary CNN
Favorskaya et al. Image-based anomaly detection using CNN cues generalisation in face recognition system
Holder et al. Input optimisation network for semantic segmentation of underexposed images
Xia et al. Multi-RPN Fusion-Based Sparse PCA-CNN Approach to Object Detection and Recognition for Robot-Aided Visual System
CN117422855B (en) Machine vision-oriented image preprocessing method, device, equipment and storage medium
Wyzykowski et al. A Universal Latent Fingerprint Enhancer Using Transformers
KR102521524B1 (en) Image processing apparatus for super resolution considering a characteristics of object and method thereof

Legal Events

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