<?xml version="1.0" encoding="UTF-8"?>
<article article-type="research-article" dtd-version="1.3" xml:lang="ru" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://metafora.rcsi.science/xsd_files/journal3.xsd">
  <front>
    <journal-meta>
      <journal-id journal-id-type="publisher-id">moitvivt</journal-id>
      <journal-title-group>
        <journal-title xml:lang="ru">Моделирование, оптимизация и информационные технологии</journal-title>
        <trans-title-group xml:lang="en">
          <trans-title>Modeling, Optimization and Information Technology</trans-title>
        </trans-title-group>
      </journal-title-group>
      <issn pub-type="epub">2310-6018</issn>
      <publisher>
        <publisher-name>Издательство</publisher-name>
      </publisher>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.26102/2310-6018/2025.49.2.041</article-id>
      <article-id pub-id-type="custom" custom-type="elpub">1928</article-id>
      <title-group>
        <article-title xml:lang="ru">Методика обучения классификаторов изображений с использованием дополнительных меток</article-title>
        <trans-title-group xml:lang="en">
          <trans-title>Method of training image classifiers using additional labels</trans-title>
        </trans-title-group>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <contrib-id contrib-id-type="orcid">0009-0005-4377-7981</contrib-id>
          <name-alternatives>
            <name name-style="eastern" xml:lang="ru">
              <surname>Петрова</surname>
              <given-names>Яна Сергеевна</given-names>
            </name>
            <name name-style="western" xml:lang="en">
              <surname>Petrova</surname>
              <given-names>Iana Sergeevna</given-names>
            </name>
          </name-alternatives>
          <email>ypetrova@bmstu.ru</email>
          <xref ref-type="aff">aff-1</xref>
        </contrib>
      </contrib-group>
      <aff-alternatives id="aff-1">
        <aff xml:lang="ru">Московский государственный технический университет им. Н.Э. Баумана</aff>
        <aff xml:lang="en">Bauman Moscow State Technical University</aff>
      </aff-alternatives>
      <pub-date pub-type="epub">
        <day>01</day>
        <month>01</month>
        <year>2026</year>
      </pub-date>
      <volume>1</volume>
      <issue>1</issue>
      <elocation-id>10.26102/2310-6018/2025.49.2.041</elocation-id>
      <permissions>
        <copyright-statement>Copyright © Авторы, 2026</copyright-statement>
        <copyright-year>2026</copyright-year>
        <license license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/">
          <license-p>This work is licensed under a Creative Commons Attribution 4.0 International License</license-p>
        </license>
      </permissions>
      <self-uri xlink:href="https://moitvivt.ru/ru/journal/article?id=1928"/>
      <abstract xml:lang="ru">
        <p>Статья посвящена разработке методики обучения классификаторов с учетом отношений между классами, представленных в виде дополнительных меток. Для этого проведен анализ функций потерь, используемых в классификации, и подходов к внедрению в них дополнительных меток. По результатам анализа в качестве основы методики предложена триплетная функция потерь с гибкой границей, спроектированная на базе оригинальной триплетной функции. Гибкая граница дает возможность корректировать расстояния между векторными представлениями изображений в зависимости от степени различия их классов. Это позволяет моделировать разные степени сходства между классами: на уровне категории, группы, подгруппы. Дополнительно разработана стратегия подбора обучающих триплетов, препятствующая обнулению весов модели и ее застреванию на тривиальном решении. Методика апробирована в задачах классификации продуктов и болезней желудочно-кишечного тракта. В результате применения методики точность классификации увеличилась на 9 % в задаче распознавания болезней и на 6 % при распознавании продуктов. Было снижено количество грубых ошибок классификации. Пространство векторных представлений изображений, сформированное триплетной функцией потерь, позволяет решать задачу кластеризации, распознавать новые классы без дообучения модели.</p>
      </abstract>
      <trans-abstract xml:lang="en">
        <p>This paper is devoted to the development of a method for training classifiers that takes into account relationships between classes, represented as additional labels. The loss functions used in classification and the approaches to incorporating additional labels into them were analyzed. Based on this analysis, we propose as the foundation of our method a triplet loss with a flexible margin, designed on the basis of the original triplet loss. The flexible margin allows adjusting the distances between the embeddings of images depending on the difference degree between their corresponding classes. This makes it possible to model different levels of similarity between classes: category, group, and subgroup levels. In addition, we develop a triplet mining strategy that prevents the model’s weights from collapsing to zero and getting stuck in a trivial solution. The method is validated on tasks of product classification and gastrointestinal disease classification. As a result of applying the method, classification accuracy increased by 9 % in the disease recognition task and by 6 % in the product recognition task. The number of severe classification errors was reduced. The image embedding space formed by the triplet loss allows clustering and recognition of new classes without additional model training.</p>
      </trans-abstract>
      <kwd-group xml:lang="ru">
        <kwd>функция потерь</kwd>
        <kwd>классификация</kwd>
        <kwd>компьютерное зрение</kwd>
        <kwd>триплеты</kwd>
        <kwd>метки</kwd>
        <kwd>векторное пространство</kwd>
      </kwd-group>
      <kwd-group xml:lang="en">
        <kwd>loss function</kwd>
        <kwd>classification</kwd>
        <kwd>computer vision</kwd>
        <kwd>triplets</kwd>
        <kwd>labels</kwd>
        <kwd>vector space</kwd>
      </kwd-group>
      <funding-group>
        <funding-statement xml:lang="ru">Исследование выполнено без спонсорской поддержки.</funding-statement>
        <funding-statement xml:lang="en">The study was performed without external funding.</funding-statement>
      </funding-group>
    </article-meta>
  </front>
  <back>
    <ref-list>
      <title>References</title>
      <ref id="cit1">
        <label>1</label>
        <mixed-citation xml:lang="ru">Евстраткин К.С., Султанова А.Р., Ерпелев А.В. OPENCV: варианты использования компьютерного зрения. В сборнике: Цифровые технологии: наука, образование, инновации: материалы III Международного научного Форума профессорско-преподавательского состава и молодых ученых, 09 ноября 2020 года, Москва, Россия. Москва: Московский государственный технологический университет «СТАНКИН»; 2021. C. 28–31.</mixed-citation>
      </ref>
      <ref id="cit2">
        <label>2</label>
        <mixed-citation xml:lang="ru">Лобзин И.А. Исследование возможностей системы ИИ ChatGPT по решению задачи классификации. В сборнике: Потенциал устойчивого инновационного развития: концепции, модели и практическое приложение: сборник статей по итогам Международной научно-практической конференции, 15 июня 2023 года, Пермь, Россия. Уфа: Агентство международных исследований; 2023. С. 157–162.</mixed-citation>
      </ref>
      <ref id="cit3">
        <label>3</label>
        <mixed-citation xml:lang="ru">Moayeri M., Pope Ph., Balaji Yo., Feizi S. A Comprehensive Study of Image Classification Model Sensitivity to Foregrounds, Backgrounds, and Visual Attributes. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 18–24 June 2022, New Orleans, LA, USA. IEEE; 2022. P. 19065–19075. https://doi.org/10.1109/CVPR52688.2022.01850</mixed-citation>
      </ref>
      <ref id="cit4">
        <label>4</label>
        <mixed-citation xml:lang="ru">Elhamod M., Diamond K.M., Maga A.M., et al. Hierarchy‐Guided Neural Network for Species Classification. Methods in Ecology and Evolution. 2021;13(1):642–652. https://doi.org/10.1111/2041-210X.13768</mixed-citation>
      </ref>
      <ref id="cit5">
        <label>5</label>
        <mixed-citation xml:lang="ru">Иванова Г.С., Петрова Я.С. Анализ методов компьютерного зрения для систематизации живописных полотен. Нейрокомпьютеры: разработка, применение. 2022;24(6):20–29. https://doi.org/10.18127/j19998554-202206-02</mixed-citation>
      </ref>
      <ref id="cit6">
        <label>6</label>
        <mixed-citation xml:lang="ru">Wang Yi., Liu P., Lang Yi., Zhou Q., Shan X. Learnable Dynamic Margin in Deep Metric Learning. Pattern Recognition. 2022;132. https://doi.org/10.1016/j.patcog.2022.108961</mixed-citation>
      </ref>
      <ref id="cit7">
        <label>7</label>
        <mixed-citation xml:lang="ru">Sun Yi., Zhu Yu., Zhang Yu., et al. Dynamic Metric Learning: Towards a Scalable Metric Space to Accommodate Multiple Semantic Scales. In: IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2021, 19–25 June 2021, Online. IEEE; 2021. P. 5393–5402. https://doi.org/10.1109/CVPR46437.2021.00535</mixed-citation>
      </ref>
      <ref id="cit8">
        <label>8</label>
        <mixed-citation xml:lang="ru">Сулоев К.К., Шешкус А.В., Арлазаров В.Л. Сферические ограничения в триплетной функции потерь. Труды Института системного анализа Российской академии наук. 2023;73(2):50–58. https://doi.org/10.14357/20790279230205</mixed-citation>
      </ref>
      <ref id="cit9">
        <label>9</label>
        <mixed-citation xml:lang="ru">Nguyen Kh., Nguyen H.H., Tiulpin A. AdaTriplet: Adaptive Gradient Triplet Loss with Automatic Margin Learning for Forensic Medical Image Matching. In: Medical Image Computing and Computer Assisted Intervention – MICCAI 2022: 25th International Conference: Proceedings: Part VIII, 18–22 September 2022, Singapore. Cham: Springer; 2022. P. 725–735. https://doi.org/10.48550/arXiv.2205.02849</mixed-citation>
      </ref>
      <ref id="cit10">
        <label>10</label>
        <mixed-citation xml:lang="ru">Wang Zh., Wang Yi., Dong B., Pracheta S., Hamlen K., Khan L. Adaptive Margin Based Deep Adversarial Metric Learning. In: 2020 IEEE 6th International Conference on Big Data Security on Cloud (BigDataSecurity), IEEE International Conference on High Performance and Smart Computing, (HPSC) and IEEE International Conference on Intelligent Data and Security (IDS), 25–27 May 2020, Baltimore, MD, USA. IEEE; 2020. P. 100–108. https://doi.org/10.1109/BigDataSecurity-HPSC-IDS49724.2020.00028</mixed-citation>
      </ref>
      <ref id="cit11">
        <label>11</label>
        <mixed-citation xml:lang="ru">Zakharov S., Kehl W., Planche B., Hutter A., Ilic S. 3D Object Instance Recognition and Pose Estimation Using Triplet Loss With Dynamic Margin. In: 2017 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 24–28 September 2017, Vancouver, BC, Canada. IEEE; 2017. P. 552–559. https://doi.org/10.1109/IROS.2017.8202207</mixed-citation>
      </ref>
      <ref id="cit12">
        <label>12</label>
        <mixed-citation xml:lang="ru">Shaik S., Bucher B., Agrafiotis N., Phillips S., Daniilidis K., Schmenner W. Learning Portrait Style Representations. arXiv. URL: https://doi.org/10.48550/arXiv.2012.04153 [Accessed 3rd May 2025].</mixed-citation>
      </ref>
      <ref id="cit13">
        <label>13</label>
        <mixed-citation xml:lang="ru">Новикова К.Н. Тенденции развития методов классификации объектов на основе модификаций контрастного обучения. В сборнике: Химия и инженерная экология – XXIII: сборник трудов международной научной конференции (школа молодых ученых), посвященной сотрудничеству с союзными государствами, 25–26 сентября 2023 года, Казань, Россия. ИП Сагиев А.Р.; 2023. С. 200–205.</mixed-citation>
      </ref>
      <ref id="cit14">
        <label>14</label>
        <mixed-citation xml:lang="ru">Рогачёв Н.Е. Проблема коллапса нейронных сетей при использовании Triplet Loss. В сборнике: Веб-программирование и интернет-технологии WebConf2018: тезисы докладов 4-й Международной научно-практической конференции, 14–18 мая 2018 года, Минск, Беларусь. Минск: Белорусский государственный университет; 2018. C. 92.</mixed-citation>
      </ref>
      <ref id="cit15">
        <label>15</label>
        <mixed-citation xml:lang="ru">Abdullah T., Bazi Ya., Al Rahhal M.M., Mekhalfi M.L., Rangarajan L., Zuair M. TextRS: Deep Bidirectional Triplet Network for Matching Text to Remote Sensing Images. Remote Sensing. 2020;12(3). https://doi.org/10.3390/rs12030405</mixed-citation>
      </ref>
      <ref id="cit16">
        <label>16</label>
        <mixed-citation xml:lang="ru">Borgli H., Thambawita V., Smedsrud P.H., et al. HyperKvasir, a Comprehensive Multi-Class Image and Video Dataset for Gastrointestinal Endoscopy. Scientific Data. 2020;7. https://doi.org/10.1038/s41597-020-00622-y</mixed-citation>
      </ref>
      <ref id="cit17">
        <label>17</label>
        <mixed-citation xml:lang="ru">Петрова Я.С., Иванова Г.С. Сравнение моделей извлечения признаков из изображений с несколькими аннотациями. Математические методы в технологиях и технике. 2023;(2):71–74.</mixed-citation>
      </ref>
    </ref-list>
    <fn-group>
      <fn fn-type="conflict">
        <p>The authors declare that there are no conflicts of interest present.</p>
      </fn>
    </fn-group>
  </back>
</article>