KR20230086502A - Method and system for deleting text in image - Google Patents

Method and system for deleting text in image Download PDF

Info

Publication number
KR20230086502A
KR20230086502A KR1020210175192A KR20210175192A KR20230086502A KR 20230086502 A KR20230086502 A KR 20230086502A KR 1020210175192 A KR1020210175192 A KR 1020210175192A KR 20210175192 A KR20210175192 A KR 20210175192A KR 20230086502 A KR20230086502 A KR 20230086502A
Authority
KR
South Korea
Prior art keywords
image
text
mask
area
model
Prior art date
Application number
KR1020210175192A
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 KR1020210175192A priority Critical patent/KR20230086502A/en
Publication of KR20230086502A publication Critical patent/KR20230086502A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/001
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Image Analysis (AREA)

Abstract

본 개시는, 적어도 하나의 프로세서에 의해 수행되는, 이미지 내의 텍스트를 삭제하는 방법에 관한 것이다. 텍스트 삭제 방법은, 하나 이상의 텍스트 객체를 포함하는 이미지를 수신하는 단계, 이미지에 대응하는 텍스트 영역 마스크를 수신하는 단계 및 수신된 이미지 및 수신된 텍스트 영역 마스크를 기계학습 모델에 입력하여, 수신된 이미지 내의 하나 이상의 스트로크의 주변 영역을 기초로, 수신된 이미지로부터 하나 이상의 텍스트 객체의 적어도 일부가 삭제된 보정 이미지를 출력하는 단계를 포함하고, 기계학습 모델은, 참조 이미지 및 참조 이미지에 대응하는 참조 텍스트 영역 마스크를 입력 받아, 참조 이미지 내의 하나 이상의 참조 스트로크의 주변 영역을 기초로 제1 참조 보정 이미지를 생성하도록 학습되는 생성 모델을 포함한다.The present disclosure relates to a method of deleting text in an image, performed by at least one processor. The text deletion method includes the steps of receiving an image including one or more text objects, receiving a text area mask corresponding to the image, inputting the received image and the received text area mask to a machine learning model, and inputting the received image to a machine learning model. and outputting a correction image in which at least a part of one or more text objects is deleted from the received image, based on a region surrounding one or more strokes in the machine learning model, the reference image and the reference text corresponding to the reference image. and a generation model trained to receive a region mask and generate a first reference corrected image based on a region surrounding one or more reference strokes in the reference image.

Figure P1020210175192
Figure P1020210175192

Description

이미지 내의 텍스트를 삭제하는 방법 및 시스템{METHOD AND SYSTEM FOR DELETING TEXT IN IMAGE}Method and system for deleting text in an image {METHOD AND SYSTEM FOR DELETING TEXT IN IMAGE}

본 발명은 이미지 내의 텍스트를 삭제하는 방법에 관한 것으로, 보다 상세하게는, 하나 이상의 텍스트 객체를 포함하는 이미지를 수신하고, 수신된 이미지 및 수신된 텍스트 영역 마스크를 기계학습 모델에 입력하여, 하나 이상의 텍스트 객체의 적어도 일부가 삭제된 보정 이미지를 출력하는 방법 및 시스템에 관한 것이다.The present invention relates to a method of deleting text in an image, and more particularly, by receiving an image including one or more text objects, inputting the received image and the received text area mask to a machine learning model, A method and system for outputting a corrected image from which at least a part of a text object is deleted.

STR(Scene Text Removal)은 최근 이미지에서 ID 번호, 전화번호 및 차량번호와 같은 개인 정보를 숨기기 위한 중요한 기술로 주목받고 있다. 현재 많은 STR 연구들이 딥러닝 방법을 이용하고 있지만, 텍스트가 제거된 일부 영역이 흐려지는 등 부정확하고 불만족스러운 결과가 도출되었다. 또한, 종래의 방법으로는 특정 영역의 글자를 선택적으로 지울 수 없어 응용 분야가 크게 제한되었다.STR (Scene Text Removal) has recently been attracting attention as an important technique for hiding personal information such as ID numbers, phone numbers, and vehicle numbers in images. Currently, many STR studies use deep learning methods, but inaccurate and unsatisfactory results have been obtained, such as blurring of some areas where text has been removed. In addition, conventional methods cannot selectively erase characters in a specific area, so application fields are greatly limited.

나아가, 종래 STR을 위해 설계된 모델들은 추가적인 개선 단계나 하위 모델을 필요로 하여 그 구성이 복잡하고 속도가 느리다는 문제가 있다. 반면, 속도가 빠른 경우에는 실제 모델로 설계하기 어렵다는 문제가 있다. 뿐만 아니라, 종래 STR 기술들은 동일하게 표준화된 학습 데이터 세트 및 평가 데이터 세트를 이용하지 않기 때문에 우수성이 평가되기 어려웠다.Furthermore, models designed for the conventional STR require additional improvement steps or sub-models, resulting in a complicated configuration and slow speed. On the other hand, if the speed is high, there is a problem that it is difficult to design as an actual model. In addition, since conventional STR technologies do not use the same standardized training data set and evaluation data set, it is difficult to evaluate their superiority.

본 개시는 상기와 같은 문제점을 해결하기 위하여, 본 개시의 다양한 실시예들은 이미지 내의 텍스트 삭제 방법, 기록매체에 저장된 컴퓨터 프로그램 및 장치(시스템)를 제공한다. In order to solve the above problems, various embodiments of the present disclosure provide a method for deleting text in an image, a computer program stored in a recording medium, and an apparatus (system).

본 개시는 방법, 장치(시스템) 또는 판독 가능 저장 매체에 저장된 컴퓨터 프로그램을 포함한 다양한 방식으로 구현될 수 있다. The present disclosure may be implemented in a variety of ways, including a method, apparatus (system) or computer program stored on a readable storage medium.

본 개시의 일 실시예에 따르면, 적어도 하나의 프로세서에 의해 수행되는, 이미지 내의 텍스트를 삭제하는 방법이 제공된다. 텍스트 삭제 방법은, 하나 이상의 텍스트 객체를 포함하는 이미지를 수신하는 단계, 이미지에 대응하는 텍스트 영역 마스크를 수신하는 단계 및 수신된 이미지 및 수신된 텍스트 영역 마스크를 기계학습 모델에 입력하여, 수신된 이미지 내의 하나 이상의 스트로크의 주변 영역을 기초로, 수신된 이미지로부터 하나 이상의 텍스트 객체의 적어도 일부가 삭제된 보정 이미지를 출력하는 단계를 포함하고, 기계학습 모델은, 참조 이미지 및 참조 이미지에 대응하는 참조 텍스트 영역 마스크를 입력 받아, 참조 이미지 내의 하나 이상의 참조 스트로크의 주변 영역을 기초로 제1 참조 보정 이미지를 생성하도록 학습되는 생성 모델을 포함한다.According to one embodiment of the present disclosure, a method of deleting text in an image, performed by at least one processor, is provided. The text deletion method includes the steps of receiving an image including one or more text objects, receiving a text area mask corresponding to the image, inputting the received image and the received text area mask to a machine learning model, and inputting the received image to a machine learning model. and outputting a correction image in which at least a part of one or more text objects is deleted from the received image, based on a region surrounding one or more strokes in the machine learning model, the reference image and the reference text corresponding to the reference image. and a generation model trained to receive a region mask and generate a first reference corrected image based on a region surrounding one or more reference strokes in the reference image.

본 개시의 일 실시예에 따르면, 이미지 내의 텍스트를 삭제하는 방법을 컴퓨터에서 실행하기 위해 컴퓨터 판독 가능한 기록 매체에 저장된 컴퓨터 프로그램이 제공된다.According to one embodiment of the present disclosure, a computer program stored in a computer readable recording medium is provided to execute a method of deleting text in an image on a computer.

본 개시의 일 실시예에 따르면, 정보 처리 시스템으로서, 메모리 및 메모리와 연결되고, 메모리에 포함된 컴퓨터 판독 가능한 적어도 하나의 프로그램을 실행하도록 구성된 적어도 하나의 프로세서를 포함하고, 적어도 하나의 프로그램은, 하나 이상의 텍스트 객체를 포함하는 이미지를 수신하고, 이미지에 대응하는 텍스트 영역 마스크를 수신하고, 수신된 이미지 및 수신된 텍스트 영역 마스크를 기계학습 모델에 입력하여, 수신된 이미지 내의 하나 이상의 스트로크의 주변 영역을 기초로, 수신된 이미지로부터 하나 이상의 텍스트 객체의 적어도 일부가 삭제된 보정 이미지를 출력하기 위한 명령어들을 포함하고, 기계학습 모델은, 참조 이미지 및 참조 이미지에 대응하는 참조 텍스트 영역 마스크를 입력 받아, 참조 이미지 내의 하나 이상의 참조 스트로크의 주변 영역을 기초로 제1 참조 보정 이미지를 생성하도록 학습되는 생성 모델을 포함한다.According to one embodiment of the present disclosure, an information processing system includes a memory and at least one processor connected to the memory and configured to execute at least one computer-readable program included in the memory, the at least one program comprising: Receive an image containing one or more text objects, receive a text area mask corresponding to the image, input the received image and the received text area mask to a machine learning model, and input the received image and the received text area mask to the area around the one or more strokes in the received image. Based on, instructions for outputting a corrected image from which at least a part of one or more text objects is deleted from the received image, and the machine learning model receives a reference image and a reference text area mask corresponding to the reference image as input, and a generating model learned to generate a first reference corrected image based on a region surrounding one or more reference strokes in the reference image.

본 개시의 일부 실시예에 따르면, 이미지 내의 텍스트 객체가 자연스럽게 삭제될 수 있다.According to some embodiments of the present disclosure, a text object in an image may be naturally deleted.

본 개시의 일부 실시예에 따르면, 기계학습 모델이 텍스트 스트로크의 주변 영역을 중심으로 학습함으로써 학습의 효율성이 향상될 수 있다.According to some embodiments of the present disclosure, learning efficiency may be improved by learning a machine learning model based on a region surrounding a text stroke.

본 개시의 일부 실시예에 따르면, 기계학습 모델이 명시적으로 텍스트 스트로크 마스크를 생성하지 않기 때문에, 기계학습 모델의 하위 모델이 필요 없으며 더 적은 수의 파라미터로 더 빠른 속도의 모델이 설계될 수 있다.According to some embodiments of the present disclosure, since the machine learning model does not explicitly create a text stroke mask, there is no need for a sub-model of the machine learning model and a faster model can be designed with fewer parameters. .

본 개시의 일부 실시예에 따르면, 기계학습 모델은 텍스트 영역 마스크에 의하여 마스크되지 않은 영역을 재구성하는 과정이 생략되기 때문에, 텍스트를 삭제하는 작업의 품질이 향상될 수 있다.According to some embodiments of the present disclosure, since a process of reconstructing an area not masked by a text area mask is omitted in the machine learning model, the quality of a text deletion operation may be improved.

도 1은 본 개시의 일 실시예에 따라 이미지 내의 텍스트를 삭제하도록 학습된 기계학습 모델의 예시를 나타낸다.
도 2는 본 개시의 일 실시예에 따른 정보 처리 시스템이 복수의 사용자 단말과 통신 가능하도록 연결된 구성을 나타내는 개요도이다.
도 3은 본 개시의 일 실시예에 따른 사용자 단말 및 정보 처리 시스템의 내부 구성을 나타내는 블록도이다.
도 4는 본 개시의 일 실시예에 따른 기계학습 모델의 구성도이다.
도 5는 본 개시의 일 실시예에 따른 공간 집중 모델의 구성도이다.
도 6은 본 개시의 일 실시예에 따라 보정 이미지를 생성하는 예시를 나타낸다.
도 7은 본 개시의 일 실시예에 따른 참조 중간 이미지의 예시를 나타낸다.
도 8은 본 개시의 일 실시예에 따른 중첩 연결(Nested Connection)의 구조를 나타낸다.
도 9는 본 개시의 일 실시예에 따른 텍스트 내 이미지를 삭제하는 방법과 다른 방법들 사이의 품질 비교 결과를 나타낸다.
도 10은 본 개시의 일 실시예에 따른 이미지 내 텍스트를 삭제하는 방법의 예시를 나타낸다.
1 shows an example of a machine learning model trained to delete text in an image according to an embodiment of the present disclosure.
2 is a schematic diagram illustrating a configuration in which an information processing system according to an embodiment of the present disclosure is communicatively connected with a plurality of user terminals.
3 is a block diagram showing internal configurations of a user terminal and an information processing system according to an embodiment of the present disclosure.
4 is a configuration diagram of a machine learning model according to an embodiment of the present disclosure.
5 is a configuration diagram of a spatial concentration model according to an embodiment of the present disclosure.
6 illustrates an example of generating a corrected image according to an embodiment of the present disclosure.
7 shows an example of a reference intermediate image according to an embodiment of the present disclosure.
8 illustrates a structure of a nested connection according to an embodiment of the present disclosure.
9 illustrates quality comparison results between a method of deleting an image in text according to an embodiment of the present disclosure and other methods.
10 illustrates an example of a method of deleting text in an image according to an embodiment of the present disclosure.

이하, 본 개시의 실시를 위한 구체적인 내용을 첨부된 도면을 참조하여 상세히 설명한다. 다만, 이하의 설명에서는 본 개시의 요지를 불필요하게 흐릴 우려가 있는 경우, 널리 알려진 기능이나 구성에 관한 구체적 설명은 생략하기로 한다.Hereinafter, specific details for the implementation of the present disclosure will be described in detail with reference to the accompanying drawings. However, in the following description, if there is a risk of unnecessarily obscuring the gist of the present disclosure, detailed descriptions of well-known functions or configurations will be omitted.

첨부된 도면에서, 동일하거나 대응하는 구성요소에는 동일한 참조부호가 부여되어 있다. 또한, 이하의 실시예들의 설명에 있어서, 동일하거나 대응되는 구성요소를 중복하여 기술하는 것이 생략될 수 있다. 그러나, 구성요소에 관한 기술이 생략되어도, 그러한 구성요소가 어떤 실시예에 포함되지 않는 것으로 의도되지는 않는다.In the accompanying drawings, identical or corresponding elements are given the same reference numerals. In addition, in the description of the following embodiments, overlapping descriptions of the same or corresponding components may be omitted. However, omission of a description of a component does not intend that such a component is not included in an embodiment.

개시된 실시예의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나, 본 개시는 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 본 실시예들은 본 개시가 완전하도록 하고, 본 개시가 통상의 기술자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것일 뿐이다.Advantages and features of the disclosed embodiments, and methods of achieving them, will become apparent with reference to the following embodiments in conjunction with the accompanying drawings. However, the present disclosure is not limited to the embodiments disclosed below and may be implemented in various different forms, but only the present embodiments make the present disclosure complete, and the present disclosure does not extend the scope of the invention to those skilled in the art. It is provided only for complete information.

본 명세서에서 사용되는 용어에 대해 간략히 설명하고, 개시된 실시예에 대해 구체적으로 설명하기로 한다. 본 명세서에서 사용되는 용어는 본 개시에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나, 이는 관련 분야에 종사하는 기술자의 의도 또는 판례, 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한, 특정한 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 발명의 설명 부분에서 상세히 그 의미를 기재할 것이다. 따라서, 본 개시에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 개시의 전반에 걸친 내용을 토대로 정의되어야 한다.Terms used in this specification will be briefly described, and the disclosed embodiments will be described in detail. The terms used in this specification have been selected from general terms that are currently widely used as much as possible while considering the functions in the present disclosure, but they may vary according to the intention of a person skilled in the related field, a precedent, or the emergence of new technologies. In addition, in a specific case, there is also a term arbitrarily selected by the applicant, and in this case, the meaning will be described in detail in the description of the invention. Therefore, the terms used in the present disclosure should be defined based on the meaning of the terms and the general content of the present disclosure, not simply the names of the terms.

본 명세서에서의 단수의 표현은 문맥상 명백하게 단수인 것으로 특정하지 않는 한, 복수의 표현을 포함한다. 또한, 복수의 표현은 문맥상 명백하게 복수인 것으로 특정하지 않는 한, 단수의 표현을 포함한다. 명세서 전체에서 어떤 부분이 어떤 구성요소를 포함한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있음을 의미한다.Expressions in the singular number in this specification include plural expressions unless the context clearly dictates that they are singular. Also, plural expressions include singular expressions unless the context clearly specifies that they are plural. When it is said that a certain part includes a certain component in the entire specification, this means that it may further include other components without excluding other components unless otherwise stated.

또한, 명세서에서 사용되는 '모듈'이라는 용어는 소프트웨어 또는 하드웨어 구성요소를 의미하며, '모듈'은 어떤 역할들을 수행한다. 그렇지만, '모듈'은 소프트웨어 또는 하드웨어에 한정되는 의미는 아니다. '모듈'은 어드레싱할 수 있는 저장 매체에 있도록 구성될 수도 있고 하나 또는 그 이상의 프로세서들을 재생시키도록 구성될 수도 있다. 따라서, 일 예로서, '모듈'은 소프트웨어 구성요소들, 객체지향 소프트웨어 구성요소들, 클래스 구성요소들 및 태스크 구성요소들과 같은 구성요소들과, 프로세스들, 함수들, 속성들, 프로시저들, 서브루틴들, 프로그램 코드의 세그먼트들, 드라이버들, 펌웨어, 마이크로 코드, 회로, 데이터, 데이터베이스, 데이터 구조들, 테이블들, 어레이들 또는 변수들 중 적어도 하나를 포함할 수 있다. 구성요소들과 '모듈'들은 안에서 제공되는 기능은 더 작은 수의 구성요소들 및 '모듈'들로 결합되거나 추가적인 구성요소들과 '모듈'들로 더 분리될 수 있다.In addition, the term 'module' used in the specification means a software or hardware component, and a 'module' performs certain roles. However, 'module' is not meant to be limited to software or hardware. A 'module' may be configured to reside on an addressable storage medium and may be configured to reproduce one or more processors. Thus, as an example, a 'module' includes components such as software components, object-oriented software components, class components, and task components, processes, functions, properties, and procedures. , subroutines, segments of program code, drivers, firmware, microcode, circuitry, data, databases, data structures, tables, arrays, or variables. The functionality provided within the components and 'modules' may be combined into a smaller number of components and 'modules' or further separated into additional components and 'modules'.

본 개시의 일 실시예에 따르면, '모듈'은 프로세서 및 메모리로 구현될 수 있다. '프로세서'는 범용 프로세서, 중앙 처리 장치(CPU), 마이크로프로세서, 디지털 신호 프로세서(DSP), 제어기, 마이크로제어기, 상태 머신 등을 포함하도록 넓게 해석되어야 한다. 몇몇 환경에서, '프로세서'는 주문형 반도체(ASIC), 프로그램가능 로직 디바이스(PLD), 필드 프로그램가능 게이트 어레이(FPGA) 등을 지칭할 수도 있다. '프로세서'는, 예를 들어, DSP와 마이크로프로세서의 조합, 복수의 마이크로프로세서들의 조합, DSP 코어와 결합한 하나 이상의 마이크로프로세서들의 조합, 또는 임의의 다른 그러한 구성들의 조합과 같은 처리 디바이스들의 조합을 지칭할 수도 있다. 또한, '메모리'는 전자 정보를 저장 가능한 임의의 전자 컴포넌트를 포함하도록 넓게 해석되어야 한다. '메모리'는 임의 액세스 메모리(RAM), 판독-전용 메모리(ROM), 비-휘발성 임의 액세스 메모리(NVRAM), 프로그램가능 판독-전용 메모리(PROM), 소거-프로그램가능 판독 전용 메모리(EPROM), 전기적으로 소거가능 PROM(EEPROM), 플래쉬 메모리, 자기 또는 광학 데이터 저장장치, 레지스터들 등과 같은 프로세서-판독가능 매체의 다양한 유형들을 지칭할 수도 있다. 프로세서가 메모리로부터 정보를 판독하고/하거나 메모리에 정보를 기록할 수 있다면 메모리는 프로세서와 전자 통신 상태에 있다고 불린다. 프로세서에 집적된 메모리는 프로세서와 전자 통신 상태에 있다.According to one embodiment of the present disclosure, a 'module' may be implemented with a processor and a memory. 'Processor' should be interpreted broadly to include general-purpose processors, central processing units (CPUs), microprocessors, digital signal processors (DSPs), controllers, microcontrollers, state machines, and the like. In some circumstances, 'processor' may refer to an application specific integrated circuit (ASIC), programmable logic device (PLD), field programmable gate array (FPGA), or the like. 'Processor' refers to a combination of processing devices, such as, for example, a combination of a DSP and a microprocessor, a combination of a plurality of microprocessors, a combination of one or more microprocessors in conjunction with a DSP core, or a combination of any other such configurations. You may. Also, 'memory' should be interpreted broadly to include any electronic component capable of storing electronic information. 'Memory' includes random access memory (RAM), read-only memory (ROM), non-volatile random access memory (NVRAM), programmable read-only memory (PROM), erasable-programmable read-only memory (EPROM), It may also refer to various types of processor-readable media, such as electrically erasable PROM (EEPROM), flash memory, magnetic or optical data storage, registers, and the like. A memory is said to be in electronic communication with the processor if the processor can read information from and/or write information to the memory. Memory integrated with the processor is in electronic communication with the processor.

본 개시에서, '복수의 A 각각' 및/또는 '복수의 A의 각각' 은 복수의 A에 포함된 모든 구성 요소의 각각을 지칭하거나, 복수의 A에 포함된 일부 구성요소의 각각을 지칭할 수 있다. 예를 들어, 복수의 픽셀 각각은, 복수의 픽셀에 포함된 모든 픽셀 각각을 지칭하거나 복수의 픽셀에 포함된 일부 픽셀의 각각을 지칭할 수 있다.In the present disclosure, 'each of a plurality of A' and/or 'each of a plurality of A' may refer to each of all components included in a plurality of A's, or each of some components included in a plurality of A's. can For example, each of a plurality of pixels may refer to each of all pixels included in the plurality of pixels or each of some pixels included in the plurality of pixels.

도 1은 본 개시의 일 실시예에 따라 이미지(110) 내의 텍스트를 삭제하도록 학습된 기계학습 모델의 예시를 나타낸다. 도시된 바와 같이, 기계학습 모델은 이미지(110) 내의 하나 이상의 텍스트 객체가 삭제된 보정 이미지(140)를 생성하기 위한 생성 모델(G)(130) 및 생성 모델(130)의 고도화를 위하여 보정 이미지(140)가 정답 이미지(Real image)인지 페이크 이미지(Fake image)인지 판별하기 위한 판별 모델(D)을 포함할 수 있다. 예를 들어, 도 1에 도시된 바와 같이, 하나 이상의 텍스트 객체는, Welcome to Our Porch Sit Long Talk Much Laugh Often를 포함할 수 있다. 도 1에는 기계학습 모델이 생성 모델(130) 및 판별 모델(160)을 모두 포함하는 것으로 도시되었으나, 이에 한정되지 않는다. 예를 들어, 기계학습 모델은 생성 모델(130)만을 포함할 수 있다.1 illustrates an example of a machine learning model trained to delete text within an image 110 according to one embodiment of the present disclosure. As shown, the machine learning model includes a generation model (G) 130 for generating a correction image 140 from which one or more text objects in the image 110 are deleted and a correction image for the advancement of the generation model 130. 140 may include a discrimination model (D) for determining whether a correct image (Real image) or a fake image (Fake image). For example, as shown in FIG. 1 , one or more text objects may include Welcome to Our Porch Sit Long Talk Much Laugh Often. 1, the machine learning model is illustrated as including both the generating model 130 and the discriminating model 160, but is not limited thereto. For example, the machine learning model may include only the generative model 130 .

일 실시예에 따르면, 생성 모델(130)은 이미지(110) 및 이미지(110)에 대응하는 텍스트 영역 마스크(120)를 입력으로 하여, 이미지(110)로부터 하나 이상의 텍스트 객체의 적어도 일부가 삭제된 보정 이미지(140)를 출력할 수 있다. 여기서, 텍스트 영역 마스크(120)는 이미지(110)에 포함된 하나 이상의 텍스트 객체의 위치를 탐지하여 기계학습 모델을 효율적으로 학습하는데 사용될 수 있다. 예를 들어, 텍스트 영역 마스크(120)는, 텍스트 객체의 위치를 특정하기 위해 사용될 수 있다. 도시된 바와 같이, 텍스트 영역 마스크(120)의 '흰 색'영역은 텍스트 영역(text region)을 나타내고, '검정색'영역은 텍스트가 아닌(non-text region) 영역을 나타낸다. 또한, 이미지(110)를 이용하여 사전에 생성된 텍스트 영역 마스크(120)가 기계학습 모델에 입력될 수 있다. According to an embodiment, the generation model 130 takes the image 110 and the text area mask 120 corresponding to the image 110 as inputs, and at least a portion of one or more text objects is deleted from the image 110. The correction image 140 may be output. Here, the text area mask 120 can be used to efficiently learn a machine learning model by detecting the location of one or more text objects included in the image 110 . For example, the text area mask 120 may be used to specify a location of a text object. As shown, the 'white' region of the text area mask 120 represents a text region, and the 'black' region represents a non-text region. In addition, a text area mask 120 generated in advance using the image 110 may be input to the machine learning model.

일 실시예에 따르면, 생성 모델(130)은 이미지(110) 및 이미지(110)에 대응하는 텍스트 영역 마스크(120)를 입력 받아, 이미지(110) 내의 하나 이상의 스트로크의 주변 영역(172, 174)을 기초로 보정 이미지(140)를 생성하도록 학습될 수 있다. 여기서, 스트로크의 주변 영역(172, 174)은 이미지(110) 내의 텍스트 객체의 외부 스트로크(stroke)(및/또는 외부 윤곽선)에 인접한 영역을 지칭할 수 있다. 예를 들어, 제1 스트로크의 주변 영역(172)은 이미지(110)내 텍스트 객체의 일부인 'Welcome To Our Porch'의 외부 스트로크에 인접한 영역을 지칭할 수 있다. 다른 예로서, 제2 스트로크의 주변 영역(174)은 이미지(110)내 텍스트 객체의 나머지 일부인 'Sit Long Talk Much Laugh Often'의 외부 스트로크에 인접한 영역을 지칭할 수 있다.According to an embodiment, the generation model 130 receives the image 110 and the text area mask 120 corresponding to the image 110, and generates the surrounding areas 172 and 174 of one or more strokes in the image 110. It can be learned to generate the corrected image 140 based on . Here, the stroke peripheral areas 172 and 174 may refer to areas adjacent to the outer stroke (and/or outer contour) of the text object in the image 110 . For example, the area 172 surrounding the first stroke may refer to an area adjacent to the outer stroke of 'Welcome To Our Porch', which is a part of the text object in the image 110 . As another example, the area 174 surrounding the second stroke may refer to an area adjacent to the outer stroke of 'Sit Long Talk Much Laugh Often', which is the remaining part of the text object in the image 110 .

일 실시예에 따르면, 판별 모델(160)은 사전에 텍스트 객체의 적어도 일부가 삭제된 참조 정답 이미지(Ground truth image)(150)를 이용하여 참조 정답 이미지의 분포를 학습하도록 구성될 수 있다. 여기서, 참조 정답 이미지의 분포는 참조 정답 이미지에 포함될 확률 분포를 나타낼 수 있으며, 복수의 참조 정답 이미지를 이용하여 결정될 수 있다. 그리고 나서, 판별 모델(160)은 보정 이미지(140)가 정답 분포에 포함되는지 여부를 기초로 보정 이미지(140)가 정답 이미지인지 아닌지를 판별할 수 있다. 판별 모델(160)은 보정 이미지(140)를 정답 이미지인 것으로 판별한 경우, 기계학습 모델은 생성 모델(130)이 참조 정답 이미지(150)에 가까운 보정 이미지(140)를 출력하도록 학습된다. 즉, 기계학습 모델은 생성 모델(130)이 참조 정답 이미지(150)와 동일하거나 매우 유사한 보정 이미지(140)를 출력하도록 구성될 수 있다.According to an embodiment, the discrimination model 160 may be configured to learn the distribution of the ground truth image by using the ground truth image 150 from which at least a part of the text object has been deleted in advance. Here, the distribution of the reference correct answer images may indicate a probability distribution to be included in the reference correct answer images, and may be determined using a plurality of reference correct answer images. Then, the discrimination model 160 may determine whether the corrected image 140 is a correct image or not based on whether the corrected image 140 is included in the correct answer distribution. When the discrimination model 160 determines that the corrected image 140 is the correct image, the machine learning model is trained so that the generating model 130 outputs the corrected image 140 close to the reference correct image 150 . That is, the machine learning model may be configured so that the generation model 130 outputs the corrected image 140 that is the same as or very similar to the reference correct image 150 .

한편, 도 1에서는 생성 모델(130)의 기계학습 모델의 추론에 이용되는 데이터와 기계학습 모델의 학습에 이용되는 데이터를 지칭하는 용어가 이미지(110), 텍스트 영역 마스크(120), 보정 이미지(140) 및 스트로크의 주변 영역(172, 174)로 혼용되어 있다. 그러나, 도 2 내지 도 10에서는 추론 과정에서 사용되는 데이터를 지칭하는 용어와 학습 과정에서 사용되는 데이터를 지칭하는 용어가 구분되어 사용될 수 있다. 예를 들어, 기계학습 모델의 추론 과정에 이용되는 데이터는 '이미지', '텍스트 영역 마스크', '보정 이미지' 및 '스트로크의 주변 영역'으로 기재될 수 있다. 반면, 기계학습 모델의 학습에 이용되는 데이터는 '참조 이미지', '참조 텍스트 영역 마스크', '참조 보정 이미지', '참조 스트로크의 주변 영역', '참조 레이블 마스크', '참조 정답 이미지'로 기재될 수 있다. 즉, 추론 과정에서 이용되는 데이터의 용어 'X'(예를 들어, 이미지 등)와 대응한 학습 과정에서 이용되는 데이터의 용어는 '참조 X'(예를 들어 참조 이미지 등)로 정의될 수 있다.On the other hand, in FIG. 1, the term referring to the data used for inference of the machine learning model of the generative model 130 and the data used for learning of the machine learning model is an image 110, a text area mask 120, and a corrected image ( 140) and the surrounding areas 172 and 174 of the stroke. However, in FIGS. 2 to 10 , terms referring to data used in the inference process and terms referring to data used in the learning process may be used separately. For example, data used in the inference process of the machine learning model may be described as 'image', 'text area mask', 'correction image', and 'surrounding area of stroke'. On the other hand, the data used for machine learning model learning are 'reference image', 'reference text area mask', 'reference correction image', 'region around reference stroke', 'reference label mask', and 'reference correct answer image'. can be listed. That is, the data term 'X' (eg, image, etc.) used in the inference process and the data term used in the corresponding learning process may be defined as 'reference X' (eg, reference image, etc.). .

도 2는 본 개시의 일 실시예에 따른 정보 처리 시스템(230)이 복수의 사용자 단말(210_1, 210_2, 210_3)과 통신 가능하도록 연결된 구성을 나타내는 개요도이다. 정보 처리 시스템(230)은 이미지 내의 텍스트를 삭제하기 위한 시스템 및/또는 장치(들)를 포함할 수 있다. 일 실시예에서, 정보 처리 시스템(230)은 이미지 내의 텍스트를 삭제하는 것과 관련된 컴퓨터 실행 가능한 프로그램(예를 들어, 다운로드 가능한 어플리케이션) 및 데이터를 저장, 제공 및 실행할 수 있는 하나 이상의 서버 장치 및/또는 데이터베이스, 또는 클라우드 컴퓨팅 서비스 기반의 하나 이상의 분산 컴퓨팅 장치 및/또는 분산 데이터베이스를 포함할 수 있다. 정보 처리 시스템(230)은 어플리케이션(예: 인공지능 어플리케이션 등)을 통해 입력되는 신호에 대응하는 정보를 제공하거나 대응하는 처리를 수행할 수 있다. 예를 들어, 정보 처리 시스템(230)은 이미지 처리(예를 들어, 이미지 내의 텍스트를 삭제하는 처리 등)와 관련된 서비스를 제공하도록 구성된 임의의 어플리케이션을 통해 복수의 사용자 단말(210_1, 210_2, 210_3)을 제어할 수 있다.2 is a schematic diagram illustrating a configuration in which an information processing system 230 according to an embodiment of the present disclosure is connected to communicate with a plurality of user terminals 210_1, 210_2, and 210_3. Information processing system 230 may include a system and/or device(s) for deleting text within an image. In one embodiment, the information processing system 230 is one or more server devices and/or devices capable of storing, providing, and executing computer-executable programs (eg, downloadable applications) and data related to deleting text within an image. database, or one or more distributed computing devices and/or distributed databases based on cloud computing services. The information processing system 230 may provide information corresponding to a signal input through an application (eg, an artificial intelligence application, etc.) or perform a corresponding process. For example, the information processing system 230 may process a plurality of user terminals 210_1, 210_2, and 210_3 through an arbitrary application configured to provide a service related to image processing (eg, processing of deleting text in an image). can control.

정보 처리 시스템(230)은 네트워크(220)를 통해 복수의 사용자 단말(210_1, 210_2, 210_3)과 통신할 수 있다. 네트워크(220)는 복수의 사용자 단말(210_1, 210_2, 210_3)과 정보 처리 시스템(230) 사이의 통신이 가능하도록 구성될 수 있다. 네트워크(220)는 설치 환경에 따라, 예를 들어, 이더넷(Ethernet), 유선 홈 네트워크(Power Line Communication), 전화선 통신 장치 및 RS-serial 통신 등의 유선 네트워크, 이동통신망, WLAN(Wireless LAN), Wi-Fi, Bluetooth 및 ZigBee 등과 같은 무선 네트워크 또는 그 조합으로 구성될 수 있다. 통신 방식은 제한되지 않으며, 네트워크(220)가 포함할 수 있는 통신망(일례로, 이동통신망, 유선 인터넷, 무선 인터넷, 방송망, 위성망 등)을 활용하는 통신 방식뿐만 아니라 복수의 사용자 단말(210_1, 210_2, 210_3) 사이의 근거리 무선 통신 역시 포함될 수 있다.The information processing system 230 may communicate with a plurality of user terminals 210_1 , 210_2 , and 210_3 through the network 220 . The network 220 may be configured to enable communication between the plurality of user terminals 210_1, 210_2, and 210_3 and the information processing system 230. Depending on the installation environment, the network 220 may be, for example, a wired network such as Ethernet, a wired home network (Power Line Communication), a telephone line communication device and RS-serial communication, a mobile communication network, a wireless LAN (WLAN), It may consist of a wireless network such as Wi-Fi, Bluetooth, and ZigBee, or a combination thereof. The communication method is not limited, and a plurality of user terminals (210_1, 210_2) as well as a communication method utilizing a communication network (eg, mobile communication network, wired Internet, wireless Internet, broadcasting network, satellite network, etc.) that the network 220 may include. , 210_3) may also include short-range wireless communication.

도 2에서 휴대폰 단말기(210_1), 태블릿 단말기(210_2) 및 PC 단말기(210_3)가 사용자 단말의 예로서 도시되었으나, 이에 한정되지 않으며, 사용자 단말(210_1, 210_2, 210_3)은 유선 및/또는 무선 통신이 가능하고 번역 어플리케이션, 이미지 처리 어플리케이션, 인공지능 어플리케이션 등이 설치되어 실행될 수 있는 임의의 컴퓨팅 장치일 수 있다. 예를 들어, 사용자 단말은, 스마트폰(smart phone), 휴대폰, 내비게이션, 컴퓨터, 노트북, 디지털방송용 단말, PDA(Personal Digital Assistants), PMP(Portable Multimedia Player), 태블릿 PC, 게임 콘솔(game console), 웨어러블 디바이스(wearable device), IoT(internet of things) 디바이스, VR(virtual reality) 디바이스, AR(augmented reality) 디바이스 등을 포함할 수 있다. 또한, 도 2에는 3개의 사용자 단말(210_1, 210_2, 210_3)이 네트워크(220)를 통해 정보 처리 시스템(230)과 통신하는 것으로 도시되어 있으나, 이에 한정되지 않으며, 상이한 수의 사용자 단말이 네트워크(220)를 통해 정보 처리 시스템(230)과 통신하도록 구성될 수도 있다.In FIG. 2, a mobile phone terminal 210_1, a tablet terminal 210_2, and a PC terminal 210_3 are illustrated as examples of user terminals, but are not limited thereto, and the user terminals 210_1, 210_2, and 210_3 may perform wired and/or wireless communication. It may be any computing device capable of this and capable of installing and running a translation application, an image processing application, an artificial intelligence application, and the like. For example, the user terminal includes a smart phone, a mobile phone, a navigation device, a computer, a laptop computer, a digital broadcasting terminal, a PDA (Personal Digital Assistants), a PMP (Portable Multimedia Player), a tablet PC, and a game console. , a wearable device, an internet of things (IoT) device, a virtual reality (VR) device, an augmented reality (AR) device, and the like. In addition, although three user terminals 210_1, 210_2, and 210_3 are shown in FIG. 2 to communicate with the information processing system 230 through the network 220, it is not limited thereto, and a different number of user terminals may be connected to the network ( 220) to communicate with the information processing system 230.

일 실시예에서, 사용자 단말(210_1, 210_2, 210_3)은 네트워크(220)를 통해 이미지 내의 텍스트를 삭제하는 방법과 관련된 데이터 요청을 정보 처리 시스템(230)으로 전송하고, 정보 처리 시스템(230)으로부터 이와 관련된 데이터(예를 들어, 텍스트 객체가 삭제된 이미지)를 수신할 수 있다.In one embodiment, the user terminals 210_1, 210_2, and 210_3 transmit a data request related to a method of deleting text in an image to the information processing system 230 through the network 220, and from the information processing system 230. Data related thereto (eg, an image in which a text object is deleted) may be received.

도 3은 본 개시의 일 실시예에 따른 사용자 단말(210) 및 정보 처리 시스템(230)의 내부 구성을 나타내는 블록도이다. 사용자 단말(210)은 번역 어플리케이션, 텍스트 에디팅 어플리케이션, 이미지 처리 어플리케이션 및/또는 인공지능 어플리케이션 등이 실행 가능하고 유/무선 통신이 가능한 임의의 컴퓨팅 장치를 지칭할 수 있으며, 예를 들어, 도 2의 휴대폰 단말기(210_1), 태블릿 단말기(210_2) 및 PC 단말기(210_3) 등을 포함할 수 있다. 도시된 바와 같이, 사용자 단말(210)은 메모리(312), 프로세서(314), 통신 모듈(316) 및 입출력 인터페이스(318)를 포함할 수 있다. 이와 유사하게, 정보 처리 시스템(230)은 메모리(332), 프로세서(334), 통신 모듈(336) 및 입출력 인터페이스(338)를 포함할 수 있다. 도 3에 도시된 바와 같이, 사용자 단말(210) 및 정보 처리 시스템(230)은 각각의 통신 모듈(316, 336)을 이용하여 네트워크(220)를 통해 정보 및/또는 데이터를 통신할 수 있도록 구성될 수 있다. 또한, 입출력 장치(320)는 입출력 인터페이스(318)를 통해 사용자 단말(210)에 정보 및/또는 데이터를 입력하거나 사용자 단말(210)로부터 생성된 정보 및/또는 데이터를 출력하도록 구성될 수 있다.Figure 3 is a block diagram showing the internal configuration of the user terminal 210 and the information processing system 230 according to an embodiment of the present disclosure. The user terminal 210 may refer to any computing device capable of executing a translation application, a text editing application, an image processing application, and/or an artificial intelligence application, and capable of wired/wireless communication. For example, in FIG. It may include a mobile phone terminal 210_1, a tablet terminal 210_2, and a PC terminal 210_3. As shown, the user terminal 210 may include a memory 312 , a processor 314 , a communication module 316 and an input/output interface 318 . Similarly, the information processing system 230 may include a memory 332 , a processor 334 , a communication module 336 and an input/output interface 338 . As shown in FIG. 3, the user terminal 210 and the information processing system 230 are configured to communicate information and/or data through the network 220 using respective communication modules 316 and 336. It can be. In addition, the input/output device 320 may be configured to input information and/or data to the user terminal 210 through the input/output interface 318 or output information and/or data generated from the user terminal 210.

메모리(312, 332)는 비-일시적인 임의의 컴퓨터 판독 가능한 기록매체를 포함할 수 있다. 일 실시예에 따르면, 메모리(312, 332)는 RAM(random access memory), ROM(read only memory), 디스크 드라이브, SSD(solid state drive), 플래시 메모리(flash memory) 등과 같은 비소멸성 대용량 저장 장치(permanent mass storage device)를 포함할 수 있다. 다른 실시예에서, ROM, SSD, 플래시 메모리, 디스크 드라이브 등과 같은 비소멸성 대용량 저장 장치는 메모리와는 구분되는 별도의 영구 저장 장치로서 사용자 단말(210) 및/또는 정보 처리 시스템(230)에 포함될 수 있다. 또한, 메모리(312, 332)에는 운영체제와 적어도 하나의 프로그램 코드(예를 들어, 사용자 단말(210)에 설치되어 구동되는 번역 어플리케이션, 텍스트 에디팅 어플리케이션, 이미지 처리 어플리케이션 및/또는 인공지능 어플리케이션 등을 위한 코드)가 저장될 수 있다.The memories 312 and 332 may include any non-transitory computer readable media. According to one embodiment, the memories 312 and 332 are non-perishable mass storage devices such as random access memory (RAM), read only memory (ROM), disk drives, solid state drives (SSDs), flash memory, and the like. (permanent mass storage device) may be included. In another embodiment, a non-perishable mass storage device such as ROM, SSD, flash memory, disk drive, etc. may be included in the user terminal 210 and/or the information processing system 230 as a separate permanent storage device distinct from memory. there is. In addition, the memories 312 and 332 include an operating system and at least one program code (for example, a translation application, a text editing application, an image processing application, and/or an artificial intelligence application installed and driven in the user terminal 210). code) can be stored.

이러한 소프트웨어 구성요소들은 메모리(312, 332)와는 별도의 컴퓨터에서 판독 가능한 기록매체로부터 로딩될 수 있다. 이러한 별도의 컴퓨터에서 판독가능한 기록매체는 이러한 사용자 단말(210) 및 정보 처리 시스템(230)에 직접 연결가능한 기록 매체를 포함할 수 있는데, 예를 들어, 플로피 드라이브, 디스크, 테이프, DVD/CD-ROM 드라이브, 메모리 카드 등의 컴퓨터에서 판독 가능한 기록매체를 포함할 수 있다. 다른 예로서, 소프트웨어 구성요소들은 컴퓨터에서 판독 가능한 기록매체가 아닌 통신 모듈을 통해 메모리(312, 332)에 로딩될 수도 있다. 예를 들어, 적어도 하나의 프로그램은 개발자들 또는 어플리케이션의 설치 파일을 배포하는 파일 배포 시스템이 네트워크(220)를 통해 제공하는 파일들에 의해 설치되는 컴퓨터 프로그램에 기반하여 메모리(312, 332)에 로딩될 수 있다.These software components may be loaded from a computer readable recording medium separate from the memories 312 and 332 . A recording medium readable by such a separate computer may include a recording medium directly connectable to the user terminal 210 and the information processing system 230, for example, a floppy drive, a disk, a tape, a DVD/CD- It may include a computer-readable recording medium such as a ROM drive and a memory card. As another example, software components may be loaded into the memories 312 and 332 through a communication module rather than a computer-readable recording medium. For example, at least one program is loaded into the memories 312 and 332 based on a computer program installed by files provided by developers or a file distribution system that distributes application installation files through the network 220 . It can be.

프로세서(314, 334)는 기본적인 산술, 로직 및 입출력 연산을 수행함으로써, 컴퓨터 프로그램의 명령을 처리하도록 구성될 수 있다. 명령은 메모리(312, 332) 또는 통신 모듈(316, 336)에 의해 프로세서(314, 334)로 제공될 수 있다. 예를 들어, 프로세서(314, 334)는 메모리(312, 332)와 같은 기록 장치에 저장된 프로그램 코드에 따라 수신되는 명령을 실행하도록 구성될 수 있다.The processors 314 and 334 may be configured to process instructions of a computer program by performing basic arithmetic, logic, and input/output operations. Instructions may be provided to processors 314 and 334 by memories 312 and 332 or communication modules 316 and 336 . For example, processors 314 and 334 may be configured to execute instructions received according to program codes stored in a recording device such as memory 312 and 332 .

통신 모듈(316, 336)은 네트워크(220)를 통해 사용자 단말(210)과 정보 처리 시스템(230)이 서로 통신하기 위한 구성 또는 기능을 제공할 수 있으며, 사용자 단말(210) 및/또는 정보 처리 시스템(230)이 다른 사용자 단말 및/또는 다른 시스템(일례로 별도의 클라우드 시스템 등)과 통신하기 위한 구성 또는 기능을 제공할 수 있다. 일례로, 사용자 단말(210)의 프로세서(314)가 메모리(312) 등과 같은 기록 장치에 저장된 프로그램 코드에 따라 생성한 요청 또는 데이터(예를 들어, 이미지 내의 텍스트 객체와 연관된 데이터 등)는 통신 모듈(316)의 제어에 따라 네트워크(220)를 통해 정보 처리 시스템(230)으로 전달될 수 있다. 역으로, 정보 처리 시스템(230)의 프로세서(334)의 제어에 따라 제공되는 제어 신호나 명령이 통신 모듈(336)과 네트워크(220)를 거쳐 사용자 단말(210)의 통신 모듈(316)을 통해 사용자 단말(210)에 수신될 수 있다.The communication modules 316 and 336 may provide configurations or functions for the user terminal 210 and the information processing system 230 to communicate with each other through the network 220, and the user terminal 210 and/or information processing. System 230 may provide configurations or functions for communicating with other user terminals and/or other systems (eg, separate cloud systems, etc.). For example, a request or data generated by the processor 314 of the user terminal 210 according to a program code stored in a recording device such as the memory 312 (eg, data associated with a text object in an image) is transmitted through a communication module It may be transferred to the information processing system 230 through the network 220 under the control of 316 . Conversely, a control signal or command provided under the control of the processor 334 of the information processing system 230 passes through the communication module 336 and the network 220 and through the communication module 316 of the user terminal 210. It may be received by the user terminal 210 .

입출력 인터페이스(318)는 입출력 장치(320)와의 인터페이스를 위한 수단일 수 있다. 일 예로서, 입력 장치는 가속도 센서, 자이로스코프(즉, 각속도 센서) 등의 관성 센서, 광학 카메라, IR 카메라 등의 광학 센서, ToF, LiDAR 센서, Depth 카메라 등의 거리 감지 센서를 포함할 수 있다. 추가적으로 입력 장치는 오디오 센서 및/또는 이미지 센서를 포함한 카메라, 키보드, 마이크로폰, 마우스 등의 장치를 포함하고, 출력 장치는 디스플레이, 스피커, 햅틱 피드백 디바이스(haptic feedback device) 등과 같은 장치를 포함할 수 있다. 다른 예로서, 입출력 인터페이스(318)는 터치스크린 등과 같이 입력과 출력을 수행하기 위한 구성 또는 기능이 하나로 통합된 장치와의 인터페이스를 위한 수단일 수 있다. 예를 들어, 사용자 단말(210)의 프로세서(314)가 메모리(312)에 로딩된 컴퓨터 프로그램의 명령을 처리함에 있어서 정보 처리 시스템(230)이 제공하는 정보 및/또는 데이터를 이용하여 구성되는 서비스 화면 등이 입출력 인터페이스(318)를 통해 디스플레이에 표시될 수 있다. 도 3에서는 입출력 장치(320)가 사용자 단말(210)에 포함되지 않도록 도시되어 있으나, 이에 한정되지 않으며, 사용자 단말(210)과 하나의 장치로 구성될 수 있다. 또한, 정보 처리 시스템(230)의 입출력 인터페이스(338)는 정보 처리 시스템(230)과 연결되거나 정보 처리 시스템(230)이 포함할 수 있는 입력 또는 출력을 위한 장치(미도시)와의 인터페이스를 위한 수단일 수 있다. 도 3에서는 입출력 인터페이스(318, 338)가 프로세서(314, 334)와 별도로 구성된 요소로서 도시되었으나, 이에 한정되지 않으며, 입출력 인터페이스(318, 338)가 프로세서(314, 334)에 포함되도록 구성될 수 있다.The input/output interface 318 may be a means for interfacing with the input/output device 320 . As an example, the input device may include an inertial sensor such as an acceleration sensor or a gyroscope (ie, an angular velocity sensor), an optical sensor such as an optical camera or an IR camera, or a distance sensor such as a ToF, LiDAR sensor, or depth camera. . Additionally, the input device may include a device such as a camera, keyboard, microphone, mouse, etc. including an audio sensor and/or an image sensor, and the output device may include a device such as a display, speaker, or haptic feedback device. . As another example, the input/output interface 318 may be a means for interface with a device in which a configuration or function for performing input and output is integrated into one, such as a touch screen. For example, a service configured using information and/or data provided by the information processing system 230 when the processor 314 of the user terminal 210 processes a command of a computer program loaded into the memory 312. A screen or the like may be displayed on the display through the input/output interface 318 . Although the input/output device 320 is not included in the user terminal 210 in FIG. 3 , it is not limited thereto, and the user terminal 210 and the user terminal 210 may be configured as one device. In addition, the input/output interface 338 of the information processing system 230 is connected to the information processing system 230 or means for interface with a device (not shown) for input or output that the information processing system 230 may include. can be In FIG. 3, the input/output interfaces 318 and 338 are shown as separate elements from the processors 314 and 334, but are not limited thereto, and the input/output interfaces 318 and 338 may be included in the processors 314 and 334. there is.

사용자 단말(210) 및 정보 처리 시스템(230)은 도 3의 구성요소들보다 더 많은 구성요소들을 포함할 수 있다. 그러나, 대부분의 종래기술적 구성요소들을 명확하게 도시할 필요성은 없다. 일 실시예에 따르면, 사용자 단말(210)은 상술된 입출력 장치(320) 중 적어도 일부를 포함하도록 구현될 수 있다. 또한, 사용자 단말(210)은 트랜시버(transceiver), GPS(Global Positioning system) 모듈, 카메라, 각종 센서, 데이터베이스 등과 같은 다른 구성요소들을 더 포함할 수 있다. 예를 들어, 사용자 단말(210)은 카메라 모듈, 터치패널, 입출력 포트 등의 다양한 구성요소들이 사용자 단말(210)에 더 포함되도록 구현될 수 있다.The user terminal 210 and the information processing system 230 may include more components than those shown in FIG. 3 . However, there is no need to clearly show most of the prior art components. According to one embodiment, the user terminal 210 may be implemented to include at least some of the aforementioned input/output devices 320 . In addition, the user terminal 210 may further include other components such as a transceiver, a global positioning system (GPS) module, a camera, various sensors, and a database. For example, the user terminal 210 may be implemented such that various components such as a camera module, a touch panel, and an input/output port are further included in the user terminal 210 .

일 실시예에 따르면, 사용자 단말(210)의 프로세서(314)는 사용자 단말(210)을 동작하거나 제어할 수 있는 임의의 어플리케이션을 동작하도록 구성될 수 있다. 예를 들어, 번역 어플리케이션, 텍스트 에디팅 어플리케이션, 이미지 처리 어플리케이션 및/또는 인공지능 어플리케이션 등이 동작하도록 구성될 수 있다. 이 때, 해당 어플리케이션 및/또는 프로그램과 연관된 코드가 사용자 단말(210)의 메모리(312)에 로딩될 수 있다. 어플리케이션 및/또는 프로그램이 동작되는 동안에, 사용자 단말(210)의 프로세서(314)는 입출력 장치(320)로부터 제공된 정보 및/또는 데이터를 입출력 인터페이스(318)를 통해 수신하거나 통신 모듈(316)을 통해 정보 처리 시스템(230)으로부터 정보 및/또는 데이터를 수신할 수 있으며, 수신된 정보 및/또는 데이터를 처리하여 메모리(312)에 저장할 수 있다. 또한, 이러한 정보 및/또는 데이터는 통신 모듈(316)을 통해 정보 처리 시스템(230)에 제공할 수 있다.According to one embodiment, the processor 314 of the user terminal 210 may be configured to run any application capable of operating or controlling the user terminal 210 . For example, a translation application, a text editing application, an image processing application, and/or an artificial intelligence application may be configured to operate. At this time, codes associated with the application and/or program may be loaded into the memory 312 of the user terminal 210 . While the application and/or program is running, the processor 314 of the user terminal 210 receives information and/or data provided from the input/output device 320 through the input/output interface 318 or through the communication module 316. Information and/or data may be received from the information processing system 230 , and the received information and/or data may be processed and stored in the memory 312 . Additionally, such information and/or data may be provided to information processing system 230 via communication module 316 .

텍스트 에디팅 어플리케이션 등을 위한 프로그램이 동작되는 동안에, 프로세서(314)는 입출력 인터페이스(318)와 연결된 터치 스크린, 키보드, 오디오 센서 및/또는 이미지 센서를 포함한 카메라, 마이크로폰 등의 입력 장치를 통해 입력되거나 선택된 텍스트, 이미지, 영상, 음성 등을 수신할 수 있으며, 수신된 텍스트, 이미지, 영상 및/또는 음성 등을 메모리(312)에 저장하거나 통신 모듈(316) 및 네트워크(220)를 통해 정보 처리 시스템(230)에 제공할 수 있다.While a program for a text editing application or the like is running, the processor 314 receives information input or selected through an input device such as a camera, microphone, or the like including a touch screen, keyboard, audio sensor, and/or image sensor connected to the input/output interface 318. It can receive text, image, video, voice, etc., and store the received text, image, video, and/or voice in the memory 312 or through the communication module 316 and the network 220 to the information processing system ( 230) can be provided.

정보 처리 시스템(230)의 프로세서(334)는, 사용자 단말(210)을 포함한 복수의 사용자 단말 및/또는 복수의 외부 시스템으로부터 수신된 정보 및/또는 데이터를 관리, 처리 및/또는 저장하도록 구성될 수 있다. 프로세서(334)에 의해 처리된 정보 및/또는 데이터는 통신 모듈(336) 및 네트워크(220)를 통해 사용자 단말(210)에 제공할 수 있다. 일 실시예에서, 정보 처리 시스템(230)의 프로세서(334)는 통신 모듈(336) 및 네트워크(220)를 통해 사용자 단말(210)로부터 이미지 내의 텍스트 삭제에 대한 요청을 수신할 수 있다. 정보 처리 시스템(330)의 프로세서(334)는 사용자 단말(210)의 디스플레이 출력 가능 장치(예: 터치 스크린, 디스플레이 등) 등의 출력 장치를 통해 처리된 정보 및/또는 데이터(예를 들어, 텍스트가 삭제된 이미지)를 출력하도록 구성될 수 있다. 이와 달리, 텍스트 삭제에 대한 요청을 수신하는 경우, 사용자 단말(210)의 프로세서(314)는 사용자 단말(210)의 메모리(312)에 저장된 기계학습 모델을 이용하여 텍스트 삭제 처리를 하도록 구성될 수 있다. 즉, 이미지 내의 텍스트 삭제를 위한 기계학습 모델의 추론 과정은 사용자 단말에서 수행될 수 있다.The processor 334 of the information processing system 230 may be configured to manage, process and/or store information and/or data received from a plurality of user terminals including the user terminal 210 and/or a plurality of external systems. can Information and/or data processed by the processor 334 may be provided to the user terminal 210 through the communication module 336 and the network 220 . In one embodiment, the processor 334 of the information processing system 230 may receive a request for deleting text in an image from the user terminal 210 through the communication module 336 and the network 220 . The processor 334 of the information processing system 330 processes information and/or data (eg, text) through an output device such as a display output capable device (eg, a touch screen, a display, etc.) of the user terminal 210. may be configured to output a deleted image). Alternatively, when receiving a request for text deletion, the processor 314 of the user terminal 210 may be configured to perform text deletion processing using a machine learning model stored in the memory 312 of the user terminal 210. there is. That is, an inference process of a machine learning model for deleting text in an image may be performed in a user terminal.

도 4는 본 개시의 일 실시예에 따른 기계학습 모델의 구성도이다. 도시된 바와 같이, 기계학습 모델은 참조 이미지(420) 및 참조 이미지(420)에 대응하는 참조 텍스트 영역 마스크(410)를 입력 받아 제1 참조 보정 이미지(440)를 생성하도록 학습되는 생성 모델(또는 생성기(generator))(430)를 포함할 수 있다. 여기서, 참조 보정 이미지(440)는 참조 이미지(420) 내의 텍스트 객체가 삭제된 비-텍스트 이미지(non-text image)를 지칭할 수 있다. 일 실시예에 따르면, 생성 모델(430)은 FCN-ResNet18 백본(backbone)으로 구현될 수 있고, 커널(kernel)의 크기는 4, 스트라이드(stride)는 2, 패딩(padding)이 1인 다섯개의 디콘볼루션 레이어들(434)과 쌍을 이루는 다섯개의 컨볼루션 레이어들(432)을 포함할 수 있으나, 이에 한정되지 않으며, 다양한 크기를 가진 임의의 모델을 포함할 수 있다.4 is a configuration diagram of a machine learning model according to an embodiment of the present disclosure. As shown, the machine learning model receives a reference image 420 and a reference text area mask 410 corresponding to the reference image 420 and is trained to generate a first reference corrected image 440 (or generator) (430). Here, the reference corrected image 440 may refer to a non-text image from which text objects in the reference image 420 are deleted. According to one embodiment, the generative model 430 may be implemented with an FCN-ResNet18 backbone, and the size of the kernel is 4, the stride is 2, and the padding is 1. It may include five convolution layers 432 paired with the deconvolution layers 434, but is not limited thereto, and may include arbitrary models having various sizes.

일 실시예에 따르면, 생성 모델(430) 및 판별 모델(예: 판별 모델(150))의 목적 함수(objective function)는 각각 수학식 1 및 수학식 2와 같다.According to an embodiment, objective functions of the generative model 430 and the discriminant model (eg, the discriminant model 150) are as Equations 1 and 2, respectively.

Figure pat00001
Figure pat00001

Figure pat00002
Figure pat00002

수학식 1 및 수학식 2에서, G 및 D는 각각 생성 모델(430) 및 판별 모델을 지칭한다. 또한, x 및 y는 각각 참조 텍스트 영역 마스크(410)와 결합된(concatenated) 참조 이미지(420) 및 참조 정답 이미지(ground truth image)(460)를 지칭한다.In Equations 1 and 2, G and D refer to a generative model 430 and a discriminant model, respectively. Also, x and y denote a reference image 420 and a ground truth image 460 concatenated with the reference text area mask 410 , respectively.

일 실시예에 따르면, 생성 모델(430)은 참조 텍스트 영역 마스크(410)와 결합된(concatenated) 참조 이미지(420)에 대한 컨볼루션 및 디컨볼루션을 수행할 수 있다. 이 경우, 생성 모델(430)에 포함된 컨볼루션 레이어들(432)은 참조 이미지(420) 및 참조 텍스트 영역 마스크(410)를 이용하여 참조 이미지(420) 내의 하나 이상의 참조 스트로크의 주변 영역(예: 스트로크의 주변 영역(172, 174))에 대한 정보를 결정하도록 구성된 공간 집중(Spatial Attention) 모델(436)을 포함할 수 있다. 본 개시에서, 공간 집중 모델(436)은 공간 집중 모듈 또는 RAMA(Region Aware Mask Guided Attention)으로 표시될 수 있다. 공간 집중 모델(436)에 대한 상세한 설명은 도 5에서 후술된다.According to an embodiment, the generation model 430 may perform convolution and deconvolution on the reference image 420 concatenated with the reference text area mask 410 . In this case, the convolution layers 432 included in the generation model 430 use the reference image 420 and the reference text area mask 410 to determine the surrounding area of one or more reference strokes in the reference image 420 (eg : A Spatial Attention model 436 configured to determine information about the surrounding areas 172 and 174 of the stroke. In this disclosure, the spatial concentration model 436 may be denoted as a spatial concentration module or Region Aware Mask Guided Attention (RAMA). A detailed description of the spatial concentration model 436 is described later in FIG. 5 .

일 실시예에 따르면, 생성 모델(430)은 제1 참조 보정 이미지(440)에 대응하는 참조 정답 이미지(460)와 제1 참조 보정 이미지(440)를 기초로 정의된 손실 함수(450)를 이용하여 학습될 수 있다. 이 경우, 손실 함수(450)의 값은, 참조 정답 이미지(460)와 제1 참조 보정 이미지(440) 사이의 차이 및 입력된 참조 텍스트 영역 마스크(410)의 교차 영역을 기초로 산출될 수 있다. 예를 들어, 손실 함수(LRR 또는 LM)(450)는 수학식 3으로 정의될 수 있다.According to an embodiment, the generation model 430 uses a reference correct image 460 corresponding to the first reference corrected image 440 and a loss function 450 defined based on the first reference corrected image 440. so it can be learned. In this case, the value of the loss function 450 may be calculated based on the difference between the reference correct image 460 and the first reference correction image 440 and the intersection area of the input reference text area mask 410. . For example, the loss function (L RR or L M ) 450 may be defined as Equation 3.

Figure pat00003
Figure pat00003

수학식 3에서 Iout(i)는 생성 모델(430)의 i 번째(i는 자연수) 디컨볼루션 레이어들(434)을 나타낸다. 또한, 수학식 3에서 Mi 및 Igt(i)는 Iout(i)와 동일한 스케일로 크기가 조정된 텍스트 영역 마스크(410) 및 참조 정답 이미지(460)를 나타낸다. 본 개시에서, 수학식 3으로 정의된 LM은 LRR 또는 RRL(Region Regression Loss)로 표시될 수 있다.In Equation 3, I out(i) represents the ith (i is a natural number) deconvolution layers 434 of the generative model 430 . In Equation 3, M i and I gt(i) represent the text area mask 410 and the reference answer image 460 scaled to the same scale as I out(i) . In the present disclosure, L M defined by Equation 3 may be expressed as L RR or Region Regression Loss (RRL).

일 실시예에 따르면, 생성 모델(430)의 컨볼루션 레이어들(432) 및/또는 디컨볼루션 레이어들(434)로부터 하나 이상의 제2 참조 보정 이미지를 추출할 수 있다. 예를 들어, 도 4에 도시된 바와 같이, 디컨볼루션 레이어의 적어도 일부(438_1, 438_2, 438_3)가 제2 참조 보정 이미지로서 추출될 수 있다. 여기서, 하나 이상의 제2 참조 보정 이미지 각각의 크기는 제1 참조 보정 이미지(440)의 크기와 상이할 수 있다. 추출된 하나 이상의 제2 참조 보정 이미지는 손실 함수(450)를 정의하는데 이용될 수 있다. 예를 들어, 손실 함수(450)의 값을 산출하기 위하여 디컨볼루션 레이어들(434)이 사용될 수 있다. 본 개시에서, 손실 함수(450)를 정의하기 위하여 3번째 디컨볼루션 레이어(438_1), 4번째 디컨볼루션 레이어(438_2) 및 5번째 디컨볼루션 레이어(438_3)가 사용될 수 있다. 이 경우,

Figure pat00004
,
Figure pat00005
Figure pat00006
는 각각 0.6, 0.8 및 1.0으로 설정될 수 있다.According to an embodiment, one or more second reference correction images may be extracted from the convolution layers 432 and/or the deconvolution layers 434 of the generation model 430 . For example, as shown in FIG. 4 , at least some portions 438_1, 438_2, and 438_3 of the deconvolution layer may be extracted as a second reference correction image. Here, the size of each of the one or more second reference corrected images may be different from that of the first reference corrected image 440 . The one or more extracted second reference corrected images may be used to define loss function 450 . For example, deconvolution layers 434 may be used to compute the value of loss function 450 . In this disclosure, a third deconvolution layer 438_1 , a fourth deconvolution layer 438_2 , and a fifth deconvolution layer 438_3 may be used to define the loss function 450 . in this case,
Figure pat00004
,
Figure pat00005
and
Figure pat00006
may be set to 0.6, 0.8 and 1.0, respectively.

일 실시예에 따르면, 생성 모델(430)의 총 손실 함수 LG는 수학식 4로 정의될 수 있다.According to one embodiment, the total loss function L G of the generative model 430 may be defined as Equation 4.

Figure pat00007
Figure pat00007

여기서, Ladv는 수학식 1에서 정의된 생성 모델(430)의 목적 함수를 나타내고,

Figure pat00008
는 수학식 10에서 정의되는 함수를 지칭할 수 있다. 또한,
Figure pat00009
,
Figure pat00010
,
Figure pat00011
,
Figure pat00012
,
Figure pat00013
Figure pat00014
는 대응 로스 함수(로스)의 가중치를 나타낼 수 있다. 예를 들어,
Figure pat00015
,
Figure pat00016
,
Figure pat00017
,
Figure pat00018
,
Figure pat00019
Figure pat00020
는 각각 100, 0.5, 50.0, 25.0, 1 및 1로 설정될 수 있다. 이하에서는, 각 함수가 상세히 정의될 수 있다.Here, L adv represents the objective function of the generative model 430 defined in Equation 1,
Figure pat00008
may refer to a function defined in Equation 10. also,
Figure pat00009
,
Figure pat00010
,
Figure pat00011
,
Figure pat00012
,
Figure pat00013
and
Figure pat00014
may represent the weight of the corresponding loss function (loss). for example,
Figure pat00015
,
Figure pat00016
,
Figure pat00017
,
Figure pat00018
,
Figure pat00019
and
Figure pat00020
may be set to 100, 0.5, 50.0, 25.0, 1 and 1, respectively. In the following, each function may be defined in detail.

Lp는 생성된 참조 보정 이미지(440)를 보다 사실적으로 만드는 데 이용될 수 있다. 이는 이미 알려진, 사전 학습된 ImageNet을 이용하여 추출한 두 이미지의 하이레벨 피처 사이의 차이를 감소시키는데 사용될 수 있다. 구체적으로, 참조 텍스트 영역 마스크(410)와 참조 텍스트 스트로크 마스크(미도시)를 각각 이용하여 생성된 두 개의 합성 출력을 이용하기 위한 손실 함수 Lp가 설계될 수 있다. 여기서, 참조 텍스트 스트로크 마스크는, 생성 모델(430)이 참조 이미지(420) 및 참조 보정 이미지(440)에 대응하는 참조 정답 이미지(460) 사이의 픽셀 값 차이를 기초로 생성한 마스크를 지칭할 수 있다. Lp는 수학식 5 내지 6에 의해 수학식 7로 정의될 수 있다.L p can be used to make the generated reference corrected image 440 more realistic. This can be used to reduce the difference between the high-level features of two images extracted using a known, pre-trained ImageNet. Specifically, a loss function L p for using two composite outputs generated using the reference text area mask 410 and the reference text stroke mask (not shown) may be designed. Here, the reference text stroke mask may refer to a mask generated by the generation model 430 based on a pixel value difference between the reference image 420 and the reference correct image 460 corresponding to the reference corrected image 440. there is. L p may be defined as Equation 7 by Equations 5 and 6.

Figure pat00021
Figure pat00021

Figure pat00022
Figure pat00022

Figure pat00023
Figure pat00023

수학식 5 내지 7에서 Iin, Iout은 각각 생성 모델의 입력 이미지와 출력 이미지를 나타내고, IboxComp 및 IstrokeComp는 각각 참조 텍스트 영역 마스크(410) Mbox 및 참조 텍스트 스트로크 마스크 MStorke로 합성하여 생성된 이미지를 지칭할 수 있다. Igt는 참조 정답 이미지(460)이고, An은 네트워크에서 n번째 레이어의 활성화를 나타낼 수 있다. 또한, 이미 알려진 ImageNet에서 사전 학습된 VGG-16의 pool1, pool2 및 pool3이 이용될 수 있다.In Equations 5 to 7, I in and I out represent the input image and output image of the generated model, respectively, and I boxComp and I strokeComp are synthesized with the reference text area mask 410 M box and the reference text stroke mask M Storke , respectively. It can refer to the created image. I gt is the reference answer image 460, and A n may indicate activation of the n-th layer in the network. In addition, pool1, pool2, and pool3 of VGG-16 pretrained on ImageNet, which is already known, can be used.

수학식 4의 Ls는 또한 참조 보정 이미지(440)의 더 나은 시각적 품질과 피처 일관성을 장려하기 위해 이용될 수 있다. 이는 피처맵의 그램 매트릭스(Gram matrix)을 이용하여 산출될 수 있다. Lp와 같이, 두 개의 합성 출력이 이용될 수 있다. Ls는 수학식 8로 정의될 수 있다. 여기서, ф(x)=xTx는 그램 매트릭스 연산자이고, An는 VGG-16의

Figure pat00024
번째 레이어의 활성화를 나타낸다. 또한, Lp와 동일한 레이어가 이용될 수 있다.L s in Equation 4 can also be used to encourage better visual quality and feature consistency of the reference calibrated image 440. This can be calculated using the gram matrix of the feature map. As with L p , two composite outputs may be used. L s may be defined by Equation 8. where ф(x)=x T x is the gram matrix operator, and A n is the VGG-16
Figure pat00024
Indicates the activation of the second layer. Also, the same layer as L p may be used.

Figure pat00025
Figure pat00025

노이즈 제거를 위한 수학식 4의 Lt는 합성 출력을 이용할 때, 참조 텍스트 영역 마스크(410)를 이용하여 생성된 합성 이미지가 이용될 수 있다. 여기서, Lt는 수학식 9로 정의될 수 있다.When synthetic output is used for L t in Equation 4 for noise removal, a synthetic image generated using the reference text area mask 410 may be used. Here, L t may be defined by Equation 9.

Figure pat00026
Figure pat00026

여기서, Icomp는 합성 이미지를 지칭할 수 있으며, i 및 j는 픽셀의 위치를 나타낼 수 있다.Here, I comp may refer to a composite image, and i and j may indicate pixel positions.

도 5는 본 개시의 일 실시예에 따른 공간 집중 모델(510)의 구성도이다. 도시된 바와 같이, 공간 집중 모델(510)은 참조 이미지(514) 및 참조 텍스트 영역 마스크(512)를 입력으로 하여 참조 이미지(514) 내의 하나 이상의 참조 스트로크의 주변 영역에 대한 정보(516)를 결정할 수 있다. 일 실시예에 따르면, 공간 집중 모델(510)은 입력된 참조 이미지(514) 및 참조 텍스트 영역 마스크(512)에 대하여 각각 컨볼루션을 수행한 후, 컨볼루션된 참조 이미지(514)에 대하여 맥스 풀링(Max Pooling) 및 애버리지 풀링(Average Pooling)을 수행할 수 있다. 그리고 나서, 참조 이미지(514)에 참조 텍스트 영역 마스크(512)를 결합함(concatenate)으로써, 하나 이상의 참조 스트로크의 주변 영역에 대한 정보(516)가 결정될 수 있다. 예를 들어, 참조 이미지(514)에 대하여 맥스 풀링이 수행된 피처(feature), 참조 이미지(514)에 대하여 애버리지 풀링이 수행된 피처 및 텍스트 영역 마스크(512)를 결합하고, 이렇게 결합된 정보에 대해 컨볼루션 연산을 수행함으로써, 하나 이상의 참조 스트로크의 주변 영역에 대한 정보(516)가 결정될 수 있다. 이러한 구성에 의해, 공간 집중 모델(510)은 스트로크(또는 텍스트 객체)의 주변 영역에 대하여 집중적으로 학습될 수 있다.5 is a configuration diagram of a spatial concentration model 510 according to an embodiment of the present disclosure. As shown, the spatial concentration model 510 takes a reference image 514 and a reference text area mask 512 as inputs to determine information 516 about the surrounding area of one or more reference strokes in the reference image 514. can According to an embodiment, the spatial concentration model 510 performs convolution on the input reference image 514 and the reference text area mask 512, respectively, and then performs max pooling on the convolved reference image 514. (Max Pooling) and Average Pooling can be performed. Then, by concatenating the reference text area mask 512 with the reference image 514, information 516 about the surrounding area of one or more reference strokes may be determined. For example, a feature on which max pooling is performed on the reference image 514, a feature on which average pooling is performed on the reference image 514, and the text area mask 512 are combined, and the combined information Information 516 on the surrounding area of one or more reference strokes may be determined by performing a convolution operation on the reference stroke. With this configuration, the spatial concentration model 510 can be intensively learned for the surrounding area of the stroke (or text object).

일 실시예에 따르면, 하나 이상의 참조 스트로크의 주변 영역에 대한 정보(516)는 참조 이미지(514)에 포함된 복수의 픽셀의 각각이 하나 이상의 참조 스트로크의 주변 영역에 포함될 확률 값, 즉, 어텐션 스코어(Attention Score)를 갖는 어텐션 스코어 맵을 포함할 수 있다. 추가적으로, 어텐션 스코어 맵은 시각화를 위하여 히트맵(heatmap)으로 표시될 수 있다. 이 경우, 참조 이미지에 포함된 복수의 픽셀 각각이 참조 스트로크의 주변 영역에 포함될 확률이 높을수록 히트맵 상의 해당 픽셀이 적색으로 나타나고, 확률이 낮을수록 해당 픽셀이 청색으로 나타낼 수 있다.According to an embodiment, the information 516 on the surrounding area of one or more reference strokes is a probability value that each of a plurality of pixels included in the reference image 514 is included in the surrounding area of the one or more reference strokes, that is, the attention score. It may include an attention score map having (Attention Score). Additionally, the attention score map can be displayed as a heatmap for visualization. In this case, the higher the probability that each of the plurality of pixels included in the reference image is included in the surrounding area of the reference stroke, the corresponding pixel on the heat map is displayed in red, and the lower the probability, the corresponding pixel is displayed in blue.

일 실시예에 따르면, 공간 집중 모델(510)은 참조 레이블 마스크(526) 및 하나 이상의 참조 스트로크의 주변 영역에 대한 정보(516)를 기초로 정의된 손실 함수를 이용하여 학습될 수 있다. 참조 레이블 마스크(526)란, 참조 스트로크의 주변 영역(예: 스트로크의 주변 영역(172, 174))에 대응하는 영역을 지칭할 수 있다. 일 실시예에 따르면, 참조 레이블 마스크(526)는 참조 이미지(514)에 대하여 사전에 생성된 레이블 마스크를 지칭할 수 있다. 일 실시예에 따르면, 참조 이미지(514) 및 참조 보정 이미지(예: 참조 보정 이미지(440))에 대응하는 참조 정답 이미지(예: 참조 정답 이미지(460)) 사이의 픽셀 값 차이를 기초로 참조 텍스트 스트로크 마스크(미도시)가 생성될 수 있다. 그리고 나서, 생성된 참조 텍스트 스트로크 마스크의 외부 및 참조 텍스트 영역 마스크(512)의 내부 사이의 교차 영역은 하나 이상의 참조 스트로크의 주변 영역(예: 스트로크의 주변 영역(172, 174))에 대응하는 참조 레이블 마스크(526)로서 생성될 수 있다. 즉, 공간 집중 모델(510)은 이러한 참조 레이블 마스크(526)를 이용하여 약지도(weak supervision) 방법에 따라 학습될 수 있다.According to one embodiment, the spatial concentration model 510 may be learned using a loss function defined based on the reference label mask 526 and the information 516 on the surrounding area of one or more reference strokes. The reference label mask 526 may refer to an area corresponding to the area around the reference stroke (eg, the area around the stroke 172 or 174). According to one embodiment, the reference label mask 526 may refer to a previously created label mask for the reference image 514 . According to one embodiment, a reference based on a pixel value difference between a reference image 514 and a reference correct image (eg, reference correct image 460) corresponding to a reference corrected image (eg, reference corrected image 440). A text stroke mask (not shown) may be created. Then, the area of intersection between the outside of the generated reference text stroke mask and the inside of the reference text area mask 512 corresponds to the surrounding area of one or more reference strokes (eg, the surrounding area of the stroke 172, 174). may be created as a label mask 526 . That is, the spatial concentration model 510 may be learned according to a weak supervision method using the reference label mask 526 .

일 실시예에 따르면, 손실 함수(530)의 값은, 참조 레이블 마스크(526) 및 결정된 하나 이상의 참조 스트로크의 주변 영역에 대한 정보(516)를 기초로 산출될 수 있다. 예를 들어, 손실 함수(530)는 수학식 10으로 정의될 수 있다.According to an embodiment, the value of the loss function 530 may be calculated based on the reference label mask 526 and the information 516 on the surrounding area of one or more determined reference strokes. For example, loss function 530 can be defined as Equation 10.

Figure pat00027
Figure pat00027

수학식 10에서 Mi, Mi box는 각각 참조 레이블 마스크(526) 및 참조 텍스트 영역 마스크(512)의 i번째 픽셀을 나타내고, scorei는 어텐션 스코어 맵의 i번째 픽셀을 나타낼 수 있다. 또한, M과 score의 형태는 (Hn, Wn, 1)으로 나타낼 수 있다. 여기서, Hn 및 Wn은 n번째 레이어의 피처맵의 크기를 나타낼 수 있다.In Equation 10, M i and M i box represent the ith pixel of the reference label mask 526 and the reference text area mask 512, respectively, and score i may represent the ith pixel of the attention score map. In addition, the form of M and score can be expressed as (H n , W n , 1). Here, H n and W n may indicate the size of the feature map of the nth layer.

일 실시예에 따르면, 공간 집중 모델(510)은 참조 텍스트 영역 마스크(512)를 업데이트할 수 있다. 공간 집중 모델(510)은 참조 이미지(514)의 텍스트 영역(즉, 참조 이미지(514)에서 텍스트 영역 마스크(512)의 '흰색'영역에 대응하는 부분)의 정보를 이용하기 때문에, 실행 중에 피처맵 내의 텍스트 영역을 추적해야 한다. 이 때, 공간 집중 모델(510)은 왜곡 없이 참조 텍스트 영역 마스크(512)를 업데이트하고, 참조 이미지(514)에서 마스크된 영역(즉, 텍스트 영역)에 의한 영향을 받는 모든 영역을 추적하기 위하여, 컨볼루션 레이어에서 리셉티브 필드(receptive field)의 개념을 이용할 수 있다. 참조 텍스트 영역 마스크(512)는 두 개의 컨볼루션 레이어에 의해 업데이트 될 수 있다. 예를 들어, 각각의 레이어는 각각의 요소(element)가 1/9로 고정된 하나의 3x3 컨볼루션 필터를 가질 수 있다. 업데이트된 참조 텍스트 영역 마스크(522)는 수학식 11로 정의될 수 있다.According to one embodiment, the spatial concentration model 510 may update the reference text area mask 512 . Since the spatial concentration model 510 uses the information of the text region of the reference image 514 (i.e., the portion corresponding to the 'white' region of the text region mask 512 in the reference image 514), the feature during execution I need to track the textarea within the map. At this time, the spatial concentration model 510 updates the reference text area mask 512 without distortion and tracks all areas affected by the masked area (ie text area) in the reference image 514, In convolutional layers, the concept of a receptive field can be used. The reference text area mask 512 can be updated by two convolutional layers. For example, each layer may have one 3x3 convolution filter in which each element is fixed to 1/9. The updated reference text area mask 522 can be defined as Equation (11).

Figure pat00028
Figure pat00028

수학식 11에서 Min 및 Mout은 각각 컨볼루션 레이어의 참조 텍스트 영역 마스크(512) 및 업데이트된 참조 텍스트 영역 마스크(522)를 나타낸다. 또한

Figure pat00029
는 컨볼루션 연산자를 나타내고, K는 각 요소(element)가 고정된 컨볼루션 레이어의 가중치를 나타낸다.In Equation 11, M in and M out represent the reference text area mask 512 and the updated reference text area mask 522 of the convolution layer, respectively. also
Figure pat00029
denotes a convolution operator, and K denotes a weight of a convolution layer in which each element is fixed.

일 실시예에 따르면, 참조 텍스트 영역 마스크(512)가 나타내는 영역(즉, '흰색' 영역)은 외부 영역(즉, '검은색' 영역)보다 더 큰 값을 갖도록 설계될 수 있다. 예를 들어, 마스크 값(즉, Min 또는 Mout)은 리셉티브 필드가 많은 영역을 포함하는 경우, 그렇지 않은 경우보다 마스크 값이 더 높아질 수 있다. 추가적으로, 마스크 값은 지나치게 작거나 커지는 것을 방지하기 위하여 자동으로 크기가 조정될 수 있다.According to an embodiment, an area indicated by the reference text area mask 512 (ie, a 'white' area) may be designed to have a larger value than an external area (ie, a 'black' area). For example, a mask value (ie, M in or M out ) may be higher when a region with many reactive fields is included than when it is not otherwise. Additionally, mask values can be automatically resized to prevent them from becoming too small or too large.

일 실시예에 따르면, 생성 모델(510)은 참조 스트로크의 주변 영역에 대한 정보(516), 참조 이미지(514), 참조 이미지(514)를 컨볼루션한 레이어를 결합(concatenate)하여 참조 중간 이미지(524)를 생성할 수 있다. 예를 들어, 참조 스트로크의 주변 영역에 대한 정보(516)를 참조 이미지(514)를 컨볼루션한 레이어에 곱하고, 이렇게 곱한 정보에 참조 이미지(514)를 더함으로써 참조 중간 이미지(524)가 생성될 수 있다. 그리고 나서, 생성 모델(510)은 참조 중간 이미지(524)를 기초로 참조 이미지(514)에서 참조 텍스트 영역 마스크(512)에 의해 마스크된 영역(즉, 참조 텍스트 영역 마스크(512)의 '흰 색' 영역)과 대응되는 부분에 포함된 텍스트 객체를 삭제할 수 있다. 한편, 도 5에서는 참조 이미지(514)가 설명의 편의를 위하여 RGB 이미지인 것으로 도시되었으나, 이에 한정되지 않는다. 예를 들어, 생성 모델(510)로 입력되는 참조 이미지(514)는 이전 레이어에서 획득된 참조 이미지(514)의 피처맵(feature map)을 지칭할 수 있다.According to an embodiment, the generation model 510 concatenates the information 516 of the surrounding area of the reference stroke, the reference image 514, and a layer obtained by convolving the reference image 514 to form a reference intermediate image ( 524) can be created. For example, a reference intermediate image 524 is generated by multiplying the information 516 of the surrounding area of the reference stroke by a layer obtained by convolving the reference image 514 and adding the reference image 514 to the multiplied information. can Then, the generation model 510 generates a region masked by the reference text area mask 512 in the reference image 514 based on the reference intermediate image 524 (ie, the 'white color' of the reference text area mask 512). ' area) and the text object included in the corresponding part can be deleted. Meanwhile, in FIG. 5 , the reference image 514 is shown as an RGB image for convenience of description, but is not limited thereto. For example, the reference image 514 input to the generation model 510 may refer to a feature map of the reference image 514 obtained in a previous layer.

도 6은 본 개시의 일 실시예에 따라 보정 이미지를 생성하는 예시를 나타낸다. 상술한 바와 같이, 기계학습 모델은 참조 이미지(610) 및 참조 텍스트 영역 마스크(620)에 대한 정보를 기초로 하나 이상의 참조 스트로크의 주변 영역에 대한 정보(예: 정보(516))를 결정할 수 있다. 그리고 나서, 결정된 하나 이상의 참조 스트로크의 주변 영역에 대한 정보를 이용하여 참조 텍스트 영역(또는 텍스트 영역 마스크) 내의 하나 이상의 텍스트 객체(또는, 스트로크)가 삭제된 이미지(630)가 생성될 수 있다. 이 경우, 참조 스트로크의 주변 영역의 이미지 특징(예를 들어, 컬러, 강도, 텍스쳐 등)이 하나 이상의 텍스트 객체를 삭제하는데 이용될 수 있다. 즉, 참조 스트로크의 주변 영역의 이미지 특징이 텍스트 객체와 대응하는 영역(즉, 스트로크 영역)에 적용될 수 있다. 이와 같이, 하나 이상의 텍스트 객체를 삭제하기 위하여 참조 스트로크의 주변 영역의 이미지 특징이 이용되기 때문에, 참조 이미지(610) 내의 하나 이상의 텍스트 객체가 더욱 자연스럽게 삭제될 수 있다.6 illustrates an example of generating a corrected image according to an embodiment of the present disclosure. As described above, the machine learning model may determine information (eg, information 516 ) about an area around one or more reference strokes based on information about the reference image 610 and the reference text area mask 620 . . Then, an image 630 in which one or more text objects (or strokes) in the reference text area (or text area mask) are deleted may be generated using the information about the area around the determined one or more reference strokes. In this case, image characteristics (eg, color, intensity, texture, etc.) of a region around the reference stroke may be used to delete one or more text objects. That is, the image characteristics of the area around the reference stroke may be applied to the area corresponding to the text object (ie, the stroke area). In this way, since the image characteristics of the area around the reference stroke are used to delete one or more text objects, one or more text objects in the reference image 610 can be deleted more naturally.

일 실시예에 따르면, 기계학습 모델은 하나 이상의 텍스트 객체가 삭제된 이미지(630) 및 참조 이미지(610)에서의 참조 텍스트 영역 마스크(620)의 외부 영역을 포함한 이미지(640)(즉, 참조 텍스트 영역 마스크(620)에 의하여 마스크되지 않는 영역)에 대한 정보를 이용하여 제1 참조 보정 이미지(650)를 출력할 수 있다. 예를 들어, 기계학습 모델은 하나 이상의 텍스트 객체가 삭제된 이미지(630)와 외부 영역을 포함한 이미지(640)를 결합하여 제1 참조 보정 이미지(650)를 출력할 수 있다.According to one embodiment, the machine learning model is an image 630 from which one or more text objects have been deleted and an image 640 including an area outside the reference text area mask 620 in the reference image 610 (i.e., the reference text The first reference corrected image 650 may be output using information on an area not masked by the area mask 620 . For example, the machine learning model may output the first reference corrected image 650 by combining the image 630 from which one or more text objects are deleted and the image 640 including the external area.

도 7은 본 개시의 일 실시예에 따른 참조 중간 이미지(720)의 예시를 나타낸다. 도 6에서 상술한 바와 같이, 기계학습 모델에 포함된 공간 집중 모델은 참조 스트로크의 주변 영역에 대한 정보를 기초로 참조 중간 이미지(720)를 생성할 수 있다. 예를 들어, 공간 집중 모델은 참조 스트로크의 주변 영역에 대한 정보(예: 참조 스트로크의 주변 영역에 대한 정보(516))와 참조 이미지(710)를 결합하여(concatenate) 참조 중간 이미지(720)를 생성할 수 있다.7 shows an example of a reference intermediate image 720 according to an embodiment of the present disclosure. As described above with reference to FIG. 6 , the spatial concentration model included in the machine learning model may generate the reference intermediate image 720 based on information about the surrounding area of the reference stroke. For example, the spatial concentration model combines information about the area around the reference stroke (eg, information 516 about the area around the reference stroke) and the reference image 710 to obtain a reference intermediate image 720. can create

일 실시예에 따르면, 참조 중간 이미지(720)에 도시된 바와 같이, 참조 이미지(710)의 적어도 일부에 포함된 픽셀에 대하여, 각 픽셀이 하나 이상의 참조 스트로크의 주변 영역에 포함될 확률을 나타내는 히트맵이 표시될 수 있다. 예를 들어, 각 픽셀이 하나 이상의 참조 스트로크의 주변 영역에 포함될 확률이 높을수록 적색에 가깝고, 각 픽셀이 하나 이상의 참조 스트로크의 주변 영역에 포함될 확률이 낮을수록 청색에 가깝게 표시될 수 있다.According to an embodiment, as shown in the reference intermediate image 720, with respect to pixels included in at least a portion of the reference image 710, a heat map indicating a probability that each pixel is included in an area surrounding one or more reference strokes. this can be displayed. For example, the higher the probability that each pixel is included in the peripheral area of one or more reference strokes, the closer to red, and the lower the probability that each pixel is included in the peripheral area of one or more reference strokes, the closer to blue color may be displayed.

도 8은 본 개시의 일 실시예에 따른 중첩 연결(Nested Connection)의 구조를 나타낸다. 여기서, 중첩 연결이란, 스트로크가 아닌(non-stroke) 영역의 품질을 개선하기 위하여, 본 기술 분야에서 이미 알려진 dense connection이 이용하여 구현될 수 있다. 구체적으로, 중첩 연결의 구조는 변환 블록(transforming block) 및 업샘플링 블록(up-sampling block)을 포함할 수 있다. 라지 커널 컨볼루션(large-kernel convolution)을 대체하기 위하여 이러한 dense connection에 본 기술 분야에서 이미 알려진 측면 연결(lateral connection)이 적용될 수 있다. 도시된 바와 같이, 업샘플링된 피처맵은 변환 피처맵과 결합될(concatenated) 수 있다.8 illustrates a structure of a nested connection according to an embodiment of the present disclosure. Here, the overlapping connection may be implemented using a dense connection already known in the art in order to improve the quality of a non-stroke area. Specifically, the structure of overlapping connection may include a transforming block and an up-sampling block. In order to replace large-kernel convolution, lateral connection, which is already known in the art, can be applied to such a dense connection. As shown, the upsampled feature map may be concatenated with the transformed feature map.

도 9는 본 개시의 일 실시예에 따른 텍스트 내 이미지를 삭제하는 방법과 다른 방법들 사이의 품질 비교 결과를 나타낸다. 왼쪽에서 오른쪽으로 각각 이미지(910), 정답 이미지(920), 본 기술분야에서 이미 알려진 EnsNet에 의해 생성된 보정 이미지(930), 본 기술분야에서 이미 알려진 MTRNet에 의해 생성된 보정 이미지(940), 본 기술분야에서 이미 알려진 MTRNet++에 의해 생성된 보정 이미지(950), 본 기술분야에서 이미 알려진 EraseNet에 의해 생성된 보정 이미지(960) 및 본 개시의 일 실시예에 따른 이미지 내의 텍스트 삭제 방법에 따른 보정 이미지(970)를 나타낸다.9 illustrates quality comparison results between a method of deleting an image in text according to an embodiment of the present disclosure and other methods. From left to right, an image 910, a correct image 920, a correction image 930 generated by EnsNet known in the art, a correction image 940 created by MTRNet known in the art, A correction image 950 generated by MTRNet++ known in the art, a correction image 960 created by EraseNet known in the art, and a method for deleting text in an image according to an embodiment of the present disclosure. Image 970 is shown.

일 실시예에 따르면, 본 개시의 기계학습 모델의 학습 및 평가를 위해, 합성(synthetic) 데이터 셋과 실제(real) 데이터 셋이 모두 이용될 수 있다. 예를 들어, 합성 데이터 셋에는 8,000개의 텍스트 없는 이미지로 구성된 약 800,000개의 이미지가 포함될 수 있다. 학습을 위해 95%의 이미지를 무작위로 선택하고, 테스트를 위해 10,000개의 이미지를 선택하고, 나머지는 검증에 이용될 수 있다. 학습 데이터 셋과 테스트 데이터 셋의 배경 이미지는 상호 배타적으로 구성될 수 있다. 다른 예로서, 중국어와 영어 텍스트 이미지에서 수동으로 생성된 실제 데이터 셋에서는 2,749개의 학습 이미지와 813개의 테스트 이미지가 포함될 수 있다.According to an embodiment, both a synthetic data set and a real data set may be used for training and evaluation of the machine learning model of the present disclosure. For example, a synthetic data set might contain about 800,000 images, consisting of 8,000 textless images. 95% of images are randomly selected for training, 10,000 images are selected for testing, and the rest can be used for validation. The background images of the training data set and the test data set may be mutually exclusive. As another example, a real data set manually generated from Chinese and English text images may include 2,749 training images and 813 test images.

일 실시예에 따르면, 본 개시의 기계학습 모델의 수행을 위해 이미지(910) 또는 참조 이미지(예: 참조 이미지(420) 또는 참조 이미지(514))에 전처리가 수행될 수 있다. 기계학습 모델을 학습하기 위하여 스트로크 수준의 세그멘테이션 마스크가 필요할 수 있다. 그러나, 기존의 데이터 셋(즉, 이미지(910) 또는 참조 이미지)은 스트로크 수준의 세그멘테이션 마스크(예: 텍스트 스트로크 마스크 또는 참조 텍스트 스트로크 마스크)를 제공하지 않는다. 따라서, 이미지(910)와 정답 이미지(920) (또는, 참조 이미지와 참조 정답 이미지)사이의 픽셀 값 차이를 산출함으로써 스트로크 수준의 세그멘테이션 마스크를 생성할 수 있다. 노이즈를 억제하기 위해 임계값은 25로 설정될 수 있다. 합성 데이터 셋과 실제 데이터 셋은 결합될 수 있고, 총 738,113개의 이미지가 학습에 이용되며, 테스트 셋은 실제 데이터 셋과 합성 데이터 셋의 성능을 구별하기 위하여 별도로 이용될 수 있다.According to an embodiment, pre-processing may be performed on the image 910 or a reference image (eg, the reference image 420 or the reference image 514) in order to perform the machine learning model of the present disclosure. A stroke-level segmentation mask may be required to train a machine learning model. However, existing data sets (i.e., image 910 or reference image) do not provide a stroke-level segmentation mask (eg, text stroke mask or reference text stroke mask). Accordingly, a stroke-level segmentation mask may be generated by calculating a pixel value difference between the image 910 and the correct answer image 920 (or the reference image and the reference correct answer image). The threshold can be set to 25 to suppress noise. The synthetic data set and the real data set can be combined, a total of 738,113 images are used for learning, and a test set can be used separately to distinguish the performance of the real data set and the synthetic data set.

일 실시예에 따르면, 본 개시의 기계학습 모델의 평가를 위해 보조 텍스트 디텍터를 이용한 평가 방법이 제안될 수 있다. 보조 텍스트 디텍터는 텍스트가 제거된 보정 이미지(930 내지 970)에서 감지 결과를 획득할 수 있다. 그리고 나서, Precision 값, Recall 값 및 F-score 값을 계산하여 모델 성능을 평가할 수 있다. Precision 값, Recall 값 및 F-score 값이 낮을수록 텍스트가 더 잘 지워진 것을 의미할 수 있다. 추가적으로, 본 개시의 기계학습 모델의 평가를 위해 이미지 인페인팅(inpainting)에 이용되는 평가 방법이 제안될 수 있다. 여기서, 보정 이미지(930 내지 970)의 품질을 평가하기 위해 PSNR(Peak Signal-to-Noise Ratio), SSIM(Structural Similarity Index Measure), MSE(Mean Squared Error), AGE(Average Gray-level Error), pEP(percentage of Error Pixels), pCEP(percentage of Clustered Error Pixels)가 이용될 수 있다. PSNR과 SSIM의 값이 높고, 다른 지표 값이 낮을수록 보정 이미지 보정 이미지(930 내지 970)의 품질이 더 좋다는 것을 의미할 수 있다. 또한, PSNR, SSIM 및 AGE가 이용될 수 있다. PSNR은 MSE에 의해 산출되기 때문에, 다양한 비교를 위해, MSE는 MAE (Mean Absolute Error)로 대체될 수 있다.According to an embodiment, an evaluation method using an auxiliary text detector may be proposed for evaluation of the machine learning model of the present disclosure. The auxiliary text detector may obtain detection results from the corrected images 930 to 970 from which text is removed. Then, the performance of the model can be evaluated by calculating the Precision value, Recall value, and F-score value. The lower the Precision value, the Recall value, and the F-score value, the better the text can be erased. Additionally, an evaluation method used for image inpainting may be proposed for evaluation of the machine learning model of the present disclosure. Here, in order to evaluate the quality of the corrected images 930 to 970, Peak Signal-to-Noise Ratio (PSNR), Structural Similarity Index Measure (SSIM), Mean Squared Error (MSE), Average Gray-level Error (AGE), Percentage of Error Pixels (pEP) and Percentage of Clustered Error Pixels (pCEP) may be used. Higher values of PSNR and SSIM and lower values of other indicators may mean that the quality of the corrected images 930 to 970 is better. Also, PSNR, SSIM and AGE may be used. Since PSNR is calculated by MSE, for various comparisons, MSE can be replaced with MAE (Mean Absolute Error).

일 실시예에 따르면, 본 개시의 기계학습 모델의 구현을 위해 상술한 합성 데이터 셋과 실제 데이터 셋이 결합된(combined) 데이터 셋에서 배치(batch)의 크기가 30인 6개의 epochs에 대하여 모델을 학습할 수 있다. 여기서, β(0.9, 0.999)인 Adam 옵티마이저가 이용될 수 있다. 초기 학습률은 0.0005로 설정되고, 이는 50,000 스텝마다 5로 나누어질 수 있다. 이를 수행하기 위하여, PyTorch 및 NVDIA Tesla M40 GPU가 이용될 수 있다.According to an embodiment, for the implementation of the machine learning model of the present disclosure, a model for 6 epochs with a batch size of 30 in a data set in which the synthetic data set and the real data set are combined can learn Here, the Adam optimizer with β(0.9, 0.999) can be used. The initial learning rate is set to 0.0005, which can be divided by 5 for every 50,000 steps. To do this, PyTorch and NVIDIA Tesla M40 GPUs can be used.

일 실시예에 따르면, 본 개시의 공간 집중 모델(예: 공간 집중 모델(510))및 도 8에서 설명된 중첩 연결(Nested Connection)의 효과를 검증하기 위하여 EnsNet가 기준으로 채택될 수 있다. 공간 집중 모델과 수학식 3에 의하여 정의된 손실 함수 RRL(Region Regression Loss)는 텍스트 영역 마스크(예: 참조 텍스트 영역 마스크(410, 512))와 연관된 정보를 이용하므로 텍스트 영역 마스크의 효율성에 대해서도 논의된다. 정량적 결과는 표 1에 도시된다.According to an embodiment, EnsNet may be adopted as a criterion to verify the effect of the spatial concentration model of the present disclosure (eg, the spatial concentration model 510) and the nested connection described in FIG. 8 . Since the loss function RRL (Region Regression Loss) defined by the spatial concentration model and Equation 3 uses information associated with text area masks (eg, reference text area masks 410 and 512), the efficiency of text area masks is also discussed. do. Quantitative results are shown in Table 1.

MethodMethod Image EvalImage Eval Detection EvalDetection Eval PSNRPSNR SSIMSSIM MAEMAE AGEAGE PP RR FF Original ImageOriginal Image 79.7679.76 67.2467.24 72.9772.97 BaseLine(EnsNet)BaseLine (EnsNet) 31.05/32.9931.05/32.99 94.78/95.1694.78/95.16 0.0116/0.00760.0116/0.0076 2.6657/1.85422.6657/1.8542 73.0773.07 54.7354.73 62.5962.59 BaseLine+MBaseLine+M 35.65/37.2835.65/37.28 96.67/96.7896.67/96.78 0.0069/0.00390.0069/0.0039 1.5015/0.89291.5015/0.8929 63.3563.35 33.2233.22 43.5843.58 BaseLine+M+RAMABaseLine+M+RAMA 36.12/38.4536.12/38.45 97.29/97.4697.29/97.46 0.0071/0.00370.0071/0.0037 1.5106/0.83531.5106/0.8353 39.0739.07 6.036.03 10.4510.45 BaseLine(Unet++)+MBaseLine(Unet++)+M 37.20/38.4037.20/38.40 97.32/97.3897.32/97.38 0.0052/0.00340.0052/0.0034 1.1266/0.78801.1266/0.7880 50.4450.44 15.0715.07 23.2123.21 BaseLine(Unet++)+M+RAMABaseLine(Unet++)+M+RAMA 37.27/38.7837.27/38.78 97.43/97.4897.43/97.48 0.0055/0.00340.0055/0.0034 1.1634/0.78271.1634/0.7827 31.5931.59 3.993.99 7.097.09 BaseLine+M+RRLBaseLine+M+RRL -/40.82-/40.82 -/98.19-/98.19 -/0.0030-/0.0030 -/0.6565-/0.6565 27.4627.46 3.093.09 5.565.56 BaseLine+M+RAMA+RRLBaseLine+M+RAMA+RRL -/41.13-/41.13 -/98.36-/98.36 -/0.0028-/0.0028 -/0.6348-/0.6348 24.4524.45 2.412.41 4.394.39 BaseLine(Unet++)+M+RRLBaseLine(Unet++)+M+RRL -/40.94-/40.94 -/98.18-/98.18 -/0.0029-/0.0029 -/0.6520-/0.6520 10.1410.14 0.690.69 1.281.28 BaseLine+M(Unet++)+M+RAMA+RRLBaseLine+M(Unet++)+M+RAMA+RRL -/41.40-/41.40 -/98.34-/98.34 -/0.0028-/0.0028 -/0.6462-/0.6462 2.862.86 0.250.25 0.450.45

표 1은 애블레이션 연구(ablation study) 결과를 나타낸다. '/'의 왼쪽은 출력 이미지를 이용한 평가 결과를 나타낸다. '/'의 오른쪽은 영역(박스) 마스크를 이용하여 생성된 합성 이미지를 이용한 평과 결과를 나타낸다. 여기서, M은 텍스트 영역 마스크, RAMA는 본 개시에서 제안된 공간 집중 모델, RRL은 영역 회귀 손실을 나타낸다. RRL을 이용하면 보정 이미지(970)의 마스크되지 않은 영역이 의미가 없게 될 수 있다. 따라서, 합성 없이 RRL을 이용하는 방법은 평가되지 않는다. 결과적으로, 표 1은 제안된 손실 함수 RRL이 Image Eval 및 Detection Eval 모두에서 정량적 성능을 크게 향상시킴을 보여준다. 또한, RRL은 기계학습 모델이 텍스트 영역에 초점을 맞추는 데 도움이 될 수 있음을 보여준다.표 1에서 RAMA(즉, 공간 집중 모델)가 있는 모델은 더 높은 PSNR 및 SSIM 값을 획득할 수 있다. 또한, 박스 마스크가 있는 기준 모델보다 낮은 MAE, AGE 값을 획득할 수 있다. 특히, 검출 평가에서 RAMA는 기준 모델보다 훨씬 낮은 Precision 값, Recall 값 및 F-score 값을 획득한다. 검출 개선 사항을 자세히 분석하기 위해 생성자의 출력이 부분적으로 비교되었다. 구체적으로, 획 마스크와 레이블 마스크를 이용하여 합성 이미지가 만들어진다. 비교할 이미지는 마스크 된 영역에서만 다르게 나타난다. 정량적 결과는 표 2와 같다. RAMA 모듈이 획 영역의 화질을 향상시킬 수 있음을 보여준다.Table 1 shows the results of an ablation study. The left side of '/' indicates the evaluation result using the output image. The right side of '/' indicates the evaluation result using the composite image generated using the area (box) mask. Here, M is the text area mask, RAMA is the spatial concentration model proposed in the present disclosure, and RRL is the area regression loss. If RRL is used, unmasked areas of the corrected image 970 may become meaningless. Therefore, methods using RRL without synthesis are not evaluated. As a result, Table 1 shows that the proposed loss function RRL significantly improves the quantitative performance in both Image Eval and Detection Eval. In addition, RRL shows that machine learning models can help focus text regions. In Table 1, models with RAMA (i.e., spatially focused models) can achieve higher PSNR and SSIM values. In addition, lower MAE and AGE values than those of the reference model with box mask can be obtained. In particular, in detection evaluation, RAMA obtains much lower Precision, Recall and F-score values than the reference model. The outputs of the generators were partially compared to analyze the detection improvements in detail. Specifically, a composite image is created using a stroke mask and a label mask. The image to be compared appears different only in the masked area. The quantitative results are shown in Table 2. It shows that the RAMA module can improve the image quality of the stroke area.

MethodMethod Image EvalImage Eval BaseLine + MBaseLine + M 38.90/44.4138.90/44.41 97.34/98.8697.34/98.86 0.0026/0.00120.0026/0.0012 0.6117 /0.28120.6117/0.2812 BaseLine + M + RAMABaseLine + M + RAMA 44.41/45.1644.41/45.16 98.80/99.1598.80/99.15 0.0016/0.00120.0016/0.0012 0.3645/0.27030.3645/0.2703

표 2는 애블레이션 연구 결과를 나타낸다. '/'의 왼쪽은 획 합성 이미지를 이용한 평과 결과를 나타낸다. '/'의 오른쪽은 레이블 마스크를 이용하여 생성된 합성 이미지를 이용한 평가 결과를 나타낸다. 여기서, M은 텍스트 영역(박스) 마스크, RAMA는 본 개시의 공간 집중 모델을 지칭할 수 있다.Table 2 shows the results of the ablation study. The left side of '/' indicates the evaluation result using the stroke synthesis image. The right side of '/' represents the evaluation result using the synthesized image generated using the label mask. Here, M may refer to a text area (box) mask, and RAMA may refer to a spatial concentration model of the present disclosure.

MethodMethod Train
Data
Train
Data
Input
Size
Input
Size
Image-EvalImage-Eval Detection-EvalDetection-Eval
PSNRPSNR SSIMSSIM MAEMAE AGEAGE PP RR FF Original ImageOriginal Image 512512 79.879.8 67.267.2 73.073.0 Scene Text EraserScene Text Eraser RealReal 256256 25.47/-25.47/- 90.14/-90.14/- -- 6.0069/-6.0069/- 40.940.9 5.95.9 10.210.2 EnsNetEnsNet RealReal 512512 29.53/-29.53/- 92.74/-92.74/- -/--/- 4.1600/-4.1600/- 68.768.7 32.832.8 44.444.4 MTRNetMTRNet Syn(75%)Syn(75%) 256256 -/--/- -/--/- -/--/- -/--/- -- -- -- MTRNet++MTRNet++ Syn(95%)Syn(95%) 256256 -/--/- -/--/- -/--/- -/--/- -- -- -- EraseNetEraseNet RealReal 512512 32.30/37.2632.30/37.26 95.42/96.8695.42/96.86 -/--/- 3.0174/-3.0174/- 53.253.2 4.64.6 8.58.5 EnsNetEnsNet Real+SynReal+Syn 512512 31.05/32.9931.05/32.99 94.78/95.1694.78/95.16 0.0116/0.00760.0116/0.0076 2.6657/1.85422.6657/1.8542 73.173.1 54.754.7 62.662.6 MTRNetMTRNet Real+SynReal+Syn 256256 30.61/36.0630.61/36.06 89.85/95.7289.85/95.72 0.0184/0.00550.0184/0.0055 3.9225/1.21373.9225/1.2137 Real+SynReal+Syn 512512 32.46/36.8932.46/36.89 95.86/96.4195.86/96.41 0.0137/0.00440.0137/0.0044 3.1222/0.97203.1222/0.9720 69.869.8 41.141.1 51.751.7 MTRNet++MTRNet++ Real+SynReal+Syn 256256 35.29/37.4035.29/37.40 96.31/96.6896.31/96.68 0.0053/0.00470.0053/0.0047 1.2636/1.08891.2636/1.0889 Real+SynReal+Syn 512512 34.86/36.5034.86/36.50 96.32/96.5196.32/96.51 0.0060/0.00570.0060/0.0057 1.4836/1.35091.4836/1.3509 58.658.6 20.520.5 30.430.4 EraseNetEraseNet Real+SynReal+Syn 512512 30.54/37.1630.54/37.16 96.27/97.5396.27/97.53 0.0147/0.00510.0147/0.0051 3.0736/1.20433.0736/1.2043 40.840.8 6.36.3 10.910.9 OursOurs Real+SynReal+Syn 512512 -/41.13-/41.13 -/98.36-/98.36 -/0.0028-/0.0028 -/0.6348-/0.6348 24.424.4 2.42.4 4.44.4 Ours(Unet++)Ours (Unet++) Real+SynReal+Syn 512512 -/41.40-/41.40 -/98.34-/98.34 -/0.0028-/0.0028 -/0.6462-/0.6462 2.92.9 0.20.2 0.50.5

표 3은 SCUT-EnsText에 대한 비교 결과를 나타낸다. '/'의 왼쪽은 출력 이미지를 이용한 평과 결과를 나타낸다. '/'의 오른쪽은 박스 마스크를 이용하여 생성한 합성 이미지를 이용한 평가 결과를 나타낸다. EraseNet에서 수집된 상단의 SSIM은 MSSIM을 의미하고, 중간 및 하단의 SSIM은 SSIM을 의미한다. 또한, Real은 SCUT-EnsText, Syn은 Oxford synthetic Dataset, P는 Precision, R은 Recall, F는 F-score를 의미한다. 각 측정 항목의 최고 성능은 굵게 표시되었다.Table 3 shows the comparison results for SCUT-EnsText. The left side of '/' indicates the evaluation result using the output image. The right side of '/' represents the evaluation result using the composite image generated using the box mask. SSIM at the top collected from EraseNet means MSSIM, and SSIM at the middle and bottom means SSIM. In addition, Real means SCUT-EnsText, Syn means Oxford synthetic Dataset, P means Precision, R means Recall, and F means F-score. The best performance for each metric is shown in bold.

MethodMethod Input
Size
Input
Size
Image-EvalImage-Eval Detection-EvalDetection-Eval
PSNRPSNR SSIMSSIM MAEMAE AGEAGE PP RR FF Original ImageOriginal Image 512512 71.371.3 51.551.5 59.859.8 EnsNetEnsNet 512512 36.67/39.7436.67/39.74 97.71/97.9497.71/97.94 0.0059/0.00330.0059/0.0033 1.2504/0.77371.2504/0.7737 55.155.1 14.014.0 22.322.3 MTRNetMTRNet 256256 30.96/37.6930.96/37.69 90.95/95.8390.95/95.83 0.01855/0.00510.01855/0.0051 4.1711/1.21984.1711/1.2198 512512 35.49/40.0335.49/40.03 97.10/97.6997.10/97.69 0.0100/0.00350.0100/0.0035 2.1809/0.80332.1809/0.8033 58.658.6 13.713.7 22.222.2 MTRNet ++MTRNet++ 256256 37.40/40.2637.40/40.26 97.02/97.2597.02/97.25 0.0036/0.00330.0036/0.0033 0.8577/0.78850.8577/0.7885 512512 38.31/40.6438.31/40.64 97.82/97.9497.82/97.94 0.0034/0.00320.0034/0.0032 0.0806/0.73080.0806/0.7308 64.064.0 15.915.9 25.425.4 EraseNetEraseNet 512512 34.35/41.7334.35/41.73 98.01/98.6298.01/98.62 0.0106/0.00280.0106/0.0028 1.8150/0.66211.8150/0.6621 30.830.8 0.60.6 1.21.2 OursOurs 512512 -/43.35-/43.35 -/98.61-/98.61 -/0.0024-/0.0024 -/0.5625-/0.5625 20.620.6 0.20.2 0.30.3 Ours (Unet++)Ours (Unet++) 512512 -/43.91-/43.91 -/98.75-/98.75 -/0.0023-/0.0023 -/0.5329-/0.5329 12.412.4 0.10.1 0.20.2

표 4는 Oxford에 대한 비교 결과를 나타낸다. '/'의 왼쪽은 출력 이미지를 이용한 평과 결과를 나타낸다. '/'의 오른쪽은 박스 마스크를 이용하여 생성된 합성 이미지를 이용한 평가 결과를 나타낸다. 여기서, P는 Precision, R은 Recall, F는 F-score를 의미한다. 모든 방법은 합성 데이터 셋과 실제 데이터 셋이 결합된 데이터 셋에서 학습되었다.Table 4 shows the comparison results for Oxford. The left side of '/' indicates the evaluation result using the output image. The right side of '/' indicates an evaluation result using a composite image generated using a box mask. Here, P means Precision, R means Recall, and F means F-score. All methods were trained on a combined data set of synthetic and real data sets.

Input SizeInput Size GMACGMAC GPU Time(ms)GPU Time(ms) ParamsParams EnsNetEnsNet 512512 21.1121.11 12.0312.03 12.4M12.4M MTRNetMTRNet 256256 18.9318.93 21.8921.89 50.3M50.3M 512512 75.7375.73 51.2851.28 MTRNet ++MTRNet++ 256256 126.20126.20 69.7669.76 18.7M18.7M 512512 504.81504.81 238.68238.68 EraseNetEraseNet 512512 92.8792.87 47.3547.35 17.8M17.8M OursOurs 512512 21.1921.19 14.4614.46 12.4M12.4M Ours (Unet++)Ours (Unet++) 512512 67.0867.08 33.7233.72 14.1M14.1M

표 5는 GMAC(곱셈-누적 연산), GPU Time 및 Parameter 크기에 대한 비교 결과를 나타낸다. 일반적으로, 측면(lateral) 연결이 있는 중첩 연결은 모든 지표 측면에서 성능을 향상시킬 수 있다. 그러나, 복잡성 증가로 인해, 모델의 GPU time이 약간 증가함을 확인할 수 있다.도 10은 본 개시의 일 실시예에 따른 이미지 내의 텍스트 삭제 방법(1000)의 예시를 나타낸다. 방법(1000)은 정보 처리 시스템의 적어도 하나의 프로세서(예: 프로세서(334)에 의해 수행될 수 있다. 도시된 바와 같이, 방법(1000)은 하나 이상의 텍스트 객체를 포함하는 이미지를 수신하는 단계(S1010)로 개시될 수 있다.Table 5 shows the comparison results for GMAC (multiply-accumulate operation), GPU Time, and parameter size. In general, overlapping connections with lateral connections can improve performance in all metrics. However, it can be confirmed that the GPU time of the model slightly increases due to the increase in complexity. FIG. 10 shows an example of a method 1000 for deleting text in an image according to an embodiment of the present disclosure. Method 1000 may be performed by at least one processor (eg, processor 334) of an information processing system. As shown, method 1000 may include receiving an image including one or more text objects ( S1010) may be initiated.

일 실시예에 따르면, 프로세서는 이미지에 대응하는 텍스트 영역 마스크를 수신할 수 있다(S1020). 그리고 나서, 수신된 이미지 및 수신된 텍스트 영역 마스크를 기계학습 모델에 입력하여, 수신된 이미지 내의 하나 이상의 스트로크의 주변 영역을 기초로, 수신된 이미지로부터 하나 이상의 텍스트 객체의 적어도 일부가 삭제된 보정 이미지를 출력할 수 있다(S1030). 이 경우, 기계학습 모델은, 참조 이미지 및 참조 이미지에 대응하는 참조 텍스트 영역 마스크를 입력 받아, 참조 이미지 내의 하나 이상의 참조 스트로크의 주변 영역을 기초로 제1 참조 보정 이미지를 생성하도록 학습되는 생성 모델을 포함할 수 있다.According to an embodiment, the processor may receive a text area mask corresponding to the image (S1020). Then, by inputting the received image and the received text area mask to a machine learning model, a corrected image in which at least a part of one or more text objects has been deleted from the received image based on the area surrounding one or more strokes in the received image. can be output (S1030). In this case, the machine learning model receives a reference image and a reference text area mask corresponding to the reference image, and generates a generation model that is trained to generate a first reference correction image based on an area surrounding one or more reference strokes in the reference image. can include

일 실시예에 따르면, 생성 모델은, 참조 이미지 및 참조 텍스트 영역 마스크를 이용하여 참조 이미지 내의 하나 이상의 참조 스트로크의 주변 영역에 대한 정보를 결정하도록 구성된 공간 집중(Spatial Attention) 모델을 포함할 수 있다. 이 경우, 프로세서는 참조 이미지 및 제1 참조 보정 이미지에 대응하는 참조 정답 이미지(ground truth image) 사이의 픽셀 값 차이를 기초로 참조 텍스트 스트로크 마스크를 생성할 수 있다. 그리고 나서, 생성된 참조 텍스트 스트로크 마스크의 외부 및 참조 텍스트 영역 마스크의 내부 사이의 교차 영역이, 하나 이상의 참조 스트로크의 주변 영역에 대응하는 참조 레이블 마스크로서 생성될 수 있다.According to an embodiment, the generating model may include a spatial attention model configured to determine information about a region surrounding one or more reference strokes in the reference image by using the reference image and the reference text region mask. In this case, the processor may generate a reference text stroke mask based on a pixel value difference between the reference image and a ground truth image corresponding to the first reference correction image. Then, an intersection area between the outside of the created reference text stroke mask and the inside of the reference text area mask can be created as a reference label mask corresponding to the surrounding area of one or more reference strokes.

일 실시예에 따르면, 공간 집중 모델은 참조 레이블 마스크 및 결정된 하나 이상의 참조 스트로크의 주변 영역에 대한 정보를 기초로 정의된 제1 손실 함수를 이용하여 학습될 수 있다. 이 경우, 하나 이상의 참조 스트로크의 주변 영역에 대한 정보는, 참조 이미지에 포함된 복수의 픽셀의 각각이 하나 이상의 참조 스트로크의 주변 영역에 포함될 확률 값을 갖는 어텐션 스코어 맵(attention score map)을 포함할 수 있다.According to an embodiment, the spatial concentration model may be learned using a first loss function defined based on a reference label mask and information about a region surrounding one or more determined reference strokes. In this case, the information on the surrounding area of at least one reference stroke may include an attention score map having a probability value that each of a plurality of pixels included in the reference image is included in the surrounding area of the at least one reference stroke. can

일 실시예에 따르면, 생성 모델은 제1 참조 보정 이미지에 대응하는 참조 정답 이미지와 제1 참조 보정 이미지를 기초로 정의된 제2 손실 함수를 이용하여 학습될 수 있다. 여기서, 제2 손실 함수의 값은, 참조 정답 이미지와 제1 참조 보정 이미지 사이의 차이 및 수신된 텍스트 영역 마스크의 교차 영역을 기초로 산출될 수 있다. 그리고 나서, 프로세서는 생성 모델의 적어도 일부 레이어로부터 하나 이상의 제2 참조 보정 이미지를 추출할 수 있다. 이 경우, 하나 이상의 제2 참조 보정 이미지의 각각의 크기는 제1 참조 보정 이미지의 크기와 상이하고, 추출된 제2 참조 보정 이미지는 제2 손실 함수를 정의하는데 이용될 수 있다.According to an embodiment, the generation model may be learned using a reference correct answer image corresponding to the first reference corrected image and a second loss function defined based on the first reference corrected image. Here, the value of the second loss function may be calculated based on the difference between the correct reference image and the first reference correction image and the intersection area of the received text area mask. Then, the processor may extract one or more second reference corrected images from at least some layers of the generated model. In this case, the size of each of the one or more second reference corrected images is different from the size of the first reference corrected image, and the extracted second reference corrected image may be used to define the second loss function.

일 실시예에 따르면, 기계학습 모델은 하나 이상의 참조 스트로크의 주변 영역에 대한 정보 및 참조 이미지에서의 참조 텍스트 영역 마스크의 외부 영역에 대한 정보를 이용하여 제1 참조 보정 이미지를 출력하도록 구성될 수 있다. 추가적으로 기계학습 모델은, 생성 모델의 고도화를 위해서 제1 참조 보정 이미지가 참조 정답 이미지의 분포에 포함되어 있는지 판별하도록 구성된 판별 모델을 더 포함하고, 참조 정답 이미지의 분포는 복수의 참조 정답 이미지를 이용하여 결정될 수 있다.According to an embodiment, the machine learning model may be configured to output a first reference corrected image by using information about a region around one or more reference strokes and information about a region outside a reference text region mask in the reference image. . Additionally, the machine learning model further includes a discrimination model configured to determine whether the first reference corrected image is included in the distribution of reference correct answer images in order to enhance the generation model, and the distribution of the reference correct answer images uses a plurality of reference correct answer images. can be determined by

본 개시의 방법, 동작 또는 기법들은 다양한 수단에 의해 구현될 수도 있다. 예를 들어, 이러한 기법들은 하드웨어, 펌웨어, 소프트웨어, 또는 이들의 조합으로 구현될 수도 있다. 본원의 개시와 연계하여 설명된 다양한 예시적인 논리적 블록들, 모듈들, 회로들, 및 알고리즘 단계들은 전자 하드웨어, 컴퓨터 소프트웨어, 또는 양자의 조합들로 구현될 수도 있음을 통상의 기술자들은 이해할 것이다. 하드웨어 및 소프트웨어의 이러한 상호 대체를 명확하게 설명하기 위해, 다양한 예시적인 구성요소들, 블록들, 모듈들, 회로들, 및 단계들이 그들의 기능적 관점에서 일반적으로 위에서 설명되었다. 그러한 기능이 하드웨어로서 구현되는지 또는 소프트웨어로서 구현되는지의 여부는, 특정 애플리케이션 및 전체 시스템에 부과되는 설계 요구사항들에 따라 달라진다. 통상의 기술자들은 각각의 특정 애플리케이션을 위해 다양한 방식들로 설명된 기능을 구현할 수도 있으나, 그러한 구현들은 본 개시의 범위로부터 벗어나게 하는 것으로 해석되어서는 안된다.The methods, acts or techniques of this disclosure may be implemented by various means. For example, these techniques may be implemented in hardware, firmware, software, or combinations thereof. Those skilled in the art will appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchange of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the particular application and design requirements imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementations should not be interpreted as causing a departure from the scope of the present disclosure.

하드웨어 구현에서, 기법들을 수행하는 데 이용되는 프로세싱 유닛들은, 하나 이상의 ASIC들, DSP들, 디지털 신호 프로세싱 디바이스들(digital signal processing devices; DSPD들), 프로그램가능 논리 디바이스들(programmable logic devices; PLD들), 필드 프로그램가능 게이트 어레이들(field programmable gate arrays; FPGA들), 프로세서들, 제어기들, 마이크로제어기들, 마이크로프로세서들, 전자 디바이스들, 본 개시에 설명된 기능들을 수행하도록 설계된 다른 전자 유닛들, 컴퓨터, 또는 이들의 조합 내에서 구현될 수도 있다.In a hardware implementation, the processing units used to perform the techniques may include one or more ASICs, DSPs, digital signal processing devices (DSPDs), programmable logic devices (PLDs) ), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, electronic devices, and other electronic units designed to perform the functions described in this disclosure. , a computer, or a combination thereof.

따라서, 본 개시와 연계하여 설명된 다양한 예시적인 논리 블록들, 모듈들, 및 회로들은 범용 프로세서, DSP, ASIC, FPGA나 다른 프로그램 가능 논리 디바이스, 이산 게이트나 트랜지스터 로직, 이산 하드웨어 컴포넌트들, 또는 본원에 설명된 기능들을 수행하도록 설계된 것들의 임의의 조합으로 구현되거나 수행될 수도 있다. 범용 프로세서는 마이크로프로세서일 수도 있지만, 대안으로, 프로세서는 임의의 종래의 프로세서, 제어기, 마이크로제어기, 또는 상태 머신일 수도 있다. 프로세서는 또한, 컴퓨팅 디바이스들의 조합, 예를 들면, DSP와 마이크로프로세서, 복수의 마이크로프로세서들, DSP 코어와 연계한 하나 이상의 마이크로프로세서들, 또는 임의의 다른 구성의 조합으로 구현될 수도 있다.Accordingly, the various illustrative logical blocks, modules, and circuits described in connection with this disclosure may be incorporated into a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or may be implemented or performed in any combination of those designed to perform the functions described in A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, eg, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other configuration.

펌웨어 및/또는 소프트웨어 구현에 있어서, 기법들은 랜덤 액세스 메모리(random access memory; RAM), 판독 전용 메모리(read-only memory; ROM), 비휘발성 RAM(non-volatile random access memory; NVRAM), PROM(programmable read-only memory), EPROM(erasable programmable read-only memory), EEPROM(electrically erasable PROM), 플래시 메모리, 컴팩트 디스크(compact disc; CD), 자기 또는 광학 데이터 스토리지 디바이스 등과 같은 컴퓨터 판독가능 매체 상에 저장된 명령어들로 구현될 수도 있다. 명령들은 하나 이상의 프로세서들에 의해 실행 가능할 수도 있고, 프로세서(들)로 하여금 본 개시에 설명된 기능의 특정 양태들을 수행하게 할 수도 있다.In firmware and/or software implementation, the techniques include random access memory (RAM), read-only memory (ROM), non-volatile random access memory (NVRAM), PROM ( on a computer readable medium, such as programmable read-only memory (EPROM), erasable programmable read-only memory (EPROM), electrically erasable PROM (EEPROM), flash memory, compact disc (CD), magnetic or optical data storage device, or the like. It can also be implemented with stored instructions. Instructions may be executable by one or more processors and may cause the processor(s) to perform certain aspects of the functionality described in this disclosure.

이상 설명된 실시예들이 하나 이상의 독립형 컴퓨터 시스템에서 현재 개시된 주제의 양태들을 활용하는 것으로 기술되었으나, 본 개시는 이에 한정되지 않고, 네트워크나 분산 컴퓨팅 환경과 같은 임의의 컴퓨팅 환경과 연계하여 구현될 수도 있다. 또 나아가, 본 개시에서 주제의 양상들은 복수의 프로세싱 칩들이나 장치들에서 구현될 수도 있고, 스토리지는 복수의 장치들에 걸쳐 유사하게 영향을 받게 될 수도 있다. 이러한 장치들은 PC들, 네트워크 서버들, 및 휴대용 장치들을 포함할 수도 있다.Although the embodiments described above have been described as utilizing aspects of the presently-disclosed subject matter in one or more stand-alone computer systems, the disclosure is not limited thereto and may be implemented in conjunction with any computing environment, such as a network or distributed computing environment. . Further, aspects of the subject matter in this disclosure may be implemented in a plurality of processing chips or devices, and storage may be similarly affected across multiple devices. These devices may include PCs, network servers, and portable devices.

본 명세서에서는 본 개시가 일부 실시예들과 관련하여 설명되었지만, 본 개시의 발명이 속하는 기술분야의 통상의 기술자가 이해할 수 있는 본 개시의 범위를 벗어나지 않는 범위에서 다양한 변형 및 변경이 이루어질 수 있다. 또한, 그러한 변형 및 변경은 본 명세서에 첨부된 특허청구의 범위 내에 속하는 것으로 생각되어야 한다.Although the present disclosure has been described in relation to some embodiments in this specification, various modifications and changes may be made without departing from the scope of the present disclosure that can be understood by those skilled in the art. Moreover, such modifications and variations are intended to fall within the scope of the claims appended hereto.

110: 이미지
120: 텍스트 영역 마스크
130: 생성 모델
140: 보정 이미지
160: 판별 모델
110: image
120: text area mask
130: generative model
140: correction image
160: discrimination model

Claims (20)

적어도 하나의 프로세서에 의해 수행되는, 이미지 내의 텍스트를 삭제하는 방법에 있어서,
하나 이상의 텍스트 객체를 포함하는 이미지를 수신하는 단계;
상기 이미지에 대응하는 텍스트 영역 마스크를 수신하는 단계; 및
상기 수신된 이미지 및 상기 수신된 텍스트 영역 마스크를 기계학습 모델에 입력하여, 상기 수신된 이미지 내의 하나 이상의 스트로크의 주변 영역을 기초로, 상기 수신된 이미지로부터 상기 하나 이상의 텍스트 객체의 적어도 일부가 삭제된 보정 이미지를 출력하는 단계를 포함하고,
상기 기계학습 모델은,
참조 이미지 및 상기 참조 이미지에 대응하는 참조 텍스트 영역 마스크를 입력 받아, 상기 참조 이미지 내의 하나 이상의 참조 스트로크의 주변 영역을 기초로 제1 참조 보정 이미지를 생성하도록 학습되는 생성 모델을 포함하는, 이미지 내의 텍스트를 삭제하는 방법.
A method of deleting text in an image, performed by at least one processor, comprising:
receiving an image containing one or more text objects;
receiving a text area mask corresponding to the image; and
At least a portion of the one or more text objects is deleted from the received image based on an area surrounding one or more strokes in the received image by inputting the received image and the received text area mask to a machine learning model. Including the step of outputting the correction image,
The machine learning model,
A text in an image comprising a generation model that receives a reference image and a reference text area mask corresponding to the reference image, and is trained to generate a first reference corrected image based on an area around one or more reference strokes in the reference image. how to delete it.
제1항에 있어서,
상기 생성 모델은, 상기 참조 이미지 및 상기 참조 텍스트 영역 마스크를 이용하여 상기 참조 이미지 내의 하나 이상의 참조 스트로크의 주변 영역에 대한 정보를 결정하도록 구성된 공간 집중(Spatial Attention) 모델을 포함하는, 이미지 내의 텍스트를 삭제하는 방법.
According to claim 1,
The generating model generates text in an image, including a spatial attention model configured to determine information about a region around one or more reference strokes in the reference image using the reference image and the reference text region mask. How to delete.
제2항에 있어서,
상기 참조 이미지 및 상기 제1 참조 보정 이미지에 대응하는 참조 정답 이미지(ground truth image) 사이의 픽셀 값 차이를 기초로 참조 텍스트 스트로크 마스크를 생성하는 단계; 및
상기 생성된 참조 텍스트 스트로크 마스크의 외부 및 상기 참조 텍스트 영역 마스크의 내부 사이의 교차 영역을, 상기 하나 이상의 참조 스트로크의 주변 영역에 대응하는 참조 레이블 마스크로서 생성하는 단계를 더 포함하는, 이미지 내의 텍스트를 삭제하는 방법.
According to claim 2,
generating a reference text stroke mask based on a pixel value difference between the reference image and a ground truth image corresponding to the first reference correction image; and
generating an intersection area between an outside of the generated reference text stroke mask and an inside of the reference text area mask as a reference label mask corresponding to a peripheral area of the one or more reference strokes; How to delete.
제3항에 있어서,
상기 공간 집중 모델은 상기 참조 레이블 마스크 및 상기 결정된 하나 이상의 참조 스트로크의 주변 영역에 대한 정보를 기초로 정의된 제1 손실 함수를 이용하여 학습되는, 이미지 내의 텍스트를 삭제하는 방법.
According to claim 3,
Wherein the spatial concentration model is learned using a first loss function defined based on the reference label mask and information about regions surrounding the determined one or more reference strokes.
제2항에 있어서,
상기 하나 이상의 참조 스트로크의 주변 영역에 대한 정보는, 상기 참조 이미지에 포함된 복수의 픽셀의 각각이 상기 하나 이상의 참조 스트로크의 주변 영역에 포함될 확률 값을 갖는 어텐션 스코어 맵(attention score map)을 포함하는, 이미지 내의 텍스트를 삭제하는 방법.
According to claim 2,
The information on the surrounding area of the one or more reference strokes includes an attention score map having a probability value that each of a plurality of pixels included in the reference image is included in the surrounding area of the one or more reference strokes. , how to delete text within an image.
제2항에 있어서,
상기 기계학습 모델은 상기 하나 이상의 참조 스트로크의 주변 영역에 대한 정보 및 상기 참조 이미지에서의 참조 텍스트 영역 마스크의 외부 영역에 대한 정보를 이용하여 상기 제1 참조 보정 이미지를 출력하도록 구성된, 이미지 내의 텍스트를 삭제하는 방법.
According to claim 2,
The machine learning model is configured to output the first reference corrected image by using information about a region around the one or more reference strokes and information about a region outside a reference text region mask in the reference image. How to delete.
제1항에 있어서,
상기 생성 모델은 상기 제1 참조 보정 이미지에 대응하는 참조 정답 이미지와 상기 제1 참조 보정 이미지를 기초로 정의된 제2 손실 함수를 이용하여 학습되는, 이미지 내의 텍스트를 삭제하는 방법.
According to claim 1,
Wherein the generating model is learned using a reference correct answer image corresponding to the first reference corrected image and a second loss function defined based on the first reference corrected image.
제7항에 있어서,
상기 제2 손실 함수의 값은, 상기 참조 정답 이미지와 상기 제1 참조 보정 이미지 사이의 차이 및 상기 수신된 텍스트 영역 마스크의 교차 영역을 기초로 산출되는, 이미지 내의 텍스트를 삭제하는 방법.
According to claim 7,
The value of the second loss function is calculated based on a difference between the correct reference image and the first reference corrected image and an intersection area of the received text area mask.
제7항에 있어서,
상기 생성 모델의 적어도 일부 레이어로부터 하나 이상의 제2 참조 보정 이미지를 추출하는 단계를 더 포함하고,
상기 하나 이상의 제2 참조 보정 이미지의 각각의 크기는 상기 제1 참조 보정 이미지의 크기와 상이하고, 상기 추출된 하나 이상의 제2 참조 보정 이미지는 상기 제2 손실 함수를 정의하는데 이용되는, 이미지 내의 텍스트를 삭제하는 방법.
According to claim 7,
Extracting one or more second reference corrected images from at least some layers of the generated model;
text in an image, wherein the size of each of the one or more second reference corrected images is different from the size of the first reference corrected image, and the extracted one or more second reference corrected images are used to define the second loss function. how to delete it.
제1항에 있어서,
상기 기계학습 모델은, 상기 생성 모델의 고도화를 위해서 상기 제1 참조 보정 이미지가 참조 정답 이미지의 분포에 포함되어 있는지 판별하도록 구성된 판별 모델을 더 포함하고,
상기 참조 정답 이미지의 분포는 복수의 참조 정답 이미지를 이용하여 결정되는,
이미지 내의 텍스트를 삭제하는 방법.
According to claim 1,
The machine learning model further includes a discrimination model configured to determine whether the first reference corrected image is included in a distribution of reference correct answer images in order to advance the generation model,
The distribution of the reference correct answer images is determined using a plurality of reference correct answer images,
How to delete text within an image.
제1항 내지 제10항 중 어느 한 항에 따른 방법을 컴퓨터에서 실행하기 위해 컴퓨터 판독 가능한 기록 매체에 저장된 컴퓨터 프로그램.
A computer program stored in a computer-readable recording medium to execute the method according to any one of claims 1 to 10 on a computer.
정보 처리 시스템으로서,
메모리; 및
상기 메모리와 연결되고, 상기 메모리에 포함된 컴퓨터 판독 가능한 적어도 하나의 프로그램을 실행하도록 구성된 적어도 하나의 프로세서
를 포함하고,
상기 적어도 하나의 프로그램은,
하나 이상의 텍스트 객체를 포함하는 이미지를 수신하고,
상기 이미지에 대응하는 텍스트 영역 마스크를 수신하고,
상기 수신된 이미지 및 상기 수신된 텍스트 영역 마스크를 기계학습 모델에 입력하여, 상기 수신된 이미지 내의 하나 이상의 스트로크의 주변 영역을 기초로, 상기 수신된 이미지로부터 상기 하나 이상의 텍스트 객체의 적어도 일부가 삭제된 보정 이미지를 출력하기 위한 명령어들을 포함하고,
상기 기계학습 모델은,
참조 이미지 및 상기 참조 이미지에 대응하는 참조 텍스트 영역 마스크를 입력 받아, 상기 참조 이미지 내의 하나 이상의 참조 스트로크의 주변 영역을 기초로 제1 참조 보정 이미지를 생성하도록 학습되는 생성 모델을 포함하는, 정보 처리 시스템.
As an information processing system,
Memory; and
at least one processor connected to the memory and configured to execute at least one computer readable program contained in the memory
including,
The at least one program,
receive an image containing one or more text objects;
Receive a text area mask corresponding to the image;
At least a portion of the one or more text objects is deleted from the received image based on an area surrounding one or more strokes in the received image by inputting the received image and the received text area mask to a machine learning model. Including instructions for outputting a correction image,
The machine learning model,
An information processing system comprising: a generation model that receives a reference image and a reference text area mask corresponding to the reference image, and is trained to generate a first reference correction image based on an area around one or more reference strokes in the reference image; .
제12항에 있어서,
상기 생성 모델은, 상기 참조 이미지 및 상기 참조 텍스트 영역 마스크를 이용하여 상기 참조 이미지 내의 하나 이상의 참조 스트로크의 주변 영역에 대한 정보를 결정하도록 구성된 공간 집중 모델을 포함하는, 정보 처리 시스템.
According to claim 12,
wherein the generating model includes a spatial concentration model configured to determine information about a region surrounding one or more reference strokes in the reference image using the reference image and the reference text region mask.
제13항에 있어서,
상기 적어도 하나의 프로그램은,
상기 참조 이미지 및 상기 제1 참조 보정 이미지에 대응하는 참조 정답 이미지 사이의 픽셀 값 차이를 기초로 참조 텍스트 스트로크 마스크를 생성하고,
상기 생성된 참조 텍스트 스트로크 마스크의 외부 및 상기 참조 텍스트 영역 마스크의 내부 사이의 교차 영역을, 상기 하나 이상의 참조 스트로크의 주변 영역에 대응하는 참조 레이블 마스크로서 생성하기 위한 명령어들을 포함하는, 정보 처리 시스템.
According to claim 13,
The at least one program,
generating a reference text stroke mask based on a pixel value difference between the reference image and a reference correct answer image corresponding to the first reference correction image;
and instructions for generating an intersection area between an exterior of the generated reference text stroke mask and an interior of the reference text area mask as a reference label mask corresponding to a peripheral area of the one or more reference strokes.
제14항에 있어서,
상기 공간 집중 모델은 상기 참조 레이블 마스크 및 상기 결정된 하나 이상의 참조 스트로크의 주변 영역에 대한 정보를 기초로 정의된 제1 손실 함수를 이용하여 학습되는, 정보 처리 시스템.
According to claim 14,
The information processing system of claim 1 , wherein the spatial concentration model is learned using a first loss function defined based on the reference label mask and information on a region surrounding the determined one or more reference strokes.
제13항에 있어서,
상기 하나 이상의 참조 스트로크의 주변 영역에 대한 정보는, 상기 참조 이미지에 포함된 복수의 픽셀의 각각이 상기 하나 이상의 참조 스트로크의 주변 영역에 포함될 확률 값을 갖는 어텐션 스코어 맵을 포함하는, 정보 처리 시스템.
According to claim 13,
The information processing system, wherein the information on the surrounding area of the at least one reference stroke includes an attention score map having a probability value that each of a plurality of pixels included in the reference image is included in the surrounding area of the at least one reference stroke.
제13항에 있어서,
상기 기계학습 모델은 상기 하나 이상의 참조 스트로크의 주변 영역에 대한 정보 및 상기 참조 이미지에서의 참조 텍스트 영역 마스크의 외부 영역에 대한 정보를 이용하여 상기 제1 참조 보정 이미지를 출력하도록 구성된, 정보 처리 시스템.
According to claim 13,
Wherein the machine learning model is configured to output the first reference corrected image by using information on a peripheral region of the one or more reference strokes and information on an external region of a reference text region mask in the reference image.
제12항에 있어서,
상기 생성 모델은 상기 제1 참조 보정 이미지에 대응하는 참조 정답 이미지와 상기 제1 참조 보정 이미지를 기초로 정의된 제2 손실 함수를 이용하여 학습되고,
상기 제2 손실 함수의 값은, 상기 참조 정답 이미지와 상기 제1 참조 보정 이미지 사이의 차이 및 상기 수신된 텍스트 영역 마스크의 교차 영역을 기초로 산출되는, 정보 처리 시스템.
According to claim 12,
The generating model is learned using a reference correct image corresponding to the first reference corrected image and a second loss function defined based on the first reference corrected image;
The information processing system of claim 1 , wherein a value of the second loss function is calculated based on a difference between the reference correct answer image and the first reference corrected image and an intersection area of the received text area mask.
제18항에 있어서,
상기 적어도 하나의 프로그램은,
상기 생성 모델의 적어도 일부 레이어로부터 하나 이상의 제2 참조 보정 이미지를 추출하기 위한 명령어들을 포함하고,
상기 하나 이상의 제2 참조 보정 이미지의 각각의 크기는 상기 제1 참조 보정 이미지의 크기와 상이하고, 상기 추출된 하나 이상의 제2 참조 보정 이미지는 상기 제2 손실 함수를 정의하는데 이용되는, 정보 처리 시스템.
According to claim 18,
The at least one program,
Includes instructions for extracting one or more second reference corrected images from at least some layers of the generated model;
A size of each of the one or more second reference corrected images is different from the size of the first reference corrected images, and the extracted one or more second reference corrected images are used to define the second loss function. .
제12항에 있어서,
상기 기계학습 모델은, 상기 생성 모델의 고도화를 위해서 상기 제1 참조 보정 이미지가 참조 정답 이미지의 분포에 포함되어 있는지 판별하도록 구성된 판별 모델을 더 포함하고,
상기 참조 정답 이미지의 분포는 복수의 참조 정답 이미지를 이용하여 결정되는,
정보 처리 시스템.
According to claim 12,
The machine learning model further includes a discrimination model configured to determine whether the first reference corrected image is included in a distribution of reference correct answer images in order to advance the generation model,
The distribution of the reference correct answer images is determined using a plurality of reference correct answer images,
information processing system.
KR1020210175192A 2021-12-08 2021-12-08 Method and system for deleting text in image KR20230086502A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210175192A KR20230086502A (en) 2021-12-08 2021-12-08 Method and system for deleting text in image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210175192A KR20230086502A (en) 2021-12-08 2021-12-08 Method and system for deleting text in image

Publications (1)

Publication Number Publication Date
KR20230086502A true KR20230086502A (en) 2023-06-15

Family

ID=86763721

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210175192A KR20230086502A (en) 2021-12-08 2021-12-08 Method and system for deleting text in image

Country Status (1)

Country Link
KR (1) KR20230086502A (en)

Similar Documents

Publication Publication Date Title
CN110599492B (en) Training method and device for image segmentation model, electronic equipment and storage medium
KR102612808B1 (en) lighting estimation
CN112308763A (en) Generating a composite digital image using a neural network with a dual stream encoder architecture
CN107220990B (en) Hair segmentation method based on deep learning
US20220301295A1 (en) Recurrent multi-task convolutional neural network architecture
CN111902807A (en) Machine learning applied to texture compression or magnification
EP4007993A1 (en) Sub-pixel data simulation system
KR20230044395A (en) Learning realistic and animatable full-body human avatars from monocular video
CN116634242A (en) Speech-driven speaking video generation method, system, equipment and storage medium
CN113870401A (en) Expression generation method, device, equipment, medium and computer program product
CN111144449B (en) Image processing method, device, storage medium and electronic equipment
US11861762B2 (en) Generating synthesized digital images utilizing class-specific machine-learning models
US11373352B1 (en) Motion transfer using machine-learning models
US8891857B2 (en) Concave surface modeling in image-based visual hull
CN116228753B (en) Tumor prognosis evaluation method, device, computer equipment and storage medium
KR20230086502A (en) Method and system for deleting text in image
CN113496225B (en) Image processing method, image processing device, computer equipment and storage medium
WO2022226744A1 (en) Texture completion
CN113674383A (en) Method and device for generating text image
CN114004751A (en) Image processing method and related equipment thereof
CN117994173B (en) Repair network training method, image processing method, device and electronic equipment
CN115761565B (en) Video generation method, device, equipment and computer readable storage medium
US20240185505A1 (en) Learning Neural Light Fields with Ray-Space Embedding Networks
US20230360327A1 (en) Generating three-dimensional representations for digital objects utilizing mesh-based thin volumes
US20240096020A1 (en) Apparatus and method for generating moving viewpoint motion picture

Legal Events

Date Code Title Description
E902 Notification of reason for refusal