bioRxiv Science⌕ Search

bioRxiv · 10.1101/2021.12.16.469125

imageseg: an R package for deep learning-based image segmentation

Abstract

O_LIConvolutional neural networks (CNNs) and deep learning are powerful and robust tools for ecological applications. CNNs can perform very well in various tasks, especially for visual tasks and image data. Image segmentation (the classification of all pixels in images) is one such task and can for example be used to assess forest vertical and horizontal structure. While such methods have been suggested, widespread adoption in ecological research has been slow, likely due to technical difficulties in implementation of CNNs and lack of toolboxes for ecologists. C_LIO_LIHere, we present R package imageseg which implements a workflow for general-purpose image segmentation using CNNs and the U-Net architecture in R. The workflow covers data (pre)processing, model training, and predictions. We illustrate the utility of the package with two models for forest structural metrics: tree canopy density and understory vegetation density. We trained the models using large and diverse training data sets from a variety of forest types and biomes, consisting of 3288 canopy images (both canopy cover and hemispherical canopy closure photographs) and 1468 understory vegetation images. C_LIO_LIOverall classification accuracy of the models was high with a Dice score of 0.91 for the canopy model and 0.89 for the understory vegetation model (assessed with 821 and 367 images, respectively), indicating robustness to variation in input images and good generalization strength across forest types and biomes. C_LIO_LIThe package and its workflow allow simple yet powerful assessments of forest structural metrics using pre-trained models. Furthermore, the package facilitates custom image segmentation with multiple classes and based on color or grayscale images, e.g. in cell biology or for medical images. Our package is free, open source, and available from CRAN. It will enable easier and faster implementation of deep learning-based image segmentation within R for ecological applications and beyond. C_LI

Source connections

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Niedballa, J., Axtner, J., Döbert, T. F., Tilker, A., Nguyen, A., Wong, S. T., Fiderer, C., Heurich, M., Wilting, A.. 2021-12-17. imageseg: an R package for deep learning-based image segmentation. https://doi.org/10.1101/2021.12.16.469125

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related preprints

Phenotypic variation in divergent mitochondrial haplotypes in migratory three-spined stickleback

Mitochondria are essential components in life-sustaining organismal processes. The mitochondrial genome can be influenced by selection, and divergent mitochondrial haplotypes have substantial potential to affect interspecies variation in life-history and physiology, yet little is known about whole organism phenotypic changes that might accompany mitochondrial genomic divergence. Three-spined stickleback on the Scottish island of North Uist provide a model to study this as their populations exhibit a well-mixed nuclear genome, yet two highly diverged mitochondrial haplotypes ( trans-Atlantic and European). Three-spined stickleback were sampled from six lochs to investigate associations between mitochondrial haplotype and phenotypic traits including organ size, body size, and ovule volume/clutch size, as well as citrate synthase enzyme activity. Results showed that mitochondrial haplotype has an influence on male gonadosomatic index (GSI) and potentially citrate synthase (CS) enzyme activity. Differences in male GSI may be explained by the timing of male spermatogenesis or potentially a need for larger testes in European haplotype fish. While no other phenotypic trait showed differences between mitochondrial haplotypes, there were many differences between sexes and populations e.g. in body size and organ/muscle size.

ecology↗

Gregariousness can promote invasion success of pest insects while higher environmental heterogeneity decreases it

Climate change and environmental homogenization are expected to facilitate the expansion of many forest pest insect species and increase the vulnerability of forest ecosystems to insect outbreaks. At present, we lack empirical data on how the antipredator defence traits of pest insects interact with the local environmental conditions and shape outbreak risk. Here we study this and ask 1) how the antipredator defence strategy of pest insects shapes survival under naturally varying predator community, and 2) how is predation risk shaped by the diversity and structure of forests? We tested these questions by conducting a field predation experiment with artificial prey system (prey items made from edible dough) where we manipulated the gregariousness, unpalatability and defensive colouration of prey and tested their effects on prey survival. Additionally, we measured environmental variables and invertebrate predator community structure along the prey transects to analyse how they shape overall predation risk. Our results show that the predation risk was always lowest for gregarious prey irrespective of other defence strategies. Furthermore, our results indicate that predation pressure was lower in more homogenously structured forest areas or areas with a weak quality deadwood continuum in comparison to locations with more natural state forests and good quality deadwood continuum. Altogether, our results suggest that gregariousness can facilitate pest insects to form outbreaks by increasing their survival against generalist predators. However, by maintaining higher heterogeneity in forests, it is possible to ensure higher predation pressure to regulate their population growth.

ecology↗

Two decades of EU pesticide substitution have not reduced impacts on stream invertebrates

Chemical regulation assumes that withdrawing hazardous substances and replacing them with alternatives reduces environmental harm. We tested this premise within the EU pesticide regulatory framework using a 23-year record of event-driven pesticide exposure and stream-invertebrate communities from 152 German agricultural streams sampled between 1998 and 2021. Neither pesticide toxic pressure nor pesticide-related invertebrate impairment showed a detectable decline over time, and an improvement equivalent to one ecological status class can be excluded. Dominant toxicity drivers shifted from organophosphates to neonicotinoids and subsequently to pyrethroids, yet the relationship between toxic pressure and community effects remained consistent despite their distinct modes of action. Sustained toxic pressure reflected three mechanisms: successive chemical substitution, prolonged approval periods, and continued exposure to substances no longer authorised as plant protection products. Substitution thus changed which chemicals harm streams, not how much. Measured field outcomes must become the benchmark of pesticide regulation.

ecology↗