KR102197653B1 - Method, system and computer program for sketch-to-line translation - Google Patents

Method, system and computer program for sketch-to-line translation Download PDF

Info

Publication number
KR102197653B1
KR102197653B1 KR1020190096919A KR20190096919A KR102197653B1 KR 102197653 B1 KR102197653 B1 KR 102197653B1 KR 1020190096919 A KR1020190096919 A KR 1020190096919A KR 20190096919 A KR20190096919 A KR 20190096919A KR 102197653 B1 KR102197653 B1 KR 102197653B1
Authority
KR
South Korea
Prior art keywords
line
sketch
image
style
texture
Prior art date
Application number
KR1020190096919A
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 KR1020190096919A priority Critical patent/KR102197653B1/en
Application granted granted Critical
Publication of KR102197653B1 publication Critical patent/KR102197653B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • G06T5/005
    • G06T5/002
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

According to one embodiment of the present invention, provided is a sketch-line conversion system based on style capable of converting a rough sketch image into a visually stunning line art image. The sketch-line conversion system based on style comprises: a pair data generation unit synthesizing a sketch image from a given line image to generate sketch-line combination pair data; a destyling unit extracting a line structure by removing a texture from a rough sketch image using a destyled model trained by the pair data; and a styling unit adding a style by applying a line style to the image having the extracted line structure using a styled model.

Description

스케치-라인 변환 방법, 시스템 및 프로그램{METHOD, SYSTEM AND COMPUTER PROGRAM FOR SKETCH-TO-LINE TRANSLATION}Sketch-to-line transformation method, system and program {METHOD, SYSTEM AND COMPUTER PROGRAM FOR SKETCH-TO-LINE TRANSLATION}

본 발명은 스케치-라인 변환 방법, 장치 및 프로그램에 관한 것으로, 보다 상세하게는 디스타일화 및 스타일화 모델을 사용하여 스케치의 디테일을 보존하면서 노이즈를 제거할 수 있는 스케치-라인 변환 방법, 시스템 및 프로그램에 관한 것이다.The present invention relates to a sketch-line conversion method, an apparatus, and a program, and more particularly, a sketch-line conversion method, a system and a system capable of removing noise while preserving the details of a sketch using a destylization and stylization model, and It's about the program.

대부분 아티스트의 그림 결과물은 대부분의 대략의 스케치에서 원하는 라인만을 따내는 스케치-라인 변환(sketch-line translation) 과정이 거의 필수적으로 행해진 후 완성된다. 그러나 스케치-라인 변환 작업은 창작활동인 스케치 작업 후 추가적으로 부여되는 단순 작업에 가깝기 때문에 스케치-라인 변환 작업을 자동으로 수행하려는 기술이 연구되고 있다. 기존의 스케치-라인 변환 연구들은 신경망을 이용하여 자동적으로 거친 스케치로부터 라인 이미지를 생성하였으나, 중요한 디테일을 누락하거나 노이즈를 보존하는 문제점이 존재하였다.Most artist paintings are completed after a sketch-line translation process, which draws only the desired line from most sketches, is almost essential. However, since the sketch-line conversion work is close to a simple work that is additionally given after the sketch work, which is a creative activity, a technique to automatically perform the sketch-line conversion work is being studied. Existing sketch-line conversion studies automatically generated line images from rough sketches using neural networks, but there were problems of missing important details or preserving noise.

한편, 기계 학습(machine learning)을 통해 어떤 유용한 모델을 도출해내기 위해서는, 컴퓨터에게 충분히 많은 데이터를 주고 거기에서 일반적인 패턴 또는 함수를 찾아내게 하는 학습 과정이 필요하다. 특히, 비지도 학습(Unsupervised Learning)과 달리 지도 학습 (Supervised Learning)은 훈련 데이터(Training Data)로부터 패턴 또는 함수를 유추해내는 것으로서, 풍부한 훈련 데이터를 확보하는 것은 정확한 모델을 생성해 내는데 필수적인 요소이다. On the other hand, in order to derive a useful model through machine learning, it is necessary to give a computer a sufficient amount of data and a learning process to find common patterns or functions there. In particular, unlike unsupervised learning, supervised learning infers patterns or functions from training data, and securing rich training data is an essential factor in generating accurate models. .

본 발명은 디스타일화 모델을 이용하여 스케치 이미지에서 라인 구조만을 추출하고, 스타일화 모델을 이용하여 라인 구조에 라인 스타일을 적용하여 스케치-라인 변환을 수행하는 것을 일 목적으로 한다.An object of the present invention is to extract only a line structure from a sketch image using a destylization model and apply a line style to the line structure using a stylization model to perform sketch-line conversion.

또한, 본 발명은 스케치-라인 변환 모델 훈련하기 위해 스케치-라인 쌍(pair) 데이터를 합성하여 훈련 데이터로 이용하는 것을 다른 목적으로 한다.Another object of the present invention is to synthesize sketch-line pair data and use it as training data in order to train a sketch-line transformation model.

본 발명의 일 실시예에 따르면, 주어진 라인 이미지로부터 스케치 이미지를 합성하여 스케치-라인 합성 쌍(pair) 데이터를 생성하는 쌍 데이터 생성부; 상기 쌍 데이터에 의해 훈련된 디스타일화 모델을 이용하여 거친 스케치(rough sketch) 이미지에서 텍스처(texture)를 제거하여 라인 구조(line structure)를 추출하는 디스타일화부; 스타일화 모델을 이용하여 상기 추출된 라인 구조로 이루어진 이미지에 라인 스타일(line style)을 적용하여 스타일을 부가하는 스타일화부; 를 포함하는 스타일에 기초한 스케치-라인 변환 시스템이 제공된다.According to an embodiment of the present invention, there is provided a pair data generator for synthesizing a sketch image from a given line image to generate sketch-line combination pair data; A destylization unit for extracting a line structure by removing texture from a rough sketch image using the destylization model trained by the paired data; A styling unit for adding a style by applying a line style to the extracted line structure image using a styling model; A sketch-line conversion system based on a style including a is provided.

본 발명에 있어서, 상기 쌍 데이터 생성부는, 래스터 라인 이미지로부터 벡터 이미지를 생성하여 복수개의 제어점을 이용하여 커브를 정의하고, 상기 복수개의 제어점에 노이즈를 부가하여 새로운 커브를 생성하며, 상기 커브를 복수개의 작은 커브로 분할하여 노이즈를 부가함으로서 노이즈 스트로크를 생성할 수 있다.In the present invention, the pair data generator generates a vector image from a raster line image, defines a curve using a plurality of control points, generates a new curve by adding noise to the plurality of control points, and generates a plurality of the curves. By dividing it into two small curves and adding noise, you can create a noise stroke.

본 발명에 있어서, 상기 디스타일화부는 텍스처를 제거하는 텍스처 제거부 및 라인 구조를 추출하는 라인 구조 추출부를 포함할 수 있다.In the present invention, the destylization unit may include a texture removal unit to remove a texture and a line structure extraction unit to extract a line structure.

본 발명에 있어서, 상기 디스타일화부는, 그라운드 트루스(ground truth) 라인 이미지의 데이터 확장(data augmentation)으로 인한 라인 폭의 변형이 발생하지 않도록 라인 폭을 정규화하는 라인 정규화부를 더 포함할 수 있다.In the present invention, the destylization unit may further include a line normalization unit for normalizing the line width so that the line width is not deformed due to data augmentation of the ground truth line image.

본 발명에 있어서, 상기 텍스처 제거부는 백그라운드 색상 혹은 스케치 라인 색상을 스케치로부터 제거할 수 있다.In the present invention, the texture removal unit may remove a background color or a sketch line color from the sketch.

본 발명에 있어서, 상기 텍스처 제거부는 텍스처 확장된(texture augmented) 합성 쌍 데이터를 이용하여 훈련되고, 상기 라인 구조 추출부는 합성 쌍 데이터를 이용하여 훈련될 수 있다.In the present invention, the texture remover may be trained using texture augmented composite pair data, and the line structure extractor may be trained using composite pair data.

본 발명에 있어서, 상기 라인 구조는 상기 거친 스케치의 스타일과 관계없는 라인의 중심일 수 있다.In the present invention, the line structure may be a center of a line irrelevant to the style of the rough sketch.

본 발명의 다른 일 실시예에 따르면, 디스타일화 모델을 이용하여 거친 스케치(rough sketch) 이미지에서 텍스처(texture)를 제거하여 라인 구조(line structure)를 추출하는 디스타일화 단계; 및 스타일화 모델을 이용하여 상기 추출된 라인 구조로 이루어진 이미지에 라인 스타일(line style)을 적용하여 스타일을 부가하는 스타일화 단계; 를 포함하는 스타일에 기초한 스케치-라인 변환 방법이 제공된다.According to another embodiment of the present invention, a destylization step of extracting a line structure by removing a texture from a rough sketch image using a destylization model; And a styling step of adding a style by applying a line style to the image having the extracted line structure using a styling model. A sketch-line conversion method based on a style including a is provided.

본 발명에 있어서, 상기 디스타일화 단계는, 텍스처를 제거하는 텍스처 제거 단계; 및 라인 구조를 추출하는 라인 구조 추출 단계;를 포함할 수 있다.In the present invention, the destyling step comprises: a texture removing step of removing a texture; And a line structure extraction step of extracting the line structure.

본 발명에 있어서, 상기 디스타일화 단계는, 그라운드 트루스(ground truth) 라인 이미지의 데이터 확장(data augmentation)으로 인한 라인 폭의 변형이 발생하지 않도록 라인 폭을 정규화하는 라인 정규화 단계;를 더 포함할 수 있다.In the present invention, the destyling step further includes a line normalization step of normalizing the line width so that the line width is not deformed due to data augmentation of the ground truth line image. I can.

본 발명에 있어서, 상기 텍스처 제거 단계는 텍스처 확장된(texture augmented) 합성 쌍 데이터를 이용하여 훈련되고, 상기 라인 구조 추출 단계는 합성 쌍 데이터를 이용하여 훈련되는, 스타일에 기초한 스케치-라인 변환 방법.In the present invention, the texture removal step is trained using texture augmented composite pair data, and the line structure extraction step is trained using composite pair data.

본 발명에 있어서, 상기 텍스처 제거 단계는 백그라운드 색상 혹은 스케치 라인 색상을 스케치로부터 제거할 수 있다.In the present invention, the texture removing step may remove a background color or a sketch line color from the sketch.

본 발명의 다른 일 실시예에 따르면, 주어진 라인 이미지로부터 스케치 이미지를 합성하여 스케치-라인 합성 쌍(pair) 데이터를 생성하는 쌍 데이터 생성 단계; 상기 쌍 데이터에 의해 훈련된 디스타일화 모델을 이용하여 거친 스케치(rough sketch) 이미지에서 텍스처(texture)를 제거하여 라인 구조(line structure)를 추출하는 디스타일화 단계; 및 스타일화 모델을 이용하여 상기 추출된 라인 구조로 이루어진 이미지에 라인 스타일(line style)을 적용하여 스타일을 부가하는 스타일화 단계; 를 포함하는 스타일에 기초한 스케치-라인 변환 방법이 제공된다.According to another embodiment of the present invention, a pair data generation step of generating sketch-line combination pair data by synthesizing a sketch image from a given line image; A destylization step of extracting a line structure by removing texture from a rough sketch image using a destylization model trained by the paired data; And a styling step of adding a style by applying a line style to the image having the extracted line structure using a styling model. A sketch-line conversion method based on a style including a is provided.

본 발명에 있어서, 상기 쌍 데이터 생성 단계는, 래스터 라인 이미지로부터 벡터 이미지를 생성하여 복수개의 제어점을 이용하여 커브를 정의하고, 상기 복수개의 제어점에 노이즈를 부가하여 새로운 커브를 생성하며, 상기 커브를 복수개의 작은 커브로 분할하여 노이즈를 부가함으로서 노이즈 스트로크를 생성할 수 있다.In the present invention, in the step of generating pair data, a vector image is generated from a raster line image, a curve is defined using a plurality of control points, noise is added to the plurality of control points to generate a new curve, and the curve is Noise strokes can be generated by dividing into a plurality of small curves and adding noise.

본 발명에 있어서, 상기 디스타일화 단계는, 텍스처를 제거하는 텍스처 제거 단계; 및 라인 구조를 추출하는 라인 구조 추출 단계;를 포함할 수 있다.In the present invention, the destyling step comprises: a texture removing step of removing a texture; And a line structure extraction step of extracting the line structure.

본 발명에 있어서, 상기 디스타일화 단계는, 그라운드 트루스(ground truth) 라인 이미지의 데이터 확장(data augmentation)으로 인한 라인 폭의 변형이 발생하지 않도록 라인 폭을 정규화하는 라인 정규화 단계;를 더 포함할 수 있다.In the present invention, the destyling step further includes a line normalization step of normalizing the line width so that the line width is not deformed due to data augmentation of the ground truth line image. I can.

본 발명에에 따른 방법을 실행하기 위해 컴퓨터 판독 가능한 기록 매체에 기록된 컴퓨터 프로그램이 더 제공된다.A computer program recorded on a computer-readable recording medium is further provided for carrying out the method according to the present invention.

본 발명에 의하면, 디스타일화 단계 및 스타일화 단계를 수행함으로써, 거친 스케치 이미지를 시각적으로 뛰어난 라인 아트 이미지로 변환할 수 있다.According to the present invention, by performing the destyling step and the styling step, a rough sketch image can be converted into a visually excellent line art image.

또한, 본 발명에 의하면 In addition, according to the present invention

도 1 은 본 발명의 일 실시예에 따른 네트워크 환경의 예를 도시한 도면이다.
도 2 는 본 발명의 일 실시예에 있어서, 사용자 단말 및 서버의 내부 구성을 설명하기 위한 블록도이다.
도 3 은 본 발명의 일 실시예에 따른 프로세서의 내부 구성을 나타낸 것이다.
도 4 는 본 발명의 일 실시예에 따른 스케치-라인 변환 방법을 시계열적으로 나타낸 도면이다.
도 5 는 본 발명의 합성 스케치 생성 방법에 따라 깨끗한 라인 이미지로부터 스케치를 생성하는 과정을 예시한 도면이다.
도 6 은 본 발명의 일 실시예에 따른 디스타일화 및 스타일화 모델을 설명하기 위한 것이다.
도 7 은 디스타일화 모델의 각 단계의 효과를 예시한 것이다.
도 8 은 본 발명의 스타일화 모델의 효과를 설명하기 위한 예시이다.
1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention.
2 is a block diagram illustrating an internal configuration of a user terminal and a server according to an embodiment of the present invention.
3 is a diagram illustrating an internal configuration of a processor according to an embodiment of the present invention.
4 is a diagram illustrating a sketch-line conversion method according to an embodiment of the present invention in time series.
5 is a diagram illustrating a process of creating a sketch from a clean line image according to the method of creating a synthetic sketch of the present invention.
6 is for explaining a destylization and stylization model according to an embodiment of the present invention.
7 illustrates the effects of each step of the destylization model.
8 is an example for explaining the effect of the styling model of the present invention.

후술하는 본 발명에 대한 상세한 설명은, 본 발명이 실시될 수 있는 특정 실시예를 예시로서 도시하는 첨부 도면을 참조한다. 이러한 실시예는 당업자가 본 발명을 실시할 수 있기에 충분하도록 상세히 설명된다. 본 발명의 다양한 실시예는 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 본 명세서에 기재되어 있는 특정 형상, 구조 및 특성은 본 발명의 정신과 범위를 벗어나지 않으면서 일 실시예로부터 다른 실시예로 변경되어 구현될 수 있다. 또한, 각각의 실시예 내의 개별 구성요소의 위치 또는 배치도 본 발명의 정신과 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 행하여지는 것이 아니며, 본 발명의 범위는 특허청구범위의 청구항들이 청구하는 범위 및 그와 균등한 모든 범위를 포괄하는 것으로 받아들여져야 한다. 도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 구성요소를 나타낸다.DETAILED DESCRIPTION OF THE INVENTION The detailed description of the present invention to be described later refers to the accompanying drawings, which illustrate specific embodiments in which the present invention may be practiced. These embodiments are described in detail sufficient to enable those skilled in the art to practice the present invention. It is to be understood that the various embodiments of the present invention are different from each other, but need not be mutually exclusive. For example, specific shapes, structures, and characteristics described herein may be changed from one embodiment to another and implemented without departing from the spirit and scope of the present invention. In addition, it should be understood that the positions or arrangements of individual elements in each embodiment may be changed without departing from the spirit and scope of the present invention. Therefore, the detailed description to be described below is not made in a limiting sense, and the scope of the present invention should be taken as encompassing the scope claimed by the claims of the claims and all scopes equivalent thereto. Like reference numerals in the drawings indicate the same or similar elements over several aspects.

도 1 은 본 발명의 일 실시예에 따른 스케치-라인 변환 시스템의 네트워크 환경의 예를 도시한 도면이다.1 is a diagram illustrating an example of a network environment of a sketch-line conversion system according to an embodiment of the present invention.

도 1의 네트워크 환경은 복수의 사용자 단말들(110, 120, 130, 140), 서버(150) 및 네트워크(160)를 포함하는 예를 나타내고 있다. 이러한 도 1은 발명의 설명을 위한 일례로 사용자 단말의 수나 서버의 수가 도 1과 같이 한정되는 것은 아니다. The network environment of FIG. 1 shows an example including a plurality of user terminals 110, 120, 130, 140, a server 150, and a network 160. 1 is an example for explaining the invention, and the number of user terminals or the number of servers is not limited as shown in FIG. 1.

복수의 사용자 단말들(110, 120, 130, 140)은 컴퓨터 장치로 구현되는 고정형 단말이거나 이동형 단말일 수 있다. 복수의 사용자 단말들(110, 120, 130, 140)의 예를 들면, 스마트폰(smart phone), 휴대폰, 네비게이션, 컴퓨터, 노트북, 디지털방송용 단말, PDA(Personal Digital Assistants), PMP(Portable Multimedia Player), 태블릿 PC 등이 있다. 일례로 사용자 단말 1(110)은 무라인 또는 유라인 통신 방식을 이용하여 네트워크(160)를 통해 다른 사용자 단말들(120, 130, 140) 및/또는 서버(150)와 통신할 수 있다.The plurality of user terminals 110, 120, 130, and 140 may be a fixed terminal implemented as a computer device or a mobile terminal. Examples of the plurality of user terminals 110, 120, 130, and 140 include smart phones, mobile phones, navigation, computers, notebook computers, digital broadcasting terminals, personal digital assistants (PDAs), and portable multimedia players (PMPs). ), tablet PC, etc. For example, the user terminal 1 110 may communicate with other user terminals 120, 130, 140 and/or the server 150 through the network 160 using a wireless or wired communication method.

통신 방식은 제한되지 않으며, 네트워크(160)가 포함할 수 있는 통신망(일례로, 이동통신망, 유라인 인터넷, 무라인 인터넷, 방송망)을 활용하는 통신 방식뿐만 아니라 기기들간의 근거리 무라인 통신 역시 포함될 수 있다. 예를 들어, 네트워크(160)는, PAN(personal area network), LAN(local area network), CAN(campus area network), MAN(metropolitan area network), WAN(wide area network), BBN(broadband network), 인터넷 등의 네트워크 중 하나 이상의 임의의 네트워크를 포함할 수 있다. 또한, 네트워크(160)는 버스 네트워크, 스타 네트워크, 링 네트워크, 메쉬 네트워크, 스타-버스 네트워크, 트리 또는 계층적(hierarchical) 네트워크 등을 포함하는 네트워크 토폴로지 중 임의의 하나 이상을 포함할 수 있으나, 이에 제한되지 않는다.The communication method is not limited, and not only a communication method using a communication network (for example, a mobile communication network, a wired Internet, a wireless Internet, a broadcasting network) that the network 160 may include, but also a short-range wireless communication between devices is included. I can. For example, the network 160 includes a personal area network (PAN), a local area network (LAN), a campus area network (CAN), a metropolitan area network (MAN), a wide area network (WAN), and a broadband network (BBN). , Internet, and the like. In addition, the network 160 may include any one or more of a network topology including a bus network, a star network, a ring network, a mesh network, a star-bus network, a tree or a hierarchical network, etc. Not limited.

서버(150)는 복수의 사용자 단말들(110, 120, 130, 140)과 네트워크(160)를 통해 통신하여 명령, 코드, 파일, 컨텐츠, 서비스 등을 제공하는 컴퓨터 장치 또는 복수의 컴퓨터 장치들로 구현될 수 있다. 본 발명의 서버(150)는 사용자 단말로부터의 요청에 의해 스케치-라인 변환을 수행할 수 있다.The server 150 is a computer device or a plurality of computer devices that communicates with a plurality of user terminals 110, 120, 130, 140 and a network 160 to provide commands, codes, files, contents, services, etc. Can be implemented. The server 150 of the present invention may perform sketch-line conversion at a request from a user terminal.

일례로, 서버(150)는 네트워크(160)를 통해 접속한 사용자 단말 1(110)로부터 거친 스케치(rough sketch) 이미지를 획득하여 라인 아트(line art) 이미지를 생성할 수 있다. 사용자 단말 1(110)이 포함하는 운영체제(Operating System, OS) 및 적어도 하나의 프로그램(일례로 브라우저나 설치된 어플리케이션)의 제어에 따라 서버(150)에 접속하여 서버(150)로 거친 스케치 이미지를 생성하거나, 라인 아트 이미지를 요청하거나, 스케치-라인 변환 모델을 훈련할 것을 요청할 수 있다. 다른 예로, 서버(150)는 데이터 송수신을 위한 통신 세션을 설정하고, 설정된 통신 세션을 통해 복수의 사용자 단말들(110, 120, 130, 140)간의 데이터 송수신을 라우팅할 수도 있다.For example, the server 150 may obtain a rough sketch image from the user terminal 1 110 accessed through the network 160 to generate a line art image. Under the control of an operating system (OS) included in the user terminal 1 (110) and at least one program (for example, a browser or an installed application), a rough sketch image is generated by the server 150 by accessing the server 150 Or, you can request a line art image, or you can ask to train a sketch-to-line transformation model. As another example, the server 150 may establish a communication session for data transmission/reception, and may route data transmission/reception between a plurality of user terminals 110, 120, 130, and 140 through the established communication session.

한편, 본 발명의 스케치-라인 변환 시스템에서, 스케치란 제품 디자인 혹은 만화와 같은 라인 아트(line art)를 생성하는 작업의 전단계 혹은 중간 단계이다. 따라서, 스케치는 아티스트가 직접 손으로 그린 라인들의 집합으로서 완성본 이전 상태인 경우가 많으며, 스케치는 만화, 영화 및 제품 디자인과 같은 많은 디자인 작품의 초기 단계에서 중요한 역할을 한다. 스케치 설계가 완료된 후, 아티스트는 스케치에 포함된 라인들의 거칠기와 중복으로 인해 스케치를 깨끗한 라인으로 단순화하는 스케치-라인 변환 작업이 필요하다. 스케치-라인 변환 작업은 초기 창작 이후에 추가적으로 투입되는 불필요한 시간인 경우가 많으므로, 최근 이러한 스케치-라인 변환 작업을 기계 학습(machine learning)으로 수행하기 위한 모델들이 개발되고 있다. 이러한 스케치-라인 변환 모델은 보존해야 할 부분과 아닌 부분을 구별해야 하기 때문에 어려운 점이 존재하며, 디테일 구조와 노이즈 라인을 구별하는 것에 어려움이 존재하였다.On the other hand, in the sketch-line conversion system of the present invention, the sketch is a pre- or intermediate stage of the work of creating a product design or line art such as a cartoon. Therefore, sketches are a set of lines drawn by the artist themselves and are often in a state prior to completion, and sketches play an important role in the early stages of many design works such as cartoons, movies and product design. After the sketch design is completed, the artist needs a sketch-to-line conversion task that simplifies the sketch into clean lines due to the roughness and overlap of the lines included in the sketch. Since the sketch-line conversion work is often unnecessary time added after initial creation, models for performing this sketch-line conversion work by machine learning have been developed recently. This sketch-line conversion model has a difficult point because it has to distinguish between the parts to be preserved and the parts that are not, and there is a difficulty in distinguishing the detail structure and noise lines.

보다 상세히, 기존의 스케치-라인 변환 방법은 이미지 구조 변환이나 스타일 트랜스퍼(transfer)에 기반을 둔 것들로서, 상세한 구조 디테일이나 노이즈가 많은 라인을 구별해내지 쉽지 않기 때문에 스케치를 고품질의 라인 이미지로 변환하는데 어려움이 존재하였다.In more detail, the existing sketch-line conversion methods are based on image structure conversion or style transfer, and since it is not easy to distinguish detailed structural details or noisy lines, the sketch is converted into a high-quality line image. There was a difficulty in doing it.

본 발명의 일 실시예에 따르면, 디스타일화(destylization) 모델 및 스타일화(stylization)의 모델을 포함하는 2단계 접근법을 사용하여 스타일에 기초한 새로운 스케치-라인 변환 방법을 제공할 수 있다. 보다 상세히, 본 발명의 일 실시예에 따르면 디스타일화 단계에서는 컨텐츠를 유지하면서 쌍(pair) 데이터(스케치-라인 데이터로 이루어진 쌍 데이터)를 사용하여 텍스처(texture)를 제거하면서 스케치 구조를 단순화한다. 본 발명에서는, 쌍 데이터의 부족을 극복하기 위해 커브 변형을 기반으로 한 스케치-라인 상 데이터 생성 방법을 제안한다. 또한, 본 발명의 일 실시예에 따르면 스타일화 단계에서는 스타일링된 라인 표현에 대한 확장된(Augmented) CycleGAN(Cycle Generative Adversarial Nets (GAN))에 기초하여 스타일화를 수행할 수 있다. 더불어, 본 명세서에서는 본 발명의 스케치-라인 변환 방법에 대한 실제 실험 결과를 소개하여 본 발명의 스케치-라인 변환 방법이 양적 및 질적 측정 기준에서 우수함을 보여준다.According to an embodiment of the present invention, a new style-based sketch-line conversion method may be provided using a two-step approach including a destylization model and a stylization model. In more detail, according to an embodiment of the present invention, in the destylization step, a sketch structure is simplified while removing a texture by using pair data (pair data consisting of sketch-line data) while maintaining content. . In the present invention, to overcome the shortage of pair data, a method of generating sketch-line data based on curve deformation is proposed. In addition, according to an embodiment of the present invention, in the styling step, styling may be performed based on an Augmented CycleGAN (Cycle Generative Adversarial Nets (GAN)) for the styled line expression. In addition, in the present specification, actual experimental results for the sketch-line conversion method of the present invention are introduced to show that the sketch-line conversion method of the present invention is superior in quantitative and qualitative measurement criteria.

보다 상세히, 본 발명은 스케치 이미지로부터 라인 구조(line structure)를 나타내는 컨텐츠 이미지를 먼저 추출하고, 그 후 깨끗한 라인 이미지에 스타일을 적용한다. 기존의 연구들은 컨텐츠 이미지를 신경 네트워크를 이용하여 특징 맵으로 인코딩한 후, 2차 통계를 이용하여 스타일화하거나, 디코더 함수를 간접적으로 학습하였다. 그러나, 기존의 연구들을 참조하면, 작은 부분의 컨텐츠 디테일을 제거하는 것도 큰 시각적 흠결을 초래할 수 있다. 즉, 기존의 기술들에 의하면, 스케치-라인 변환 작업에 의해 일부 디테일이 사라질 수 있고, 사라져야 할 일부 노이즈들이 오히려 보존될 수 있다. 즉, 이미지의 어떤 부분이 디테일 표현이고 어떤 부분이 노이즈인지 비지도 학습을 이용한 분포 매칭(distribution matching)만을 이용하여 모델링하는 것은 어렵다.In more detail, the present invention first extracts a content image representing a line structure from a sketch image, and then applies a style to a clean line image. In the previous studies, after encoding the content image into a feature map using a neural network, styling it using quadratic statistics, or indirectly learning a decoder function. However, referring to existing studies, even removing a small portion of content detail may lead to a large visual defect. That is, according to the existing technologies, some details may be lost due to a sketch-line conversion operation, and some noises to be disappeared may be rather preserved. That is, it is difficult to model which part of the image is a detail representation and which part is noise using only distribution matching using unsupervised learning.

따라서, 본 발명에 의하면 스케치-라인 스타일 변환을 위한 모델로서, 스타일화 모델 및 디스타일화 모델을 포함하는 변환을 위한 모델을 제공할 수 있다. 디스타일화 모델은 스케치 이미지에서 스케치 스타일을 제거하여 라인 구조만을 추출하고, 스타일화 모델은 라인 구조에 라인 스타일(line style)을 적용하여 스타일이 가미된 라인 아트 이미지를 획득할 수 있다. 또한, 본 발명은 디스타일화 작업의 출력을 최종 출력 이미지가 아닌 컨텐츠 이미지로 처리한다. 스케치 단순화의 목적은 스케치 이미지에서 거친 라인 스타일을 제거하는 것이기도 하기 때문에, 본 발명은 스타일화 작업과의 연결을 보다 명확히 나타내기 위해 이러한 작업을 디스타일화 작업으로 해석한다. 본 발명의 디스타일화 모델은 기존의 연구와 비교할 때 하기와 같은 차이점이 있다.Accordingly, according to the present invention, a model for transformation including a stylization model and a destylization model can be provided as a model for sketch-line style transformation. The destylized model may extract only the line structure by removing the sketch style from the sketch image, and the stylized model may obtain a line art image with style added by applying a line style to the line structure. In addition, the present invention processes the output of the destylization job as a content image rather than a final output image. Since the purpose of the sketch simplification is also to remove the rough line style from the sketch image, the present invention interprets this work as a destylization work in order to more clearly show the connection with the styling work. The destylization model of the present invention has the following differences when compared with existing studies.

첫번째로, 본 발명은 수동으로 생성된 데이터 대신 자동으로 생성된 스케치-라인 쌍 데이터를 사용한다. 두번째로, 본 발명은 거친 스케치를 디스타일화하기 전에 텍스처(texture)를 제거하여 라인 구조와 무관한 정보에 초점을 맞추지 않을 수 있다.First, the present invention uses automatically generated sketch-line pair data instead of manually generated data. Second, the present invention removes the texture before destyling the rough sketch, so that it may not focus on information irrelevant to the line structure.

또한, 본 발명의 스타일화 단계에서는 확장된 CycleGAN 을 이용하여 추출된 컨텐츠 이미지를 다양한 라인 스타일로 스타일화할 수 있다. 본 발명은 순서대로 디스타일화 모델 및 스타일화 모델을 사용함으로써, 본 발명은 거친 스케치들을 시각적으로 뛰어난 라인 아트 이미지로 변환할 수 있다.In addition, in the styling step of the present invention, the content image extracted using the extended CycleGAN may be styled in various line styles. The present invention uses the destylized model and the stylized model in sequence, so that the present invention can convert rough sketches into visually outstanding line art images.

정리하면, 본 발명은 최종 출력 이미지의 라인 스타일을 고려한 스케치-라인 변환 작업을 제공할 수 있다. 또한, 본 발명은 텍스처 제거 및 합성 쌍 데이터를 이용한 디스타일화 모델을 제공할 수 있다. 또한, 본 발명은 디스타일화 모델을 훈련하기 위한 쌍 데이터를 합성하는 모델을 제공할 수 있다. 즉, 본 발명은 기존의 스케치 단순화 작업과 비교할 때, 본 발명은 라인 구조(line structure) 뿐만 아니라 그림의 분위기와 인상을 결정하는 중요한 요소인 스타일을 고려한다. 더불어, 기존의 작업은 수동으로 생성된 스케치-쌍 데이터에 의존하지만, 본 발명은 자동으로 생성된 쌍 데이터를 사용할 수 있다.In summary, the present invention can provide a sketch-line conversion operation in consideration of the line style of the final output image. In addition, the present invention can provide a destylization model using texture removal and synthesis pair data. Further, the present invention can provide a model for synthesizing paired data for training a destylization model. That is, the present invention considers not only the line structure but also the style, which is an important factor that determines the mood and impression of a picture, as compared with the existing sketch simplification work. In addition, the existing work relies on manually generated sketch-pair data, but the present invention can use automatically generated pair data.

본 발명의 일 실시예에 따르면, 디스타일화(destylization) 및 스타일화(stylization)의 모델을 포함하는 2단계 접근법을 사용하여 스타일에 기초한 새로운 스케치-라인 변환 방법을 제공한다.According to an embodiment of the present invention, a new sketch-line conversion method based on style is provided using a two-step approach including a model of destylization and stylization.

도 2 는 본 발명의 일 실시예에 있어서, 사용자 단말 및 서버의 내부 구성을 설명하기 위한 블록도이다.2 is a block diagram illustrating an internal configuration of a user terminal and a server according to an embodiment of the present invention.

도 2에서는 하나의 사용자 단말에 대한 예로서 사용자 단말 1(110), 그리고 하나의 서버에 대한 예로서 서버(150)의 내부 구성을 설명한다. 다른 사용자 단말들(120, 130, 140)들 역시 동일한 또는 유사한 내부 구성을 가질 수 있다.In FIG. 2, the internal configuration of the user terminal 1 110 as an example of one user terminal and the server 150 as an example of one server is described. Other user terminals 120, 130, and 140 may also have the same or similar internal configuration.

사용자 단말 1(110)과 서버(150)는 메모리(211, 221), 프로세서(212, 222), 통신 모듈(213, 223) 그리고 입출력 인터페이스(214, 224)를 포함할 수 있다. 메모리(211, 221)는 컴퓨터에서 판독 가능한 기록 매체로서, RAM(random access memory), ROM(read only memory) 및 디스크 드라이브와 같은 비소멸성 대용량 기록장치(permanent mass storage device)를 포함할 수 있다. 또한, 메모리(211, 221)에는 운영체제와 적어도 하나의 프로그램 코드(일례로 사용자 단말 1(110)에 설치되어 구동되는 브라우저나 상술한 어플리케이션 등을 위한 코드)가 저장될 수 있다. 이러한 소프트웨어 구성요소들은 드라이브 메커니즘(drive mechanism)을 이용하여 메모리(211, 221)와는 별도의 컴퓨터에서 판독 가능한 기록 매체로부터 로딩될 수 있다. 이러한 별도의 컴퓨터에서 판독 가능한 기록 매체는 플로피 드라이브, 디스크, 테이프, DVD/CD-ROM 드라이브, 메모리 카드 등의 컴퓨터에서 판독 가능한 기록 매체를 포함할 수 있다. 다른 실시예에서 소프트웨어 구성요소들은 컴퓨터에서 판독 가능한 기록 매체가 아닌 통신 모듈(213, 223)을 통해 메모리(211, 221)에 로딩될 수도 있다. 예를 들어, 적어도 하나의 프로그램은 개발자들 또는 어플리케이션의 설치 파일을 배포하는 파일 배포 시스템(일례로 상술한 서버(150))이 네트워크(160)를 통해 제공하는 파일들에 의해 설치되는 프로그램(일례로 상술한 스케치-라인 변환 방법을 구현한 어플리케이션)에 기반하여 메모리(211, 221)에 로딩될 수 있다.The user terminal 1 110 and the server 150 may include memories 211 and 221, processors 212 and 222, communication modules 213 and 223, and input/output interfaces 214 and 224. The memories 211 and 221 are computer-readable recording media, and may include a permanent mass storage device such as a random access memory (RAM), a read only memory (ROM), and a disk drive. In addition, the memory 211 and 221 may store an operating system and at least one program code (for example, a browser installed and driven in the user terminal 1 110 or a code for the aforementioned application). These software components may be loaded from a computer-readable recording medium separate from the memories 211 and 221 using a drive mechanism. Such a separate computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, a disk, a tape, a DVD/CD-ROM drive, and a memory card. In another embodiment, software components may be loaded into the memories 211 and 221 through communication modules 213 and 223 other than a computer-readable recording medium. For example, at least one program is a program installed by files provided through the network 160 by a file distribution system (for example, the server 150 described above) for distributing the installation files of developers or applications (example It may be loaded into the memories 211 and 221 based on the application implementing the sketch-line conversion method described above.

프로세서(212, 222)는 기본적인 산술, 로직 및 입출력 연산을 수행함으로써, 컴퓨터 프로그램의 명령을 처리하도록 구성될 수 있다. 명령은 메모리(211, 221) 또는 통신 모듈(213, 223)에 의해 프로세서(212, 222)로 제공될 수 있다. 예를 들어 프로세서(212, 222)는 메모리(211, 221)와 같은 기록 장치에 저장된 프로그램 코드에 따라 수신되는 명령을 실행하도록 구성될 수 있다. 특히, 서버(150)의 프로세서(222)는 사용자 단말(110)로부터 획득한 거친 스케치 이미지를 디스타일화 및 스타일화 모델을 이용하여 라인 아트 이미지로 변환하고, 디스타일화 및 스타일화 모델을 훈련할 수 있다. 프로세서(222)의 구체적인 구성 및 동작에 대해서는 후술하기로 한다.The processors 212 and 222 may be configured to process instructions of a computer program by performing basic arithmetic, logic, and input/output operations. The instructions may be provided to the processors 212 and 222 by the memories 211 and 221 or the communication modules 213 and 223. For example, the processors 212 and 222 may be configured to execute a command received according to a program code stored in a recording device such as the memories 211 and 221. In particular, the processor 222 of the server 150 converts the rough sketch image obtained from the user terminal 110 into a line art image using a destylization and stylization model, and trains a destylization and stylization model. can do. A detailed configuration and operation of the processor 222 will be described later.

통신 모듈(213, 223)은 네트워크(160)를 통해 사용자 단말 1(110)과 서버(150)가 서로 통신하기 위한 기능을 제공할 수 있으며, 다른 사용자 단말(일례로 사용자 단말 2(120)) 또는 다른 서버(일례로 서버(150))와 통신하기 위한 기능을 제공할 수 있다. 일례로, 사용자 단말 1(110)의 프로세서(222)가 메모리(211)와 같은 기록 장치에 저장된 프로그램 코드에 따라 생성한 요청이 통신 모듈(213)의 제어에 따라 네트워크(160)를 통해 서버(150)로 전달될 수 있다. 역으로, 서버(150)의 프로세서(222)의 제어에 따라 제공되는 제어 신호나 명령, 컨텐츠, 파일 등이 통신 모듈(223)과 네트워크(160)를 거쳐 사용자 단말 1(110)의 통신 모듈(213)을 통해 사용자 단말 1(110)로 수신될 수 있다. 예를 들어 통신 모듈(213)을 통해 수신된 서버(150)의 제어 신호나 명령 등은 프로세서(222)나 메모리(211)로 전달될 수 있고, 컨텐츠나 파일 등은 사용자 단말 1(110)이 더 포함할 수 있는 저장 매체로 저장될 수 있다.The communication modules 213 and 223 may provide a function for the user terminal 1 110 and the server 150 to communicate with each other through the network 160, and other user terminals (for example, user terminal 2 120) Alternatively, a function for communicating with another server (for example, the server 150) may be provided. As an example, a request generated by the processor 222 of the user terminal 1 110 according to a program code stored in a recording device such as the memory 211 is transmitted through the network 160 under the control of the communication module 213. 150). Conversely, control signals, commands, contents, files, etc. provided under the control of the processor 222 of the server 150 are transmitted via the communication module 223 and the network 160 to the communication module of the user terminal 1 110 ( 213) through the user terminal 1 (110). For example, a control signal or command of the server 150 received through the communication module 213 may be transmitted to the processor 222 or the memory 211, and the user terminal 1 110 may transmit contents or files. It may be stored in a storage medium that may further contain.

입출력 인터페이스(214, 224)는 입출력 장치(215)와의 인터페이스를 위한 수단일 수 있다. 예를 들어, 입력 장치는 키보드 또는 마우스 등의 장치를, 그리고 출력 장치는 어플리케이션의 통신 세션을 표시하기 위한 디스플레이와 같은 장치를 포함할 수 있다. 다른 예로 입출력 인터페이스(214)는 터치스크린과 같이 입력과 출력을 위한 기능이 하나로 통합된 장치와의 인터페이스를 위한 수단일 수도 있다. 보다 구체적인 예로, 사용자 단말 1(110)의 프로세서(222)는 메모리(211)에 로딩된 컴퓨터 프로그램의 명령을 처리함에 있어서 서버(150)나 사용자 단말 2(120)가 제공하는 데이터를 이용하여 구성되는 서비스 화면이나 컨텐츠가 입출력 인터페이스(214)를 통해 디스플레이에 표시될 수 있다.The input/output interfaces 214 and 224 may be means for interfacing with the input/output device 215. For example, the input device may include a device such as a keyboard or a mouse, and the output device may include a device such as a display for displaying a communication session of an application. As another example, the input/output interface 214 may be a means for interfacing with a device in which input and output functions are integrated into one, such as a touch screen. As a more specific example, the processor 222 of the user terminal 1 110 is configured by using data provided by the server 150 or the user terminal 2 120 in processing the command of the computer program loaded in the memory 211 The service screen or content to be displayed may be displayed on the display through the input/output interface 214.

또한, 다른 실시예들에서 사용자 단말 1(110) 및 서버(150)는 도 2의 구성요소들보다 더 많은 구성요소들을 포함할 수도 있다. 그러나, 대부분의 종래기술적 구성요소들을 명확하게 도시할 필요성은 없다. 예를 들어, 사용자 단말 1(110)은 상술한 입출력 장치(215) 중 적어도 일부를 포함하도록 구현되거나 또는 트랜시버(transceiver), GPS(Global Positioning System) 모듈, 카메라, 각종 센서, 데이터베이스 등과 같은 다른 구성요소들을 더 포함할 수도 있다.In addition, in other embodiments, the user terminal 1 110 and the server 150 may include more components than those of FIG. 2. However, there is no need to clearly show most of the prior art components. For example, the user terminal 1 110 may be implemented to include at least some of the input/output devices 215 described above, or other components such as a transceiver, a global positioning system (GPS) module, a camera, various sensors, a database, etc. It may also contain more elements.

도 3 은 본 발명의 일 실시예에 따른 프로세서의 내부 구성을 나타낸 것이다.3 is a diagram illustrating an internal configuration of a processor according to an embodiment of the present invention.

프로세서(222)는 스케치 이미지를 획득하여 라인 아트 이미지를 반환할 수 있는 스케치-라인 변환 모델을 실행하는 어플리케이션을 포함할 수 있다. 또한, 프로세서(222)는 스케치-라인 변환 모델을 합성 데이터를 이용하여 훈련할 수 있다. 프로세서(222) 내에서 본 발명의 일 실시예에 따른 스케치-라인 변환 기능을 수행하는 구성은 도 3 에 도시된 바와 같이 쌍 데이터 생성부(310), 디스타일화부(320) 및 스타일화부(330)를 포함할 수 있다. 실시예에 따라 프로세서(222)의 구성요소들은 선택적으로 프로세서(222)에 포함되거나 제외될 수도 있다. 또한, 실시예에 따라 프로세서(222)의 구성요소들은 프로세서(222)의 기능의 표현을 위해 분리 또는 병합될 수도 있다.The processor 222 may include an application that executes a sketch-line conversion model capable of obtaining a sketch image and returning a line art image. In addition, the processor 222 may train a sketch-line transformation model using synthetic data. The configuration for performing the sketch-line conversion function according to an embodiment of the present invention within the processor 222 is a pair data generation unit 310, a destylization unit 320, and a styling unit 330 as shown in FIG. 3. ) Can be included. Depending on the embodiment, components of the processor 222 may be selectively included or excluded from the processor 222. Further, according to an embodiment, components of the processor 222 may be separated or merged to express the function of the processor 222.

여기서, 프로세서(222)의 구성요소들은 서버(100)에 저장된 프로그램 코드가 제공하는 명령에 따라 프로세서(222)에 의해 수행되는 프로세서(222)의 서로 다른 기능들(different functions)의 표현들일 수 있다. 프로세서(222)는 쌍 데이터 생성부(310), 디스타일화부(320) 및 스타일화부(330)를 이용하여 합성 쌍 데이터로 디스타일화 모델 및 스타일화 모델을 훈련시키고, 훈련된 모델을 이용하여 스케치-라인 변환 기능을 수행할 수 있다.Here, the components of the processor 222 may be expressions of different functions of the processor 222 executed by the processor 222 according to an instruction provided by the program code stored in the server 100. . The processor 222 trains the destylization model and the stylization model with the synthesized pair data using the pair data generation unit 310, the destylization unit 320 and the stylization unit 330, and uses the trained model. You can perform the sketch-line conversion function.

이러한 프로세서(222) 및 프로세서(222)의 구성요소들은 후술하는 도 4 의 스케치-라인 변환 방법이 포함하는 단계들(S1 내지 S4)을 수행하도록 서버(150)를 제어할 수 있다. 예를 들어, 프로세서(222) 및 프로세서(222)의 구성요소들은 메모리(211)가 포함하는 운영체제의 코드와 적어도 하나의 프로그램의 코드에 따른 명령(instruction)을 실행하도록 구현될 수 있다.The components of the processor 222 and the processor 222 may control the server 150 to perform the steps (S1 to S4) included in the sketch-line conversion method of FIG. 4 to be described later. For example, the processor 222 and the components of the processor 222 may be implemented to execute an instruction (instruction) according to the code of the operating system included in the memory 211 and the code of at least one program.

도 4 는 본 발명의 일 실시예에 따른 스케치-라인 변환 방법을 시계열적으로 나타낸 도면이다. 이하에서는, 도 3 및 도 4 를 함께 참조하여 본 발명의 스케치-라인 변환 방법, 시스템 및 컴퓨터 프로그램을 구체적으로 살펴보기로 한다.4 is a diagram illustrating a sketch-line conversion method according to an embodiment of the present invention in time series. Hereinafter, a sketch-line conversion method, system, and computer program of the present invention will be described in detail with reference to FIGS. 3 and 4.

상술한 바와 같이, 본 발명의 스케치-라인 변환 시스템 및 방법은 스케치에서 라인 구조를 추출하는 디스타일화 모델과 다양한 라인 스타일을 라인 구조에 적용하는 스타일화 모델을 포함한다. 이하의 본 명세서에서는, 쌍 데이터를 합성하는 쌍 데이터 생성부(310), 디스타일화 모델을 수행할 수 있는 디스타일화부(320)을 설명한 후, 디스타일화 모델에 의해 생성된 컨텐츠 이미지를 스타일화된 라인 아트로 변환하는 모델을 포함하는 스타일화부(330)를 설명하기로 한다.As described above, the sketch-line conversion system and method of the present invention includes a destylization model for extracting a line structure from a sketch and a stylization model for applying various line styles to the line structure. In the following specification, after describing the pair data generation unit 310 for synthesizing pair data and the destylization unit 320 capable of performing the destylization model, the content image generated by the destylization model is styled. A description will be made of the styling unit 330 including a model that converts the converted line art.

먼저, 본 발명의 쌍 데이터 생성부(310)는 주어진 라인 이미지로부터 스케치 이미지를 합성하여 스케치-라인 합성 쌍 데이터를 생성한다(S1). 보다 상세히, 본 발명의 쌍 데이터 생성부(310)는 후술할 디스타일화부(320)를 훈련하기 위한 스케치 이미지-라인 이미지로 이루어진 스케치-라인 합성 쌍 데이터(이하, '쌍 데이터' 또는 '합성 쌍 데이터'라 할 수 있음)를 생성하는 합성을 수행한다. 이를 위해, 본원 발명은 주어진 깨끗한 라인 이미지(clean line)이미지로부터 역으로 스케치 이미지를 생성한다. 즉, 본원 발명은 스케치 이미지로부터 라인 이미지를 생성하는 것이 최종 목적이므로, 본 발명의 모델을 훈련하기 위해서는 스케치-라인의 쌍으로 이루어진 다수의 쌍 데이터가 필요하다. 그러나, 쌍 데이터는 저작권 등의 문제로 획득하기 어렵기 때문에, 이미 주어진 라인 이미지로부터 스케치 이미지를 생성하여 훈련을 위한 쌍 데이터를 생성할 수 있다.First, the pair data generation unit 310 of the present invention synthesizes a sketch image from a given line image to generate sketch-line synthesis pair data (S1). In more detail, the pair data generation unit 310 of the present invention includes sketch-line synthesis pair data (hereinafter, “pair data” or “composite pair”) consisting of a sketch image-line image for training the destylization unit 320 to be described later. Data'). To this end, the present invention creates a sketch image inversely from a given clean line image. That is, since the final object of the present invention is to generate a line image from a sketch image, in order to train the model of the present invention, a plurality of pair data consisting of a pair of sketch-lines are required. However, since pair data is difficult to obtain due to problems such as copyright, it is possible to generate pair data for training by generating a sketch image from an already given line image.

보다 상세히, 쌍 데이터 생성부(310)는 먼저 래스터 라인(raster line) 이미지로부터 벡터화 방법(vectorization methods)을 사용하여 벡터 이미지를 생성한다. 기존의 벡터화 방법은 깨끗한 선으로 된 래스터 이미지를 잘 처리하지만 래스터 스케치 이미지를 벡터화하지 못하는 경우가 많다. 이에 반해, 본 발명은 3개의 제어점에 의해 커브 모양을 모델링할 수 있는 4차 베지어 커브(Bιzier curve)를 이용한다.In more detail, the pair data generation unit 310 first generates a vector image from a raster line image using vectorization methods. Existing vectorization methods handle raster images with clean lines well, but in many cases raster sketch images cannot be vectorized. On the other hand, the present invention uses a 4th-order Bezier curve capable of modeling a curve shape by three control points.

보다 상세히, 본 발명의 일 실시예에 따라 기본 곡선으로부터 추출된 벡터는 3개의 제어점에 의해 표현될 수 있으며, 3개의 제어점이 주어지는 경우 대응하는 곡선이 특정될 수 있다. 보다 상세히, 3개의 제어점을 c1, c2, c3 라고 정의하였을 때, 기본 곡선 B 는 하기의 [수학식 3] 과 같이 나타낼 수 있다.In more detail, according to an embodiment of the present invention, a vector extracted from a basic curve may be expressed by three control points, and when three control points are given, a corresponding curve may be specified. In more detail, when three control points are defined as c1, c2, and c3, the basic curve B can be expressed as [Equation 3] below.

Figure 112019081520460-pat00001
Figure 112019081520460-pat00001

[수학식 3][Equation 3]

상기 [수학식 3]에서,

Figure 112019081520460-pat00002
이다. 제어점 c1 부터 c3 를 변형함으로써, 베지어 커브는 라인의 모양을 직관적으로 변형할 수 있다. 또한, 본 발명은 거친 스케치 스트로크(stroke)를 시뮬레이션하기 위해 제어점의 위치에 노이즈를 추가하여 각 베지어 커브의 파라미터를 교란시킬 수 있다. 또한, 노이즈의 절대적인 크기는 스트로크 길이의 크기에 비례하여 증가하기 때문에, 본 발명은 라인 세그먼트의 길이에 비례하여 섭동(perturbation) 노이즈를 설정할 수 있다. 본 발명은 0의 평균 및
Figure 112019081520460-pat00003
의 표준 편차를 갖는 가우시안 분포로부터 노이즈 ε를 샘플링할 수 있다. 이때, s 는 주어진 깨끗한 스트로크이고, α는 하이퍼파라미터값이다.In the above [Equation 3],
Figure 112019081520460-pat00002
to be. By transforming the control points c 1 to c 3 , the Bezier curve can intuitively transform the shape of the line. In addition, the present invention may perturb the parameters of each Bezier curve by adding noise to the position of the control point in order to simulate a rough sketch stroke. Further, since the absolute magnitude of the noise increases in proportion to the magnitude of the stroke length, the present invention can set the perturbation noise in proportion to the length of the line segment. The present invention has an average of 0 and
Figure 112019081520460-pat00003
Noise ε can be sampled from a Gaussian distribution with a standard deviation of. In this case, s is the given clean stroke and α is the hyperparameter value.

또한, 본 발명은 하나의 긴 커브를 복수개의 짧은 커브로 무작위로 나누어, 합성 스케치의 다양성을 증가시키고 복수개의 짧은 라인으로 하나의 긴 라인을 표현하는 일반적인 아티스트들의 행동을 모방할 수 있다. 이를 위해, 본 발명은 라인 세그먼트를 Mc 커브들로 균등하게 분할하고, 각 커브에 노이즈를 추가할 수 있다. 마지막으로, 아티스트들은 보통 스트로크를 여러번 그리면서 스케치를 보강하기 때문에, 본 발명 역시 반복적으로 노이즈 스트로크를 생성하고, 반복의 횟수는 다른 하이퍼파라미터 Ms 로 나타낼 수 있다. 하이퍼파라미터들의 선택은 후술할 실험 단락에서 설명하기로 한다.In addition, the present invention may randomly divide one long curve into a plurality of short curves, thereby increasing the diversity of synthetic sketches, and imitating the behavior of general artists expressing one long line with a plurality of short lines. To this end, the present invention can evenly divide a line segment into M c curves and add noise to each curve. Finally, since artists usually reinforce a sketch by drawing a stroke several times, the present invention also repeatedly creates a noise stroke, and the number of iterations can be represented by another hyperparameter M s . The selection of hyperparameters will be described in the experimental section to be described later.

도 5 는 본 발명의 합성 스케치 생성 방법에 따라 깨끗한 라인 이미지로부터 스케치를 생성하는 과정을 예시한 도면이다.5 is a diagram illustrating a process of creating a sketch from a clean line image according to the method of creating a synthetic sketch of the present invention.

도 5 를 참조하면, (a) 는 입력 래스터 라인이고, (b) 는 3개의 제어점으로 나타난 파라미터화된 커브이고, (c) 는 제어점 변경의 결과이며, (d) 는 커브가 2개의 작은 스트로크로 분할된 경우를 나타내고, (e) 는 스케치 스트로크를 반복적으로 생성한 결과이다.5, (a) is an input raster line, (b) is a parameterized curve represented by three control points, (c) is the result of control point change, and (d) is a curve with two small strokes. The case is divided into, and (e) is the result of repeatedly generating a sketch stroke.

보다 상세히, 본 발명의 일 실시예에 따른 쌍 데이터 생성부(310)는 도 5 의 (a)의 입력 래스터 라인 이미지를 벡터 이미지화하여, (b) 와 같이 3개의 제어점으로 나타낸 커브로 변환할 수 있다. 다음으로, 쌍 데이터 생성부(310)는 (c)와 같이 3개의 제어점에 노이즈를 부가함으로써 제어점을 변경하여 다른 베지어 커브를 생성할 수 있다. 다음으로, 쌍 데이터 생성부(310)는 (d)와 같이 하나의 커브를 복수개의 작은 스트로크로 분할하고, 분할된 각 커브에 (c) 의 방법과 같이 노이즈를 부가할 수 있다. 또한, (e)와 같이 반복적으로 노이즈 스트로크를 생성할 수 있다. In more detail, the pair data generation unit 310 according to an embodiment of the present invention converts the input raster line image of FIG. 5(a) into a vector image and converts it into a curve represented by three control points as shown in (b). have. Next, the pair data generation unit 310 may generate another Bezier curve by changing the control points by adding noise to the three control points as shown in (c). Next, the pair data generator 310 may divide one curve into a plurality of small strokes as shown in (d), and add noise to each divided curve as in the method (c). Also, as shown in (e), it is possible to repeatedly generate noise strokes.

더불어, 본 발명은 백그라운드 색상, 라인 색상 및 굵기, 글로벌 조명과 같은 글로벌 설정(global configurations)을 변경함으로써 합성 쌍 스케치를 글로벌 확장(global augmentations)한다. 즉, 상술한 방법으로 생성된 합성 쌍 스케치에 텍스처를 부가할 수 있다. 또한, 본 발명은 스케치들에 일반적인 선으로 만들어진 영역을 시뮬레이션한다. 글로벌 조명과 관련하여, 빛이 균일하게 분산되지 않는 상황을 고려하기 위해 점진적으로 흰색을 추가할 수 있다. 즉, 본 발명의 쌍 데이터 생성부(310)는 라인 이미지를 단순 스케치 이미지로 변환한 합성 쌍 데이터 외에, 합성 쌍 데이터에 글로벌 설정을 부가 또는 변경한 텍스처 확장된(texture augmented) 합성 쌍 데이터를 생성할 수 있다. 합성 쌍 데이터는 후술할 라인 구조 추출부(323)를 훈련하는데 사용될 수 있고, 텍스처 확장된 합성 쌍 데이터는 후술할 텍스처 제거부(322)를 훈련하는데 사용될 수 있다.In addition, the present invention global augmentations of the composite pair sketch by changing global configurations such as background color, line color and thickness, and global illumination. That is, it is possible to add a texture to the composite pair sketch generated by the above-described method. In addition, the present invention simulates an area made of lines common to sketches. Regarding global lighting, white can be added gradually to account for situations where the light is not evenly distributed. That is, the pair data generation unit 310 of the present invention generates texture augmented composite pair data in which a global setting is added or changed to the composite pair data in addition to the composite pair data obtained by converting a line image into a simple sketch image. can do. The composite pair data may be used to train the line structure extracting unit 323 to be described later, and the texture-expanded composite pair data may be used to train the texture removing unit 322 to be described later.

다음으로, 본 발명의 디스타일화부(320)는 상술한 쌍 데이터를 이용하여 훈련되며, 거친 스케치(rough sketch) 이미지에서 라인 구조를 추출하여, 컨텐츠 이미지(content image)를 생성하는 디스타일화 모델을 포함한다(S2). 보다 상세히, 본 발명의 일 실시예에 따르면 디스타일화부(320)는 텍스처를 제거하여 스케치들간의 편차와 실제 스케치와 합성 스케치 사이의 차이를 줄일 수 있다. 또한, 디스타일화부(320)는 라인 정규화(line normalizer) 모델을 이용하여 데이터 확장으로 인한 라인 폭의 변형을 막기 위해 라인 폭을 정규화하는 모델을 사용한다.Next, the destylization unit 320 of the present invention is trained using the paired data described above, extracts a line structure from a rough sketch image, and generates a content image. It includes (S2). In more detail, according to an embodiment of the present invention, the destylization unit 320 may reduce a deviation between sketches and a difference between an actual sketch and a composite sketch by removing a texture. Also, the destylization unit 320 uses a model for normalizing the line width in order to prevent the line width from being deformed due to data expansion by using a line normalizer model.

본 발명의 일 실시예에 따른 디스타일화부(320)는 라인 정규화부(321), 텍스처 제거부(322) 및 라인 구조 추출부(323)를 포함할 수 있다. 라인 정규화부(321), 텍스처 제거부(322) 및 라인 구조 추출부(323)의 모델은 오토인코더와 동일한 형태를 가지나, 역할에 따라 모델 사이즈, 사용 데이터 및 학습 손실에서 차이점이 존재할 수 있다.The destylization unit 320 according to an embodiment of the present invention may include a line normalization unit 321, a texture removal unit 322, and a line structure extraction unit 323. The models of the line normalization unit 321, the texture removal unit 322, and the line structure extraction unit 323 have the same shape as the autoencoder, but there may be differences in model size, use data, and learning loss depending on the role.

도 6 은 본 발명의 일 실시예에 따른 디스타일화 및 스타일화 모델을 설명하기 위한 것이다. 6 is for explaining a destylization and stylization model according to an embodiment of the present invention.

도 6 의 윗부분은 각각 디스타일화부 및 스타일화부의 훈련을 설명하기 위한 것이고, 아랫부분은 각각 디스타일화부 및 스타일화부를 적용한 실제 스케치-라인 변환 결과를 예시한 것이다.The upper part of FIG. 6 is for explaining the training of the destyling unit and the styling unit, respectively, and the lower part is an example of the actual sketch-line conversion result applying the destyling unit and the styling unit, respectively.

상술한 바와 같이, 디스타일화부(320)는 라인 정규화부(321), 텍스처 제거부(322) 및 라인 구조 추출부(323)를 포함할 수 있다. 도 6 을 참조하여, 먼저 디스타일화부의 훈련 부분을 참조하면, 본 발명의 디스타일화부(320)의 디스타일화 모델은 텍스처 확장된 합성 쌍 데이터를 이용하여 텍스처 제거부(322)가 훈련되고, 합성 쌍 데이터를 이용하여 라인 구조 추출부(313)가 훈련될 수 있다.As described above, the destylization unit 320 may include a line normalization unit 321, a texture removal unit 322, and a line structure extraction unit 323. Referring to FIG. 6, first, referring to the training part of the destylization unit, the destylization model of the destylization unit 320 of the present invention uses the texture-extended composite pair data, and the texture removal unit 322 is trained. , The line structure extraction unit 313 may be trained using the composite pair data.

보다 상세히, 라인 정규화부(321)는 그라운드 트루스(ground truth) 라인 이미지의 데이터 확장(data augmentation) 중에 라인 굵기가 변경되는 것을 방지한다. 도 6 을 참조하면, 라인 정규화부(321)는 실제 라인 아트(y)를 획득하여 라인을 정규화한 후 후술하는 텍스처 제거부(322)에 제공할 수 있다. 본 발명의 일 실시예에 따르면, 라인 정규화부(321)는 텍스처 제거부(322) 및 라인 구조 추출부(323)가 정확한 결과를 얻을 수 있도록 타겟 라인의 굵기를 유지하기 위해 리사이징(resize)된 이미지에 적용될 수 있다. 라인 정규화 모델은 텍스처 제거 모델 및 라인 구조 추출 모델보다 작을 수 있는데, 이는 라인 정규화 모델은 로컬 영역(local region)만을 고려하기 때문이다. 라인 정규화부(321)는 확장된 라인 폭을 갖는 라인 이미지를 이용하여 L1 손실로 훈련될 수 있다.In more detail, the line normalization unit 321 prevents the line thickness from being changed during data augmentation of a ground truth line image. Referring to FIG. 6, the line normalization unit 321 may obtain the actual line art y, normalize the line, and provide it to the texture removal unit 322 described later. According to an embodiment of the present invention, the line normalization unit 321 is resized to maintain the thickness of the target line so that the texture removing unit 322 and the line structure extracting unit 323 can obtain accurate results. Can be applied to images. The line normalization model may be smaller than the texture removal model and the line structure extraction model, because the line normalization model considers only a local region. The line normalization unit 321 may be trained with L1 loss using a line image having an extended line width.

다음으로, 텍스처 제거부(322)는 백그라운드 색상이나 스케치 라인 색상과 같은 텍스처를 스케치로부터 제거한다. 텍스처 제거부(322)는 관계없는 영역 및 정보를 제거함으로써, 후술할 라인 구조 추출부(323)의 작업을 용이하게 할 수 있다. 또한, 텍스처 제거부(322)는 저레벨 정보를 활용할 수 있다.Next, the texture removal unit 322 removes a texture such as a background color or a sketch line color from the sketch. The texture removal unit 322 can facilitate the operation of the line structure extraction unit 323 to be described later by removing irrelevant regions and information. Also, the texture removal unit 322 may utilize low-level information.

도 6 을 참조하면, 텍스처 제거부(322)는 실제 라인 아트(y)에 기초한 라인 정규화부(321)로부터의 정규화된 라인 및 실제 거친 스케치(x)를 획득하여 텍스처를 스케치로부터 제거하도록 훈련될 수 있다. 또한, 텍스처 제거부(322)는 텍스처 확장된 합성 쌍 데이터(texture augmented synthetic paired data)를 이용하여 L1 손실로 훈련될 수 있다. 도 6 에 도시된 실제 거친 스케치(x) 및 실제 라인 아트(y)는 서로 쌍이 없는 실제 데이터로서, 다량의 데이터이다. 즉, x 및 y 는 서로 쌍이 없는 다량의 데이터로서, 쌍이 없는 데이터이므로 용이하게 수집될 수 있는 데이터이다. 이에 반해, 합성 쌍 데이터는 본 발명에 의해 생성된 스케치-라인 쌍 데이터이다. 더불어, 도 6 과 같이 본 발명은 라인 정규화부(321)로부터의 정규화된 라인 및 실제 거친 스케치(x) 사이에 GAN(Generative Adversarial Nets) 손실을 추가할 수 있다. 6, the texture removal unit 322 is trained to remove the texture from the sketch by acquiring the normalized line and the actual rough sketch x from the line normalization unit 321 based on the actual line art (y). I can. In addition, the texture removing unit 322 may be trained with L1 loss using texture augmented synthetic paired data. The actual rough sketch (x) and the actual line art (y) shown in FIG. 6 are actual data that are not paired with each other, and are large amounts of data. That is, x and y are data that are not paired with each other, and are data that can be easily collected because there is no pair of data. In contrast, the composite pair data is sketch-line pair data generated by the present invention. In addition, as shown in FIG. 6, the present invention may add a Generative Adversarial Nets (GAN) loss between the normalized line from the line normalization unit 321 and the actual rough sketch x.

본 발명의 일 실시예에 따르면 텍스처 제거부(322)의 모델을 학습하기 위하여, 본원 발명은 합성 쌍 데이터를 이용할 수 있다. 텍스처 제거부(322)는 L1 손실 및 GAN 손실을 정확한 결과를 얻기 위해 사용한다. According to an embodiment of the present invention, in order to learn the model of the texture removing unit 322, the present invention may use the composite pair data. The texture removal unit 322 uses the L1 loss and the GAN loss to obtain an accurate result.

텍스처 제거부(322)의 목적식은 하기의 [수학식 1]과 같이 정의될 수 있다.The purpose of the texture removal unit 322 may be defined as [Equation 1] below.

Figure 112019081520460-pat00004
Figure 112019081520460-pat00004

[수학식 1][Equation 1]

상기 [수학식 1]에서, N, T, DT 는 각각 라인 정규화부(321), 텍스처 제거, 부(322) 및 디스크리미네이터(discriminator)를 뜻한다. 또한, s1, s*, x, 및 y 는 각각 텍스처-확장된 합성 라인 이미지(texture-augmented synthetic line image), 그것의 쌍 원본 클린 이미지(paired original clean image), 실제 스케치 이미지 및 실제 라인 아트를 각각 나타낸다. 보다 상세히, [수학식 1] 에서 T 는 목적식의 값을 최소화 하도록 학습이 되고 D_T 는 목적식의 값을 최대화 하는 방향으로 학습이 된다. 본 발명에 따르면, 실제 텍스처 제거를 위해 사용하는 모델은 T 이고, D_T 는 T 가 최소화되는 것을 방해하지만(T와 반대 방향으로 목적식의 값을 최대화 하기 때문), 최종적으로는 T의 학습을 최종적으로 도울 수 있다. 부연하면, 상기 [수학식 1]은 문제를 어렵게 출제하여 T가 어려운 문제도 용이하게 해결할 수 있도록 훈련될 수 있다.In the above [Equation 1], N, T, and D T denote a line normalizing unit 321, a texture removing unit 322, and a discriminator, respectively. In addition, s 1 , s*, x, and y are respectively a texture-augmented synthetic line image, its paired original clean image, a real sketch image and a real line art. Respectively. More specifically, T in Equation 1 is the learning so as to minimize the value of the objective function D_ T is a Learning in the direction that maximizes the value of the objective function. According to the present invention, the model to be used for actual texture removing T, D_ T is to the disturbance, but (due to maximize the value of the objective function as a T in the opposite direction), and finally T learning of the T is minimized Finally can help. In other words, [Equation 1] can be trained to solve difficult T problems easily by questioning problems.

다음으로, 라인 구조 추출부(323)는 라인 구조를 이미 프로세싱된 거친 이미지로부터 추출한다. 라인 구조는 라인들의 스타일에 관계없는 라인의 중심을 뜻한다. 라인 구조 추출부(323)는 플랫 라인 아트 이미지(flat line art image)를 이용하여 라인 구조를 표현하며, 플랫 라인 아트 이미지란, 추출된 라인 구조만으로 이루어진 이미지이다. 라인 구조 추출부(323)는 텍스처 제거부(322)로부터 입력 데이터를 획득하여 라인 구조를 추출할 수 있다.Next, the line structure extraction unit 323 extracts the line structure from the already processed rough image. The line structure means the center of the line regardless of the style of the lines. The line structure extraction unit 323 expresses a line structure using a flat line art image, and the flat line art image is an image composed of only the extracted line structure. The line structure extraction unit 323 may extract the line structure by obtaining input data from the texture removal unit 322.

본 발명의 라인 구조 추출부(323)는 도 6 의 훈련 부분에 도시된 바와 같이 텍스처 제거부(322)로부터의 입력 데이터 및 합성 쌍 데이터(Synthetic paired data)에 의해 훈련될 수 있다. 이때, 텍스처 제거부(322)로부터의 입력 데이터는, 상술한 바와 같이 정규화된 라인 및 실체 스케치(x)에서 텍스처를 제거한 데이터일 수 있으며, 텍스처 제거부(322)로부터의 입력 데이터에 GAN 손실이 추가될 수 있다. 또한, 라인 구조 추출부는 기존의 연구들과 달리 수동으로 생성된 데이터 대신 합성 쌍 데이터를 이용하여 L1 손실(L1 loss)로 훈련될 수 있다. The line structure extraction unit 323 of the present invention may be trained by input data and synthetic paired data from the texture removing unit 322 as shown in the training part of FIG. 6. At this time, the input data from the texture removal unit 322 may be data from which the texture is removed from the normalized line and the entity sketch (x) as described above, and the GAN loss in the input data from the texture removal unit 322 Can be added. In addition, unlike existing studies, the line structure extractor may be trained with L1 loss using synthetic pair data instead of manually generated data.

보다 상세히, 쌍 데이터는 정답을 직접적으로 알려주는 L1 손실을 활용할 때 사용된다. 또한, 텍스처 제거부(322)에 의해 텍스처가 제거된 이미지와 실제 라인 데이터는 서로 쌍(pair)이 아니기 때문에 L1 손실을 사용하는 대신, 간접적으로 변환된 이미지가 얼마나 실제 라인 이미지와 비슷하게 생겼는지에 대한 GAN 손실(GAN Loss)을 활용한다.In more detail, paired data is used when taking advantage of the L1 loss, which directly informs the correct answer. In addition, since the image from which the texture has been removed by the texture removal unit 322 and the actual line data are not paired with each other, instead of using L1 loss, it is possible to determine how similar the indirectly converted image to the actual line image looks. Use GAN Loss.

참고적으로, 본 발명에 따르면 GAN 손실의 학습 방식은 정답에 대한 쌍이 없으나 각 데이터를 따로따로는 가지고 있을 때(예를 들어, 도 6 에 도시된 바와 같은 쌍이 없는 x, y) 이를 최대한 활용하여 간접적으로 x 혹은 y의 성질을 학습하게 하는 방법이다. 보다 상세히, 본 발명의 일 실시예에 따라, G라는 모델이 있어서, x(실제 거친 스케치)를 y(실제 라인 이미지)처럼 보이게 하는 것이 목표(이를 함수 형태로 G(x)로 표현하고, G(x) = y가 되는 것이 목표)인 것을 가정하기로 한다. 이때, 본 발명은 D라는 별도의 모델을 두고 D에게 y와 G(x)를 주어 이 둘을 구별하는 것을 학습하게 하고, 반면 G는 D가 y와 G(x)를 구별하지 못하도록 학습하게 한다. 이 경우, D 와 G 는 서로 경쟁적으로 학습을 수행하고, 오랜 시간 동안 학습을 반복하면 본 발명의 목표인 G(x) = y가 학습될 수 있다. 즉, 본 발명에 따르면 데이터로 (x, y)쌍이 있어서 G(x) = y를 직접 학습시키는 것은 불가능 하지만, D를 활용해서 G(x) = y를 배우도록 하는 것이 가능하다.For reference, according to the present invention, when the GAN loss learning method does not have a pair for the correct answer, but has each data separately (for example, x, y without a pair as shown in FIG. 6), it is used as much as possible. It is a way to indirectly learn the properties of x or y. In more detail, according to an embodiment of the present invention, there is a model G, so the goal is to make x (real rough sketch) look like y (real line image) (this is expressed as G(x) in the form of a function, and G (x) = y is the goal). In this case, the present invention has a separate model called D, and gives y and G(x) to D to learn to distinguish the two, whereas G allows D to learn not to distinguish between y and G(x). . In this case, D and G perform learning competitively with each other, and if the learning is repeated for a long time, G(x) = y, the goal of the present invention, can be learned. That is, according to the present invention, it is impossible to directly learn G(x) = y because there are (x, y) pairs as data, but it is possible to learn G(x) = y using D.

또한, 라인 구조 추출부(323)는 배치(batch) 정규화 대신 인스턴스(instance) 정규화를 사용할 수 있다. 더불어, 도 5 에 나타난 바와 같이 본 발명은 GAN 손실을 추가할 수 있다. 라인 구조 추출부(323)의 목적식은 하기의 [수학식 2]와 같이 정의될 수 있다.In addition, the line structure extracting unit 323 may use instance normalization instead of batch normalization. In addition, as shown in FIG. 5, the present invention can add GAN loss. The purpose of the line structure extraction unit 323 may be defined as in [Equation 2] below.

Figure 112019081520460-pat00005
Figure 112019081520460-pat00005

[수학식 2][Equation 2]

상기 [수학식 2]에서, G, DG, s2 는 각각 라인 추출, 디스크리미네이터 및 합성 라인 이미지를 각각 나타낸다. 보다 상세히, G 는 목적식의 값을 줄이고자 학습되고, D는 목적식의 값을 높이고자 학습된다. [수학식 2]의 목적식의 내용은 상술한 GAN 손실 학습 방식처럼 D가 N(y)와 G(T(x)) 이 두 개를 잘 구별할 경우 값이 커지고, 잘 구별하지 못할 경우 값이 작아지는 것이다. 상술한 GAN Loss 학습 방식과 동일하게, D는 잘 구별하려고(목적식 값을 크게 만들고자 함) 학습하고, G는 잘 구별하지 못하도록(목적식 값을 작게 만듦) 학습한다. 따라서, 본 발명에 따르면 최종적으로는 G가 생성하는 G(T(x))가 실제 라인 데이터 N(y), 정확히는 정규화된(N) 실제 라인 데이터와 비슷해 질 수 있다.In the above [Equation 2], G, D G , and s 2 denote a line extraction, a discreminator, and a composite line image, respectively. In more detail, G is learned to reduce the value of the objective expression, and D is learned to increase the value of the objective expression. The content of the objective expression of [Equation 2] is, as in the GAN loss learning method described above, if D distinguishes between the two N(y) and G(T(x)) well, the value increases, and if it is not well distinguished, the value This is going to be smaller. In the same way as the above-described GAN Loss learning method, D learns to distinguish well (to make the objective expression value larger), and G learns not to distinguish well (make the objective expression value smaller). Accordingly, according to the present invention, finally, G (T(x)) generated by G may be similar to actual line data N(y), and more precisely normalized (N) actual line data.

본 발명의 일 실시예에 따르면 라인 정규화부(321), 텍스처 제거부(322), 라인 구조 추출부(323)를 동시에 훈련시킬 수 있지만, 라인 정규화부와 텍스처 제거부를 별도의 모델로 사용하기 위해 개별적으로 학습하고 추론 중에 함께 배치하는 것도 가능하다.According to an embodiment of the present invention, the line normalization unit 321, the texture removal unit 322, and the line structure extraction unit 323 may be trained at the same time, but in order to use the line normalization unit and the texture removal unit as separate models It is also possible to learn individually and place them together during inference.

도 7 은 디스타일화 모델의 각 단계의 효과를 예시한 것이다.7 illustrates the effects of each step of the destylization model.

보다 상세히, 도 7 의 (a) 는 입력 스케치이고, (b) 는 텍스처 제거의 결과이고, (c)는 라인 추출의 결과이다. 보다 상세히, 본 발명의 텍스처 제거부(322)는 (a)의 입력 스케치에서 라인이 아닌 텍스처를 제거하여 (b) 와 같은 결과를 얻을 수 있다. 또한, 본 발명의 라인 구조 추출부(323)는 라인 구조를 추출하여 (c)와 같은 결과를 얻을 수 있다. 또한, 도 7 의 (d) 는 후술하는 스타일화부(330)에 의해 스타일화된 결과를 나타낸 이미지이다.In more detail, (a) of FIG. 7 is an input sketch, (b) is a result of texture removal, and (c) is a result of line extraction. In more detail, the texture removal unit 322 of the present invention may obtain the same result as (b) by removing a texture other than a line from the input sketch of (a). In addition, the line structure extraction unit 323 of the present invention may extract the line structure and obtain the same result as (c). In addition, (d) of FIG. 7 is an image showing the result of styling by the styling unit 330 described later.

다음으로, 본 발명의 스타일화부(330)는 추출된 라인 구조로 이루어진 이미지에 라인 스타일을 적용하여 스타일을 부가하는 스타일화 모델을 포함한다(S3). 본 발명의 스타일화부(330)는 디스타일화부에 의해 생성된 플랫 라인 이미지(flat line image)에 사실적인 라인 스타일(realistic line style)을 적용한다. 본 발명은 확장된(Augumented) CycleGAN을 이용하여 플랫 라인 이미지(flat line image)를 스타일리쉬 라인 이미지(stylish line image)로 변환한다. 이때, 플랫 라인 이미지는 본원 발명의 스타일화가 적용되기 이전의 라인 이미지이고, 스타일리쉬 라인 이미지는 본 발명의 스타일화가 적용된 라인 이미지이다. Next, the styling unit 330 of the present invention includes a styling model for adding a style by applying a line style to an image having the extracted line structure (S3). The styling unit 330 of the present invention applies a realistic line style to the flat line image generated by the destyling unit. The present invention converts a flat line image into a stylish line image using an Augmented CycleGAN. In this case, the flat line image is a line image before the stylization of the present invention is applied, and the stylish line image is a line image to which the stylization of the present invention is applied.

도 6 에 도시된 바와 같이, 스타일화부(330)는 라인 정규화부(331) 및 스타일러(332)를 포함할 수 있다. 라인 정규화부(331)는 상술한 디스타일화부(320)의 라인 정규화부(321)와 동일한 역할을 수행할 수 있다. 또한, 스타일러(332)는 실제 라인 아트(y)와 실제 라인 아트(y)를 정규화한 값을 이용하여 L1 손실로 훈련될 수 있다. 또한, 스타일화부(330)의 스타일러(332)는 는 실제 라인 아트(y)를 정규화한 값을 이용하여 확장된 CycleGAN 학습 방법으로 훈련될 수 있다.As shown in FIG. 6, the styling unit 330 may include a line normalizing unit 331 and a styler 332. The line normalization unit 331 may perform the same role as the line normalization unit 321 of the destylization unit 320 described above. Also, the styler 332 may be trained with L1 loss using a value obtained by normalizing the actual line art y and the actual line art y. In addition, the styler 332 of the styling unit 330 may be trained using an extended CycleGAN learning method using a value obtained by normalizing the actual line art y.

확장된 CycleGAN 을 이용하여, 스타일화부(330)의 스타일러(styler)를 A Х Zb 에서 B Х Za 의 방향으로 훈련하는 것은 하기의 [수학식 4] 와 같이 나타낼 수 있다.Using the extended CycleGAN, training the styler of the styling unit 330 in the direction of A Х Z b to B Х Z a can be expressed as [Equation 4] below.

Figure 112019081520460-pat00006
Figure 112019081520460-pat00006

[수학식 4][Equation 4]

상기 [수학식 4]에서, A, B, SAB 및 DS 는 각각 플랫 라인 이미지(스케치), 스타일리쉬 라인 이미지(라인 이미지), 스타일러 및 디스크리미네이터이다. 또한, Zb 는 라인 이미지의 스타일을 나타낸 코드, Za 는 스케치의 스타일을 나타낸 코드이다. 본 발명의 일 실시예에 따르면 유사한 목적이 반대 방향에 의해 정의될 수 있고, 양 방향이 동시에 훈련될 수 있다. 상술한 라인 정규화부(321)를 사용하여 깨끗한 스타일의 라인 이미지에서 라인 구조를 쉽게 추출할 수 있기 때문에, 본 발명은 반-지도 학습(semi-supervised learning) 을 위한 지도 손실(supervised loss)을 하기의 [수학식 5]와 같이 추가할 수 있다.In the above [Equation 4], A, B, S AB and D S are a flat line image (sketch), a stylish line image (line image), a styler, and a discreminator, respectively. In addition, Z b is a code indicating the style of the line image, and Z a is a code indicating the style of the sketch. According to an embodiment of the present invention, similar objectives can be defined by opposite directions, and both directions can be trained simultaneously. Since the line structure can be easily extracted from the line image of a clean style using the above-described line normalization unit 321, the present invention performs supervised loss for semi-supervised learning. It can be added as in [Equation 5].

Figure 112019081520460-pat00007
Figure 112019081520460-pat00007

[수학식 5][Equation 5]

본 발명에 의하면, 상기 지도 손실 부분이 사이클 일관성 손실 모델을 훈련할 때 발생할 수 있는 스케가노그래피(steganography)를 방지할 수 있다 확장된 CycleGAN이 스케치 이미지를 스타일리시 라인 이미지로 직접 변환하는 것을 실패하더라도, 확장된 CycleGAN은 상술한 반-지도 손실의 도움으로 플랫 라인 구조를 스타일화하는 것을 성공적으로 훈련할 수 있다.According to the present invention, it is possible to prevent steganography, which may occur when the map loss part is training the cycle coherence loss model. Even if the extended CycleGAN fails to directly convert the sketch image into a stylish line image, The extended CycleGAN can successfully train styling flat line structures with the aid of the half-map loss described above.

도 6 의 아랫부분의 적용을 참조하면, 라인 구조 추출부(323)가 출력한 플랫 라인 아트 이미지에 스타일 가이드(style guided)된 잠재 코드(latent code) 혹은 랜덤 노이즈를 부가하여, 스타일화부(330)의 스타일러(332)는 다중 모드(multi-modal)의 라인 아트 이미지를 출력할 수 있다. 관련하여, 본 발명에 따르면 스타일 이미지가 존재하는 경우, 인코더를 이용해서 스타일 이미지로부터 Zb(라인 이미지의 스타일 코드)를 뽑아내 사용할 수 있지만, 없을 경우 Zb 를 랜덤 샘플링을 통해 추출할 수 있습니다. 예를 들어, Zb 가 10개의 숫자로 표현된다면 10개의 숫자를 가우시안 분포(gaussian distribution)에서 랜덤 샘플링하여 추출할 수 있다.Referring to the application of the lower part of FIG. 6, a style guided latent code or random noise is added to the flat line art image output by the line structure extraction unit 323, and the styling unit 330 The styler 332 of) may output a multi-modal line art image. In connection, when the style image exists according to the present invention, but using an encoder used in from style image pull the Z b (style of the line image code), and when there can be extracted the Z b on the random sampling . For example, if Z b is represented by 10 numbers, 10 numbers can be extracted by random sampling from a Gaussian distribution.

본 발명의 스타일에 기초한 스케치-라인 변환 방법은 스케치 이미지로부터 컨텐츠를 추출하는 디스타일화 모델과 추출된 컨텐츠에 다양한 라인 스타일을 적용하는 스타일화 모델을 포함한다. 이전 기술들은 비지도 이미지-이미지 변환을 사용하고 스타일 변환이 노이즈 라인과 디테일을 구분하지 못한다는 문제점이 존재하였다. 그러나, 본 발명은 노이즈를 성공적으로 제거하면서 지도 학습을 사용하여 컨텐츠의 중요한 디테일을 보존할 수 있다. 디스타일화 모델을 라인 정규화부, 텍스처 제거부 및 라인 구조 추출부를 포함하고, 본 발명에 의해 합성된 스케치-라인 쌍 데이터를 이용하여 훈련된다. 라인 구조를 추출하고 난 후, 본 발명은 확장된 CycleGAN을 이용하여 플랫 라인 이미지를 스타일리쉬 라인 이미지로 변환한다.The style-based sketch-line conversion method of the present invention includes a destylization model for extracting content from a sketch image and a stylization model for applying various line styles to the extracted content. Previous techniques used unsupervised image-image conversion, and there was a problem that style conversion could not distinguish noise lines and details. However, the present invention can preserve important details of content using supervised learning while successfully removing noise. The destylization model includes a line normalization unit, a texture removal unit, and a line structure extraction unit, and is trained using sketch-line pair data synthesized by the present invention. After extracting the line structure, the present invention converts a flat line image into a stylish line image using the extended CycleGAN.

이하에서는, 본 발명의 스타일에 기초한 스케치-라인 변환 방법을 기존의 연구 결과와 비교한 실험 결과를 설명하기로 한다. 그러나, 이하의 실험 결과는 본 발명의 일 실시예를 구현한 것에 불과하며, 세부적인 사항은 발명의 핵심적 특징을 벗어나지 않는 선에서 변경 가능함은 물론이다.Hereinafter, an experiment result of comparing the sketch-line conversion method based on the style of the present invention with the existing research results will be described. However, the following experimental results are only an embodiment of the present invention, and details can be changed without departing from the core features of the invention.

먼저, 실험의 설계에 대해 간단히 설명하기로 한다. 본 발명의 스케치-라인 변환 방법을 실험하기 위한 데이터로서, Danbooru2017 데이터 세트(G. B. A. G. Anonymous, the Danbooru community. Danbooru2018: A Large-Scale Crowdsourced and Tagged Anime Illustration Dataset. January 2019.)를 사용하였다. 이 데이터 세트는 99,700,000 개의 태그 주석이 있는 애니메이션 이미지 3.3 백만 개 이상으로 구성되어 있다. 280 쌍의 스케치 및 라인 이미지를 사용하는 기존의 Inker 모델(E. Simo-Serra, S. Iizuka, and H. Ishikawa. Real-Time DataDriven Interactive Rough Sketch Inking. ACM Transactions on Graphics(SIGGRAPH), 37(4), 2018.)과 공정하게 비교하기 위해 스케치 및 라인 아트 태그가 있는 이미지에서 300 개의 스케치 및 라인 이미지를 각각 수동으로 수집했다. 라인 이미지를 수집 할 때 각 라인 이미지는 두께, 밝기 및 곡률에 따라 별개의 스타일을 나타내는 것을 고려하였다. 또한, 본 발명에 따라 합성 쌍 데이터를 생성하기 위해 30 개의 라인 이미지를 사용하여 900 개의 합성 스케치를 생성하였다. 훈련을 위해, 상술한 Inker 모델에서 설명된 방법으로 확장된 각 이미지로부터 추출된 패치를 사용하였다.First, the design of the experiment will be briefly described. As data for experimenting the sketch-line conversion method of the present invention, the Danbooru2017 data set (G. B. A. G. Anonymous, the Danbooru community. Danbooru 2018: A Large-Scale Crowdsourced and Tagged Anime Illustration Dataset. January 2019.) was used. This data set consists of over 3.3 million animated images with 99,700,000 tag annotations. Existing Inker models using 280 pairs of sketches and line images (E. Simo-Serra, S. Iizuka, and H. Ishikawa. Real-Time Data Driven Interactive Rough Sketch Inking. ACM Transactions on Graphics (SIGGRAPH), 37(4) ), 2018.), we manually collected 300 sketch and line images, respectively, from images tagged with sketch and line art. When collecting line images, it was considered that each line image represents a distinct style according to thickness, brightness, and curvature. In addition, 900 composite sketches were created using 30 line images to generate composite pair data according to the present invention. For training, a patch extracted from each image expanded by the method described in the Inker model described above was used.

본 실험에서는, 미니 배치 크기 하나로 20,000회 반복하여 본 발명의 라인 정규화부, 텍스처 제거부 및 라인 구조 추출부를 훈련시키고, 60,000회 반복하여 스타일화부를 훈련하였다. 또한, 학습률(learning rate) 0.0001,

Figure 112019081520460-pat00008
1 = 0.5,
Figure 112019081520460-pat00009
2 = 0.999 인 ADAM 최적화 도구(D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. In ICLR, 2015. 5)를 사용했다. 또한, 상술한 [수학식 1] 내지 [수학식 5] 에서
Figure 112019081520460-pat00010
, γ1, γ2를 각각 10-3, 1.0, 0.025로 설정 하였다. 합성 스케치 구축에 사용 된 하이퍼 파라미터에 대해 α∈{30, 40, 50}과
Figure 112019081520460-pat00011
= 3 인 포아송 분포로부터의 무작위로 추출한 Mc 및 Ms 를 값을 값을 사용했다. 또한, 본 실험에서는 채색된 영역 또는 채워진 영역의 비율을 이미지 영역의 20 %로 설정했다.In this experiment, the line normalization unit, the texture removal unit, and the line structure extraction unit of the present invention were trained by repeating 20,000 times with one mini-batch size, and training the styling unit by repeating 60,000 times. Also, the learning rate is 0.0001,
Figure 112019081520460-pat00008
1 = 0.5,
Figure 112019081520460-pat00009
2 = 0.999 ADAM optimization tool (DP Kingma and J. Ba. Adam: A method for stochastic optimization. In ICLR, 2015. 5) was used. In addition, in [Equation 1] to [Equation 5] described above
Figure 112019081520460-pat00010
, γ 1 and γ 2 were set to 10 -3 , 1.0, and 0.025, respectively. For the hyperparameters used to build the composite sketch, α∈{30, 40, 50} and
Figure 112019081520460-pat00011
Values of M c and M s extracted at random from the Poisson distribution of = 3 were used. In addition, in this experiment, the proportion of the colored area or the filled area was set to 20% of the image area.

다음으로, 실험에 대해 보다 상세히 소개하기로 한다. 본 실험에서는 상술한 디스타일화 모델 및 스타일화 모델의 효과를 보여주기 위해 광범위한 제어 실험(Controlled experiments)을 수행했다.Next, the experiment will be introduced in more detail. In this experiment, extensive controlled experiments were performed to show the effects of the above-described destylization model and stylization model.

도 8 은 본 발명의 스타일화 모델의 효과를 설명하기 위한 예시이다.8 is an example for explaining the effect of the styling model of the present invention.

도 8 은 본 발명의 변환 방법으로 생성된 다양한 선 스타일을 사용한 결과이다. 보다 상세히, 도 8 의 (a) 는 입력 스케치, (b) 는 두꺼운 선분으로 스타일화된 결과 이미지, (c) 는 얇은 선분으로 스타일화된 결과 이미지이다. 도 8 을 참조하면, 선 스타일에 따라 스타일화된 결과 이미지가 상이하게 생성됨을 알 수 있다. 즉, 본 발명에 따르면 주어진 스케치 이미지의 중요한 세부 사항을 유지하면서 다른 선 스타일들을 성공적으로 반영한다는 것을 알 수 있다. 또한, [수학식 5]의 지도 손실 방정식이 기존의 방법에서 보여지는 컨텐츠 제거를 방지한다는 것도 알 수 있다.8 is a result of using various line styles generated by the conversion method of the present invention. In more detail, (a) of FIG. 8 is an input sketch, (b) is a result image stylized as a thick line segment, and (c) is a result image stylized as a thin segment. Referring to FIG. 8, it can be seen that the resulting image styled according to the line style is generated differently. In other words, it can be seen that according to the present invention, different line styles are successfully reflected while maintaining important details of a given sketch image. In addition, it can be seen that the map loss equation of [Equation 5] prevents the content removal shown in the existing method.

다음으로, 본 발명의 스케치-선 변환 방법과 기존의 변환 방법의 비교하는 실험 결과를 소개하기로 한다. 본 실험에서는 본 발명의 변환 방법과 기존 모델의 결과를 비교하기로 한다. 이때, 비교 대상이 되는 모델은 WCT(Y. Li, C. Fang, J. Yang, Z. Wang, X. Lu, and M.-H. Yang. Universal style transfer via feature transforms. In NIPS, 2017.), Inker(E. Simo-Serra, S. Iizuka, and H. Ishikawa. Real-Time DataDriven Interactive Rough Sketch Inking. ACM Transactions on Graphics(SIGGRAPH), 37(4), 2018.), 확장된 CycleGAN(A. Almahairi, S. Rajeshwar, A. Sordoni, P. Bachman, and A. C. Courville. Augmented cyclegan: Learning many-tomany mappings from unpaired data. In Proceedings of the 35th International Conference on Machine Learning, ICML 2018, Stockholmsmδssan, Stockholm, Sweden, July 10-15, 2018, pages 195-204, 2018.) 모델인 것으로 가정하기로 한다.Next, an experimental result comparing the sketch-line conversion method of the present invention and the conventional conversion method will be introduced. In this experiment, the conversion method of the present invention and the result of the existing model will be compared. At this time, the model to be compared is WCT (Y. Li, C. Fang, J. Yang, Z. Wang, X. Lu, and M.-H. Yang. Universal style transfer via feature transforms. In NIPS, 2017. ), Inker (E. Simo-Serra, S. Iizuka, and H. Ishikawa. Real-Time DataDriven Interactive Rough Sketch Inking. ACM Transactions on Graphics (SIGGRAPH), 37(4), 2018.), Extended CycleGAN (A. Almahairi, S. Rajeshwar, A. Sordoni, P. Bachman, and AC Courville.Augmented cyclegan: Learning many-tomany mappings from unpaired data.In Proceedings of the 35th International Conference on Machine Learning, ICML 2018, Stockholmsmδssan, Stockholm, Sweden , July 10-15, 2018, pages 195-204, 2018.) It is assumed that it is a model.

먼저, 모델 성능을 평가하기 위해 20 명의 사용자에게 각 모델이 원래의 스케치 컨텐츠를 잘 보존하고 스타일을 세련된 라인 아트로 전달하는 방식에 기초하여 가장 시각적으로 매력적인 이미지를 선택하도록 하였다. 테스트 이미지의 경우 상술한 Danbooru2017 에서 트레이닝 중에 사용되지 않은 스케치에서 40 개의 스케치 이미지를 무작위로 선택하였다. 본 평가에서는 두 가지 사용자 연구를 수행했다. 먼저, 첫번째는 스케치-라인 변환 방법에 대한 전체 퍼포먼스를 WCT, Inker, 확장된 CycleGAN 및 본 발명에 대해 평가하도록 요청하였다. 두번째로, Inker의 결과와 본 발명의 디스타일화 모델에 대해 평가하도록 요청하였다. WCT와 Inker의 결과에 대해서는 프로젝트 사이트에서 생성한 결과를 사용했으며, AugCycleGAN의 결과에 대해 우리는 스스로를 구현하고 결과가 수렴 될 때까지 훈련하였다.First, to evaluate the model's performance, 20 users were asked to select the most visually attractive image based on how each model preserves the original sketch content and conveys the style as a refined line art. For the test images, 40 sketch images were randomly selected from sketches not used during training in Danbooru 2017 described above. In this evaluation, two user studies were conducted. First, the first was requested to evaluate the overall performance of the sketch-line conversion method for WCT, Inker, extended CycleGAN, and the present invention. Second, we asked to evaluate Inker's results and the destylization model of the present invention. For the results of WCT and Inker, we used the results generated at the project site, and for the results of AugCycleGAN, we implemented ourselves and trained until the results converge.

표 1은 WCT, Inker, AugCycleGAN 및 WCT를 사용한 본 모델의 사용자 연구 결과를 보여준다. 여기서 각 모델은 각각 스케치 단순화, 이미지 - 이미지 및 스타일 전송 도메인 모델의 최신 모델을 나타낸다. 표에 표시된 것처럼 사용자가 가장 선호하는 방법은 본 발명인 것을 알 수 있다. 본 발명의 모델은 MUNIT와 AugCycleGAN에 비해 입력 스케치의 원래 내용을 더 잘 보존하는 경향이 존재한다. Inker의 경우 선의 구조가 잘 유지되었지만 사용자는 선의 스타일과 선의 분위기를 결정하는 중요한 요소를 고려하지 않았기 때문에 본 발명의 결과를 더 선호한다.Table 1 shows the results of user studies of this model using WCT, Inker, AugCycleGAN and WCT. Here, each model represents the latest model of the sketch simplification, image-image and style transfer domain model respectively. As shown in the table, it can be seen that the user's most preferred method is the present invention. The model of the present invention tends to better preserve the original contents of the input sketch compared to MUNIT and AugCycleGAN. In the case of Inker, the structure of the line is well maintained, but the user prefers the result of the present invention because the line style and the important factors that determine the atmosphere of the line are not considered.

긍정답 비율Positive answer rate 우세한 이미지 숫자Dominant image number WCTWCT 0%0% 0(0%)0 (0%) InkerInker 31.1%31.1% 9(22.5%)9(22.5%) 확장된 CycleGANExtended CycleGAN 26.8%26.8% 18(20%)18 (20%) 본 발명The present invention 42.1%42.1% 19(47.5%)19 (47.5%)

또한, 본 발명의 디스타일화 모델의 성능을 평가하기 위한 다른 사용자 연구의 결과는 [표 2]에 제시되어있다. 본 실험에서는 디스타일화 모델의 결과를 Inker와 비교했다. 이 연구에서 선 스타일이 아닌 라인 구조의 품질을 조사하기 위해 라인 정규화부를 사용하여 선폭을 정규화하여 사용자가 선 두께에 따라 모델을 구별하지 못하도록 하였다. [표 2]에서 알 수 있듯이 본 발명의 모델은 실제 스케치 선 데이터가 없는 스케치 단순화 방법 중에서 가장 우수한 성능을 나타내는 것을 알 수 있다.In addition, the results of other user studies for evaluating the performance of the destylization model of the present invention are presented in [Table 2]. In this experiment, the results of the destylization model were compared with Inker. In this study, in order to investigate the quality of the line structure, not the line style, the line width was normalized using the line normalization unit so that the user could not distinguish the model according to the line thickness. As can be seen from [Table 2], it can be seen that the model of the present invention exhibits the best performance among sketch simplification methods without actual sketch line data.

긍정답 비율Positive answer rate 우세한 이미지 숫자Dominant image number InkerInker 40.6%40.6% 15(37.5%)15 (37.5%) 본 발명The present invention 59.4%59.4% 25(62.5%)25 (62.5%)

이상 설명된 본 발명에 따른 실시예는 컴퓨터 상에서 다양한 구성요소를 통하여 실행될 수 있는 컴퓨터 프로그램의 형태로 구현될 수 있으며, 이와 같은 컴퓨터 프로그램은 컴퓨터로 판독 가능한 매체에 기록될 수 있다. 이때, 매체는 컴퓨터로 실행 가능한 프로그램을 계속 저장하거나, 실행 또는 다운로드를 위해 저장하는 것일 수도 있다. 또한, 매체는 단일 또는 수개 하드웨어가 결합된 형태의 다양한 기록수단 또는 저장수단일 수 있는데, 어떤 컴퓨터 시스템에 직접 접속되는 매체에 한정되지 않고, 네트워크 상에 분산 존재하는 것일 수도 있다. 매체의 예시로는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium), 및 ROM, RAM, 플래시 메모리 등을 포함하여 프로그램 명령어가 저장되도록 구성된 것이 있을 수 있다. 또한, 다른 매체의 예시로, 애플리케이션을 유통하는 앱 스토어나 기타 다양한 소프트웨어를 공급 내지 유통하는 사이트, 서버 등에서 관리하는 기록매체 내지 저장매체도 들 수 있다.The embodiment according to the present invention described above may be implemented in the form of a computer program that can be executed through various components on a computer, and such a computer program may be recorded in a computer-readable medium. In this case, the medium may continue to store a program executable by a computer, or may be stored for execution or download. In addition, the medium may be a variety of recording means or storage means in a form in which a single piece of hardware or several pieces of hardware are combined, but is not limited to a medium directly connected to a computer system, and may be distributed on a network. Examples of media include magnetic media such as hard disks, floppy disks and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magnetic-optical media such as floptical disks, and And ROM, RAM, flash memory, and the like may be configured to store program instructions. In addition, examples of other media include an app store that distributes applications, a site that supplies or distributes various software, and a recording medium or storage medium managed by a server.

이상에서 본 발명이 구체적인 구성요소 등과 같은 특정 사항과 한정된 실시예 및 도면에 의하여 설명되었으나, 이는 본 발명의 보다 전반적인 이해를 돕기 위하여 제공된 것일 뿐, 본 발명이 상기 실시예에 한정되는 것은 아니며, 본 발명이 속하는 기술분야에서 통상적인 지식을 가진 자라면 이러한 기재로부터 다양한 수정과 변경을 꾀할 수 있다.In the above, the present invention has been described by specific matters such as specific elements and limited embodiments and drawings, but this is provided only to help a more general understanding of the present invention, and the present invention is not limited to the above embodiments. Anyone with ordinary knowledge in the technical field to which the invention belongs can make various modifications and changes from these descriptions.

따라서, 본 발명의 사상은 상기 설명된 실시예에 국한되어 정해져서는 아니 되며, 후술하는 특허청구범위뿐만 아니라 이 특허청구범위와 균등한 또는 이로부터 등가적으로 변경된 모든 범위는 본 발명의 사상의 범주에 속한다고 할 것이다.Accordingly, the spirit of the present invention is limited to the above-described embodiments and should not be defined, and all ranges equivalent to or equivalently changed from the claims to be described later as well as the claims to be described later are the scope of the spirit of the present invention. It will be said to belong to.

Claims (17)

주어진 라인 이미지로부터 스케치 이미지를 합성하여 스케치-라인 합성 쌍(pair) 데이터를 생성하는 쌍 데이터 생성부;
상기 쌍 데이터에 의해 훈련된 디스타일화 모델을 이용하여 거친 스케치(rough sketch) 이미지에서 텍스처(texture)를 제거하여 라인 구조(line structure)를 추출하는 디스타일화부;
스타일화 모델을 이용하여 상기 추출된 라인 구조로 이루어진 이미지에 라인 스타일(line style)을 적용하여 스타일을 부가하는 스타일화부;
를 포함하고,
상기 쌍 데이터 생성부는,
래스터 라인 이미지를 벡터 이미지화 하여 획득한 복수의 제어점을 기초로 노이즈 스트로크를 생성하는,
스타일에 기초한 스케치-라인 변환 시스템.
A pair data generator for synthesizing a sketch image from a given line image to generate sketch-line combination pair data;
A destylization unit for extracting a line structure by removing texture from a rough sketch image using the destylization model trained by the paired data;
A styling unit for adding a style by applying a line style to the extracted line structure image using a styling model;
Including,
The pair data generation unit,
Generates a noise stroke based on a plurality of control points obtained by converting a raster line image into a vector image,
Sketch-to-line conversion system based on style.
제 1 항에 있어서,
상기 쌍 데이터 생성부는,
래스터 라인 이미지로부터 벡터 이미지를 생성하여 복수개의 제어점을 이용하여 커브를 정의하고, 상기 복수개의 제어점에 노이즈를 부가하여 새로운 커브를 생성하며, 상기 커브를 복수개의 작은 커브로 분할하여 노이즈를 부가함으로서 노이즈 스트로크를 생성하는, 스타일에 기초한 스케치-라인 변환 시스템.
The method of claim 1,
The pair data generation unit,
Noise is generated by creating a vector image from a raster line image and defining a curve using a plurality of control points, adding noise to the plurality of control points to create a new curve, and adding noise by dividing the curve into a plurality of small curves. A style-based sketch-to-line conversion system that creates strokes.
제 1 항에 있어서,
상기 디스타일화부는 텍스처를 제거하는 텍스처 제거부 및 라인 구조를 추출하는 라인 구조 추출부를 포함하는, 스타일에 기초한 스케치-라인 변환 시스템.
The method of claim 1,
The destylization unit includes a texture removal unit to remove a texture and a line structure extraction unit to extract a line structure, based on a style sketch-line conversion system.
제 3 항에 있어서,
상기 디스타일화부는, 그라운드 트루스(ground truth) 라인 이미지의 데이터 확장(data augmentation)으로 인한 라인 폭의 변형이 발생하지 않도록 라인 폭을 정규화하는 라인 정규화부를 더 포함하는, 스타일에 기초한 스케치-라인 변환 시스템.
The method of claim 3,
The destylization unit further includes a line normalization unit that normalizes the line width so that the line width is not deformed due to data augmentation of the ground truth line image. Sketch-line conversion based on style system.
제 3 항에 있어서,
상기 텍스처 제거부는 백그라운드 색상 혹은 스케치 라인 색상을 스케치로부터 제거하는, 스타일에 기초한 스케치-라인 변환 시스템.
The method of claim 3,
The texture removal unit removes the background color or the sketch line color from the sketch, a style-based sketch-line conversion system.
제 3 항에 있어서,
상기 텍스처 제거부는 텍스처 확장된(texture augmented) 합성 쌍 데이터를 이용하여 훈련되고, 상기 라인 구조 추출부는 합성 쌍 데이터를 이용하여 훈련되는, 스타일에 기초한 스케치-라인 변환 시스템.
The method of claim 3,
The texture removal unit is trained using texture augmented composite pair data, and the line structure extractor is trained using composite pair data.
제 1 항에 있어서,
상기 라인 구조는 상기 거친 스케치의 스타일과 관계없는 라인의 중심인, 스타일에 기초한 스케치-라인 변환 시스템.
The method of claim 1,
The line structure is a style-based sketch-line conversion system, which is the center of a line unrelated to the style of the rough sketch.
디스타일화 모델을 이용하여 거친 스케치(rough sketch) 이미지에서 텍스처(texture)를 제거하여 라인 구조(line structure)를 추출하는 디스타일화 단계; 및
스타일화 모델을 이용하여 상기 추출된 라인 구조로 이루어진 이미지에 라인 스타일(line style)을 적용하여 스타일을 부가하고, 래스터 라인 이미지를 벡터 이미지화 하여 획득한 복수의 제어점을 기초로 노이즈 스트로크를 생성하는 스타일화 단계; 를 포함하는 스타일에 기초한 스케치-라인 변환 방법.
A destylization step of extracting a line structure by removing texture from a rough sketch image using a destylization model; And
A style that applies a line style to an image composed of the extracted line structure using a styling model to add a style, and generates a noise stroke based on a plurality of control points obtained by converting a raster line image into a vector image. The stage of fire; Sketch-line conversion method based on the style including a.
제 8 항에 있어서,
상기 디스타일화 단계는,
텍스처를 제거하는 텍스처 제거 단계; 및
라인 구조를 추출하는 라인 구조 추출 단계;를 포함하는, 스타일에 기초한 스케치-라인 변환 방법.
The method of claim 8,
The destylization step,
A texture removal step of removing texture; And
A line structure extraction step of extracting a line structure; including, a sketch-line conversion method based on a style.
제 9 항에 있어서,
상기 디스타일화 단계는, 그라운드 트루스(ground truth) 라인 이미지의 데이터 확장(data augmentation)으로 인한 라인 폭의 변형이 발생하지 않도록 라인 폭을 정규화하는 라인 정규화 단계;를 더 포함하는, 스타일에 기초한 스케치-라인 변환 방법.
The method of claim 9,
The destyling step further comprises a line normalization step of normalizing the line width so that the line width is not deformed due to data augmentation of the ground truth line image. -Line conversion method.
제 9 항에 있어서,
상기 텍스처 제거 단계는 텍스처 확장된(texture augmented) 합성 쌍 데이터를 이용하여 훈련되고, 상기 라인 구조 추출 단계는 합성 쌍 데이터를 이용하여 훈련되는, 스타일에 기초한 스케치-라인 변환 방법.
The method of claim 9,
Wherein the texture removal step is trained using texture augmented composite pair data, and the line structure extraction step is trained using composite pair data.
제 9 항에 있어서,
상기 텍스처 제거 단계는 백그라운드 색상 혹은 스케치 라인 색상을 스케치로부터 제거하는, 스타일에 기초한 스케치-라인 변환 방법.
The method of claim 9,
The texture removal step removes a background color or a sketch line color from the sketch.
주어진 라인 이미지로부터 스케치 이미지를 합성하여 스케치-라인 합성 쌍(pair) 데이터를 생성하는 쌍 데이터 생성 단계;
상기 쌍 데이터에 의해 훈련된 디스타일화 모델을 이용하여 거친 스케치(rough sketch) 이미지에서 텍스처(texture)를 제거하여 라인 구조(line structure)를 추출하는 디스타일화 단계; 및
스타일화 모델을 이용하여 상기 추출된 라인 구조로 이루어진 이미지에 라인 스타일(line style)을 적용하여 스타일을 부가하는 스타일화 단계; 를 포함하고,
상기 쌍 데이터 생성 단계는,
래스터 라인 이미지를 벡터 이미지화 하여 획득한 복수의 제어점을 기초로 노이즈 스트로크를 생성하는,
스타일에 기초한 스케치-라인 변환 방법.
A pair data generation step of synthesizing a sketch image from a given line image to generate sketch-line combination pair data;
A destylization step of extracting a line structure by removing texture from a rough sketch image using a destylization model trained by the paired data; And
A styling step of adding a style by applying a line style to the extracted line structure image using a styling model; Including,
The pair data generation step,
Generates a noise stroke based on a plurality of control points obtained by converting a raster line image into a vector image,
Style-based sketch-to-line conversion method.
제 13 항에 있어서,
상기 쌍 데이터 생성 단계는,
래스터 라인 이미지로부터 벡터 이미지를 생성하여 복수개의 제어점을 이용하여 커브를 정의하고, 상기 복수개의 제어점에 노이즈를 부가하여 새로운 커브를 생성하며, 상기 커브를 복수개의 작은 커브로 분할하여 노이즈를 부가함으로서 노이즈 스트로크를 생성하는, 스타일에 기초한 스케치-라인 변환 방법.
The method of claim 13,
The pair data generation step,
Noise is generated by creating a vector image from a raster line image and defining a curve using a plurality of control points, adding noise to the plurality of control points to create a new curve, and adding noise by dividing the curve into a plurality of small curves. A style-based sketch-to-line conversion method that creates a stroke.
제 13 항에 있어서,
상기 디스타일화 단계는,
텍스처를 제거하는 텍스처 제거 단계; 및
라인 구조를 추출하는 라인 구조 추출 단계;를 포함하는, 스타일에 기초한 스케치-라인 변환 방법.
The method of claim 13,
The destylization step,
A texture removal step of removing texture; And
A line structure extraction step of extracting a line structure; including, a sketch-line conversion method based on a style.
제 13 항에 있어서,
상기 디스타일화 단계는, 그라운드 트루스(ground truth) 라인 이미지의 데이터 확장(data augmentation)으로 인한 라인 폭의 변형이 발생하지 않도록 라인 폭을 정규화하는 라인 정규화 단계;를 더 포함하는, 스타일에 기초한 스케치-라인 변환 방법.
The method of claim 13,
The destyling step further comprises a line normalization step of normalizing the line width so that the line width is not deformed due to data augmentation of the ground truth line image. -Line conversion method.
제 8 항 내지 제 16 항 중 어느 한 항에 따른 방법을 실행하기 위해 컴퓨터 판독 가능한 기록 매체에 기록된 컴퓨터 프로그램.A computer program recorded on a computer-readable recording medium for executing the method according to any one of claims 8 to 16.
KR1020190096919A 2019-08-08 2019-08-08 Method, system and computer program for sketch-to-line translation KR102197653B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190096919A KR102197653B1 (en) 2019-08-08 2019-08-08 Method, system and computer program for sketch-to-line translation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190096919A KR102197653B1 (en) 2019-08-08 2019-08-08 Method, system and computer program for sketch-to-line translation

Publications (1)

Publication Number Publication Date
KR102197653B1 true KR102197653B1 (en) 2021-01-04

Family

ID=74127345

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190096919A KR102197653B1 (en) 2019-08-08 2019-08-08 Method, system and computer program for sketch-to-line translation

Country Status (1)

Country Link
KR (1) KR102197653B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112837396A (en) * 2021-01-29 2021-05-25 深圳市天耀创想网络科技有限公司 Line draft generation method and device based on machine learning
KR20220112608A (en) * 2021-02-04 2022-08-11 (주)비케이 Method for changing style and replaying of vector image
CN117237478A (en) * 2023-11-09 2023-12-15 北京航空航天大学 Sketch-to-color image generation method, sketch-to-color image generation system, storage medium and processing terminal

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018132855A (en) * 2017-02-14 2018-08-23 国立大学法人電気通信大学 Image style conversion apparatus, image style conversion method and image style conversion program

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018132855A (en) * 2017-02-14 2018-08-23 国立大学法人電気通信大学 Image style conversion apparatus, image style conversion method and image style conversion program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Shuai Yang ET AL:"TET-GAN: Text Effects Transfer via Stylization and Destylization", In AAAI Conference on Artificial Intelligence, 17 July 2019(2019.07.17.) 1부.* *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112837396A (en) * 2021-01-29 2021-05-25 深圳市天耀创想网络科技有限公司 Line draft generation method and device based on machine learning
CN112837396B (en) * 2021-01-29 2024-05-07 深圳市天耀创想网络科技有限公司 Line manuscript generation method and device based on machine learning
KR20220112608A (en) * 2021-02-04 2022-08-11 (주)비케이 Method for changing style and replaying of vector image
KR102573822B1 (en) * 2021-02-04 2023-09-04 (주)비케이 Method for changing style and replaying of vector image
CN117237478A (en) * 2023-11-09 2023-12-15 北京航空航天大学 Sketch-to-color image generation method, sketch-to-color image generation system, storage medium and processing terminal
CN117237478B (en) * 2023-11-09 2024-02-09 北京航空航天大学 Sketch-to-color image generation method, sketch-to-color image generation system, storage medium and processing terminal

Similar Documents

Publication Publication Date Title
Ferreira et al. Learning to dance: A graph convolutional adversarial network to generate realistic dance motions from audio
KR102197653B1 (en) Method, system and computer program for sketch-to-line translation
CN111898696A (en) Method, device, medium and equipment for generating pseudo label and label prediction model
CN108961369A (en) The method and apparatus for generating 3D animation
Wang et al. 3D human motion editing and synthesis: A survey
US20230267686A1 (en) Subdividing a three-dimensional mesh utilizing a neural network
CN116309992A (en) Intelligent meta-universe live person generation method, equipment and storage medium
Arantes et al. Csc-gan: Cycle and semantic consistency for dataset augmentation
CN113408694A (en) Weight demodulation for generative neural networks
Jo et al. Generative artificial intelligence and building design: early photorealistic render visualization of façades using local identity-trained models
US20220375223A1 (en) Information generation method and apparatus
Jayanthi et al. Reviving Cultural Heritage: Advancements in Pose Recognition and 3D Model Reconstruction for Indian Classical Dance Using AI and Augmented Reality Technologies
CN117132777B (en) Image segmentation method, device, electronic equipment and storage medium
CN117237542B (en) Three-dimensional human body model generation method and device based on text
KR102197652B1 (en) Method, apparatus and computer program for generating training image of sketch simplification
Li et al. Game Image Quality Enhancement Algorithm based on Generative Adversarial Network and Knowledge Distillation
Zhang et al. Customizable gan: Customizable image synthesis based on adversarial learning
Liu et al. Dual stage augmented colorful texture synthesis from hand sketch
Fang et al. Fashion-sketcher: A model for producing fashion sketches of multiple categories
WO2024066549A1 (en) Data processing method and related device
Zhao Art visual image transmission method based on cartesian genetic programming
Wang Fast Realistic 3D Face Modeling Algorithm for Film and Television Animation
Basso New Interpretation Tools and Metamorphosis of the Image, How the Self-synthesizing of Visual Elements Influences the Aesthetic Evolution
KR20240086003A (en) Method and apparatus for improving realism of rendered image
Liu et al. Fine-Grained Multi-modal Fundus Image Generation Based on Diffusion Models for Glaucoma Classification

Legal Events

Date Code Title Description
N231 Notification of change of applicant
GRNT Written decision to grant