KR20230006077A - Recording Medium - Google Patents

Recording Medium Download PDF

Info

Publication number
KR20230006077A
KR20230006077A KR1020210086808A KR20210086808A KR20230006077A KR 20230006077 A KR20230006077 A KR 20230006077A KR 1020210086808 A KR1020210086808 A KR 1020210086808A KR 20210086808 A KR20210086808 A KR 20210086808A KR 20230006077 A KR20230006077 A KR 20230006077A
Authority
KR
South Korea
Prior art keywords
face
image data
face image
dataset
recording medium
Prior art date
Application number
KR1020210086808A
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 KR1020210086808A priority Critical patent/KR20230006077A/en
Publication of KR20230006077A publication Critical patent/KR20230006077A/en

Links

Images

Classifications

    • G06T3/10
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/0056Geometric image transformation in the plane of the image the transformation method being selected according to the characteristics of the input image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • G06T7/0014Biomedical image inspection using an image reference approach
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Abstract

According to one embodiment of the present invention, a recording medium in which a program for operating a face swap service providing device is recorded is provided. The recording medium comprises: a video data management function of managing source video data including a converted face image of a face to be converted and target video data including target content corresponding to the converted face image; a frame extraction function of extracting and storing a plurality of frames from the source video data and the target video data; a face image identification function of obtaining face image data by cropping a face video area identified in each frame; a dataset pre-processing function of generating a face image dataset by combining first face image data obtained from the target video data with second face image data obtained from the source video data, based on the face image data; and a learning modeling function of generating face conversion video data by applying a face swap video generation algorithm using the face image dataset and a dataset of the converted face image as input data. According to the present invention, more natural and sophisticated face conversion is possible to create added value such as special effects. Therefore, the development potential of the overall video production industry can be increased.

Description

기록매체{Recording Medium}Recording Medium {Recording Medium}

본 발명은 인공지능 학습 기반으로 변환하고자 하는 얼굴 이미지 데이터를 소스 영상으로부터 추출하여 타깃 영상의 등장인물 얼굴인 타깃 콘텐츠에 적용하고 변환하는 서비스에 관한 것으로, 보다 상세하게는 소스 영상으로부터 추출한 소스 얼굴 이미지 데이터와 타깃 영상으로부터 추출한 타깃 얼굴 이미지 데이터의 전처리를 통한 데이터 세트를 입력 데이터로 이용하여 페이스 스왑 영상을 획득하는 페이스 스왑 서비스 제공 장치의 동작을 위한 프로그램을 기록한 기록매체에 관한 것이다.The present invention relates to a service for extracting face image data to be converted from a source image based on artificial intelligence learning, applying the extracted face image data to target content, which is a character face of a target image, and converting the data, and more particularly, to a source face image extracted from the source image. A recording medium recording a program for operating a face swap service providing apparatus for obtaining a face swap image using a data set through preprocessing of data and target face image data extracted from a target image as input data.

일반적으로, 딥러닝(Deep Learning)을 이용하여 원본 이미지나 동영상 위에 다른 영상을 중첩하거나 결합하여 원본과는 다른 콘텐츠를 생성하는 기술인 딥페이크(Deepfake)는 영상 산업에 적극 활용되고 있다. 딥페이크라는 용어는 유명 배우의 얼굴로 조작된 가짜 동영상을 통한 이슈화를 야기한 온라인 커뮤니티 회원 정보와 관련되어 유래되었다. 이후, 온라인 커뮤니티와 SNS를 중심으로 급속히 확산된 딥페이크 콘텐츠는 딥러닝 기술의 발전에 맞추어 더욱 빠르고 정교하게 생성되고 있다.In general, deepfake, a technology that creates content different from the original by superimposing or combining another image on top of an original image or video using deep learning, is actively used in the video industry. The term deepfake originated in relation to online community member information that caused an issue through a fake video manipulated with the face of a famous actor. Since then, deepfake content, which has rapidly spread around online communities and SNS, is being created more quickly and elaborately in line with the development of deep learning technology.

이같은 딥페이크 콘텐츠는 오픈 소스 형태의 페이스 스왑 영상 생성 알고리즘이 배포되면서, 보다 정교하게 변환하고자 하는 얼굴 이미지 데이터를 이용하여 다른 인물이 등장하는 영상의 얼굴에 합성하여 타깃 콘텐츠를 변환하여 영상 데이터를 생성할 수 있다. As for such deepfake content, an open source face swap image generation algorithm is distributed, using the face image data to be converted more elaborately and combining it with the face of a video in which another person appears, converting the target content to generate image data. can do.

하지만 상기 페이스 스왑 영상 생성 알고리즘의 입력 데이터로 사용되는 소스 얼굴 이미지 데이터와 타깃 얼굴 이미지 데이터의 얼굴 형태, 표정, 촬영 각도 등의 현저한 상이함으로 인해 학습을 통한 최종 출력 영상 데이터에서 합성된 얼굴의 부자연스러움과 디테일의 모순, 액세서리 미반영이 발생될 수 있는 한계가 있다.However, due to the significant difference between the source face image data used as input data of the face swap image generation algorithm and the target face image data, such as face shape, expression, and shooting angle, the face synthesized from the final output image data through learning is unnatural. There is a limit that can cause contradiction in details and accessories, and non-reflection of accessories.

본 발명은 상기한 종래의 문제점을 해결하고자 안출된 것으로, 페이스 스왑 영상 생성 알고리즘을 이용함에 있어서, 변환하고자 하는 소스 영상의 얼굴 이미지 데이터와 얼굴 변경이 될 타깃 콘텐츠(대상인물)가 포함되는 타깃 영상 얼굴 이미지 데이터를 결합하여 데이터셋을 생성하고, 이를 입력 데이터로 이용함으로써 정교한 얼굴 변환을 통해 결과물의 자연스러움을 보장하며 얼굴 변환 처리의 효율성을 극대화하는 페이스 스왑 서비스 제공 장치의 동작을 위한 프로그램을 기록한 기록매체를 제공하는데 그 목적이 있다.The present invention has been made to solve the above conventional problems, and in using a face swap image generation algorithm, a target image including face image data of a source image to be converted and target content (target person) to be changed. By combining facial image data to create a dataset and using it as input data, naturalness of the result is guaranteed through sophisticated face transformation and a program for operation of the face swap service providing device that maximizes the efficiency of face transformation processing is recorded. Its purpose is to provide a recording medium.

상기 과제를 해결하기 위한 본 발명의 실시 예에 따른 기록매체는, 변환하고자 하는 변환 얼굴 이미지를 포함하는 소스 영상 데이터 및 상기 변환 얼굴 이미지와 대응되는 타깃 콘텐츠를 포함하는 타깃 영상 데이터를 관리하는 영상 데이터 관리 기능; 상기 소스 영상 데이터 및 상기 타깃 영상 데이터로부터 복수개의 프레임을 추출하여 저장하는 프레임 추출부; 각각의 상기 프레임에서 식별되는 얼굴 이미지 영역을 크롭핑하여 얼굴 이미지 데이터를 획득하는 얼굴 이미지 식별 기능; 상기 얼굴 이미지 데이터에 기반하여, 상기 타깃 영상 데이터로부터 획득되는 제1 얼굴 이미지 데이터를, 상기 소스 영상 데이터로부터 획득되는 제2 얼굴 이미지 데이터에 결합하여 얼굴 이미지 데이터셋을 생성하는 데이터셋 전처리 기능; 및 상기 얼굴 이미지 데이터셋과 변환 얼굴 이미지 데이터셋을 입력 데이터로 이용하여 페이스 스왑 영상 생성 알고리즘을 적용한 얼굴 변환 영상 데이터를 생성하는 학습 모델링 기능;을 포함하는 페이스 스왑 서비스 제공 장치의 동작을 위한 프로그램을 기록한 기록매체이다.A recording medium according to an embodiment of the present invention for solving the above problems is image data for managing source image data including a transformed face image to be transformed and target image data including target content corresponding to the transformed face image. management function; a frame extraction unit extracting and storing a plurality of frames from the source image data and the target image data; a face image identification function for acquiring face image data by cropping a face image region identified in each of the frames; a dataset pre-processing function generating a face image dataset by combining first face image data obtained from the target image data with second face image data obtained from the source image data, based on the face image data; and a learning modeling function for generating face transformation image data to which a face swap image generation algorithm is applied using the face image dataset and the transformed face image dataset as input data. It is a recording medium.

본 발명의 실시 예에 따르면, 페이스 스왑 영상 생성 알고리즘을 이용함에 있어서, 변환하고자 하는 소스 영상의 얼굴 이미지 데이터와 얼굴 변경이 될 타깃 콘텐츠(대상인물)가 포함되는 타깃 영상 얼굴 이미지 데이터를 결합하여 데이터셋을 생성함으로써, 변환 처리되는 얼굴을 포함하는 영상의 자연스러움과 사실감을 극대화하고 변환 영상 처리를 위한 시스템 리소스를 효율적으로 사용할 수 있다. 또한 보다 자연스럽고 정교한 얼굴 변환을 가능하게 함으로써 특수효과 등의 부가가치를 창출하여 영상 제작 산업 전반에 발전 가능성을 높일 수 있다.According to an embodiment of the present invention, in using a face swap image generation algorithm, face image data of a source image to be converted and target image face image data including target content (target person) to be changed are combined to obtain data By creating a set, naturalness and realism of an image including a face to be transformed can be maximized and system resources for processing a transformed image can be efficiently used. In addition, by enabling more natural and sophisticated face transformation, added value such as special effects can be created, thereby increasing the possibility of development in the video production industry as a whole.

도 1은 본 발명의 실시 예에 따른 전체 시스템을 개략적으로 도시한 개념도이다.
도 2는 본 발명의 실시 예에 따른 타깃 콘텐츠 변환 서비스 제공 장치를 설명하기 위한 블록도이다.
도 3은 본 발명의 실시 예에 따른 타깃 콘텐츠 변환 서비스 제공 장치의 동작 방법을 설명하기 위한 흐름도이다.
1 is a conceptual diagram schematically illustrating an entire system according to an embodiment of the present invention.
2 is a block diagram illustrating an apparatus for providing a target content conversion service according to an embodiment of the present invention.
3 is a flowchart illustrating an operating method of an apparatus for providing a target content conversion service according to an embodiment of the present invention.

이하의 내용은 단지 본 발명의 원리를 예시한다. 그러므로 당업자는 비록 본 명세서에 명확히 설명되거나 도시되지 않았지만 본 발명의 원리를 구현하고 본 발명의 개념과 범위에 포함된 다양한 장치와 방법을 발명할 수 있는 것이다. 또한, 본 명세서에 열거된 모든 조건부 용어 및 실시 예들은 원칙적으로, 본 발명의 개념이 이해되도록 하기 위한 목적으로만 명백히 의도되고, 이와 같이 특별히 열거된 실시 예들 및 상태들에 제한적이지 않는 것으로 이해되어야 한다.The following merely illustrates the principles of the present invention. Therefore, those skilled in the art can invent various devices and methods that embody the principles of the present invention and fall within the concept and scope of the present invention, even though not explicitly described or illustrated herein. In addition, all conditional terms and embodiments listed in this specification are, in principle, expressly intended only for the purpose of understanding the concept of the present invention, and should be understood not to be limited to such specifically listed embodiments and conditions. do.

또한, 본 발명의 원리, 관점 및 실시 예들 뿐만 아니라 특정 실시 예를 열거하는 모든 상세한 설명은 이러한 사항의 구조적 및 기능적 균등물을 포함하도록 의도되는 것으로 이해되어야 한다. 또한 이러한 균등물들은 현재 공지된 균등물뿐만 아니라 장래에 개발될 균등물 즉 구조와 무관하게 동일한 기능을 수행하도록 발명된 모든 소자를 포함하는 것으로 이해되어야 한다.In addition, it should be understood that all detailed descriptions reciting specific embodiments, as well as principles, aspects and embodiments of the present invention, are intended to encompass structural and functional equivalents of these matters. In addition, it should be understood that such equivalents include not only currently known equivalents but also equivalents developed in the future, that is, all devices invented to perform the same function regardless of structure.

따라서, 예를 들어, 본 명세서의 블록도는 본 발명의 원리를 구체화하는 예시적인 회로의 개념적인 관점을 나타내는 것으로 이해되어야 한다. 이와 유사하게, 모든 흐름도, 상태 변환도, 의사 코드 등은 컴퓨터가 판독 가능한 매체에 실질적으로 나타낼 수 있고 컴퓨터 또는 프로세서가 명백히 도시되었는지 여부를 불문하고 컴퓨터 또는 프로세서에 의해 수행되는 다양한 프로세스를 나타내는 것으로 이해되어야 한다.Thus, for example, the block diagrams herein should be understood to represent conceptual views of illustrative circuits embodying the principles of the present invention. Similarly, all flowcharts, state transition diagrams, pseudo code, etc., are meant to be tangibly represented on computer readable media and represent various processes performed by a computer or processor, whether or not the computer or processor is explicitly depicted. It should be.

또한 프로세서, 제어 또는 이와 유사한 개념으로 제시되는 용어의 명확한 사용은 소프트웨어를 실행할 능력을 가진 하드웨어를 배타적으로 인용하여 해석되어서는 아니 되고, 제한 없이 디지털 신호 프로세서(DSP) 하드웨어, 소프트웨어를 저장하기 위한 롬(ROM), 램(RAM) 및 비휘발성 메모리를 암시적으로 포함하는 것으로 이해되어야 한다. 주지관용의 다른 하드웨어도 포함될 수 있다.In addition, the explicit use of terms presented as processor, control, or similar concepts should not be construed as exclusively citing hardware capable of executing software, and without limitation, digital signal processor (DSP) hardware, ROM for storing software (ROM), random access memory (RAM) and non-volatile memory. Other hardware for the governor's use may also be included.

상술한 목적, 특징 및 장점은 첨부된 도면과 관련한 다음의 상세한 설명을 통하여 보다 분명해질 것이며, 그에 따라 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 것이다. 또한, 본 발명을 실시함에 있어서 본 발명과 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에 그 상세한 설명을 생략하기로 한다.The above objects, features and advantages will become more apparent through the following detailed description in conjunction with the accompanying drawings, and accordingly, those skilled in the art to which the present invention belongs can easily implement the technical idea of the present invention. There will be. In addition, in carrying out the present invention, if it is determined that the detailed description of the known technology related to the present invention may unnecessarily obscure the subject matter of the present invention, the detailed description will be omitted.

본 출원에서 사용한 용어는 단지 특정한 실시 예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.Terms used in this application are only used to describe specific embodiments, and are not intended to limit the present invention. Singular expressions include plural expressions unless the context clearly dictates otherwise. In this application, the terms "include" or "have" are intended to designate that there is a feature, number, step, operation, component, part, or combination thereof described in the specification, but one or more other features It should be understood that the presence or addition of numbers, steps, operations, components, parts, or combinations thereof is not precluded.

이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시 예를 보다 상세하게 설명하고자 한다. 본 발명을 설명함에 있어 전체적인 이해를 용이하게 하기 위하여 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, with reference to the accompanying drawings, preferred embodiments of the present invention will be described in more detail. In order to facilitate overall understanding in the description of the present invention, the same reference numerals are used for the same components in the drawings, and redundant descriptions of the same components are omitted.

도 1은 본 발명의 실시 예에 따른 전체 시스템을 개략적으로 도시한 개념도이다.1 is a conceptual diagram schematically illustrating an entire system according to an embodiment of the present invention.

도 1을 참조하면, 본 발명의 일 실시 예에 따른 시스템은 서비스 제공 장치(100), 사용자 단말(200), 영상 데이터 공급 단말(300)을 포함할 수 있다.Referring to FIG. 1 , a system according to an embodiment of the present invention may include a service providing device 100 , a user terminal 200 , and an image data supply terminal 300 .

보다 구체적으로, 서비스 제공 장치(100)와 사용자 단말(200), 영상 데이터 공급 단말(300)은 공중망(Public network)과의 연결을 통해 유선 및 무선 중 하나 이상으로 연결되어 데이터를 송수신할 수 있다. 상기 공중망은 국가 혹은 통신 기간 사업자가 구축 및 관리하는 통신망으로, 일반적으로 전화망, 데이터망, CATV망 및 이동 통신망 등을 포함하여 불특정 다수의 일반인이 타 통신망이나 인터넷에 접속 가능하도록 연결 서비스를 제공한다. 본 발명에서는 상기 공중망을 네트워크로 대체하여 표기한다.More specifically, the service providing device 100, the user terminal 200, and the video data supply terminal 300 may be connected to one or more of wired and wireless through a connection to a public network to transmit and receive data. . The public network is a communication network established and managed by the state or telecommunications infrastructure operators, and provides connection services so that an unspecified number of ordinary people can access other communication networks or the Internet, including generally telephone networks, data networks, CATV networks, and mobile communication networks. . In the present invention, the public network is replaced with a network.

또한, 서비스 제공 장치(100)는 사용자 단말(200), 영상 데이터 공급 단말(300)과 각 통신망에 상응하는 프로토콜로 통신하기 위한 각각의 통신 모듈을 포함할 수 있다.In addition, the service providing device 100 may include each communication module for communicating with the user terminal 200 and the image data supply terminal 300 using a protocol corresponding to each communication network.

서비스 제공 장치(100)는 영상 데이터 또는 이미지 데이터에 포함되는 특정 사람의 얼굴을 타 영상 데이터에 포함되는 다른 사람의 얼굴에 매칭하여 변환할 수 있다. 상기 서비스 제공 장치(100)는 변환하고자 하는 사람의 얼굴을 포함하는 영상 데이터인 소스 영상 데이터를 이용하여 프레임별 얼굴 영역의 이미지 데이터를 확보할 수 있다. 상기 서비스 제공 장치(100)는 얼굴을 바꾸고자 하는 영상 데이터인 타깃 영상 데이터(목적 영상 데이터)를 이용하여 프레임별 얼굴 영역의 이미지 데이터를 확보할 수 있다. 서비스 제공 장치(100)는 소스 영상의 얼굴 이미지를 타깃 영상(목적 영상)의 다른 사람 얼굴 이미지에 적용하여 바꾸기 위한 딥페이크(Deepfake) 시스템을 제공할 수 있다.The service providing apparatus 100 may match and convert a face of a specific person included in image data or image data to a face of another person included in other image data. The service providing apparatus 100 may secure image data of face regions for each frame using source image data, which is image data including a face of a person to be transformed. The service providing apparatus 100 may secure image data of a face region for each frame using target image data (target image data), which is image data to change a face. The service providing apparatus 100 may provide a deepfake system for changing a face image of a source image by applying it to another person's face image of a target image (target image).

사용자 단말(200)은 특정 사람의 얼굴로 변환된 타깃 영상(목적 영상) 데이터를 상기 서비스 제공 장치(100)로부터 제공 받고 이를 출력할 수 있다.The user terminal 200 may receive target image (target image) data converted into a face of a specific person from the service providing device 100 and output it.

영상 데이터 공급 단말(300)은 변환하고자 하는 얼굴을 포함하는 소스 영상 데이터를 상기 서비스 제공 장치(100)에 제공할 수 있다. 또한 사용자 단말(200)은 변환 대상이 되는 얼굴을 포함하는 타깃 영상 데이터(목적 영상 데이터)를 상기 서비스 제공 장치(100)에 제공할 수 있다.The image data supply terminal 300 may provide source image data including a face to be transformed to the service providing device 100 . In addition, the user terminal 200 may provide target image data (target image data) including a face to be converted to the service providing device 100 .

서비스 제공 장치(100)는 특정 얼굴로 변환 된 영상 데이터를 생성하고 이를 제공하기 위하여 사용자 단말(200), 영상 데이터 공급 단말(300)과 유선/무선 네트워크를 통해 연결될 수 있다. 상기 네트워크에 연결된 장치 또는 단말은 사전 설정된 네트워크 채널을 통해 상호간 통신을 수행할 수 있다.The service providing device 100 may be connected to the user terminal 200 and the video data supply terminal 300 through a wired/wireless network to generate and provide video data converted into a specific face. Devices or terminals connected to the network may communicate with each other through a preset network channel.

여기서 상기 네트워크는 근거리 통신망(Local Area Network; LAN), 광역 통신망(Wide Area Network; WAN), 부가가치 통신망(Value Added Network; VAN), 개인 근거리 무선통신(Personal Area Network; PAN), 이동 통신망(Mobile radio communication network) 또는 위성 통신망 등과 같은 모든 종류의 유/무선 네트워크로 구현될 수 있다.Here, the network includes a local area network (LAN), a wide area network (WAN), a value added network (VAN), a personal area network (PAN), and a mobile communication network (Mobile). It can be implemented in all types of wired/wireless networks such as radio communication networks) or satellite communication networks.

그리고 본 명세서에서 설명되는 사용자 단말(200) 또는 영상 데이터 공급 단말(300)은 PC(personal computer), 노트북 컴퓨터(laptop computer), 휴대폰(Mobile phone), 태블릿 PC(Tablet PC), PDA(Personal Digital Assistants), PMP(Portable Multimedia Player) 등이 포함될 수 있다.And the user terminal 200 or the image data supply terminal 300 described in this specification is a PC (personal computer), a laptop computer (laptop computer), a mobile phone (Mobile phone), a tablet PC (Tablet PC), a PDA (Personal Digital Assistants), PMP (Portable Multimedia Player), and the like may be included.

또한 서비스 제공 장치(100), 사용자 단말(200), 영상 데이터 공급 단말(300)은 상기 장치 구분에 한정되지 않고 데이터 처리 및 저장, 관리 기능을 고도화하여 확장할 수 있는 서버 시스템 관련 장치를 포함할 수 있다. In addition, the service providing device 100, the user terminal 200, and the video data supply terminal 300 are not limited to the above device classification and may include a server system-related device that can enhance and expand data processing, storage, and management functions. can

도 2는 본 발명의 실시 예에 따른 타깃 콘텐츠 변환 서비스 제공 장치를 설명하기 위한 블록도이다.2 is a block diagram illustrating an apparatus for providing a target content conversion service according to an embodiment of the present invention.

도 2를 참조하면, 본 발명의 실시 예에 따른 서비스 제공 장치(100)는 제어부(110), 제1 영상 데이터 관리부(120), 제2 영상 데이터 관리부(130), 프레임 추출부(140), 얼굴 이미지 식별부(150), 데이터셋 전처리부(160), 학습 모델링부(170), 통신부(180)를 포함할 수 있다. 상기 데이터셋 전처리부(160)는 제1 얼굴 유사도 선별부(161), 데이터셋 유사도 선별부(162)를 포함할 수 있다.Referring to FIG. 2 , the service providing device 100 according to an embodiment of the present invention includes a control unit 110, a first image data management unit 120, a second image data management unit 130, a frame extraction unit 140, It may include a face image identification unit 150, a dataset pre-processing unit 160, a learning modeling unit 170, and a communication unit 180. The dataset pre-processing unit 160 may include a first face similarity selection unit 161 and a dataset similarity selection unit 162 .

제어부(110)는 각 모듈의 전반적인 동작을 제어하여, 본 발명의 실시 예에 따른 서비스 제공 방법에 따른 동작 처리를 제공하며, 이를 위한 하나 이상의 마이크로 프로세서를 포함할 수 있다.The control unit 110 controls the overall operation of each module to provide operation processing according to the service providing method according to an embodiment of the present invention, and may include one or more microprocessors for this purpose.

제1 영상 데이터 관리부(120)는 변환하고자 하는 변환 얼굴 이미지를 포함하는 소스 영상 데이터를 관리할 수 있다. 상기 소스 영상 데이터는 컴퓨터가 인식할 수 있는 포맷을 갖는 디지털 영상 데이터를 포함할 수 있다. 상기 디지털 영상 데이터는 정지된 이미지들인 복수개의 프레임들의 연속적인 재생으로 움직이는 동영상으로 출력될 수 있다. 또한 상기 디지털 영상은 영상정보와 함께 음성정보를 포함하여 출력될 수 있다. 상기 디지털 영상 데이터는 *.avi, *.mp4, *.wmv, *.flv, *.mxf, *.mov 등의 파일 확장자를 가지는 파일 포맷을 포함할 수 있다. 이 때, 상기 소스 영상 데이터는 등장인물의 얼굴을 포함하는 이미지 데이터를 포함할 수 있다.The first image data management unit 120 may manage source image data including a face image to be converted. The source image data may include digital image data having a computer-recognizable format. The digital image data may be output as a moving video by continuously reproducing a plurality of frames, which are still images. In addition, the digital image may be output including audio information together with image information. The digital image data may include a file format having a file extension such as *.avi, *.mp4, *.wmv, *.flv, *.mxf, or *.mov. In this case, the source image data may include image data including a character's face.

상기 제1 영상 데이터 관리부(120)는 영상 데이터 공급 단말(300)로부터 상기 변환할 대상이 되는 얼굴 이미지를 포함하는 영상 데이터를 선택하여 수신하고, 수신한 영상 데이터를 소스 영상 데이터로 관리할 수 있다. 또는 상기 제1 영상 데이터 관리부(120)는 영상 데이터 제공 플랫폼(미도시), 예를 들어, 동영상 공유 서비스 플랫폼인 유튜브, 방송사 또는 콘텐츠 제작사에서 제공하는 온라인 스트리밍 서비스, VOD(video on demand) 서비스, 소셜 미디어 서비스(SNS)에서 획득할 수 있는 동영상 콘텐츠 등을 통해 사용하고자 하는 소스 영상 데이터를 선택적으로 획득할 수 있다. 그리고 상기 제1 영상 데이터 관리부(120)는 직접 동영상 콘텐츠를 제작하거나 생성하여 소스 영상 데이터로 관리할 수 있다.The first image data management unit 120 may select and receive image data including a face image to be converted from the image data supply terminal 300 and manage the received image data as source image data. . Alternatively, the first video data management unit 120 may be a video data providing platform (not shown), for example, YouTube, a video sharing service platform, an online streaming service provided by a broadcasting company or a content producer, a video on demand (VOD) service, Source image data to be used may be selectively obtained through video content that can be obtained from a social media service (SNS). In addition, the first video data management unit 120 may directly produce or create video contents and manage them as source video data.

제2 영상 데이터 관리부(130)는 상기 변환 얼굴 이미지와 대응되는 타깃 콘텐츠를 포함하는 타깃 영상 데이터를 관리할 수 있다. 상기 타깃 영상 데이터는 컴퓨터가 인식할 수 있는 포맷을 갖는 디지털 영상 데이터를 포함할 수 있다.The second image data management unit 130 may manage target image data including target content corresponding to the transformed face image. The target image data may include digital image data having a computer-recognizable format.

상기 타깃 콘텐츠는 변환하고자 하는 변환 얼굴 이미지로 대체될 수 있는 대상 얼굴을 포함하는 인물을 포함할 수 있다. 상기 타깃 콘텐츠는 등장인물의 얼굴 이미지가 변환 얼굴 이미지로 대체되고, 그 외의 배경 영상 정보와 오디오 정보는 유지될 수 있다.The target content may include a person including a target face that can be replaced with a transformed face image to be transformed. In the target content, a character's face image may be replaced with a converted face image, and other background image information and audio information may be maintained.

상기 제2 영상 데이터 관리부(130)는 영상 데이터 공급 단말(300)로부터 상기 변환될 대상이 되는 얼굴 이미지를 포함하는 영상 데이터를 선택하여 수신하고, 수신한 영상 데이터를 타깃 영상 데이터로 관리할 수 있다.The second image data management unit 130 may select and receive image data including a face image to be converted from the image data supply terminal 300 and manage the received image data as target image data. .

상기 제2 영상 데이터 관리부(130)는 상기 제1 영상 데이터 관리부(120)의 소스 영상 데이터에서 추출한 특정인의 얼굴 이미지를 입히고자 하는 대상 인물이 등장하는 타깃 영상 데이터를 획득할 수 있다.The second image data manager 130 may obtain target image data in which a target person to whom a face image of a specific person is to be applied appears, extracted from the source image data of the first image data manager 120 .

상기 제2 영상 데이터 관리부(130)는 동영상 공유 서비스 플랫폼인 유튜브, 방송사 또는 콘텐츠 제작사에서 제공하는 온라인 스트리밍 서비스, VOD(video on demand) 서비스, 소셜 미디어 서비스(SNS)에서 획득할 수 있는 동영상 콘텐츠 등을 통해 이용하고자 하는 타깃 영상 데이터를 선택적으로 획득할 수 있다. 그리고 상기 제2 영상 데이터 관리부(130)는 동영상 콘텐츠를 제작하거나 생성하여 타깃 영상 데이터로 관리할 수 있다.The second video data management unit 130 is a video sharing service platform such as YouTube, an online streaming service provided by a broadcasting company or a content producer, a video on demand (VOD) service, video content obtainable from a social media service (SNS), and the like. Target image data to be used may be selectively acquired through Also, the second image data management unit 130 may produce or create video contents and manage them as target video data.

프레임 추출부(140)는 상기 소스 영상 데이터 또는 상기 타깃 영상 데이터로부터 복수개의 프레임을 추출하여 저장할 수 있다. 상기 프레임은 완성된 동영상을 구성하는 정지된 각각의 이미지로, 움직이는 영상을 출력하기 위해 fps(frame per second)의 단위로 구성될 수 있다. 예를 들어, 1초당 24프레임, 30프레임, 60프레임을 출력하는 동영상 데이터는 24fps, 30fps, 60fps로 표시될 수 있다.The frame extractor 140 may extract and store a plurality of frames from the source image data or the target image data. The frame is each still image constituting the completed video, and may be configured in units of fps (frame per second) to output a moving image. For example, video data outputting 24 frames, 30 frames, or 60 frames per second may be displayed at 24 fps, 30 fps, or 60 fps.

상기 프레임 추출부(140)는 상기 소스 영상 데이터 또는 상기 타깃 영상 데이터에 포함된 복수개의 프레임을 추출하기 위해서는 공지된 프레임 추출 기술 또는 관련 분야로 개발되는 기술을 활용할 수 있다.The frame extractor 140 may utilize a known frame extraction technique or a technique developed in a related field to extract a plurality of frames included in the source image data or the target image data.

얼굴 이미지 식별부(150)는 각각의 상기 프레임에서 식별되는 얼굴 이미지 영역을 크롭핑하여 얼굴 이미지 데이터를 획득할 수 있다.The face image identification unit 150 may acquire face image data by cropping the face image region identified in each frame.

상기 얼굴 이미지 식별부(150)는 이미지 인식 기술, 이미지 분석 기술, 이미지 유사도 판단 기술, 이미지 매칭 기술 등으로 공지된 기술 또는 관련 분야로 개발되는 기술을 활용할 수 있다. 상기 얼굴 이미지 식별부(150)는 안면 및 이미지 인식 기술을 이용하는 응용 프로그램 또는 알고리즘을 활용하여 얼굴을 인식할 수 있다. 예를 들어, 얼굴 이미지를 식별하고 분석하는 기술은 Single Shot Scale-invariant Face Detector(S3FD), Multi-Task Cascaded Convolutional Neural Network(MTCNN), Microsoft Computer Vision, Kairos Face Recognition, Animetrics Face Recognition, Lambda Labs Face Recognition, Luxand.cloud Face Recognition, EyeRecognize Face Detection, Face++ Face Detection, Macgyver Face Recognition, BetaFace Face Recognition, Amazon (AWS) Rekognition, Trueface.ai Facial Recognition, IBM Watson’s Visual Recognition, ColorTag, Everypixel Image Recognition, Eyeris EmoVu, Inferdo Face Detection 등을 활용할 수 있다.The facial image identification unit 150 may utilize known technologies such as image recognition technology, image analysis technology, image similarity determination technology, and image matching technology, or technologies developed in related fields. The face image identification unit 150 may recognize a face using an application program or algorithm using face and image recognition technology. For example, techniques for identifying and analyzing facial images include Single Shot Scale-invariant Face Detector (S3FD), Multi-Task Cascaded Convolutional Neural Network (MTCNN), Microsoft Computer Vision, Kairos Face Recognition, Animetrics Face Recognition, Lambda Labs Face Recognition, Luxand.cloud Face Recognition, EyeRecognize Face Detection, Face++ Face Detection, Macgyver Face Recognition, BetaFace Face Recognition, Amazon (AWS) Rekognition, Trueface.ai Facial Recognition, IBM Watson's Visual Recognition, ColorTag, Everypixel Image Recognition, Eyeris EmoVu, Inferdo Face Detection can be used.

데이터셋 전처리부(160)는 상기 얼굴 이미지 데이터에 기반하여, 상기 타깃 영상 데이터로부터 획득되는 제1 얼굴 이미지 데이터를 상기 소스 영상 데이터로부터 획득되는 제2 얼굴 이미지 데이터에 결합하여 얼굴 이미지 데이터셋을 생성할 수 있다. 상기 데이터셋 전처리부(160)는 타깃 영상 데이터에서 제1 얼굴 이미지 데이터가 아닌 제2 얼굴 이미지 데이터가 반영되어 자연스럽게 출력될 수 있도록 하는 페이스 스왑 영상 생성 알고리즘의 입력값으로 데이터셋을 제공할 수 있다.Based on the face image data, the dataset pre-processor 160 generates a face image dataset by combining first face image data obtained from the target image data with second face image data obtained from the source image data. can do. The dataset pre-processor 160 may provide the dataset as an input value of a face swap image generation algorithm that allows the second face image data, not the first face image data, to be reflected in the target image data and output naturally. .

상기 데이터셋 전처리부(160)는 상기 제2 얼굴 이미지 데이터를 특정 저장 경로에 저장하고, 상기 저장경로에 상기 제1 얼굴 이미지 데이터를 이동 및 저장하여 결합할 수 있다. The dataset pre-processing unit 160 may store the second face image data in a specific storage path, move and store the first face image data in the storage path, and combine them.

이를 통해, 상기 데이터셋 전처리부(160)는 상기 타깃 영상에서 추출된 제2 얼굴 이미지 데이터와 소스 영상에서 추출된 제1 얼굴 이미지 데이터를 동일한 경로의 저장소에 저장하여 페이스 스왑 영상 생성 알고리즘의 입력값으로 활용할 수 있다.Through this, the dataset pre-processor 160 stores the second face image data extracted from the target image and the first face image data extracted from the source image in the storage of the same path, and the input value of the face swap image generation algorithm. can be utilized as

이 때, 상기 데이터셋 전처리부(160)는 페이스 스왑 처리를 위한 시스템의 하드웨어 사양, 유효 작업 시간, 이미지 변환 정밀도 등의 효율성을 고려하여 저장소에 저장하는 상기 제1 얼굴 이미지 데이터의 양을 결정할 수 있다. 상기 제1 얼굴 이미지 데이터의 양은 저장되는 이미지 데이터 파일 수로 산정될 수 있다. At this time, the dataset pre-processing unit 160 may determine the amount of the first face image data to be stored in the storage in consideration of efficiency such as hardware specifications of the face swap processing system, effective working time, and image conversion precision. there is. The amount of the first face image data may be calculated based on the number of stored image data files.

또한 상기 데이터셋 전처리부(160)는 페이스 스왑 처리를 위한 시스템의 하드웨어 사양, 유효 작업 시간, 이미지 변환 정밀도 등의 효율성을 고려하여, 상기 제2 얼굴 이미지 데이터가 저장된 저장소에 상기 제1 얼굴 이미지 데이터를 이동하여 저장한 후, 제1 얼굴 이미지 데이터를 선별하여 데이터의 양을 결정할 수 있다.In addition, the dataset pre-processing unit 160 considers efficiency such as hardware specifications of a system for face swap processing, effective working time, image conversion accuracy, etc., and stores the first face image data in a storage where the second face image data is stored. After moving and storing , the amount of data may be determined by selecting the first face image data.

첫번째 경우로는, 상기 데이터셋 전처리부(160)는 획득되는 상기 제1 얼굴 이미지 데이터의 양을 상기 제2 얼굴 이미지 데이터 저장소에 이동하기 전 조절할 수 있다.In the first case, the dataset pre-processing unit 160 may adjust the amount of the acquired first face image data before moving it to the second face image data storage.

이를 위해서, 데이터셋 전처리부(160)는 제1 얼굴 유사도 선별부(161)를 포함할 수 있다.To this end, the dataset pre-processing unit 160 may include a first face similarity selection unit 161 .

상기 제1 얼굴 유사도 선별부(161)는 상기 제1 얼굴 이미지 데이터 중에서 선정된 대표 이미지와의 유사도 판별 측정값에 따라 사전 설정된 측정값 이상으로 판별되는 상기 제1 얼굴 이미지 데이터를 상기 데이터셋에서 삭제 처리할 수 있다. The first face similarity selection unit 161 deletes the first face image data that is determined to be equal to or greater than a preset measurement value according to a similarity determination measurement value with a representative image selected from among the first face image data from the dataset. can be dealt with

이를 통해, 상기 데이터셋 전처리부(160)는 상기 대표 이미지와 함께 제2 얼굴 이미지와 함께 저장되는 제1 얼굴 이미지 데이터의 양을 조절하여 얼굴 이미지 데이터셋을 획득할 수 있다. Through this, the dataset pre-processing unit 160 may obtain a face image dataset by adjusting the amount of first face image data stored together with the representative image and the second face image.

상기 이미지 유사도 판별 측정값은 SSIM(Structural Similarity Index Measure), MSE(Mean Squared Error), Mahalanobis distance 등의 유사도 측정 방식을 활용하여 적용한 값으로 산출되고, 이를 이용하여 유사도를 비교할 수 있다. 상기 대표 이미지는 사용자의 지정 또는 임의 지정 방식 등을 활용하여 적용될 수 있다.The image similarity determination measurement value is calculated as a value applied using a similarity measurement method such as SSIM (Structural Similarity Index Measure), MSE (Mean Squared Error), Mahalanobis distance, and the like, and similarity can be compared using this. The representative image may be applied using a user's designation or an arbitrary designation method.

두번째 경우로는, 상기 데이터셋 전처리부(160)는 획득되는 상기 제1 얼굴 이미지 데이터의 양을 상기 제2 얼굴 이미지 데이터 저장소에 이동한 후 조절할 수 있다.In the second case, the dataset pre-processing unit 160 may adjust the amount of the acquired first face image data after moving it to the second face image data storage.

이를 위해서, 데이터셋 전처리부(160)는 데이터셋 유사도 선별부(162)를 포함할 수 있다.To this end, the dataset pre-processing unit 160 may include a dataset similarity selection unit 162 .

상기 데이터셋 유사도 선별부(162)는 상기 얼굴 이미지 데이터 중에서 선정된 대표 이미지와의 유사도 판별을 통한 측정값에 따라 사전 설정된 측정값 이상으로 판별되는 상기 얼굴 이미지 데이터를 상기 데이터셋에서 삭제 처리할 수 있다. 이 때, 상기 얼굴 이미지 데이터는 제1 얼굴 이미지 데이터를 대상으로 할 수 있다. 상기 이미지 유사도 판별 측정값은 SSIM(Structural Similarity Index Measure), MSE(Mean Squared Error), Mahalanobis distance 등의 유사도 측정 방식을 활용하여 적용한 값으로 산출되고, 이를 이용하여 유사도를 비교할 수 있다. 상기 대표 이미지는 사용자의 지정 또는 임의 지정 방식 등을 활용하여 적용될 수 있다.The dataset similarity selection unit 162 may delete the facial image data that is determined to be greater than or equal to a preset measurement value from the dataset according to the measurement value through the similarity determination with the representative image selected from among the face image data. there is. In this case, the face image data may be the first face image data. The image similarity determination measurement value is calculated as a value applied using a similarity measurement method such as SSIM (Structural Similarity Index Measure), MSE (Mean Squared Error), Mahalanobis distance, and the like, and similarity can be compared using this. The representative image may be applied using a user's designation or an arbitrary designation method.

학습 모델링부(170)는 상기 얼굴 이미지 데이터셋과 변환 얼굴 이미지 데이터셋을 입력 데이터로 이용하여 페이스 스왑 영상 생성 알고리즘을 적용한 얼굴 변환 영상 데이터를 생성할 수 있다.The learning modeling unit 170 may generate face transformation image data to which a face swap image generation algorithm is applied by using the face image dataset and the transformed face image dataset as input data.

상기 변환 얼굴 이미지 데이터셋은 대상 얼굴에 대한 촬영 각도, 표정, 화질, 밝기 등에서 서로 상이한 제3 얼굴 이미지 데이터를 포함할 수 있다. 상기 제3 얼굴 이미지 데이터는 생성적 적대 신경망 기반 알고리즘 등을 이용하여 생성될 수 있다. 예를 들어, 상기 제3 얼굴 이미지 데이터는 StyleGAN2 등의 알고리즘을 이용하여 생성될 수 있다. The converted face image dataset may include third face image data that are different from each other in terms of a photographing angle, facial expression, image quality, and brightness of the target face. The third face image data may be generated using a generative adversarial network-based algorithm or the like. For example, the third face image data may be generated using an algorithm such as StyleGAN2.

상기 페이스 스왑 영상 생성 알고리즘은 DeepFaceLab 알고리즘을 적용하여 얼굴이 변환된 출력 영상 데이터를 생성할 수 있다. 상기 DeepFaceLab 알고리즘은 오픈 소스 딥페이크 영상 생성 기법으로, 소스 영상의 눈, 코, 입 등 얼굴의 특징을 타깃 영상(배경 영상)의 대상 인물 얼굴에 대체하는 페이스 스와핑(Face swapping)을 처리할 수 있다. 상기 DeepFaceLab 알고리즘은 오픈 소스 기반에 따라 최신화되는 알고리즘 버전과 상세 구현 공지 기술로 시스템에 최적화되어 적용될 수 있다.The face swap image generation algorithm may generate output image data in which a face is converted by applying the DeepFaceLab algorithm. The DeepFaceLab algorithm is an open source deepfake image generation technique, and can process face swapping in which facial features such as eyes, nose, and mouth of a source image are replaced with the face of a target person in a target image (background image). . The DeepFaceLab algorithm can be optimized and applied to the system with an updated algorithm version and detailed implementation known technology based on an open source basis.

참고적으로, 상기 DeepFaceLab 알고리즘은 추출(Extraction), 학습(Training), 전환(Conversion)의 세 가지 단계로 구분하여 요약될 수 있다.For reference, the DeepFaceLab algorithm can be summarized by dividing it into three steps: extraction, training, and conversion.

상기 추출 단계는, 입력 데이터를 통해 정확한 얼굴의 형태와 랜드마크를 확인하고 정렬된 얼굴 정보를 획득한다. 이 때, 상기 입력 데이터는 상기 학습 모델링부(170)의 얼굴 이미지 데이터셋과 변환 얼굴 이미지 데이터셋를 포함할 수 있다.In the extraction step, an accurate face shape and landmarks are confirmed through input data and aligned face information is obtained. In this case, the input data may include a face image dataset of the learning modeling unit 170 and a transformed face image dataset.

구체적으로, 상기 추출 단계는 얼굴로 식별되는 부분을 포괄하여 탐지하고, 얼굴 특징에 따라 랜드마크를 확인하여 정렬할 수 있다. 상기 랜드마크를 추출하는 알고리즘은 히트맵기반의 얼굴 랜드마크 알고리즘인 2DFAN 및 PRNET을 제공할 수 있다. 그리고 분할작업으로 정렬된 얼굴 이미지를 정밀하게 세분화한 구도와 표정을 학습하여 머리카락, 손가락 또는 안경이 있는 얼굴 등을 정확하게 분할한다. In detail, in the extraction step, a part identified as a face may be comprehensively detected, and landmarks may be identified and aligned according to facial features. The algorithm for extracting the landmark may provide 2DFAN and PRNET, which are heat map-based facial landmark algorithms. In addition, it learns the composition and facial expressions of the face images arranged by the segmentation operation to accurately segment hair, fingers, or a face with glasses.

상기 학습 단계는, 상기 추출 단계 이후 사실적인 얼굴 교환 결과를 달성할 수 있도록 상기 입력 데이터의 가중치를 공유하는 인코더와 Inter 레이어를 학습시킨 후, 변환하고자 하는 얼굴과 변환하고자 하는 얼굴로 대체될 대상이 되는 얼굴의 출력에 대한 학습을 통해 판별기로 진위 여부를 분류할 수 있다. In the learning step, after learning the encoder and the inter layer that share the weight of the input data so that a realistic face exchange result can be achieved after the extraction step, the face to be transformed and the target to be replaced with the face to be transformed are selected. Through learning about the output of the face to be recognized, it is possible to classify authenticity with a discriminator.

마지막으로, DeepFaceLab 알고리즘은 전환 단계를 통해 변환하고자 하는 얼굴을, 얼굴이 대체될 대상의 얼굴에 적용하여 변환할 수 있다.Finally, the DeepFaceLab algorithm can convert the face to be transformed through the conversion step by applying it to the face of the object to be replaced.

도 3은 본 발명의 실시 예에 따른 타킷 콘텐츠 변환 서비스 제공 장치의 동작 방법을 설명하기 위한 흐름도이다.3 is a flowchart illustrating an operating method of an apparatus for providing a target content conversion service according to an embodiment of the present invention.

도 3을 참조하면, 타킷 콘텐츠 변환 서비스 제공 장치의 동작 방법에 있어서, 제1 영상 데이터 관리단계(S101)는 변환하고자 하는 변환 얼굴 이미지를 포함하는 소스 영상 데이터를 관리할 수 있다.Referring to FIG. 3 , in the operating method of the apparatus for providing a target content conversion service, in the first image data management step ( S101 ), source image data including a face image to be converted may be managed.

제2 영상 데이터 관리단계(S103)는 상기 변환 얼굴 이미지와 대응되는 타깃 콘텐츠를 포함하는 타깃 영상 데이터를 관리할 수 있다.In the second image data management step ( S103 ), target image data including target content corresponding to the converted face image may be managed.

프레임 추출단계(S105)는 상기 소스 영상 데이터 및 상기 타깃 영상 데이터로부터 복수개의 프레임을 추출하여 저장할 수 있다.In the frame extraction step (S105), a plurality of frames may be extracted and stored from the source image data and the target image data.

얼굴 이미지 식별단계(S107)는 각각의 상기 프레임에서 식별되는 얼굴 이미지 영역을 크롭핑하여 얼굴 이미지 데이터를 획득할 수 있다.In the face image identification step (S107), face image data may be obtained by cropping the face image region identified in each frame.

데이터셋 전처리단계(S109)는 상기 얼굴 이미지 데이터에 기반하여, 상기 타깃 영상 데이터로부터 획득되는 제1 얼굴 이미지 데이터를 상기 소스 영상 데이터로부터 획득되는 제2 얼굴 이미지 데이터에 결합하여 얼굴 이미지 데이터셋을 생성할 수 있다.In the dataset preprocessing step (S109), based on the face image data, a face image dataset is generated by combining first face image data obtained from the target image data with second face image data obtained from the source image data. can do.

상기 데이터셋 전처리단계(S109)는 제1 얼굴 유사도 선별단계(미도시)를 포함할 수 있다. 상기 제1 얼굴 유사도 선별단계는 상기 제1 얼굴 이미지 데이터 중에서 선정된 대표 이미지와의 유사도 판별 측정값에 따라 사전 설정된 측정값 이상으로 판별되는 상기 제1 얼굴 이미지 데이터를 상기 데이터셋에서 삭제 처리할 수 있다. 상기 이미지 유사도 판별 측정값은 SSIM(Structural Similarity Index Measure), MSE(Mean Squared Error), Mahalanobis distance 등의 유사도 측정 방식을 활용하여 적용한 값으로 산출되고, 이를 이용하여 유사도를 비교할 수 있다. 상기 대표 이미지는 사용자의 지정 또는 임의 지정 방식 등을 활용하여 적용될 수 있다.The dataset preprocessing step (S109) may include a first face similarity screening step (not shown). In the first face similarity screening step, the first face image data that is determined to be equal to or greater than a preset measurement value according to a similarity determination measurement value with a representative image selected from among the first face image data may be deleted from the dataset. there is. The image similarity determination measurement value is calculated as a value applied using a similarity measurement method such as SSIM (Structural Similarity Index Measure), MSE (Mean Squared Error), Mahalanobis distance, and the like, and similarity can be compared using this. The representative image may be applied using a user's designation or an arbitrary designation method.

상기 데이터셋 전처리단계(S109)는 데이터셋 유사도 선별단계(미도시)를 더 포함할 수 있다. 상기 데이터셋 유사도 선별단계는 상기 얼굴 이미지 데이터 중에서 선정된 대표 이미지와의 유사도 판별을 통한 측정값에 따라 사전 설정된 측정값 이상으로 판별되는 상기 얼굴 이미지 데이터를 상기 데이터셋에서 삭제 처리할 수 있다. 상기 이미지 유사도 판별을 위해서는 SSIM(Structural Similarity Index Measure), MSE(Mean Squared Error), Mahalanobis distance의 유사도 측정 방식 등을 활용하여 적용한 값으로 산출되고, 이를 이용하여 유사도를 비교할 수 있다. 상기 대표 이미지는 사용자의 지정 또는 임의 지정 방식 등을 활용하여 적용될 수 있다.The dataset preprocessing step (S109) may further include a dataset similarity selection step (not shown). In the dataset similarity screening step, the face image data determined to be higher than a preset measurement value may be deleted from the dataset according to a measurement value obtained by determining similarity with a representative image selected from among the face image data. In order to determine the image similarity, SSIM (Structural Similarity Index Measure), MSE (Mean Squared Error), and Mahalanobis distance similarity measuring method are used to calculate the applied value, and the similarity can be compared using these values. The representative image may be applied using a user's designation or an arbitrary designation method.

학습 모델링단계(S111)는 상기 얼굴 이미지 데이터셋과 변환 얼굴 이미지 데이터셋을 입력 데이터로 이용하여 페이스 스왑 영상 생성 알고리즘을 적용한 얼굴 변환 영상 데이터를 생성할 수 있다.In the learning modeling step (S111), face transformation image data to which a face swap image generation algorithm is applied may be generated using the face image dataset and the transformed face image dataset as input data.

상기 변환 얼굴 이미지 데이터셋은 대상 얼굴에 대한 촬영 각도, 표정, 화질, 밝기 등에서 서로 상이한 제3 얼굴 이미지 데이터를 포함할 수 있다. 상기 제3 얼굴 이미지 데이터는 생성적 적대 신경망 기반 알고리즘 등을 이용하여 생성될 수 있다. 예를 들어, 상기 제3 얼굴 이미지 데이터는 StyleGAN2 등의 알고리즘을 이용하여 생성될 수 있다. The converted face image dataset may include third face image data that are different from each other in terms of a photographing angle, facial expression, image quality, and brightness of the target face. The third face image data may be generated using a generative adversarial network-based algorithm or the like. For example, the third face image data may be generated using an algorithm such as StyleGAN2.

상기 페이스 스왑 영상 생성 알고리즘은 DFL(DeepFaceLab) 알고리즘을 적용하여 얼굴이 변환된 출력 영상 데이터를 생성할 수 있다.The face swap image generating algorithm may generate output image data in which a face is converted by applying a DFL (DeepFaceLab) algorithm.

상술한 본 발명에 따른 방법은 컴퓨터에서 실행되기 위한 프로그램으로 제작되어 컴퓨터가 읽을 수 있는 기록 매체에 저장될 수 있으며, 컴퓨터가 읽을 수 있는 기록 매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피디스크, 광 데이터 저장장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다.The method according to the present invention described above may be produced as a program to be executed on a computer and stored in a computer-readable recording medium. Examples of the computer-readable recording medium include ROM, RAM, CD-ROM, and magnetic tape. , floppy disks, optical data storage devices, and the like, and also includes those implemented in the form of carrier waves (for example, transmission through the Internet).

컴퓨터가 읽을 수 있는 기록 매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다. 그리고, 상기 방법을 구현하기 위한 기능적인(function) 프로그램, 코드 및 코드 세그먼트들은 본 발명이 속하는 기술분야의 프로그래머들에 의해 용이하게 추론될 수 있다.The computer-readable recording medium is distributed to computer systems connected through a network, so that computer-readable codes can be stored and executed in a distributed manner. In addition, functional programs, codes, and code segments for implementing the method can be easily inferred by programmers in the technical field to which the present invention belongs.

또한, 이상에서는 본 발명의 바람직한 실시 예에 대하여 도시하고 설명하였지만, 본 발명은 상술한 특정의 실시 예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진 자에 의해 다양한 변형 실시가 가능한 것은 물론이고, 이러한 변형 실시들은 본 발명의 기술적 사상이나 전망으로부터 개별적으로 이해되어서는 안될 것이다.In addition, although the preferred embodiments of the present invention have been shown and described above, the present invention is not limited to the specific embodiments described above, and the technical field to which the present invention belongs without departing from the gist of the present invention claimed in the claims. Of course, various modifications can be made by those skilled in the art, and these modifications should not be individually understood from the technical spirit or perspective of the present invention.

Claims (7)

페이스 스왑 서비스 제공 장치의 동작을 위한 프로그램을 기록한 기록매체에 있어서,
변환하고자 하는 변환 얼굴 이미지를 포함하는 소스 영상 데이터 및 상기 변환 얼굴 이미지와 대응되는 타깃 콘텐츠를 포함하는 타깃 영상 데이터를 관리하는 영상 데이터 관리 기능;
상기 소스 영상 데이터 및 상기 타깃 영상 데이터로부터 복수개의 프레임을 추출하여 저장하는 프레임 추출 기능;
각각의 상기 프레임에서 식별되는 얼굴 이미지 영역을 크롭핑하여 얼굴 이미지 데이터를 획득하는 얼굴 이미지 식별 기능;
상기 얼굴 이미지 데이터에 기반하여, 상기 타깃 영상 데이터로부터 획득되는 제1 얼굴 이미지 데이터를, 상기 소스 영상 데이터로부터 획득되는 제2 얼굴 이미지 데이터에 결합하여 얼굴 이미지 데이터셋을 생성하는 데이터셋 전처리 기능; 및
상기 얼굴 이미지 데이터셋과 변환 얼굴 이미지 데이터셋을 입력 데이터로 이용하여 페이스 스왑 영상 생성 알고리즘을 적용한 얼굴 변환 영상 데이터를 생성하는 학습 모델링 기능;을 포함하는
기록매체.
In the recording medium recording the program for the operation of the face swap service providing device,
an image data management function for managing source image data including a transformed face image to be transformed and target image data including target content corresponding to the transformed face image;
a frame extracting function for extracting and storing a plurality of frames from the source image data and the target image data;
a face image identification function for acquiring face image data by cropping a face image region identified in each of the frames;
a dataset pre-processing function generating a face image dataset by combining first face image data obtained from the target image data with second face image data obtained from the source image data, based on the face image data; and
A learning modeling function for generating face transformation image data to which a face swap image generation algorithm is applied using the face image dataset and the transformed face image dataset as input data;
recording medium.
제 1항에 있어서,
상기 데이터셋 전처리 기능은,
상기 제1 얼굴 이미지 데이터 중에서 선정된 대표 이미지와의 유사도 판별 측정값에 따라 사전 설정된 측정값 이상으로 판별되는 상기 제1 얼굴 이미지 데이터를 상기 데이터셋에서 삭제 처리하는 제1 얼굴 유사도 선별 기능; 및
상기 얼굴 이미지 데이터 중에서 선정된 대표 이미지와의 유사도 판별을 통한 측정값에 따라 사전 설정된 측정값 이상으로 판별되는 상기 얼굴 이미지 데이터를 상기 데이터셋에서 삭제 처리하는 데이터셋 얼굴 유사도 선별 기능;을 포함하는 것을 특징으로 하는
기록매체.
According to claim 1,
The dataset preprocessing function,
a first facial similarity screening function for deleting from the dataset the first face image data that is determined to be equal to or greater than a preset measurement value according to a similarity determination measurement value with a representative image selected from among the first face image data; and
A dataset face similarity screening function for deleting from the dataset the face image data determined to be greater than or equal to a preset measurement value according to the measurement value through the similarity determination with the representative image selected from among the face image data; characterized
recording medium.
제 1항에 있어서,
상기 이미지 유사도 판별 측정값은 SSIM(Structural Similarity Index Measure), MSE(Mean Squared Error), Mahalanobis distance의 유사도 측정 방식 중에서 적어도 하나를 선택적으로 적용한 값으로 산출되는 것을 특징으로 하는
기록매체.
According to claim 1,
Characterized in that the image similarity discrimination measurement value is calculated by selectively applying at least one of SSIM (Structural Similarity Index Measure), MSE (Mean Squared Error), and Mahalanobis distance similarity measurement methods.
recording medium.
제 1항에 있어서,
상기 대표 이미지는 사용자의 지정 또는 임의 지정 방식 중에서 선택적으로 적용되는 것을 특징으로 하는
기록매체.
According to claim 1,
Characterized in that the representative image is selectively applied from a user's designation or arbitrary designation method
recording medium.
제 1항에 있어서,
상기 변환 얼굴 이미지 데이터셋은 대상 얼굴에 대한 촬영 각도, 표정, 화질, 밝기 중 하나 이상이 서로 상이한 제3 얼굴 이미지 데이터를 포함하는 것을 특징으로 하는
기록매체.
According to claim 1,
Characterized in that the converted face image dataset includes third face image data different from each other at least one of the shooting angle, facial expression, image quality, and brightness of the target face.
recording medium.
제 5항에 있어서,
상기 제3 얼굴 이미지 데이터는 생성적 적대 신경망 기반 알고리즘을 이용하여 생성되는 것을 특징으로 하는
기록매체.
According to claim 5,
Characterized in that the third face image data is generated using a generative adversarial network-based algorithm
recording medium.
제 1항에 있어서,
상기 페이스 스왑 영상 생성 알고리즘은 DFL(DeepFaceLab) 알고리즘인 것을 특징으로 하는
기록매체.
According to claim 1,
Characterized in that the face swap image generation algorithm is a DFL (DeepFaceLab) algorithm
recording medium.
KR1020210086808A 2021-07-02 2021-07-02 Recording Medium KR20230006077A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210086808A KR20230006077A (en) 2021-07-02 2021-07-02 Recording Medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210086808A KR20230006077A (en) 2021-07-02 2021-07-02 Recording Medium

Publications (1)

Publication Number Publication Date
KR20230006077A true KR20230006077A (en) 2023-01-10

Family

ID=84893588

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210086808A KR20230006077A (en) 2021-07-02 2021-07-02 Recording Medium

Country Status (1)

Country Link
KR (1) KR20230006077A (en)

Similar Documents

Publication Publication Date Title
CN108154518B (en) Image processing method and device, storage medium and electronic equipment
KR102354692B1 (en) Rule-based video importance analysis
CN112954450B (en) Video processing method and device, electronic equipment and storage medium
CN105684046B (en) Generate image composition
CN109902681B (en) User group relation determining method, device, equipment and storage medium
CN111724302A (en) Aspect ratio conversion using machine learning
Agarwal et al. Privacy preservation through facial de-identification with simultaneous emotion preservation
Tolosana et al. An introduction to digital face manipulation
Jin et al. Network video summarization based on key frame extraction via superpixel segmentation
CN113962417A (en) Video processing method and device, electronic equipment and storage medium
KR20230006077A (en) Recording Medium
KR20230006076A (en) Device for providing target content conversion service based on artificial intelligence learning and its operation method
KR20230006083A (en) Program for the operation of a service providing device that transforms target content based on AI
KR20230006079A (en) Method for face image transformation based on artificial intelligence learning
KR20230006078A (en) Recording medium for recording a program for operating an apparatus providing a face image conversion processing service
KR20230006080A (en) Method for providing face image conversion service through content acquired from the video sharing service platform
KR20230006084A (en) Program for operating device that providing face swap service based on deep learning
KR20230006081A (en) Device for providing face swap service
KR20230006082A (en) Device for providing face conversion services through content acquired from video sharing service platforms
KR20230086984A (en) Method for acquiring swap face image using preprocessing according to user selection
KR20230086987A (en) Program for the operation of a device for providing a target content conversion service that transforms the face of a character in the target image
KR20230086988A (en) Recording medium storing target content conversion program
KR20230086986A (en) Method for data setting configuration that selectively adjusts the composition of face image data from a source image and a target image
KR20230086989A (en) Program that selectively adjusts the composition of face image data
KR20230086982A (en) Device for providing personalized target content conversion service based on artificial intelligence learning by using user interfaces and its operation method