new-open-source-ai-pipeline-accelerates-digitisation-of-pinned-insect-specimen-labels
New Open-Source AI Pipeline Accelerates Digitisation of Pinned Insect Specimen Labels

New Open-Source AI Pipeline Accelerates Digitisation of Pinned Insect Specimen Labels

Researchers associated with the New Zealand Arthropod Collection have developed RAPIID and Chrysalis, an open-source semi-automated pipeline that accelerates the digitisation of pinned insect specimen labels without requiring expensive robotic infrastructure. Pinned insect collections present severe digitisation challenges because their data labels are physically minute, frequently handwritten, and stacked beneath specimens on the mounting pin. To eliminate this operational bottleneck, the new workflow couples an adaptable multi-camera desktop imaging rig with a browser-based application powered by Google Gemini vision-language models. The desktop imaging utility, termed RAPIID, standardises visual capture and reads machine-readable accession codes from pins in real time. Meanwhile, the browser application, Chrysalis, transcribes and parses raw visual label text directly into structured Darwin Core biodiversity fields. By combining low-cost consumer hardware with multimodal artificial intelligence, the pipeline converts raw physical specimens into database-ready digital archives, providing natural history repositories with an accessible alternative to industrial conveyor-driven imaging machinery.

The digitisation of natural history collections has evolved into essential curatorial work that directly underpins biodiversity conservation, biosecurity research, and global ecological monitoring. However, transforming physical museum specimens into usable digital records remains slow and labour-intensive across institutions worldwide. For pinned entomological holdings, labels are routinely stacked two or three deep along the pin, making them difficult to photograph and read without physical extraction. Historically, institutions have relied on manual transcription, wherein staff manually read labels and type data into collection databases, a process requiring decades to digitise large national holdings. While some major institutions have deployed automated conveyor systems that process hundreds of specimens daily, these systems demand extensive floor space and cost hundreds of thousands to millions of dollars. These extreme financial and physical barriers place automated systems beyond the reach of most natural history collections, creating an urgent requirement for compact, affordable digitisation alternatives that smaller institutions can independently fabricate and operate.

The image capture phase is managed by RAPIID, or the RAked Pinned Insect Imaging Device, a desktop application designed to capture high-quality label photographs and capture metadata without manual data entry. Written in Python with a PyQt5 graphical interface, RAPIID supports multiple cameras arranged in a responsive grid. The software interfaces with inexpensive webcams, digital single-lens reflex and mirrorless cameras in webcam streaming modes, and high-resolution FLIR machine vision cameras operating via the Spinnaker SDK. By angling both the camera and the mounting pin, RAPIID allows operators to capture complete label text without removing labels from the pin for a substantial proportion of specimens. For specimens bearing more than two or three labels, additional cameras can be positioned to capture complementary angles simultaneously. Text is extracted from each perspective individually and later combined during pre-upload processing, enabling collections to scale imaging hardware according to their institutional budget and throughput needs.

To eliminate transcription errors during data intake, RAPIID incorporates automated accession barcode decoding alongside specimen imaging. A dedicated webcam scans two-dimensional DataMatrix codes from accession labels in real time, automatically populating catalogue numbers without manual keyboard entry. The software also supports quick-response and one-dimensional linear barcodes through selectable interface options. Upon image capture, RAPIID writes dedicated image files for active cameras, embedding creator names, taxon identifications, accession numbers, capture dates, and copyright metadata directly into image EXIF tags. Simultaneously, the application appends corresponding metadata rows to per-taxon comma-separated values files. Camera streaming and device discovery execute across background threads, preserving software responsiveness. Operators can save capture parameters within YAML configuration files, allowing seamless session reloads. The physical apparatus can be assembled using accessible materials, including aluminium extrusion T-slot framing, three-dimensionally printed mounting arms, and ring light-emitting diode illuminators, ensuring low fabrication costs and complete hardware adaptability.

The pipeline’s transcription stage is executed by Chrysalis, a client-side browser application built in TypeScript that converts label images into structured, Darwin Core-aligned fields. Chrysalis operates without a dedicated backend server, communicating directly with Google Gemini vision-language foundation models via application programming interface requests. Unlike traditional digitisation pipelines that separate optical character recognition scanning from downstream rule-based entity parsing, Chrysalis executes both transcription and semantic extraction in a single multimodal pass. A single comprehensive prompt instructs the model to extract and categorize textual entities, including collector names, collection localities, sampling dates, taxonomic determinations, and accession numbers, directly from the uploaded photographs. This unified single-pass structure reduces external API calls and minimizes operational processing expenses. However, researchers observe that consolidating character recognition and semantic parsing into one inference step means errors cannot always be diagnosed separately, as incorrect field values may reflect optical misreads, parsing misassignments, or a combination of both.

To maintain rigorous data quality, Chrysalis features a split-panel interface displaying the original label image alongside extracted Darwin Core fields, allowing curators to verify and correct entries before marking them reviewed. A bulk taxonomy tool enables users to apply uniform Order, Family, Genus, or Species determinations across entire batches, streamlining the processing of specimens sharing common collecting events or storage drawers. When physical labels lack explicit geographic coordinates, Chrysalis estimates decimal latitude and longitude from locality descriptions, explicitly tagging generated values as artificial-intelligence-estimated within output metadata. Curators can subsequently validate these coordinates against authoritative geographic gazetteers. Following review, Chrysalis exports batch datasets as single comma-separated values files formatted for compatibility with the Global Biodiversity Information Facility. For New Zealand entomological collections, the export includes standardized two-letter regional area codes established by Crosby and colleagues, facilitating immediate regional categorization and ensuring seamless alignment with established institutional biodiversity documentation protocols.

Extraction accuracy in Chrysalis is controlled through customizable settings that allow curators to refine system prompts and model temperatures without modifying application source code. Curators can tailor extraction prompts to accommodate distinct regional locality phrasing or adjust extraction boundaries for archaic historical handwriting styles. Adjusting model temperature regulates analytical creativity versus strict determinism, with prompt and temperature modifications applying to subsequent batch items without altering previously evaluated records. Chrysalis currently supports Google Gemini 2.5 Flash and Gemini 3.5 Flash, storing user model selections locally within the browser. Based on published pricing metrics for representative 1024 by 1024 pixel images, processing one thousand label images costs approximately 1.11 United States dollars with Gemini 2.5 Flash, compared to approximately 4.98 United States dollars with Gemini 3.5 Flash. Although Gemini 3.5 Flash costs roughly 4.5 times more, its superior reasoning capabilities provide enhanced extraction performance when interpreting degraded or handwritten historical labels.

To validate operational throughput, the research team conducted an empirical case study examining a drawer containing 356 Megaspilidae wasp specimens from the New Zealand Arthropod Collection. The evaluation sample reflected realistic curatorial heterogeneity, spanning collection dates from 1923 to 2005 and comprising 58 handwritten labels alongside 298 printed labels, with one to three labels per pin. Imaging the specimens with RAPIID required an average of 22.3 seconds per sample, with a standard deviation of 10.9 seconds, completing the physical capture of all 356 specimens in approximately 2.2 hours. Subsequent batch processing through Chrysalis took 46.3 minutes, achieving an average automated extraction speed of 7.8 seconds per label image. Because this processing stage runs autonomously in the background, curatorial personnel were free to perform other collection tasks. Final human review required approximately 10 minutes to scan the returned records, with curators needing only to rectify occasional minor punctuation inconsistencies.

The timing results obtained during the trial demonstrated performance comparable or superior to existing digitisation platforms, with RAPIID achieving roughly 160 specimens per hour compared to approximately 140 per hour reported for the ALICE system. Furthermore, Chrysalis completed label processing in 7.8 seconds per image, slightly outperforming SpeciMate’s reported 8.3 seconds for herbarium sheets. Detailed evaluation of structured outputs showed that the multimodal model effectively parsed complex historical notations, resolving Roman-numeral date conventions, expanding abbreviated geographical terms, and reconstructing partially obscured words. When processing labels noting reared host associations, the model accurately distinguished host designations from specimen taxonomy, excluding non-target species names from primary taxonomic fields. Furthermore, the model inferred correct taxonomic orders, including Coleoptera and Diptera, based on the physical appearance of specimens in the images, even when order names were absent from label text, illustrating the sophisticated multimodal capabilities underpinning the extraction pipeline.

Cleaned data from Chrysalis can be imported directly into collection management systems like Symbiota using modifiable column headers and supplementary R scripts to standardize names against authority files. However, the authors outline important operational limitations and privacy considerations. Because Chrysalis relies on cloud-hosted foundation models, specimen photographs and label data are transmitted to external Google servers, requiring institutions managing sensitive locality data for endangered species to carefully evaluate network security policies. Additionally, because transcription accuracy depends on image resolution and handwriting legibility, the workflow relies fundamentally on human-in-the-loop oversight rather than fully unattended automation. AI-estimated coordinates similarly require independent gazetteer verification prior to database ingestion. Despite these considerations, RAPIID and Chrysalis offer an adaptable, open-source pipeline that institutions can deploy incrementally using existing equipment, with future research testing applications for microscope slides, fluid-preserved specimens in glass vials, and herbarium sheets across collaborating natural history museums.

Subject of Research: Semi-automated digitisation and AI-assisted transcription of pinned insect specimen labels

Article Title: RAPIID and Chrysalis : a low-cost semi-automated pipeline for digitising pinned insect specimen labels

Article References: Harmer, A., Elder, L., & Ward, D. (2026). RAPIID and Chrysalis: a low-cost semi-automated pipeline for digitising pinned insect specimen labels. Biodiversity Data Journal, 14, Article e212675. https://doi.org/10.3897/bdj.14.e212675

Image Credits: AI Generated

DOI: 10.3897/BDJ.14.e212675

Keywords: RAPIID, Chrysalis, pinned insect specimens, specimen label digitisation, New Zealand Arthropod Collection, Darwin Core, Google Gemini Flash, DataMatrix barcodes, machine vision, multimodal AI, optical character recognition, Symbiota CMS, biodiversity informatics, Megaspilidae, open-source software, georeferencing, natural history collections