KR20230086502A - Method and system for deleting text in image - Google Patents
Method and system for deleting text in image Download PDFInfo
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 238000010801 machine learning Methods 0.000 claims abstract description 54
- 238000012937 correction Methods 0.000 claims abstract description 23
- 230000010365 information processing Effects 0.000 claims description 41
- 230000015654 memory Effects 0.000 claims description 40
- 230000006870 function Effects 0.000 claims description 38
- 238000004590 computer program Methods 0.000 claims description 7
- 230000002093 peripheral effect Effects 0.000 claims description 6
- 238000012217 deletion Methods 0.000 abstract description 5
- 230000037430 deletion Effects 0.000 abstract description 5
- 238000004891 communication Methods 0.000 description 26
- 238000011156 evaluation Methods 0.000 description 15
- 230000008569 process Effects 0.000 description 14
- 238000012545 processing Methods 0.000 description 12
- 238000010586 diagram Methods 0.000 description 8
- 239000002131 composite material Substances 0.000 description 7
- 238000013473 artificial intelligence Methods 0.000 description 5
- 238000001514 detection method Methods 0.000 description 5
- 238000011176 pooling Methods 0.000 description 5
- 238000012549 training Methods 0.000 description 5
- 230000014509 gene expression Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 238000012360 testing method Methods 0.000 description 4
- 238000013519 translation Methods 0.000 description 4
- 230000011218 segmentation Effects 0.000 description 3
- 238000002679 ablation Methods 0.000 description 2
- 230000004913 activation Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 2
- 230000015572 biosynthetic process Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 238000009434 installation Methods 0.000 description 2
- 230000005291 magnetic effect Effects 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000003786 synthesis reaction Methods 0.000 description 2
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
- 238000010200 validation analysis Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/60—Editing figures and text; Combining figures or text
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
-
- G06T5/001—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/20—Image enhancement or restoration using local operators
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; 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.
Description
본 발명은 이미지 내의 텍스트를 삭제하는 방법에 관한 것으로, 보다 상세하게는, 하나 이상의 텍스트 객체를 포함하는 이미지를 수신하고, 수신된 이미지 및 수신된 텍스트 영역 마스크를 기계학습 모델에 입력하여, 하나 이상의 텍스트 객체의 적어도 일부가 삭제된 보정 이미지를 출력하는 방법 및 시스템에 관한 것이다.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
일 실시예에 따르면, 생성 모델(130)은 이미지(110) 및 이미지(110)에 대응하는 텍스트 영역 마스크(120)를 입력으로 하여, 이미지(110)로부터 하나 이상의 텍스트 객체의 적어도 일부가 삭제된 보정 이미지(140)를 출력할 수 있다. 여기서, 텍스트 영역 마스크(120)는 이미지(110)에 포함된 하나 이상의 텍스트 객체의 위치를 탐지하여 기계학습 모델을 효율적으로 학습하는데 사용될 수 있다. 예를 들어, 텍스트 영역 마스크(120)는, 텍스트 객체의 위치를 특정하기 위해 사용될 수 있다. 도시된 바와 같이, 텍스트 영역 마스크(120)의 '흰 색'영역은 텍스트 영역(text region)을 나타내고, '검정색'영역은 텍스트가 아닌(non-text region) 영역을 나타낸다. 또한, 이미지(110)를 이용하여 사전에 생성된 텍스트 영역 마스크(120)가 기계학습 모델에 입력될 수 있다. According to an embodiment, the
일 실시예에 따르면, 생성 모델(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
일 실시예에 따르면, 판별 모델(160)은 사전에 텍스트 객체의 적어도 일부가 삭제된 참조 정답 이미지(Ground truth image)(150)를 이용하여 참조 정답 이미지의 분포를 학습하도록 구성될 수 있다. 여기서, 참조 정답 이미지의 분포는 참조 정답 이미지에 포함될 확률 분포를 나타낼 수 있으며, 복수의 참조 정답 이미지를 이용하여 결정될 수 있다. 그리고 나서, 판별 모델(160)은 보정 이미지(140)가 정답 분포에 포함되는지 여부를 기초로 보정 이미지(140)가 정답 이미지인지 아닌지를 판별할 수 있다. 판별 모델(160)은 보정 이미지(140)를 정답 이미지인 것으로 판별한 경우, 기계학습 모델은 생성 모델(130)이 참조 정답 이미지(150)에 가까운 보정 이미지(140)를 출력하도록 학습된다. 즉, 기계학습 모델은 생성 모델(130)이 참조 정답 이미지(150)와 동일하거나 매우 유사한 보정 이미지(140)를 출력하도록 구성될 수 있다.According to an embodiment, the
한편, 도 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
도 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
정보 처리 시스템(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
도 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
일 실시예에서, 사용자 단말(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
도 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
메모리(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
이러한 소프트웨어 구성요소들은 메모리(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
프로세서(314, 334)는 기본적인 산술, 로직 및 입출력 연산을 수행함으로써, 컴퓨터 프로그램의 명령을 처리하도록 구성될 수 있다. 명령은 메모리(312, 332) 또는 통신 모듈(316, 336)에 의해 프로세서(314, 334)로 제공될 수 있다. 예를 들어, 프로세서(314, 334)는 메모리(312, 332)와 같은 기록 장치에 저장된 프로그램 코드에 따라 수신되는 명령을 실행하도록 구성될 수 있다.The
통신 모듈(316, 336)은 네트워크(220)를 통해 사용자 단말(210)과 정보 처리 시스템(230)이 서로 통신하기 위한 구성 또는 기능을 제공할 수 있으며, 사용자 단말(210) 및/또는 정보 처리 시스템(230)이 다른 사용자 단말 및/또는 다른 시스템(일례로 별도의 클라우드 시스템 등)과 통신하기 위한 구성 또는 기능을 제공할 수 있다. 일례로, 사용자 단말(210)의 프로세서(314)가 메모리(312) 등과 같은 기록 장치에 저장된 프로그램 코드에 따라 생성한 요청 또는 데이터(예를 들어, 이미지 내의 텍스트 객체와 연관된 데이터 등)는 통신 모듈(316)의 제어에 따라 네트워크(220)를 통해 정보 처리 시스템(230)으로 전달될 수 있다. 역으로, 정보 처리 시스템(230)의 프로세서(334)의 제어에 따라 제공되는 제어 신호나 명령이 통신 모듈(336)과 네트워크(220)를 거쳐 사용자 단말(210)의 통신 모듈(316)을 통해 사용자 단말(210)에 수신될 수 있다.The
입출력 인터페이스(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/
사용자 단말(210) 및 정보 처리 시스템(230)은 도 3의 구성요소들보다 더 많은 구성요소들을 포함할 수 있다. 그러나, 대부분의 종래기술적 구성요소들을 명확하게 도시할 필요성은 없다. 일 실시예에 따르면, 사용자 단말(210)은 상술된 입출력 장치(320) 중 적어도 일부를 포함하도록 구현될 수 있다. 또한, 사용자 단말(210)은 트랜시버(transceiver), GPS(Global Positioning system) 모듈, 카메라, 각종 센서, 데이터베이스 등과 같은 다른 구성요소들을 더 포함할 수 있다. 예를 들어, 사용자 단말(210)은 카메라 모듈, 터치패널, 입출력 포트 등의 다양한 구성요소들이 사용자 단말(210)에 더 포함되도록 구현될 수 있다.The user terminal 210 and the
일 실시예에 따르면, 사용자 단말(210)의 프로세서(314)는 사용자 단말(210)을 동작하거나 제어할 수 있는 임의의 어플리케이션을 동작하도록 구성될 수 있다. 예를 들어, 번역 어플리케이션, 텍스트 에디팅 어플리케이션, 이미지 처리 어플리케이션 및/또는 인공지능 어플리케이션 등이 동작하도록 구성될 수 있다. 이 때, 해당 어플리케이션 및/또는 프로그램과 연관된 코드가 사용자 단말(210)의 메모리(312)에 로딩될 수 있다. 어플리케이션 및/또는 프로그램이 동작되는 동안에, 사용자 단말(210)의 프로세서(314)는 입출력 장치(320)로부터 제공된 정보 및/또는 데이터를 입출력 인터페이스(318)를 통해 수신하거나 통신 모듈(316)을 통해 정보 처리 시스템(230)으로부터 정보 및/또는 데이터를 수신할 수 있으며, 수신된 정보 및/또는 데이터를 처리하여 메모리(312)에 저장할 수 있다. 또한, 이러한 정보 및/또는 데이터는 통신 모듈(316)을 통해 정보 처리 시스템(230)에 제공할 수 있다.According to one embodiment, the
텍스트 에디팅 어플리케이션 등을 위한 프로그램이 동작되는 동안에, 프로세서(314)는 입출력 인터페이스(318)와 연결된 터치 스크린, 키보드, 오디오 센서 및/또는 이미지 센서를 포함한 카메라, 마이크로폰 등의 입력 장치를 통해 입력되거나 선택된 텍스트, 이미지, 영상, 음성 등을 수신할 수 있으며, 수신된 텍스트, 이미지, 영상 및/또는 음성 등을 메모리(312)에 저장하거나 통신 모듈(316) 및 네트워크(220)를 통해 정보 처리 시스템(230)에 제공할 수 있다.While a program for a text editing application or the like is running, the
정보 처리 시스템(230)의 프로세서(334)는, 사용자 단말(210)을 포함한 복수의 사용자 단말 및/또는 복수의 외부 시스템으로부터 수신된 정보 및/또는 데이터를 관리, 처리 및/또는 저장하도록 구성될 수 있다. 프로세서(334)에 의해 처리된 정보 및/또는 데이터는 통신 모듈(336) 및 네트워크(220)를 통해 사용자 단말(210)에 제공할 수 있다. 일 실시예에서, 정보 처리 시스템(230)의 프로세서(334)는 통신 모듈(336) 및 네트워크(220)를 통해 사용자 단말(210)로부터 이미지 내의 텍스트 삭제에 대한 요청을 수신할 수 있다. 정보 처리 시스템(330)의 프로세서(334)는 사용자 단말(210)의 디스플레이 출력 가능 장치(예: 터치 스크린, 디스플레이 등) 등의 출력 장치를 통해 처리된 정보 및/또는 데이터(예를 들어, 텍스트가 삭제된 이미지)를 출력하도록 구성될 수 있다. 이와 달리, 텍스트 삭제에 대한 요청을 수신하는 경우, 사용자 단말(210)의 프로세서(314)는 사용자 단말(210)의 메모리(312)에 저장된 기계학습 모델을 이용하여 텍스트 삭제 처리를 하도록 구성될 수 있다. 즉, 이미지 내의 텍스트 삭제를 위한 기계학습 모델의 추론 과정은 사용자 단말에서 수행될 수 있다.The
도 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
일 실시예에 따르면, 생성 모델(430) 및 판별 모델(예: 판별 모델(150))의 목적 함수(objective function)는 각각 수학식 1 및 수학식 2와 같다.According to an embodiment, objective functions of the
수학식 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
일 실시예에 따르면, 생성 모델(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
일 실시예에 따르면, 생성 모델(430)은 제1 참조 보정 이미지(440)에 대응하는 참조 정답 이미지(460)와 제1 참조 보정 이미지(440)를 기초로 정의된 손실 함수(450)를 이용하여 학습될 수 있다. 이 경우, 손실 함수(450)의 값은, 참조 정답 이미지(460)와 제1 참조 보정 이미지(440) 사이의 차이 및 입력된 참조 텍스트 영역 마스크(410)의 교차 영역을 기초로 산출될 수 있다. 예를 들어, 손실 함수(LRR 또는 LM)(450)는 수학식 3으로 정의될 수 있다.According to an embodiment, the
수학식 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
일 실시예에 따르면, 생성 모델(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)가 사용될 수 있다. 이 경우,, 및 는 각각 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
일 실시예에 따르면, 생성 모델(430)의 총 손실 함수 LG는 수학식 4로 정의될 수 있다.According to one embodiment, the total loss function L G of the
여기서, Ladv는 수학식 1에서 정의된 생성 모델(430)의 목적 함수를 나타내고, 는 수학식 10에서 정의되는 함수를 지칭할 수 있다. 또한, , , , , 및 는 대응 로스 함수(로스)의 가중치를 나타낼 수 있다. 예를 들어, , , , , 및 는 각각 100, 0.5, 50.0, 25.0, 1 및 1로 설정될 수 있다. 이하에서는, 각 함수가 상세히 정의될 수 있다.Here, L adv represents the objective function of the
Lp는 생성된 참조 보정 이미지(440)를 보다 사실적으로 만드는 데 이용될 수 있다. 이는 이미 알려진, 사전 학습된 ImageNet을 이용하여 추출한 두 이미지의 하이레벨 피처 사이의 차이를 감소시키는데 사용될 수 있다. 구체적으로, 참조 텍스트 영역 마스크(410)와 참조 텍스트 스트로크 마스크(미도시)를 각각 이용하여 생성된 두 개의 합성 출력을 이용하기 위한 손실 함수 Lp가 설계될 수 있다. 여기서, 참조 텍스트 스트로크 마스크는, 생성 모델(430)이 참조 이미지(420) 및 참조 보정 이미지(440)에 대응하는 참조 정답 이미지(460) 사이의 픽셀 값 차이를 기초로 생성한 마스크를 지칭할 수 있다. Lp는 수학식 5 내지 6에 의해 수학식 7로 정의될 수 있다.L p can be used to make the generated reference corrected
수학식 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
수학식 4의 Ls는 또한 참조 보정 이미지(440)의 더 나은 시각적 품질과 피처 일관성을 장려하기 위해 이용될 수 있다. 이는 피처맵의 그램 매트릭스(Gram matrix)을 이용하여 산출될 수 있다. Lp와 같이, 두 개의 합성 출력이 이용될 수 있다. Ls는 수학식 8로 정의될 수 있다. 여기서, ф(x)=xTx는 그램 매트릭스 연산자이고, An는 VGG-16의 번째 레이어의 활성화를 나타낸다. 또한, Lp와 동일한 레이어가 이용될 수 있다.L s in Equation 4 can also be used to encourage better visual quality and feature consistency of the reference calibrated
노이즈 제거를 위한 수학식 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
여기서, 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
일 실시예에 따르면, 하나 이상의 참조 스트로크의 주변 영역에 대한 정보(516)는 참조 이미지(514)에 포함된 복수의 픽셀의 각각이 하나 이상의 참조 스트로크의 주변 영역에 포함될 확률 값, 즉, 어텐션 스코어(Attention Score)를 갖는 어텐션 스코어 맵을 포함할 수 있다. 추가적으로, 어텐션 스코어 맵은 시각화를 위하여 히트맵(heatmap)으로 표시될 수 있다. 이 경우, 참조 이미지에 포함된 복수의 픽셀 각각이 참조 스트로크의 주변 영역에 포함될 확률이 높을수록 히트맵 상의 해당 픽셀이 적색으로 나타나고, 확률이 낮을수록 해당 픽셀이 청색으로 나타낼 수 있다.According to an embodiment, the
일 실시예에 따르면, 공간 집중 모델(510)은 참조 레이블 마스크(526) 및 하나 이상의 참조 스트로크의 주변 영역에 대한 정보(516)를 기초로 정의된 손실 함수를 이용하여 학습될 수 있다. 참조 레이블 마스크(526)란, 참조 스트로크의 주변 영역(예: 스트로크의 주변 영역(172, 174))에 대응하는 영역을 지칭할 수 있다. 일 실시예에 따르면, 참조 레이블 마스크(526)는 참조 이미지(514)에 대하여 사전에 생성된 레이블 마스크를 지칭할 수 있다. 일 실시예에 따르면, 참조 이미지(514) 및 참조 보정 이미지(예: 참조 보정 이미지(440))에 대응하는 참조 정답 이미지(예: 참조 정답 이미지(460)) 사이의 픽셀 값 차이를 기초로 참조 텍스트 스트로크 마스크(미도시)가 생성될 수 있다. 그리고 나서, 생성된 참조 텍스트 스트로크 마스크의 외부 및 참조 텍스트 영역 마스크(512)의 내부 사이의 교차 영역은 하나 이상의 참조 스트로크의 주변 영역(예: 스트로크의 주변 영역(172, 174))에 대응하는 참조 레이블 마스크(526)로서 생성될 수 있다. 즉, 공간 집중 모델(510)은 이러한 참조 레이블 마스크(526)를 이용하여 약지도(weak supervision) 방법에 따라 학습될 수 있다.According to one embodiment, the
일 실시예에 따르면, 손실 함수(530)의 값은, 참조 레이블 마스크(526) 및 결정된 하나 이상의 참조 스트로크의 주변 영역에 대한 정보(516)를 기초로 산출될 수 있다. 예를 들어, 손실 함수(530)는 수학식 10으로 정의될 수 있다.According to an embodiment, the value of the
수학식 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
일 실시예에 따르면, 공간 집중 모델(510)은 참조 텍스트 영역 마스크(512)를 업데이트할 수 있다. 공간 집중 모델(510)은 참조 이미지(514)의 텍스트 영역(즉, 참조 이미지(514)에서 텍스트 영역 마스크(512)의 '흰색'영역에 대응하는 부분)의 정보를 이용하기 때문에, 실행 중에 피처맵 내의 텍스트 영역을 추적해야 한다. 이 때, 공간 집중 모델(510)은 왜곡 없이 참조 텍스트 영역 마스크(512)를 업데이트하고, 참조 이미지(514)에서 마스크된 영역(즉, 텍스트 영역)에 의한 영향을 받는 모든 영역을 추적하기 위하여, 컨볼루션 레이어에서 리셉티브 필드(receptive field)의 개념을 이용할 수 있다. 참조 텍스트 영역 마스크(512)는 두 개의 컨볼루션 레이어에 의해 업데이트 될 수 있다. 예를 들어, 각각의 레이어는 각각의 요소(element)가 1/9로 고정된 하나의 3x3 컨볼루션 필터를 가질 수 있다. 업데이트된 참조 텍스트 영역 마스크(522)는 수학식 11로 정의될 수 있다.According to one embodiment, the
수학식 11에서 Min 및 Mout은 각각 컨볼루션 레이어의 참조 텍스트 영역 마스크(512) 및 업데이트된 참조 텍스트 영역 마스크(522)를 나타낸다. 또한 는 컨볼루션 연산자를 나타내고, K는 각 요소(element)가 고정된 컨볼루션 레이어의 가중치를 나타낸다.In Equation 11, M in and M out represent the reference
일 실시예에 따르면, 참조 텍스트 영역 마스크(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
도 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
일 실시예에 따르면, 기계학습 모델은 하나 이상의 텍스트 객체가 삭제된 이미지(630) 및 참조 이미지(610)에서의 참조 텍스트 영역 마스크(620)의 외부 영역을 포함한 이미지(640)(즉, 참조 텍스트 영역 마스크(620)에 의하여 마스크되지 않는 영역)에 대한 정보를 이용하여 제1 참조 보정 이미지(650)를 출력할 수 있다. 예를 들어, 기계학습 모델은 하나 이상의 텍스트 객체가 삭제된 이미지(630)와 외부 영역을 포함한 이미지(640)를 결합하여 제1 참조 보정 이미지(650)를 출력할 수 있다.According to one embodiment, the machine learning model is an
도 7은 본 개시의 일 실시예에 따른 참조 중간 이미지(720)의 예시를 나타낸다. 도 6에서 상술한 바와 같이, 기계학습 모델에 포함된 공간 집중 모델은 참조 스트로크의 주변 영역에 대한 정보를 기초로 참조 중간 이미지(720)를 생성할 수 있다. 예를 들어, 공간 집중 모델은 참조 스트로크의 주변 영역에 대한 정보(예: 참조 스트로크의 주변 영역에 대한 정보(516))와 참조 이미지(710)를 결합하여(concatenate) 참조 중간 이미지(720)를 생성할 수 있다.7 shows an example of a reference
일 실시예에 따르면, 참조 중간 이미지(720)에 도시된 바와 같이, 참조 이미지(710)의 적어도 일부에 포함된 픽셀에 대하여, 각 픽셀이 하나 이상의 참조 스트로크의 주변 영역에 포함될 확률을 나타내는 히트맵이 표시될 수 있다. 예를 들어, 각 픽셀이 하나 이상의 참조 스트로크의 주변 영역에 포함될 확률이 높을수록 적색에 가깝고, 각 픽셀이 하나 이상의 참조 스트로크의 주변 영역에 포함될 확률이 낮을수록 청색에 가깝게 표시될 수 있다.According to an embodiment, as shown in the reference
도 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
일 실시예에 따르면, 본 개시의 기계학습 모델의 학습 및 평가를 위해, 합성(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
일 실시예에 따르면, 본 개시의 기계학습 모델의 평가를 위해 보조 텍스트 디텍터를 이용한 평가 방법이 제안될 수 있다. 보조 텍스트 디텍터는 텍스트가 제거된 보정 이미지(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
일 실시예에 따르면, 본 개시의 기계학습 모델의 구현을 위해 상술한 합성 데이터 셋과 실제 데이터 셋이 결합된(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.
표 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
표 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.
DataTrain
Data
SizeInput
Size
표 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.
SizeInput
Size
표 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.
표 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
일 실시예에 따르면, 프로세서는 이미지에 대응하는 텍스트 영역 마스크를 수신할 수 있다(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.
상기 생성 모델은, 상기 참조 이미지 및 상기 참조 텍스트 영역 마스크를 이용하여 상기 참조 이미지 내의 하나 이상의 참조 스트로크의 주변 영역에 대한 정보를 결정하도록 구성된 공간 집중(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.
상기 참조 이미지 및 상기 제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.
상기 공간 집중 모델은 상기 참조 레이블 마스크 및 상기 결정된 하나 이상의 참조 스트로크의 주변 영역에 대한 정보를 기초로 정의된 제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.
상기 하나 이상의 참조 스트로크의 주변 영역에 대한 정보는, 상기 참조 이미지에 포함된 복수의 픽셀의 각각이 상기 하나 이상의 참조 스트로크의 주변 영역에 포함될 확률 값을 갖는 어텐션 스코어 맵(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.
상기 기계학습 모델은 상기 하나 이상의 참조 스트로크의 주변 영역에 대한 정보 및 상기 참조 이미지에서의 참조 텍스트 영역 마스크의 외부 영역에 대한 정보를 이용하여 상기 제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 참조 보정 이미지를 기초로 정의된 제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.
상기 제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.
상기 생성 모델의 적어도 일부 레이어로부터 하나 이상의 제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 참조 보정 이미지가 참조 정답 이미지의 분포에 포함되어 있는지 판별하도록 구성된 판별 모델을 더 포함하고,
상기 참조 정답 이미지의 분포는 복수의 참조 정답 이미지를 이용하여 결정되는,
이미지 내의 텍스트를 삭제하는 방법.
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.
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; .
상기 생성 모델은, 상기 참조 이미지 및 상기 참조 텍스트 영역 마스크를 이용하여 상기 참조 이미지 내의 하나 이상의 참조 스트로크의 주변 영역에 대한 정보를 결정하도록 구성된 공간 집중 모델을 포함하는, 정보 처리 시스템.
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.
상기 적어도 하나의 프로그램은,
상기 참조 이미지 및 상기 제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.
상기 공간 집중 모델은 상기 참조 레이블 마스크 및 상기 결정된 하나 이상의 참조 스트로크의 주변 영역에 대한 정보를 기초로 정의된 제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.
상기 하나 이상의 참조 스트로크의 주변 영역에 대한 정보는, 상기 참조 이미지에 포함된 복수의 픽셀의 각각이 상기 하나 이상의 참조 스트로크의 주변 영역에 포함될 확률 값을 갖는 어텐션 스코어 맵을 포함하는, 정보 처리 시스템.
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.
상기 기계학습 모델은 상기 하나 이상의 참조 스트로크의 주변 영역에 대한 정보 및 상기 참조 이미지에서의 참조 텍스트 영역 마스크의 외부 영역에 대한 정보를 이용하여 상기 제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.
상기 생성 모델은 상기 제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.
상기 적어도 하나의 프로그램은,
상기 생성 모델의 적어도 일부 레이어로부터 하나 이상의 제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. .
상기 기계학습 모델은, 상기 생성 모델의 고도화를 위해서 상기 제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.
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) |
-
2021
- 2021-12-08 KR KR1020210175192A patent/KR20230086502A/en not_active Application Discontinuation
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 |