<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//TaxonX//DTD Taxonomic Treatment Publishing DTD v0 20100105//EN" "https://biss.pensoft.net/nlm/tax-treatment-NS0.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tp="http://www.plazi.org/taxpub" article-type="research-article">
  <front>
    <journal-meta>
      <journal-id journal-id-type="publisher-id">63</journal-id>
      <journal-id journal-id-type="index">urn:lsid:arphahub.com:pub:0E0032F4-55AE-5263-8B3C-F4DD637C30C2</journal-id>
      <journal-title-group>
        <journal-title xml:lang="en">Biodiversity Information Science and Standards</journal-title>
        <abbrev-journal-title xml:lang="en">BISS</abbrev-journal-title>
      </journal-title-group>
      <issn pub-type="epub">2535-0897</issn>
      <publisher>
        <publisher-name>Pensoft Publishers</publisher-name>
      </publisher>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.3897/biss.10.183602</article-id>
      <article-id pub-id-type="publisher-id">183602</article-id>
      <article-id pub-id-type="manuscript">29107</article-id>
      <article-categories>
        <subj-group subj-group-type="heading">
          <subject>Conference Abstract</subject>
        </subj-group>
        <subj-group subj-group-type="conference-part">
          <subject>6798502 - Scaling AI For and Across Biodiversity: Data Collection and Curation in AI-Driven Biodiversity Research</subject>
        </subj-group>
        <subj-group subj-group-type="biological_taxon">
          <subject>Plantae</subject>
        </subj-group>
        <subj-group subj-group-type="scientific_subject">
          <subject>Artificial intelligence</subject>
          <subject>Image processing</subject>
          <subject>Natural History</subject>
        </subj-group>
      </article-categories>
      <title-group>
        <article-title>Determining the Scale of Herbarium Sheet Images via Ruler Detection</article-title>
      </title-group>
      <contrib-group content-type="authors">
        <contrib contrib-type="author" corresp="yes">
          <name name-style="western">
            <surname>Milleville</surname>
            <given-names>Kenzo</given-names>
          </name>
          <email xlink:type="simple">kenzo.milleville@ugent.be</email>
          <uri content-type="orcid">https://orcid.org/0000-0002-9765-6000</uri>
          <xref ref-type="aff" rid="A1">1</xref>
        </contrib>
        <contrib contrib-type="author" corresp="no">
          <name name-style="western">
            <surname>De Witte</surname>
            <given-names>Dieter</given-names>
          </name>
          <xref ref-type="aff" rid="A1">1</xref>
        </contrib>
        <contrib contrib-type="author" corresp="no">
          <name name-style="western">
            <surname>Trekels</surname>
            <given-names>Maarten</given-names>
          </name>
          <uri content-type="orcid">https://orcid.org/0000-0001-8282-8765</uri>
          <xref ref-type="aff" rid="A2">2</xref>
        </contrib>
        <contrib contrib-type="author" corresp="no">
          <name name-style="western">
            <surname>Groom</surname>
            <given-names>Quentin</given-names>
          </name>
          <uri content-type="orcid">https://orcid.org/0000-0002-0596-5376</uri>
          <xref ref-type="aff" rid="A2">2</xref>
        </contrib>
        <contrib contrib-type="author" corresp="no">
          <name name-style="western">
            <surname>Verstockt</surname>
            <given-names>Steven</given-names>
          </name>
          <xref ref-type="aff" rid="A1">1</xref>
        </contrib>
      </contrib-group>
      <aff id="A1">
        <label>1</label>
        <addr-line content-type="verbatim">IDLab, Ghent University, Ghent, Belgium</addr-line>
        <institution>IDLab, Ghent University</institution>
        <addr-line content-type="city">Ghent</addr-line>
        <country>Belgium</country>
      </aff>
      <aff id="A2">
        <label>2</label>
        <addr-line content-type="verbatim">Meise Botanic Garden, Meise, Belgium</addr-line>
        <institution>Meise Botanic Garden</institution>
        <addr-line content-type="city">Meise</addr-line>
        <country>Belgium</country>
      </aff>
      <author-notes>
        <fn fn-type="corresp">
          <p>Corresponding author: Kenzo Milleville (<email xlink:type="simple">kenzo.milleville@ugent.be</email>).</p>
        </fn>
        <fn fn-type="edited-by">
          <p>Academic editor: </p>
        </fn>
      </author-notes>
      <pub-date pub-type="collection">
        <year>2026</year>
      </pub-date>
      <pub-date pub-type="epub">
        <day>23</day>
        <month>03</month>
        <year>2026</year>
      </pub-date>
      <volume>10</volume>
      <elocation-id>e183602</elocation-id>
      <uri content-type="arpha" xlink:href="http://openbiodiv.net/34CB2833-6255-55DA-BF23-0630C1A9261D">34CB2833-6255-55DA-BF23-0630C1A9261D</uri>
      <permissions>
        <copyright-statement>Kenzo Milleville, Dieter De Witte, Maarten Trekels, Quentin Groom, Steven Verstockt</copyright-statement>
        <license license-type="creative-commons-attribution" xlink:href="http://creativecommons.org/licenses/by/4.0/" xlink:type="simple">
          <license-p>This is an open access article distributed under the terms of the Creative Commons Attribution License (CC BY 4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.</license-p>
        </license>
      </permissions>
      <abstract>
        <label>Abstract</label>
        <p>
          <styled-content style="font-weight:normal;">The digitization and online availability of herbarium specimens have increased the need for automated tools to extract specimen traits at scale. Quantitative trait data, such as leaf area or petal length, are critical for ecology, evolution, and climate change research. In recent years, automated methods such as <ext-link ext-link-type="uri" xlink:href="https://leafmachine.org">LeafMachine2</ext-link> (<xref ref-type="bibr" rid="B13613281">Weaver and Smith 2023</xref>) and <ext-link ext-link-type="uri" xlink:href="https://bids.berkeley.edu/mothra">Mothra</ext-link> (<xref ref-type="bibr" rid="B13616212">Wilson et al. 2022</xref>) have been developed to measure these traits from images, supporting large-scale studies. However, such image measurements need to be converted from pixels to standardized units (e.g., centimeters) to be useful. Existing methods estimate this conversion factor (CF) by detecting the ruler type and the tick mark locations directly. From these image coordinates, the average pixel distance between them can be calculated to estimate the CF. These methods typically require many annotated samples for each ruler type and tend to perform poorly when applied to unseen or visually distinct rulers.</styled-content>
        </p>
        <p><styled-content style="font-weight:normal;">To overcome these limitations, we present a generic pipeline that accurately predicts the CF with few labeled rulers. The approach leverages the fact that many institutions reuse identical rulers, often differing only in institutional logos. Instead of directly classifying or predicting the tick mark locations, the pipeline uses a similarity-based approach. First, rulers on the page are detected using a <ext-link ext-link-type="uri" xlink:href="https://docs.ultralytics.com/models/yolo11/">YOLOv11</ext-link> object detection model. Second, these rulers are cropped and normalized, ensuring the longest side is horizontal. After detection, we use Contrastive Language-Image Pre-training (<ext-link ext-link-type="uri" xlink:href="https://github.com/mlfoundations/open_clip">CLIP)</ext-link> to embed each ruler and to retrieve the three most similar ruler candidates from our ground-truth dataset. Next, we use the <ext-link ext-link-type="uri" xlink:href="https://github.com/cvg/LightGlue">LightGlue</ext-link> keypoint-matching model to detect corresponding keypoints between the query ruler and each retrieved candidate. This model detects and scores similar keypoint pairs (pixel coordinates) between two input image pairs. The candidate ruler with the highest average score across the 100 best keypoint pairs is selected as the best match. If none of the candidates had at least 10 matching keypoint pairs, we consider the query ruler a “no-match”. Finally, these keypoint pairs are used to estimate a homography</styled-content>, which describes how one image can be transformed to align with another taken from a different viewpoint. This transformation is then applied to<styled-content style="font-size: 1em;"> the ground truth tick mark locations to calculate the CF for the query ruler.</styled-content></p>
        <p><styled-content style="font-weight:normal;">To evaluate the proposed method, we constructed a new dataset by randomly selecting 400 herbarium sheets from the Global Biodiversity Information Facility (<ext-link ext-link-type="uri" xlink:href="https://gbif.org">GBIF</ext-link>), <ext-link ext-link-type="uri" xlink:href="https://www.imageclef.org/PlantCLEF2020">PlantCLEF2020</ext-link>, and <xref ref-type="bibr" rid="B13616276">Dillen et al. 2019</xref><bold>.</bold> Each ruler was annotated with its bounding polygon and a type. Ruler tick marks were annotated with their coordinate locations and units (e.g., ticks_1cm). The dataset contains a diverse set of 476 rulers from over 40 institutions. We estimated our measurement error at 0.794%, which is in line with the reported 0.8% from LeafMachine2</styled-content>, by calculating the average standard deviation of pixel distances between each tick mark. We evaluated our approach using a leave-one-out cross-validation, treating each ruler crop as a query and the remaining dataset as candidate matches. We also evaluated our method on the 1131 rulers from LeafMachine2<bold>,</bold> which were annotated with a bounding box around the tick marks (see Fig. <xref ref-type="fig" rid="F13603214">1</xref>).</p>
        <p><styled-content style="font-weight:normal;">Rulers without a matching type were excluded for evaluation. The method achieved an average CF error of 0.689% using the best-matching ruler. 94.8% of rulers had a CF error less than 2%. On the LeafMachine2 dataset, performance improved with an average CF error of 0.324%. There, 99.0% of rulers had a CF error less than 2%. </styled-content> <styled-content style="font-weight:normal;">We plan to investigate how different annotation strategies affect performance. Table <xref ref-type="table" rid="T13590495">1</xref><bold> </bold>details these evaluation results. </styled-content></p>
        <p>The proposed method offers several advantages over existing approaches. First, it allows an accurate conversion with fewer annotated rulers of the same type, essentially needing only one. Second, the keypoint matching process is robust to partial detections, occlusions, and low-resolution rulers, as visualized in Fig. <xref ref-type="fig" rid="F13616541">2</xref>. Third, only the detection model needs minimal fine-tuning when new ruler types are added to the dataset, as the matching models remain unchanged. Additionally, the prediction can still be accurate when the best-matching ruler is from a different institution (see Fig. <xref ref-type="fig" rid="F13616591">3</xref>).</p>
        <p>The main limitation of our method is that it requires at least one annotated ruler of a similar type to result in a good match. It also assumes the tick marks are on a straight line, resulting in poorer performance for curved rulers. Finally, we found that simple rulers, such as straight lines, tend to perform worse (see Fig. <xref ref-type="fig" rid="F13616591">3</xref>). </p>
        <p><styled-content style="font-weight:normal;">This work represents part of our ongoing research to assist trait extraction at scale. We plan to expand the dataset with additional ruler types, including examples from other natural history collections. We will further refine the method to improve its robustness and generalization across institutions and to explore fallback methods when no match is found. </styled-content> <styled-content style="font-weight:normal;">The code and dataset are available on GitHub*<xref ref-type="fn" rid="FN13729176">1</xref>.</styled-content></p>
      </abstract>
      <kwd-group>
        <label>Keywords</label>
        <kwd>computer vision</kwd>
        <kwd>object detection</kwd>
        <kwd>trait extraction</kwd>
      </kwd-group>
      <funding-group>
        <award-group>
          <funding-source>
            <named-content content-type="funder_name">Fonds Wetenschappelijk Onderzoek</named-content>
            <named-content content-type="funder_identifier">501100003130</named-content>
            <named-content content-type="funder_ror">https://ror.org/03qtxy027</named-content>
            <named-content content-type="funder_doi">http://doi.org/10.13039/501100003130</named-content>
          </funding-source>
        </award-group>
      </funding-group>
      <counts>
        <fig-count count="3"/>
        <table-count count="1"/>
        <ref-count count="3"/>
      </counts>
    </article-meta>
    <notes>
      <sec sec-type="Presenting author">
        <title>Presenting author</title>
        <p>Kenzo Milleville</p>
      </sec>
      <sec sec-type="Presented at">
        <title>Presented at</title>
        <p>Living Data 2025</p>
      </sec>
      <sec sec-type="Funding program">
        <title>Funding program</title>
        <p>This research was supported by the Research Foundation - Flanders (FWO Grant 12A9L25N) and facilitated by the infrastructure provided by DiSSCo Flanders (FWO Project I001625N).</p>
      </sec>
    </notes>
  </front>
  
  <back>
    <sec sec-type="Conflicts of interest">
      <title>Conflicts of interest</title>
      <p>No conflict of interest to declare</p>
      <p>Disclaimer: This article is (co-)authored by any of the Editors-in-Chief, Managing Editors or their deputies in this journal.</p>
    </sec>
    <ref-list>
      <title>References</title>
      <ref id="B13616276">
        <element-citation publication-type="article">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Dillen</surname>
              <given-names>Mathias</given-names>
            </name>
            <name name-style="western">
              <surname>Groom</surname>
              <given-names>Quentin</given-names>
            </name>
            <name name-style="western">
              <surname>Chagnoux</surname>
              <given-names>Simon</given-names>
            </name>
            <etal/>
          </person-group>
          <year>2019</year>
          <article-title>A benchmark dataset of herbarium specimen images with label data</article-title>
          <source>Biodiversity Data Journal</source>
          <volume>7</volume>
          <pub-id pub-id-type="doi">10.3897/bdj.7.e31817</pub-id>
        </element-citation>
      </ref>
      <ref id="B13613281">
        <element-citation publication-type="article">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Weaver</surname>
              <given-names>William N.</given-names>
            </name>
            <name name-style="western">
              <surname>Smith</surname>
              <given-names>Stephen A.</given-names>
            </name>
          </person-group>
          <year>2023</year>
          <article-title>From leaves to labels: Building modular machine learning networks for rapid herbarium specimen analysis with LeafMachine2</article-title>
          <source>Applications in Plant Sciences</source>
          <volume>11</volume>
          <issue>5</issue>
          <pub-id pub-id-type="doi">10.1002/aps3.11548</pub-id>
        </element-citation>
      </ref>
      <ref id="B13616212">
        <element-citation publication-type="article">
          <person-group person-group-type="author">
            <name name-style="western">
              <surname>Wilson</surname>
              <given-names>Rebecca J.</given-names>
            </name>
            <name name-style="western">
              <surname>de Siqueira</surname>
              <given-names>Alexandre Fioravante</given-names>
            </name>
            <name name-style="western">
              <surname>Brooks</surname>
              <given-names>Stephen J.</given-names>
            </name>
            <etal/>
          </person-group>
          <year>2022</year>
          <article-title>Applying computer vision to digitised natural history collections for climate change research: Temperature‐size responses in British butterflies</article-title>
          <source>Methods in Ecology and Evolution</source>
          <volume>14</volume>
          <issue>2</issue>
          <fpage>372</fpage>
          <lpage>384</lpage>
          <pub-id pub-id-type="doi">10.1111/2041-210x.13844</pub-id>
        </element-citation>
      </ref>
    </ref-list>
    <fn-group>
      <fn id="FN13729176">
        <label>*1</label>
        <p>
          <ext-link ext-link-type="uri" xlink:href="https://github.com/kymillev/herbarium-rulers">https://github.com/kymillev/herbarium-rulers</ext-link>
        </p>
      </fn>
    </fn-group>
  </back>
  <floats-group>
    <fig id="F13603214" position="float" orientation="portrait">
      <object-id content-type="arpha">D04E16E2-F552-5C22-B118-DEE14D592372</object-id>
      
      <label>Figure 1.</label>
      <caption>
        <p>Top: Sample ruler from our own dataset. Bottom: Sample ruler from the LeafMachine2 dataset. Original images from Clemson University Herbarium, <ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by-nc/3.0/">CC BY-NC 3.0.</ext-link></p>
      </caption>
      <graphic xlink:href="biss-10-e183602-g001.png" position="float" id="oo_1450039.png" orientation="portrait" xlink:type="simple">
        <uri content-type="original_file">https://binary.pensoft.net/fig/1450039</uri>
      </graphic>
    </fig>
    <fig id="F13616541" position="float" orientation="portrait">
      <object-id content-type="arpha">1FD8D5E9-E9E1-53C2-98F6-21AA242CFA88</object-id>
      
      <label>Figure 2.</label>
      <caption>
        <p>Output of our pipeline for two sample rulers. From top to bottom: the query ruler, the best-matching ruler candidate, and the predicted tick marks visualized in red. Original images from the Field Museum of Natural History (<ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by-nc/4.0/deed.en">CC BY-NC 4.0</ext-link>) and the University of Florida Herbarium (<ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by-nc/4.0/">CC BY-NC 4.0</ext-link>).</p>
      </caption>
      <graphic xlink:href="biss-10-e183602-g002.jpg" position="float" id="oo_1455548.jpg" orientation="portrait" xlink:type="simple">
        <uri content-type="original_file">https://binary.pensoft.net/fig/1455548</uri>
      </graphic>
    </fig>
    <fig id="F13616591" position="float" orientation="portrait">
      <object-id content-type="arpha">9485046B-E6A5-53A0-8084-29C31FFACB2B</object-id>
      
      <label>Figure 3.</label>
      <caption>
        <p>Left: Inaccurate prediction due to a failure in the keypoint matching. Right: Accurate prediction despite the best-matching ruler being from a different institution. Original images from Botanic Garden and Botanical Museum Berlin (<ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by-sa/3.0/de/">CC BY-SA 3.0 DE</ext-link>), Clemson University Herbarium (<ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by-nc/3.0/">CC BY-NC 3.0</ext-link>), and Royal Botanic Gardens, Kew (<ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by/4.0/">CC BY-4.0</ext-link>)</p>
      </caption>
      <graphic xlink:href="biss-10-e183602-g003.jpg" position="float" id="oo_1455563.jpg" orientation="portrait" xlink:type="simple">
        <uri content-type="original_file">https://binary.pensoft.net/fig/1455563</uri>
      </graphic>
    </fig>
    <table-wrap id="T13590495" position="float" orientation="portrait">
      <label>Table 1.</label>
      <caption>
        <p>Evaluation results of our pipeline on our dataset and the dataset of LeafMachine2. </p>
      </caption>
      <table rules="all" border="1" cellpadding="1" cellspacing="1">
        <tbody>
          <tr>
            <td rowspan="1" colspan="1">Dataset</td>
            <td rowspan="1" colspan="1">Amount</td>
            <td rowspan="1" colspan="1">Annotation error (%)</td>
            <td rowspan="1" colspan="1">Average error (%)</td>
            <td rowspan="1" colspan="1">Median error (%)</td>
            <td rowspan="1" colspan="1">No match</td>
          </tr>
          <tr>
            <td rowspan="1" colspan="1">Own</td>
            <td rowspan="1" colspan="1">457</td>
            <td rowspan="1" colspan="1">0.794</td>
            <td rowspan="1" colspan="1">0.689</td>
            <td rowspan="1" colspan="1">0.199</td>
            <td rowspan="1" colspan="1">11 (2.40%)</td>
          </tr>
          <tr>
            <td rowspan="1" colspan="1">LeafMachine2</td>
            <td rowspan="1" colspan="1">1131</td>
            <td rowspan="1" colspan="1">0.800</td>
            <td rowspan="1" colspan="1">0.324</td>
            <td rowspan="1" colspan="1">0.141</td>
            <td rowspan="1" colspan="1">46 (4.07%)</td>
          </tr>
        </tbody>
      </table>
    </table-wrap>
  </floats-group>
</article>
