Mothra analyzes images of butterflies and measures their wing lengths. Using binarization techniques and calculating the resolution of ruler ticks, we read in images of butterflies and output the millimeter lengths of their wings.

The pipeline script combines four modules to analyze an image: ruler detection, binarization, tracing, and final measurement. These modules are located in /butterfly . Python module requirements are listed in requirements.txt .

Run the file with the arguments to read in raw images and output result images and .csv file with the measurements.

The results are cached in cachedir so that if the same methods are re-run with the same inputs, the computation will simply be retrieved from memory instead of being recomputed. Delete cachedir to remove the cache and to recompute all results. If the source files for any part of the pipeline are tweaked, then results will be recomputed automatically.

Applying computer vision to digitised natural history collections for climate change research: temperature-size responses in British butterflies
December 22, 2021  |   bioRxiv 
Authors: Rebecca J. Wilson, Alexandre Fioravante de Siqueira, Stephen J. Brooks, Benjamin W. Price, Lea M. Simon, Stéfan J. van der Walt, Phillip B. Fenberg


BIDS Affiliates

Alex de Siqueira

Assistant Project Scientist, Data Science Outreach Lead

Stéfan van der Walt

Senior Research Data Scientist