[go: up one dir, main page]

RU2774665C1 - Method for recognising chemical information from images of document and system for implementation thereof - Google Patents

Method for recognising chemical information from images of document and system for implementation thereof Download PDF

Info

Publication number
RU2774665C1
RU2774665C1 RU2021118778A RU2021118778A RU2774665C1 RU 2774665 C1 RU2774665 C1 RU 2774665C1 RU 2021118778 A RU2021118778 A RU 2021118778A RU 2021118778 A RU2021118778 A RU 2021118778A RU 2774665 C1 RU2774665 C1 RU 2774665C1
Authority
RU
Russia
Prior art keywords
chemical
arrow
reaction
page
recognition
Prior art date
Application number
RU2021118778A
Other languages
Russian (ru)
Inventor
Иван Сергеевич Хохлов
Лев Валерьевич Краснов
Максим Валериевич Федоров
Сергей Борисович Соснин
Original Assignee
Автономная некоммерческая образовательная организация высшего образования «Сколковский институт науки и технологий»
Filing date
Publication date
Application filed by Автономная некоммерческая образовательная организация высшего образования «Сколковский институт науки и технологий» filed Critical Автономная некоммерческая образовательная организация высшего образования «Сколковский институт науки и технологий»
Priority to EP21948594.3A priority Critical patent/EP4364110A4/en
Priority to PCT/RU2021/000294 priority patent/WO2023277725A1/en
Priority to US18/574,499 priority patent/US20240242788A1/en
Application granted granted Critical
Publication of RU2774665C1 publication Critical patent/RU2774665C1/en

Links

Images

Abstract

FIELD: computing technology.
SUBSTANCE: invention relates to the field of computing technology for data recognition. The computer-implemented method includes the following stages: inputting an image of a document page into a detector; the detector identifying fragments on the page; obtaining coordinates of the fragment on the page for each identified fragment; and classifying the fragments; the structure recognition unit recognises the chemical structure for each fragment; inputting the identified reaction arrow fragments into the arrow recognition unit; obtaining coordinates on the page for each arrow and attributes of the reaction; supplying the coordinates on the page to the input of the reaction recognition unit for each fragment of the recognised chemical structures; and, based on the received data, the reaction recognition unit determines the relation between the arrows and the recognised chemical structures; recognised chemical structures are obtained as a result based on the recognised data for the image of a document page.
EFFECT: ensured automatic recognition of chemical information from images of documents, reduction in the duration and increase in the accuracy of recognition of chemical information from images of documents.
17 cl, 7 dwg

Description

ОБЛАСТЬ ТЕХНИКИFIELD OF TECHNOLOGY

Изобретение относится к области распознавания данных, в частности к способу распознавания химической информации из изображений документов и система для его осуществления.The invention relates to the field of data recognition, in particular to a method for recognizing chemical information from document images and a system for its implementation.

Представленное решение может быть использовано, по меньшей мере, в фармацевтических компаниях для сбора данных по разнообразной химической информации, например, химическим соединениям, представленным в различных форматах, химическим реакциям и дополнительной химической информации, в других областях техники, в которых необходимо осуществлять сбор данных по такой химической информации. Также настоящее решение может использоваться провайдерами химической информации для составления баз данных.The presented solution can be used at least in pharmaceutical companies to collect data on a variety of chemical information, for example, chemical compounds presented in various formats, chemical reactions and additional chemical information, in other areas of technology in which it is necessary to collect data on such chemical information. Also, this solution can be used by chemical information providers to compile databases.

УРОВЕНЬ ТЕХНИКИBACKGROUND OF THE INVENTION

В заявке на изобретение CN111860507A, дата публикации 30.10.2020, описан способ извлечения молекулярной структурной формулы составного изображения, основанный на состязательном обучении, относящемся к области глубокого обучения, распознавания изображений и извлечения составной молекулярной формулы. Способ извлечения молекулярной структурной формулы составного изображения, основанный на состязательном обучении, включает следующие этапы: построение набора пар данных, состоящих из составных изображений, и молекулярных структур в виде нотации SMILES; создание состязательных сетей: генератора SMILES и распознавателя структур в нотации SMILES, и состязательное обучение предложенной нейросетевой модели.In the patent application CN111860507A, published on 10/30/2020, a method for extracting the molecular structural formula of a composite image based on adversarial learning related to the field of deep learning, image recognition and extracting a composite molecular formula is described. A method for extracting a molecular structural formula of a composite image based on adversarial learning includes the following steps: building a set of data pairs consisting of composite images and molecular structures in the form of SMILES notation; creation of adversarial networks: SMILES generator and structure recognizer in SMILES notation, and adversarial training of the proposed neural network model.

В международной заявке на изобретение WO2019148852A1, дата публикации 08.08.2019, раскрыт способ распознавания химической информации из изображений рисунков, нарисованных от руки, путем идентификации структур, идентификации рукописного шрифта, идентификации атомов, соответствующих структурам, идентификации связей с помощью методов глубокого обучения.In the international application for invention WO2019148852A1, publication date 08/08/2019, a method for recognizing chemical information from images of hand-drawn drawings by identifying structures, identifying handwriting, identifying atoms corresponding to structures, identifying bonds using deep learning methods is disclosed.

В патентном документе EP2567338B1, дата публикации 08.04.2020, раскрыто устройство для электронной идентификации и составления химических структур, обнаруженных в хранилище, в котором хранятся электронные файлы. Модуль распознавания оптической структуры идентифицирует множество возможных химических структур в электронных файлах хранилища, при этом, по крайней мере, один из электронных файлов содержит невстроенные изображения химических структур, идентифицируемых оптической структурой. Модуль распознавания выводит (для каждой идентифицированной потенциальной химической структуры) объект химической структуры со связанным набором свойств, включая количество атомов углерода (например, число гетероатомов, число связей, число связей выбранного порядка связи, число колец и вес формулы). Модуль распознавания оптической структуры также применяет (для каждого производного объекта химической структуры) один или несколько фильтров, включая фильтр для исключения объектов, идентифицированных как имеющие менее выбранного количества атомов углерода, при этом выбранное количество атомов углерода конфигурируется и устанавливается пользователем на основе ожидаемого содержимого электронных файлов, и сохраняет объекты, не удаленные одним или несколькими фильтрами, в доступной для поиска электронной базе данных идентифицированных объектов.Patent document EP2567338B1, publication date 04/08/2020, discloses a device for electronic identification and compilation of chemical structures found in a vault in which electronic files are stored. The optical structure recognition module identifies a plurality of possible chemical structures in the electronic storage files, wherein at least one of the electronic files contains non-embedded images of the chemical structures identified by the optical structure. The recognition module outputs (for each potential chemical structure identified) a chemical structure object with an associated set of properties, including the number of carbon atoms (eg, number of heteroatoms, number of bonds, number of bonds of the chosen bond order, number of rings, and formula weight). The optical structure recognition module also applies (for each derived chemical structure object) one or more filters, including a filter to exclude objects identified as having less than a selected number of carbon atoms, with the selected number of carbon atoms being configured and set by the user based on the expected content of electronic files. , and stores objects not removed by one or more filters in a searchable electronic database of identified objects.

В заявке на изобретение CN112818645A, дата публикации 18.05.2021, описан способ и устройство извлечения химической информации, в которых осуществляют получение документа, содержащего химическую информацию, вычленение изображения и текста из документа, содержащего химическую информацию, извлечение химической структуры и соответствующей ей метки, установление связи между химической структурой и меткой, извлечение химического объекта и отношения между химическими объектами из текста.In the application for invention CN112818645A, publication date 05/18/2021, a method and a device for extracting chemical information are described, in which a document containing chemical information is obtained, an image and text are extracted from a document containing chemical information, the chemical structure and its corresponding label are extracted, and connections between the chemical structure and the label, the extraction of the chemical object and the relationship between chemical objects from the text.

В статье [1] авторы представили новую модель DECIMER (Deep lEarning for Chemical ImagE Recognition). Раскрыта сеть на основе нейронной архитектуры Трансформера, которая может распознавать молекулярные структуры в виде нотации SMILES с точностью более 96% для изображений химических структур без стереохимической информации и с точностью более 89% для изображений со стереохимической информацией.In the article [1], the authors presented a new model DECIMER (Deep lEarning for Chemical Image Recognition). A network based on the neural architecture of the Transformer is disclosed that can recognize molecular structures in the form of SMILES notation with an accuracy of more than 96% for images of chemical structures without stereochemical information and with an accuracy of more than 89% for images with stereochemical information.

В статье [2] авторы обращаются к проблеме трансляции изображения в текст специально для молекулярных структур, где результатом будет предсказанное химическое обозначение в формате InChI для данной молекулярной структуры. Текущие подходы в основном основаны на правилах или методологии на основе CNN + RNN. Тем не менее, по заявлению авторов работы [2] они показывают худшие результаты на зашумленных изображениях и изображениях с небольшим количеством различимых деталей. Чтобы преодолеть данные ограничения, авторы предложили сквозную модель трансформера. По сравнению с основанными на внимании методами, предлагаемая модель демонстрирует лучшую производительность.In the article [2], the authors address the problem of image-to-text translation specifically for molecular structures, where the result is a predicted chemical designation in the InChI format for a given molecular structure. Current approaches are mostly rule based or CNN + RNN based methodology. However, according to the authors of [2], they show worse results on noisy images and images with a small amount of distinguishable details. To overcome these limitations, the authors proposed an end-to-end transformer model. Compared to attention-based methods, the proposed model demonstrates better performance.

В статье [3] авторы представляют быструю и точную модель, сочетающую глубокую сверточную нейронную сеть, обучающуюся на основе изображений молекул, и предварительно обученный декодер, который переводит скрытое представление в представление молекул SMILES. Метод, названный авторами Img2Mol, способен правильно распознавать до 88% молекулярных изображений и конвертировать в представление SMILES.In [3], the authors present a fast and accurate model that combines a deep convolutional neural network that learns from molecular images and a pretrained decoder that translates the latent representation into a representation of SMILES molecules. The method, named Img2Mol by the authors, is capable of correctly recognizing up to 88% of molecular images and converting them to the SMILES representation.

В химических журналах, научных статьях, патентах, технических отчетах, диссертациях и прочих химических документах ключевая информация представлена в виде изображения не только молекулярных структур в стандартизированном формате, но и структур, записанных в нестандартизированном формате, с указанием «псевдохимических групп» R1, R2 и т. п. В общем виде такие структуры называются структурами Маркуша. Также в состав химических формул часто входят обозначения химических групп в виде сокращений – например «Ph-», «MeO-». Кроме этого, ключевая химическая информация также представлена в виде химических реакций. Однако, в решениях из уровня техники отсутствует возможность оптического распознавания из исходных оптических сканов различных химических документов химической информации в виде структур, записанных в нестандартизированном или сокращенном формате, а также в виде химических реакций.In chemical journals, scientific articles, patents, technical reports, dissertations and other chemical documents, key information is presented in the form of a representation not only of molecular structures in a standardized format, but also of structures written in a non-standardized format, indicating "pseudochemical groups" R1, R2 and etc. In general, such structures are called Markush structures. Also, chemical formulas often include the designations of chemical groups in the form of abbreviations - for example, "Ph-", "MeO-". In addition, key chemical information is also presented in the form of chemical reactions. However, in the solutions of the prior art there is no possibility of optical recognition from the original optical scans of various chemical documents of chemical information in the form of structures recorded in a non-standardized or abbreviated format, as well as in the form of chemical reactions.

Оптическое распознавание подобного рода информации – сложнейшая задача. Техническая проблема, на решение которой направлено заявляемое изобретение, заключается в распознавании из химических документов химической информации, содержащей как химические структуры, записанные в стандартизированном, так и нестандартизированном или сокращенном формате, а также химические реакции.Optical recognition of this kind of information is a very difficult task. The technical problem to be solved by the claimed invention is the recognition of chemical information from chemical documents, containing both chemical structures written in a standardized and non-standardized or abbreviated format, as well as chemical reactions.

СУЩНОСТЬ ИЗОБРЕТЕНИЯSUMMARY OF THE INVENTION

Техническим результатом заявляемого изобретения является обеспечение автоматического распознавания из изображений документов химической информации, содержащей как химические структуры, записанные в стандартизированном, так и нестандартизированном или сокращенном формате, а также химические реакции, сокращение времени и повышение точности распознавания химической информации из изображений документов. Дополнительным техническим результатом является увеличение производительности вычислительной системы при решении поставленной задачи, т.е. настоящее решение позволяет производить обработку документов с получением результата распознавания за меньшее количество времени, тем самым снижая нагрузку на центральный процессор вычислительного устройства.The technical result of the claimed invention is the provision of automatic recognition of chemical information from document images, containing both chemical structures recorded in a standardized and non-standardized or abbreviated format, as well as chemical reactions, reducing the time and increasing the accuracy of recognition of chemical information from document images. An additional technical result is an increase in the performance of the computing system when solving the task, i.e. The present solution makes it possible to process documents to obtain a recognition result in less time, thereby reducing the load on the central processor of the computing device.

Указанный технический результат достигается за счёт того, что компьютерно-реализуемый способ распознавания химической информации из изображений документов, в котором вычислительное устройство, содержащее процессор и память, хранит в памяти инструкции, исполняемые процессором, и исполняют инструкции, включающие этапы, на которых:This technical result is achieved due to the fact that a computer-implemented method for recognizing chemical information from document images, in which a computing device containing a processor and memory stores in memory instructions executed by the processor, and executes instructions, including the steps at which:

- на вход детектора подают изображение страницы документа; детектор с помощью первой нейронной сети идентифицирует на странице один или более фрагментов, содержащих химическую информацию; для каждого идентифицированного фрагмента получают координаты фрагмента на странице; и классифицируют фрагменты по меньшей мере по следующим категориям: химическая структура, стрелка реакции;- the image of the document page is fed to the input of the detector; the detector using the first neural network identifies on the page one or more fragments containing chemical information; for each identified fragment get the coordinates of the fragment on the page; and classifying the fragments into at least the following categories: chemical structure, reaction arrow;

- на вход блока распознавания структур подают один или более идентифицированных фрагментов химических структур, причем каждый фрагмент представляет собой изображение; блок распознавания структур для каждого фрагмента распознает химическую структуру с помощью второй нейронной сети;- one or more identified fragments of chemical structures are fed to the input of the structure recognition block, each fragment being an image; the structure recognition unit for each fragment recognizes the chemical structure using the second neural network;

- на вход блока распознавания стрелок подают один или более идентифицированных фрагментов стрелок реакций; блок распознавания стрелок с помощью третьей нейронной сети определяет тип стрелки, и с помощью четвертой нейронной сети получают координаты на странице для каждой стрелки, и атрибуты реакции;- one or more identified fragments of reaction arrows are fed to the input of the arrow recognition block; the arrow recognition unit, using the third neural network, determines the type of the arrow, and using the fourth neural network, the coordinates on the page for each arrow, and the response attributes are obtained;

- на вход блока распознавания реакций передают координаты на странице каждого фрагмента распознанных химических структур, соответствующие распознанные химические структуры, координаты на странице каждой стрелки реакции, тип стрелки, атрибуты реакции; и на основании полученных данных блок распознавания реакций определяет, как стрелки связывают распознанные химические структуры;- the coordinates on the page of each fragment of the recognized chemical structures, the corresponding recognized chemical structures, the coordinates on the page of each reaction arrow, the arrow type, the reaction attributes are transmitted to the input of the reaction recognition block; and based on the received data, the reaction recognition block determines how the arrows connect the recognized chemical structures;

- в результате на основании распознанных данных для изображения страницы документа получают одну или более распознанных химических структур, координаты на странице для каждой распознанной химической структуры, распознанные отношения между веществами, участвующими в химической реакции, представленными в виде химических структур, координаты на странице для каждого распознанного отношения.- as a result, based on the recognized data for the document page image, one or more recognized chemical structures are obtained, coordinates on the page for each recognized chemical structure, recognized relationships between substances participating in a chemical reaction, represented as chemical structures, coordinates on the page for each recognized relations.

В способе химическая структура может являться, по меньшей мере, химическим соединением, структурой Маркуша, химической структурой с заместителями.In the method, the chemical structure may be at least a chemical compound, a Markush structure, a chemical structure with substituents.

В способе дополнительно могут идентифицировать фрагменты, содержащие дополнительную информацию, способствующую распознаванию реакций.The method may additionally identify fragments containing additional information to help recognize reactions.

В способе дополнительная информация может включать, по меньшей мере, следующее: заголовок, легенда.In the method, additional information may include at least the following: title, legend.

В способе детектор дополнительно для каждого идентифицированного фрагмента может определять уверенность - число от 0 до 1, которое оценивает достоверность идентифицированного фрагмента, где 0 - абсолютно не уверен, 1 - полностью уверен.In the method, the detector additionally for each identified fragment can determine confidence - a number from 0 to 1, which evaluates the reliability of the identified fragment, where 0 is absolutely not sure, 1 is completely sure.

В способе идентифицированные фрагменты могут фильтроваться по предустановленному порогу уверенности.In the method, the identified fragments may be filtered by a predetermined confidence threshold.

В способе может быть установлен порог уверенности для каждой категории фрагментов.The method may set a confidence threshold for each category of fragments.

В способе первая нейронная сеть может являться нейронной сетью Faster R-CNN или другой сверточной сетью равной или большей мощности.In the method, the first neural network may be a Faster R-CNN neural network or other convolutional network of equal or greater power.

В способе вторая нейронная сеть может являться нейронной сетью на базе архитектуры трансформера, и блок распознавания структур содержит сверточный блок и декодер трансформера.In the way the second neural network may be a neural network based on a transformer architecture, and the pattern recognition block comprises a convolutional block and a transformer decoder.

В способе в качестве сверточного блока может использоваться ResNet-50 без последних двух слоев или другая сверточная сеть, работающая с изображениями.The method can use ResNet-50 without the last two layers as a convolutional block, or another convolutional network that works with images.

В способе распознанная химическая структура может представлять собой текстовую последовательность, однозначно описывающую химическую структуру.In the method, the recognized chemical structure may be a text sequence that uniquely describes the chemical structure.

В способе могут описывать химическую структуру в виде текстовой последовательности с помощью модификации SMILES, способной описать структуры Маркуша и химические структуры с заместителями.The method may describe the chemical structure as a text sequence using a SMILES modification capable of describing Markush structures and chemical structures with substituents.

В способе может быть реализован механизм конвертации модификации SMILES, способной описать структуры Маркуша и химические структуры с заместителями, в SMILES и обратно.The method can implement a mechanism for converting the SMILES modification, which is capable of describing Markush structures and chemical structures with substituents, to SMILES and vice versa.

В способе третья и четвертая нейронные сети могут являться сверточными нейронными сетями на базе ResNet.In the method, the third and fourth neural networks may be ResNet-based convolutional neural networks.

В способе стрелки могут быть классифицированы по следующим типам: прямая стрелка, стрелка, которая не является прямой стрелкой.In the method, the arrows can be classified into the following types: a straight arrow, an arrow that is not a straight arrow.

В способе веществами, участвующими в химической реакции, могут являться исходные вещества химической реакции, продукты химической реакции.In the method, the substances participating in the chemical reaction may be the initial substances of the chemical reaction, the products of the chemical reaction.

Система распознавания химической информации из изображений документов содержит:The system for recognition of chemical information from document images contains:

- детектор;- detector;

- блок распознавания структур;- structure recognition block;

- блок распознавания стрелок;- arrow recognition unit;

- блок распознавания реакций;- reaction recognition block;

и в которой вычислительное устройство, содержащее процессор и память, хранящую инструкции, исполняемые процессором, осуществляет вышеописанный способ.and wherein the computing device, comprising the processor and a memory storing instructions executable by the processor, performs the above-described method.

ОПИСАНИЕ ЧЕРТЕЖЕЙDESCRIPTION OF THE DRAWINGS

Реализация изобретения будет описана в дальнейшем в соответствии с прилагаемыми чертежами, которые представлены для пояснения сути изобретения и никоим образом не ограничивают область изобретения.The implementation of the invention will be described hereinafter in accordance with the accompanying drawings, which are presented to explain the essence of the invention and in no way limit the scope of the invention.

Заявляемое изобретение проиллюстрировано фигурами 1-4, на которых изображены:The claimed invention is illustrated by figures 1-4, which depict:

Фиг. 1 иллюстрирует блок-схему системы распознавания химической информации из изображений документов.Fig. 1 illustrates a block diagram of a system for recognizing chemical information from document images.

Фиг. 2 иллюстрирует блок-схему модифицированного трансформера.Fig. 2 illustrates a block diagram of a modified transformer.

Фиг. 3а, 3б, 3в, 3г иллюстрируют пример работы системы распознавания химической информации из изображений документов.Fig. 3a, 3b, 3c, 3d illustrate an example of the operation of a system for recognizing chemical information from document images.

Фиг. 4 иллюстрирует общую схему вычислительного устройства для реализации настоящего изобретения.Fig. 4 illustrates a general diagram of a computing device for implementing the present invention.

ДЕТАЛЬНОЕ ОПИСАНИЕ ИЗОБРЕТЕНИЯDETAILED DESCRIPTION OF THE INVENTION

В приведенном ниже подробном описании реализации изобретения приведены многочисленные детали реализации, призванные обеспечить отчетливое понимание настоящего изобретения. Однако, квалифицированному в предметной области специалисту будет очевидно, каким образом можно использовать настоящее изобретение, как с данными деталями реализации, так и без них. В других случаях хорошо известные методы, процедуры и компоненты не были описаны подробно, чтобы не затруднять излишне понимание особенностей настоящего изобретения.In the following detailed description of the implementation of the invention, numerous implementation details are provided to provide a clear understanding of the present invention. However, it will be apparent to one skilled in the art how the present invention can be used, both with and without these implementation details. In other instances, well-known methods, procedures, and components have not been described in detail so as not to unnecessarily obscure the features of the present invention.

Кроме того, из приведенного изложения будет ясно, что изобретение не ограничивается приведенной реализацией. Многочисленные возможные модификации, изменения, вариации и замены, сохраняющие суть и форму настоящего изобретения, будут очевидными для квалифицированных в предметной области специалистов.Furthermore, it will be clear from the foregoing that the invention is not limited to the present implementation. Numerous possible modifications, changes, variations and substitutions that retain the spirit and form of the present invention will be apparent to those skilled in the subject area.

Настоящее изобретение представляет собой автоматизированный механизм распознавания химической информации из реальных химических документов.The present invention is an automated mechanism for recognizing chemical information from real chemical documents.

На Фиг. 1 представлена архитектура системы распознавания химической информации из изображений документов. Система (100) содержит следующие основные блоки:On FIG. Figure 1 shows the architecture of a system for recognizing chemical information from document images. System (100) contains the following main blocks:

- Детектор (101), который выполняет локализацию отдельных элементов химической информации на скане химического документа с помощью нейронной сети на базе архитектуры «Faster R-CNN» или любой другой более мощной сверточной сети.- A detector (101) that localizes individual elements of chemical information on a scan of a chemical document using a neural network based on the Faster R-CNN architecture or any other more powerful convolutional network.

- Блок распознавания структур (102), который с помощью нейронной сети на базе модифицированной архитектуры трансформер (Transformer) решает задачу трансляции изображения в текст (image captioning). Архитектура Transformer модифицирована таким образом, чтобы на вход сети подавать не последовательность, а изображение. В модифицированной архитектуре Transformer отсутствует блок энкодера.- A structure recognition block (102), which, using a neural network based on a modified transformer architecture (Transformer), solves the problem of translating an image into text (image captioning). The architecture of the Transformer is modified in such a way that not a sequence, but an image is fed to the network input. The modified Transformer architecture lacks the encoder block.

- Блок распознавания стрелок (103), который классифицирует стрелки, изображающие направление протекания реакции, с помощью нейронной сети. Нейронная сеть распознает координаты начала и конца стрелок, а также атрибуты реакций.- An arrow recognition unit (103), which classifies the arrows representing the direction of the reaction with the aid of a neural network. The neural network recognizes the coordinates of the beginning and end of the arrows, as well as the attributes of the reactions.

- Блок распознавания реакций (104), который определяет, как стрелки связывают распознанные химические структуры.- A Reaction Recognition Block (104), which determines how the arrows link the recognized chemical structures.

На вход системы подается скан страницы документа, который передается в детектор (101). Детектор (101) с помощью нейронной сети находит на странице прямоугольные области, содержащие химическую информацию — молекулы и стрелки реакций, а также дополнительную информацию, помогающую в распознавании реакций, например, заголовки и легенды схем.The system input is a scan of the document page, which is transferred to the detector (101). The detector (101) using a neural network finds rectangular areas on the page containing chemical information - molecules and arrows of reactions, as well as additional information that helps in recognizing reactions, for example, titles and legends of schemes.

Детектор (101) в своей основе имеет сеть Faster R-CNN, но в равной степени может быть реализован на базе любой нейросетевой архитектуры, решающей задачу детекции (YOLO, SDD, EfficientDet и т. д.).The detector (101) basically has a Faster R-CNN network, but can equally be implemented on the basis of any neural network architecture that solves the detection problem (YOLO, SDD, EfficientDet, etc.).

Для каждого найденного фрагмента возвращаются:For each fragment found, the following are returned:

1. Координаты на исходной странице;1. Coordinates on the original page;

2. Категория (молекула, стрелка, заголовок, легенда);2. Category (molecule, arrow, title, legend);

3. Уверенность - число от 0 (абсолютно не уверен) до 1 (полностью уверен).3. Confidence - a number from 0 (absolutely not sure) to 1 (completely sure).

Полученные объекты фильтруются по предустановленному порогу уверенности (например, 0.8), т. е. фрагмент со значением уверенности меньше 0.8 будет отброшен как недостоверный. Порог может быть установлен свой для каждой категории фрагментов.The received objects are filtered by a preset confidence threshold (for example, 0.8), i.e. a fragment with a confidence value less than 0.8 will be rejected as unreliable. The threshold can be set for each category of fragments.

Для обучения детектора (101) использовались данные, размеченные вручную с помощью специально написанного для этой цели интерфейса разметки. Всего было размечено 2500 страниц из статей. Дальнейшее наполнение набора обучающих данных возможно в полуавтоматическом режиме, когда прогноз детектора корректируется вручную.To train the detector (101), we used manually labeled data using a labeling interface specially written for this purpose. In total, 2500 pages of articles were marked up. Further filling of the training data set is possible in a semi-automatic mode, when the detector prediction is corrected manually.

Блок распознавания структур (102) преобразует изображения химических структур в химических документах в структуры в виде текстовой последовательности с помощью нейронной сети. Изображения химических структур, которые подают в блок распознавания структур (102), описывают, например, пространственные структуры молекул, исходные вещества, участвующие в химических реакциях, продукты химических реакций и т.д. Кроме того, блок распознавания структур (102) распознает химические структуры, которые изображаются как в стандартизированном, так и нестандартизированном или сокращенном формате. Нейронная сеть реализована на базе архитектуры Transformer. Обычный трансформер решает задачу sequence2sequence, т. е. трансляцию из одной последовательности в другую, например, машинный перевод. В настоящем изобретении на вход подается не 1D-последовательность, а изображение (2D-последовательность), поэтому используется модифицированный вариант трансформера (Фиг. 2). Модифицированный трансформер (200) содержит сверточный блок (201) и декодер трансформера (202). Блок энкодера, который используется в обычном трансформере, полностью заменен на сверточный блок (201). В качестве сверточного блока (201) используется ResNet-50 без последних двух слоев. Таким образом, при подаче изображения размером 384x384 на выходе из сверточного блока (201) получается матрица размерности 512x48x48, что эквивалентно энкодеру трансформера с глубиной 512 и длиной входной последовательности 48. В то же время, сверточный блок (201) может быть не только ResNet, но любой другой сверточной сетью, работающей с изображением, из множества вариантов, например, EfficientNet, DenseNet и т.д.The structure recognition block (102) converts images of chemical structures in chemical documents into structures in the form of a text sequence using a neural network. The images of chemical structures that are fed to the structure recognition unit (102) describe, for example, the spatial structures of molecules, the starting materials involved in chemical reactions, the products of chemical reactions, and so on. In addition, the structure recognition unit (102) recognizes chemical structures that are displayed in both standardized and non-standardized or abbreviated format. The neural network is implemented on the basis of the Transformer architecture. An ordinary transformer solves the sequence2sequence problem, i.e. translation from one sequence to another, for example, machine translation. In the present invention, the input is not a 1D sequence, but an image (2D sequence), so a modified version of the transformer is used (Fig. 2). The modified transformer (200) contains a convolutional block (201) and a transformer decoder (202). The encoder block, which is used in a conventional transformer, has been completely replaced by a convolutional block (201). ResNet-50 is used as the convolution block (201) without the last two layers. Thus, when a 384x384 image is supplied, the output from the convolution block (201) is a 512x48x48 matrix, which is equivalent to a transformer encoder with a depth of 512 and an input sequence length of 48. At the same time, the convolution block (201) can be not only ResNet, but any other convolutional network that works with an image, from a variety of options, for example, EfficientNet, DenseNet, etc.

Трансформер (200) преобразует изображение в текстовую последовательность, однозначно описывающую пространственную структуру молекулы. Языком описания молекулы может быть любое представление: SMILES и его вариации (DeepSMILES, SELFIES), а также InChI или IUPAC имя. Варианты на основе SMILES являются предпочтительными, т. к. являются наиболее краткими и отражают непосредственно структуру.The transformer (200) converts the image into a text sequence that uniquely describes the spatial structure of the molecule. The description language of a molecule can be any representation: SMILES and its variations (DeepSMILES, SELFIES), as well as InChI or IUPAC name. SMILES-based options are preferred because they are the most concise and reflect the structure directly.

Для текстового представления структур Маркуша, а также структур с заместителями, разработан язык FG-SMILES (Functional Group SMILES). FG-SMILES является расширением обычного языка текстового описания химических структур SMILES. FG-SMILES позволяет записывать как структуры с функциональными группами в сокращенном виде, так и структуры Маркуша. Язык CXSMILES - известный аналог для записи групп-заместителей и структур Маркуша, в сравнении с FG-SMILES, является слишком многословным, и также не позволяет записывать R-группы в неопределенной позиции. Кроме этого, для FG-SMILES реализован механизм конвертации в SMILES и обратно.For textual representation of Markush structures, as well as structures with substituents, the FG-SMILES (Functional Group SMILES) language has been developed. FG-SMILES is an extension of the conventional SMILES chemical text description language. FG-SMILES allows you to write both structures with functional groups in abbreviated form, and Markush structures. The CXSMILES language, a well-known analogue for writing substituent groups and Markush structures, is too verbose in comparison with FG-SMILES, and also does not allow writing R-groups in an indefinite position. In addition, for FG-SMILES a mechanism for converting to SMILES and vice versa is implemented.

Данная нотация позволяет записывать функциональные группы как заместители атомов, например:This notation allows you to write functional groups as substituents of atoms, for example:

[Et]N([Et])CCCNc1nc([X])nc([R3])c1[R2][Et]N([Et])CCCNc1nc([X])nc([R3])c1[R2]

В классическом SMILES в квадратных скобках записываются неорганические атомы, ионы, изотопы, а также стерео-атомы. В данной модификации аналогичным образом записываются сокращенные имена функциональных групп, а также R-группы. Представлен также способ привязки R-группы к циклу, а не к конкретной позиции в цикле (если требуется показать, что R-группа находится в неопределенной позиции в цикле).In classic SMILES, inorganic atoms, ions, isotopes, and also stereo atoms are written in square brackets. In this modification, the abbreviated names of functional groups, as well as R-groups, are written in a similar way. A way is also presented of linking an R-group to a cycle, rather than to a specific position in the cycle (if you want to show that the R-group is in an indefinite position in the cycle).

Существует также расширение CXSMILES, которое решает аналогичную задачу (за исключением неопределенной позиции), но соответствующее представление не интуитивно и многократно длиннее, что негативно сказывается на возможности использовать CXSMILES в машинном обучении. CXSMILES строка, соответствующая приведенному выше примеру:There is also a CXSMILES extension that solves a similar problem (except for the indeterminate position), but the corresponding representation is unintuitive and many times longer, which negatively affects the ability to use CXSMILES in machine learning. CXSMILES string corresponding to the above example:

*c1nc(*)c(*)c(NCCCN(*)*)n1 |atomProp:0.dummyLabel.X:4.dummyLabel.R3:6.dummyLabel.R2:13.dummyLabel.Et:14.dummyLabel.Et|*c1nc(*)c(*)c(NCCCN(*)*)n1 |atomProp:0.dummyLabel.X:4.dummyLabel.R3:6.dummyLabel.R2:13.dummyLabel.Et:14.dummyLabel.Et |

Реализованный механизм конвертации SMILES ↔ FG-SMILES позволяет находить в SMILES известные функциональные группы и заменять их. В список функциональных групп вошли более 100 групп. Это не все возможные группы, однако этот список покрывает подавляющее большинство реальных примеров из статей, а также может быть дополнен.The implemented SMILES ↔ FG-SMILES conversion mechanism makes it possible to find known functional groups in SMILES and replace them. The list of functional groups includes more than 100 groups. These are not all possible groups, but this list covers the vast majority of real examples from articles, and can also be expanded.

Данные для обучения модели распознавания структур генерируются искусственно с помощью генератора данных на основе метода создания искусственного датасета, имитирующего данные из реальных научных статей. Это обусловлено тем, что авторы реальных химических статей допускают значительные вольности при изображении структур. Помимо отличий в шрифтах, толщинах линий и отступах, часто встречаются элементы художественного оформления. Чтобы модель была устойчива к таким особенностям реальных данных, генератор применяет случайные нелинейные геометрические искажения к изображениям, а также добавляет случайный химически-осмысленный мусор - фрагменты других молекул, стрелки и надписи в свободное пространство изображения.The data for training the structure recognition model is artificially generated using a data generator based on the method of creating an artificial dataset that simulates data from real scientific articles. This is due to the fact that the authors of real chemical articles take considerable liberties when depicting structures. In addition to differences in fonts, line weights, and padding, there are often elements of artistic design. In order for the model to be resistant to such features of real data, the generator applies random non-linear geometric distortions to images, and also adds random chemically meaningful garbage - fragments of other molecules, arrows and inscriptions to the free space of the image.

Генератор данных производит случайную модификацию базовой молекулы, производит изображение модифицированной молекулы, а также соответствующий FG-SMILES.The data generator generates a random modification of the base molecule, produces an image of the modified molecule, and the corresponding FG-SMILES.

Генератор принимает на вход SMILES-строку. Затем он ищет в соответствующей молекуле функциональные группы, и случайно выбранную их часть заменяет на короткое представление, формируя таким образом FG-SMILES. Часть метильных заместителей меняются на случайную R-группу. Затем молекула отрисовывается средствами библиотеки RDKit в соответствии с тем, какие замены функциональных групп были произведены. Полученные пары «изображение-FG-SMILES» используются для обучения модели.The generator takes a SMILES string as input. It then looks for functional groups in the corresponding molecule, and replaces a randomly selected part of them with a short representation, thus forming FG-SMILES. Part of the methyl substituents are changed to a random R-group. Then the molecule is drawn using the RDKit library in accordance with what substitutions of functional groups were made. The resulting image-FG-SMILES pairs are used to train the model.

Обученная модель возвращает прогноз в виде строки FG-SMILES, а также уверенность в прогнозе - число от 0 до 1. Выявлена четкая закономерность между возвращаемым значением уверенности и корректностью ответа. Без учета значений уверенности базовая модель имеет на тестовых данных точность около 90%. Под точностью понимается доля полных соответствий между реальным значением и прогнозом, вплоть до различения индексов и количества штрихов около R-групп. Если отбрасывать примеры со значением уверенности меньше 0.98, то отбрасывается 10%, но на оставшихся примерах точность становится 97%. По порогу 0.99 отрезается 15%, точности на оставшихся — 98.6%, по порогу 0.995 отрезается 22%, точность на оставшихся 99.8%.The trained model returns the forecast as a string FG-SMILES, as well as the confidence in the forecast - a number from 0 to 1. A clear pattern was found between the returned confidence value and the correctness of the answer. Without taking into account the confidence values, the base model has an accuracy of about 90% on the test data. Accuracy is understood as the proportion of complete matches between the real value and the forecast, up to the difference between indices and the number of strokes near R-groups. If we discard examples with a confidence value less than 0.98, then 10% is discarded, but on the remaining examples, the accuracy becomes 97%. At the threshold of 0.99, 15% is cut off, the accuracy on the remaining ones is 98.6%, at the threshold of 0.995, 22% is cut off, the accuracy on the remaining 99.8%.

Фактически это позволяет говорить о достижении абсолютной точности, если не ставится задача распознать все. В задаче массового распознавания структур и реакций для автоматического наполнения баз данных не имеет принципиального значения, если часть структур будет отброшена, однако имеет принципиальное значение не допустить попадания ложных данных в базы данных. Таким образом, отрезание по порогу позволяет добиться практически абсолютной точности.In fact, this allows us to talk about the achievement of absolute accuracy, if the task is not to recognize everything. In the problem of mass recognition of structures and reactions for automatic filling of databases, it is not of fundamental importance if some of the structures are discarded, but it is of fundamental importance to prevent false data from entering the database. Threshold cutting thus achieves almost absolute precision.

Фрагменты исходной страницы, распознанные детектором (101) как «стрелки реакций», передаются в блок распознавания стрелок (103). Первая сеть в блоке распознавания стрелок определяет, является ли фрагмент прямой стрелкой, означающей протекание реакции. По архитектуре сеть является простейшей сверточной сетью на базе ResNet. Сеть училась на 10 000 фрагментах, полученных из детектора (101), и размеченных вручную. Сеть возвращает «Да», если фрагмент — одна прямая стрелка, означающая необратимую реакцию, и «Нет» в остальных случаях. Таким образом, исключаются варианты, когда стрелка представляет обратимую реакцию, равновесное состояние, механизм реакции, либо фрагмент ошибочно возвращен детектором (101).Fragments of the original page, recognized by the detector (101) as "reaction arrows", are transferred to the arrow recognition unit (103). The first network in the arrow recognition block determines whether the fragment is a straight arrow, indicating a reaction. By architecture, the network is the simplest convolutional network based on ResNet. The network was trained on 10,000 fragments obtained from the detector (101) and labeled manually. The network returns "Yes" if the fragment is a single straight arrow, indicating an irreversible reaction, and "No" otherwise. Thus, options are excluded when the arrow represents a reversible reaction, an equilibrium state, a reaction mechanism, or a fragment was erroneously returned by the detector (101).

Координаты начала и конца стрелки распознаются другой сверточной сетью на базе ResNet с четырьмя выходами, означающими положение X и Y координат начала и конца стрелки соответственно, в долях длины/ширины фрагмента. Для обучения сети были размечены вручную 7000 реальных фрагментов, полученных с помощью детектора (101), для которых первая сеть вернула «Да».The arrow start and end coordinates are recognized by another ResNet-based convolutional network with four outputs representing the X and Y position of the arrow start and end coordinates, respectively, in fractions of the length/width of the fragment. To train the network, 7000 real fragments obtained using the detector (101) were manually labeled, for which the first network returned "Yes".

Задачи, которые стоят перед обеими сетями, не являются сложными по меркам современных технологий в отличие от детектора (101) или блока распознавания структур (102), обе сети обучились с точностью, близкой к 100%.The tasks facing both networks are not difficult by the standards of modern technologies, in contrast to the detector (101) or the pattern recognition unit (102), both networks were trained with an accuracy close to 100%.

Блок распознавания стрелок реакций (103) определяет координаты начала и конца стрелок на исходной странице. Вместе с координатами прямоугольников распознанных структур, эта информация передается в блок распознавания реакций (104), который представляет собой логический алгоритм, который определяет для каждой стрелки, есть ли для нее распознанная структура рядом с началом и концом стрелки. Если найден правдоподобный вариант, то структура у начала стрелки считается реагентом, а структура за концом стрелки — продуктом реакции. Блок распознавания реакций (104) формирует результат в виде готовых реакций. На выходе блока (104) формируется список распознанных структур с координатами и значениями уверенности, а также список реакций.The reaction arrow recognition block (103) determines the coordinates of the beginning and end of the arrows on the initial page. Together with the coordinates of the rectangles of the recognized structures, this information is passed to the reaction recognition block (104), which is a logical algorithm that determines for each arrow whether there is a recognized structure for it near the beginning and end of the arrow. If a plausible option is found, then the structure at the beginning of the arrow is considered a reactant, and the structure behind the end of the arrow is considered a reaction product. The reaction recognition block (104) generates the result in the form of ready-made reactions. At the output of block (104), a list of recognized structures with coordinates and confidence values is formed, as well as a list of reactions.

Таким образом, после обработки скана страницы на выходе системы (100) получают распознанные химические структуры, координаты на странице для каждой распознанной химической структуры, распознанные отношения между реактантами, агентами и продуктами химической реакции, представленными в виде химических структур, координаты на странице для каждого распознанного отношения.Thus, after processing the page scan, the output of the system (100) is the recognized chemical structures, the coordinates on the page for each recognized chemical structure, the recognized relationships between reactants, agents and chemical reaction products presented as chemical structures, the coordinates on the page for each recognized relations.

Пример распознавания химической информации из изображений документов, который представлен для пояснения сути изобретения и никоим образом не ограничивает область изобретения.An example of recognizing chemical information from document images, which is presented to explain the essence of the invention and in no way limits the scope of the invention.

На вход детектора (101) подают изображение страницы документа (Фиг. 3а), содержащей химическую информацию. Детектор (101) с помощью первой нейронной сети идентифицирует на странице фрагменты, содержащие химическую информацию. На Фиг. 3б идентифицированные детектором (101) фрагменты выделены прямоугольниками. Для каждого идентифицированного фрагмента получают координаты фрагмента на странице; и классифицируют фрагменты по следующим категориям: химическая структура – прямоугольники со структурой молекул, стрелка реакции - прямоугольник со стрелкой, дополнительная информация – под прямоугольниками молекул два маленьких прямоугольника «AZD9496», «A1», и один длинный прямоугольник, содержащий дополнительную информацию о химической реакции, а также прямоугольник заголовка «Scheme 1» (Фиг. 3б). Прямоугольники молекул имеют класс image, прямоугольник со стрелкой – класс condition, два маленьких прямоугольника и один длинный – класс description, прямоугольник заголовка – класс legend.The input of the detector (101) is fed with an image of a document page (Fig. 3a) containing chemical information. The detector (101) using the first neural network identifies fragments on the page containing chemical information. On FIG. 3b, the fragments identified by the detector (101) are marked with rectangles. For each identified fragment, the coordinates of the fragment on the page are obtained; and classify the fragments into the following categories: chemical structure - rectangles with the structure of molecules, reaction arrow - rectangle with an arrow, additional information - under the rectangles of molecules, two small rectangles "AZD9496", "A1", and one long rectangle containing additional information about the chemical reaction , as well as the title rectangle "Scheme 1" (Fig. 3b). Molecule rectangles have the image class, the arrow rectangle has the condition class, two small rectangles and one long rectangle has the description class, and the title rectangle has the legend class.

На вход блока распознавания структур (102) подают один или более идентифицированных фрагментов химических структур, причем каждый фрагмент представляет собой изображение (Фиг. 3в, 301, 302); блок распознавания структур (102) для каждого фрагмента распознает химическую структуру с помощью второй нейронной сети.One or more identified fragments of chemical structures are fed to the input of the structure recognition block (102), each fragment being an image (Fig. 3c, 301, 302); the structure recognition block (102) for each fragment recognizes the chemical structure using the second neural network.

Для фрагмента (301) блок распознает FG-SMILES:For fragment (301), the block recognizes FG-SMILES:

FC=1C=C(C=C(C1[C@H]1N([C@@H](CC2C1NC1=CC=CC=C21)C)CC(C)(C)F)F)/C=C/C(=O)OFC=1C=C(C=C(C1[C@H]1N([C@@H](CC2C1NC1=CC=CC=C21)C)CC(C)(C)F)F)/C=C /C(=O)O

Для фрагмента (302) блок распознает FG-SMILES:For fragment (302), the block recognizes FG-SMILES:

C[C@@H]1CC2c3ccccc3N(C)C2[C@@H](c2c(F)cc(/C=C/C(=O)O)cc2F)N1CC(C)(C)FC[C@@H]1CC2c3ccccc3N(C)C2[C@@H](c2c(F)cc(/C=C/C(=O)O)cc2F)N1CC(C)(C)F

На вход блока распознавания стрелок (103) подают идентифицированный фрагмент стрелки реакций (Фиг. 3г). Блок распознавания стрелок (103) с помощью третьей нейронной сети определяет тип стрелки – прямая стрелка, и с помощью четвертой нейронной сети получает координаты начала и конца стрелки на странице, и атрибуты реакции.The identified fragment of the reaction arrow is fed to the input of the arrow recognition block (103) (Fig. 3d). The arrow recognition block (103) using the third neural network determines the type of arrow - a straight arrow, and using the fourth neural network receives the coordinates of the beginning and end of the arrow on the page, and the response attributes.

На вход блока распознавания реакций (104) передают координаты на странице каждого фрагмента распознанных химических структур, соответствующие распознанные химические структуры, координаты на странице каждой стрелки реакции, тип стрелки, атрибуты реакции; и на основании полученных данных блок распознавания реакций (104) определяет, как стрелки связывают распознанные химические структуры.At the input of the reaction recognition block (104), the coordinates on the page of each fragment of the recognized chemical structures, the corresponding recognized chemical structures, the coordinates on the page of each reaction arrow, the arrow type, the reaction attributes are transmitted; and based on the received data, the reaction recognition block (104) determines how the arrows connect the recognized chemical structures.

В результате на основании распознанных данных для изображения страницы документа получают одну или более распознанных химических структур, координаты на странице для каждой распознанной химической структуры, распознанные отношения между веществами, участвующими в химической реакции, представленными в виде химических структур, координаты на странице для каждого распознанного отношения.As a result, based on the recognized data for the document page image, one or more recognized chemical structures are obtained, coordinates on the page for each recognized chemical structure, recognized relationships between substances participating in a chemical reaction, represented as chemical structures, coordinates on the page for each recognized relationship. .

На Фиг. 4 представлена общая схема вычислительного устройства (400), обеспечивающего обработку данных, необходимую для реализации заявленного решения.On FIG. 4 shows a general diagram of a computing device (400) that provides the data processing necessary to implement the claimed solution.

В общем случае устройство (400) содержит такие компоненты, как: один или более процессоров (401), по меньшей мере одну память (402), средство хранения данных (403), интерфейсы ввода/вывода (404), средство В/В (405), средства сетевого взаимодействия (406).In general, the device (400) contains such components as: one or more processors (401), at least one memory (402), data storage medium (403), input/output interfaces (404), I/O means ( 405), networking tools (406).

Процессор (401) устройства выполняет основные вычислительные операции, необходимые для функционирования устройства (400) или функциональности одного или более его компонентов. Процессор (401) исполняет необходимые машиночитаемые команды, содержащиеся в оперативной памяти (402).The processor (401) of the device performs the basic computing operations necessary for the operation of the device (400) or the functionality of one or more of its components. The processor (401) executes the necessary machine-readable instructions contained in the main memory (402).

Память (402), как правило, выполнена в виде ОЗУ и содержит необходимую программную логику, обеспечивающую требуемый функционал.The memory (402) is typically in the form of RAM and contains the necessary software logic to provide the required functionality.

Средство хранения данных (403) может выполняться в виде HDD, SSD дисков, рейд массива, сетевого хранилища, флэш-памяти, оптических накопителей информации (CD, DVD, MD, Blue-Ray дисков) и т.п. Средство (403) позволяет выполнять долгосрочное хранение различного вида информации.The data storage means (403) can be in the form of HDD, SSD disks, raid array, network storage, flash memory, optical information storage devices (CD, DVD, MD, Blue-Ray disks), etc. Means (403) allows you to perform long-term storage of various types of information.

Интерфейсы (404) представляют собой стандартные средства для подключения и работы с серверной частью, например, USB, RS232, RJ45, LPT, COM, HDMI, PS/2, Lightning, FireWire и т.п.Interfaces (404) are standard means for connecting and working with the server part, for example, USB, RS232, RJ45, LPT, COM, HDMI, PS/2, Lightning, FireWire, etc.

Выбор интерфейсов (404) зависит от конкретного исполнения устройства (400), которое может представлять собой персональный компьютер, мейнфрейм, серверный кластер, тонкий клиент, смартфон, ноутбук и т.п.The choice of interfaces (404) depends on the specific implementation of the device (400), which can be a personal computer, mainframe, server cluster, thin client, smartphone, laptop, and the like.

В качестве средств В/В данных (405) в любом воплощении системы должна использоваться клавиатура. Аппаратное исполнение клавиатуры может быть любым известным: это может быть, как встроенная клавиатура, используемая на ноутбуке или нетбуке, так и обособленное устройство, подключенное к настольному компьютеру, серверу или иному компьютерному устройству. Подключение при этом может быть, как проводным, при котором соединительный кабель клавиатуры подключен к порту PS/2 или USB, расположенному на системном блоке настольного компьютера, так и беспроводным, при котором клавиатура осуществляет обмен данными по каналу беспроводной связи, например, радиоканалу, с базовой станцией, которая, в свою очередь, непосредственно подключена к системному блоку, например, к одному из USB-портов. Помимо клавиатуры, в составе средств В/В данных также может использоваться: джойстик, дисплей (сенсорный дисплей), проектор, тачпад, манипулятор мышь, трекбол, световое перо, динамики, микрофон и т.п.The keyboard should be used as the data I/O (405) in any embodiment of the system. The keyboard hardware can be any known: it can be either a built-in keyboard used on a laptop or netbook, or a separate device connected to a desktop computer, server, or other computer device. In this case, the connection can be either wired, in which the keyboard connection cable is connected to the PS / 2 or USB port located on the system unit of the desktop computer, or wireless, in which the keyboard exchanges data via a wireless communication channel, for example, a radio channel, with base station, which, in turn, is directly connected to the system unit, for example, to one of the USB ports. In addition to the keyboard, the following I/O devices can also be used: joystick, display (touchscreen), projector, touchpad, mouse, trackball, light pen, speakers, microphone, etc.

Средства сетевого взаимодействия (406) выбираются из устройств, обеспечивающих сетевой прием и передачу данных, например, Ethernet карту, WLAN/Wi-Fi модуль, Bluetooth модуль, BLE модуль, NFC модуль, IrDa, RFID модуль, GSM модем и т.п. С помощью средств (405) обеспечивается организация обмена данными по проводному или беспроводному каналу передачи данных, например, WAN, PAN, ЛВС (LAN), Интранет, Интернет, WLAN, WMAN или GSM, 3G, 4G, 5G.Means of networking (406) are selected from devices that provide network reception and transmission of data, for example, an Ethernet card, WLAN/Wi-Fi module, Bluetooth module, BLE module, NFC module, IrDa, RFID module, GSM modem, etc. With the help of tools (405) the organization of data exchange over a wired or wireless data transmission channel is provided, for example, WAN, PAN, LAN (LAN), Intranet, Internet, WLAN, WMAN or GSM, 3G, 4G, 5G.

Компоненты устройства (400) сопряжены посредством общей шины передачи данных (407).The components of the device (400) are coupled via a common data bus (407).

В настоящих материалах заявки представлено предпочтительное раскрытие осуществления заявленного технического решения, которое не должно использоваться как ограничивающее иные, частные воплощения его реализации, которые не выходят за рамки испрашиваемого объема правовой охраны и являются очевидными для специалистов в соответствующей области техники.The present application materials provide a preferred disclosure of the implementation of the claimed technical solution, which should not be used as limiting other, private embodiments of its implementation, which do not go beyond the scope of the requested legal protection and are obvious to specialists in the relevant field of technology.

Специалисту в данной области техники должно быть понятно, что различные вариации заявляемого способа и системы не изменяют сущность изобретения, а лишь определяют его конкретные воплощения и применения.It should be clear to a person skilled in the art that various variations of the proposed method and system do not change the essence of the invention, but only determine its specific embodiments and applications.

ИсточникиSources

[1] Rajan et al., DECIMER 1.0: Deep Learning for Chemical Image Recognition using Transformers, 2021 https://chemrxiv.org/ndownloader/files/27775521[1] Rajan et al., DECIMER 1.0: Deep Learning for Chemical Image Recognition using Transformers, 2021 https://chemrxiv.org/ndownloader/files/27775521

[2] Sundaramoorthy et al., End-to-End Attention-based Image Captioning», 30.04.2021 https://arxiv.org/pdf/2104.14721.pdf[2] Sundaramoorthy et al., End-to-End Attention-based Image Captioning, 04/30/2021 https://arxiv.org/pdf/2104.14721.pdf

[3] Clevert et al., Img2Mol-Accurate SMILES Recognition from Molecular Graphical Depictions, 2021 https://chemrxiv.org/ndownloader/files/27273986.[3] Clevert et al., Img2Mol-Accurate SMILES Recognition from Molecular Graphical Depictions, 2021 https://chemrxiv.org/ndownloader/files/27273986.

Claims (27)

1. Компьютерно-реализуемый способ распознавания химической информации из изображений документов, в котором вычислительное устройство, содержащее процессор и память, хранит в памяти инструкции, исполняемые процессором, и исполняет инструкции, включающие этапы, на которых:1. A computer-implemented method for recognizing chemical information from document images, in which a computing device containing a processor and memory stores in memory instructions executed by the processor and executes instructions, including the steps of: - на вход детектора подают изображение страницы документа; детектор с помощью первой нейронной сети идентифицирует на странице один или более фрагментов, содержащих химическую информацию; для каждого идентифицированного фрагмента получают координаты фрагмента на странице; и классифицируют фрагменты по меньшей мере по следующим категориям: химическая структура, стрелка реакции;- the image of the document page is fed to the input of the detector; the detector using the first neural network identifies on the page one or more fragments containing chemical information; for each identified fragment get the coordinates of the fragment on the page; and classify the fragments into at least the following categories: chemical structure, reaction arrow; - на вход блока распознавания структур подают один или более идентифицированных фрагментов химических структур, причем каждый фрагмент представляет собой изображение; блок распознавания структур для каждого фрагмента распознает химическую структуру с помощью второй нейронной сети;- one or more identified fragments of chemical structures are fed to the input of the structure recognition block, each fragment being an image; the structure recognition unit for each fragment recognizes the chemical structure using the second neural network; - на вход блока распознавания стрелок подают один или более идентифицированных фрагментов стрелок реакций; блок распознавания стрелок с помощью третьей нейронной сети определяет тип стрелки, и с помощью четвертой нейронной сети получают координаты на странице для каждой стрелки, и атрибуты реакции;- one or more identified fragments of reaction arrows are fed to the input of the arrow recognition block; the arrow recognition unit, using the third neural network, determines the type of the arrow, and using the fourth neural network, the coordinates on the page for each arrow, and the response attributes are obtained; - на вход блока распознавания реакций передают координаты на странице каждого фрагмента распознанных химических структур, соответствующие распознанные химические структуры, координаты на странице каждой стрелки реакции, тип стрелки, атрибуты реакции; и на основании полученных данных блок распознавания реакций определяет, как стрелки связывают распознанные химические структуры;- the coordinates on the page of each fragment of the recognized chemical structures, the corresponding recognized chemical structures, the coordinates on the page of each reaction arrow, the arrow type, the reaction attributes are transmitted to the input of the reaction recognition block; and based on the received data, the reaction recognition block determines how the arrows connect the recognized chemical structures; - в результате на основании распознанных данных для изображения страницы документа получают одну или более распознанных химических структур, координаты на странице для каждой распознанной химической структуры, распознанные отношения между веществами, участвующими в химической реакции, представленными в виде химических структур, координаты на странице для каждого распознанного отношения.- as a result, based on the recognized data for the document page image, one or more recognized chemical structures are obtained, coordinates on the page for each recognized chemical structure, recognized relationships between substances participating in a chemical reaction, represented as chemical structures, coordinates on the page for each recognized relations. 2. Способ по п. 1, характеризующийся тем, что химическая структура является, по меньшей мере, химическим соединением, структурой Маркуша, химической структурой с заместителями.2. The method according to claim 1, characterized in that the chemical structure is at least a chemical compound, a Markush structure, a chemical structure with substituents. 3. Способ по п. 1, характеризующийся тем, что дополнительно идентифицируют фрагменты, содержащие дополнительную информацию, способствующую распознаванию реакций.3. The method according to p. 1, characterized in that additionally identify fragments containing additional information that contributes to the recognition of reactions. 4. Способ по п. 3, характеризующийся тем, что дополнительная информация включает, по меньшей мере, следующее: заголовок, легенда.4. The method according to p. 3, characterized in that additional information includes at least the following: title, legend. 5. Способ по п. 1, характеризующийся тем, что детектор дополнительно для каждого идентифицированного фрагмента определяет уверенность – число от 0 до 1, которое оценивает достоверность идентифицированного фрагмента, где 0 – абсолютно не уверен, 1 – полностью уверен.5. The method according to p. 1, characterized in that the detector additionally determines confidence for each identified fragment - a number from 0 to 1, which evaluates the reliability of the identified fragment, where 0 is absolutely not sure, 1 is completely sure. 6. Способ по п. 5, характеризующийся тем, что идентифицированные фрагменты фильтруют по предустановленному порогу уверенности.6. The method according to claim 5, characterized in that the identified fragments are filtered by a predetermined confidence threshold. 7. Способ по п. 6, характеризующийся тем, что устанавливают порог уверенности для каждой категории фрагментов.7. The method according to p. 6, characterized in that which set a confidence threshold for each category of fragments. 8. Способ по п. 1, характеризующийся тем, что первая нейронная сеть является нейронной сетью Faster R-CNN или другой сверточной сетью равной или большей мощности.8. The method according to p. 1, characterized in that the first neural network is a Faster R-CNN neural network or other convolutional network of equal or greater power. 9. Способ по п. 1, характеризующийся тем, что вторая нейронная сеть является нейронной сетью на базе архитектуры трансформера, и блок распознавания структур содержит сверточный блок и декодер трансформера.9. The method according to p. 1, characterized in that the second neural network is a neural network based on the transformer architecture, and the structure recognition block contains a convolutional block and a transformer decoder. 10. Способ по п. 9, характеризующийся тем, что в качестве сверточного блока используется ResNet-50 без последних двух слоев или другая сверточная сеть, работающая с изображениями.10. The method according to claim 9, characterized in that ResNet-50 without the last two layers or another convolutional network that works with images is used as a convolutional block. 11. Способ по п. 1, характеризующийся тем, что распознанная химическая структура представляет собой текстовую последовательность, однозначно описывающую химическую структуру.11. The method according to claim 1, characterized in that the recognized chemical structure is a text sequence that uniquely describes the chemical structure. 12. Способ по п. 11, характеризующийся тем, что описывают химическую структуру в виде текстовой последовательности с помощью модификации SMILES, способной описать структуры Маркуша и химические структуры с заместителями.12. The method according to p. 11, characterized in that describe the chemical structure as a text sequence using the SMILES modification capable of describing Markush structures and chemical structures with substituents. 13. Способ по п. 12, характеризующийся тем, что реализован механизм конвертации модификации SMILES, способной описать структуры Маркуша и химические структуры с заместителями, в SMILES и обратно.13. The method according to p. 12, characterized in that implemented a mechanism for converting the SMILES modification, which is capable of describing Markush structures and chemical structures with substituents, to SMILES and vice versa. 14. Способ по п. 1, характеризующийся тем, что третья и четвертая нейронные сети являются сверточными нейронными сетями на базе ResNet.14. The method according to p. 1, characterized in that the third and fourth neural networks are ResNet-based convolutional neural networks. 15. Способ по п. 1, характеризующийся тем, что стрелки классифицируют по следующим типам: прямая стрелка, стрелка, которая не является прямой стрелкой.15. The method according to p. 1, characterized in that arrows are classified into the following types: straight arrow, arrow that is not a straight arrow. 16. Способ по п. 1, характеризующийся тем, что веществами, участвующими в химической реакции, являются исходные вещества химической реакции, продукты химической реакции.16. The method according to p. 1, characterized in that the substances involved in a chemical reaction are the initial substances of a chemical reaction, the products of a chemical reaction. 17. Система распознавания химической информации из изображений документов, содержащая:17. System for recognition of chemical information from images of documents, containing: - детектор;- detector; - блок распознавания структур;- structure recognition block; - блок распознавания стрелок;- arrow recognition unit; - блок распознавания реакций;- reaction recognition block; и в которой вычислительное устройство, содержащее процессор и память, хранящую инструкции, исполняемые процессором, осуществляет способ по пп. 1-16.and in which the computing device, containing the processor and memory storing instructions executable by the processor, implements the method according to paragraphs. 1-16.
RU2021118778A 2021-06-28 2021-06-28 Method for recognising chemical information from images of document and system for implementation thereof RU2774665C1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP21948594.3A EP4364110A4 (en) 2021-06-28 2021-07-08 METHOD AND SYSTEM FOR RECOGNIZING CHEMICAL INFORMATION FROM DOCUMENT IMAGES
PCT/RU2021/000294 WO2023277725A1 (en) 2021-06-28 2021-07-08 Method and system for recognizing chemical information from document images
US18/574,499 US20240242788A1 (en) 2021-06-28 2021-07-08 Method and System for Recognizing Chemical Information from Document Images

Publications (1)

Publication Number Publication Date
RU2774665C1 true RU2774665C1 (en) 2022-06-21

Family

ID=

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115909328A (en) * 2022-11-29 2023-04-04 西华大学 An Image Recognition Method of Small Molecule Chemical Structure Based on Transform Neural Network
CN116453112A (en) * 2022-09-09 2023-07-18 深圳晶泰科技有限公司 Molecular structure extraction method, device and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130218878A1 (en) * 2010-05-03 2013-08-22 Cambridgesoft Corporation Systems, methods, and apparatus for processing documents to identify structures
RU2650029C2 (en) * 2012-07-13 2018-04-06 Самсунг Электроникс Ко., Лтд. Method and apparatus for controlling application by handwriting image recognition
WO2019148852A1 (en) * 2018-01-31 2019-08-08 青岛清原精准农业科技有限公司 Chemical information identification method based on deep learning image identification technology
CN111860507A (en) * 2020-07-20 2020-10-30 中国科学院重庆绿色智能技术研究院 A method for extracting molecular structural formula from compound images based on adversarial learning
CN112818645A (en) * 2021-02-02 2021-05-18 广州楹鼎生物科技有限公司 Chemical information extraction method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130218878A1 (en) * 2010-05-03 2013-08-22 Cambridgesoft Corporation Systems, methods, and apparatus for processing documents to identify structures
RU2650029C2 (en) * 2012-07-13 2018-04-06 Самсунг Электроникс Ко., Лтд. Method and apparatus for controlling application by handwriting image recognition
WO2019148852A1 (en) * 2018-01-31 2019-08-08 青岛清原精准农业科技有限公司 Chemical information identification method based on deep learning image identification technology
CN111860507A (en) * 2020-07-20 2020-10-30 中国科学院重庆绿色智能技术研究院 A method for extracting molecular structural formula from compound images based on adversarial learning
CN112818645A (en) * 2021-02-02 2021-05-18 广州楹鼎生物科技有限公司 Chemical information extraction method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116453112A (en) * 2022-09-09 2023-07-18 深圳晶泰科技有限公司 Molecular structure extraction method, device and equipment
CN115909328A (en) * 2022-11-29 2023-04-04 西华大学 An Image Recognition Method of Small Molecule Chemical Structure Based on Transform Neural Network

Similar Documents

Publication Publication Date Title
CN113807098B (en) Model training method and device, electronic device and storage medium
AU2016203856B2 (en) System and method for automating information abstraction process for documents
JP7289047B2 (en) Method, computer program and system for block-based document metadata extraction
US20210366055A1 (en) Systems and methods for generating accurate transaction data and manipulation
US11869263B2 (en) Automated classification and interpretation of life science documents
CN114942977B (en) Multi-task document-level relation extraction method and device based on support sentence prediction
CN112084448B (en) Similar information processing method and device
CN109446328A (en) A kind of text recognition method, device and its storage medium
US20240242788A1 (en) Method and System for Recognizing Chemical Information from Document Images
CN115130435B (en) Document processing method, device, electronic equipment and storage medium
US20230177267A1 (en) Automated classification and interpretation of life science documents
WO2012158572A2 (en) Exploiting query click logs for domain detection in spoken language understanding
US20230351791A1 (en) Method, device, and system for outputting description of patent reference sign
Khan et al. Performance Analysis of LSTM and Bi-LSTM Model with Different Optimizers in Bangla Sentiment Analysis
EP3104285A1 (en) System and method for automating information abstraction process for documents
Boillet et al. The Socface project: Large-scale collection, processing, and analysis of a century of French censuses
CA2932310A1 (en) System and method for automating information abstraction process for documents
Nguyen et al. Learning Reading Order via Document Layout with Layout2Pos
JP2022035594A (en) Table structure recognition device and table structure recognition method
RU2774665C1 (en) Method for recognising chemical information from images of document and system for implementation thereof
CN120449861A (en) Intelligent rule extraction and change comparison method for policy documents for electricity fee verification
US20240233223A1 (en) Image table generation
CN110378378A (en) Fact retrieval method, apparatus, computer equipment and storage medium
EP4009194A1 (en) Automated classification and interpretation of life science documents
Shaout et al. Exploring the Utility and Challenges of AI Interpretation of Construction Blueprints