Search bioRxiv⌕ 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

Invasion analysis for structured populations: analytical principles and numerical workflows

All real populations show some form of structure--differences among individuals, such as life stage or physiological condition, that shape a species' ability to persist. Yet it remains challenging to incorporate population structure into models of species interactions. We provide a general framework for studying competition in structured populations by quantifying species' invasion growth rates. The crux of our approach is separation of timescales: the initial dynamics of a structured population depend on how exactly it is introduced, but these transient differences do not affect long-term invasion success. Depending on the research question, the relevant long-term growth rate when rare may equivalently be derived using analytical separation of timescales, matrix population theory, or numerical simulations. Using case studies spanning developmental stage, environmental state, and infection status, we illustrate how our methodology derives simple, ecologically meaningful invasion conditions for a variety of systems. Finally, we extend the approach to fluctuating resident dynamics, showing how to use simulations or a general mathematical framework known as Floquet theory to correctly quantify invasion growth. By unifying the quantitative methods of population biology and community ecology, our framework will allow ecologists to study species persistence and coexistence across a greater variety of demographically complex systems.

ecology↗

Interspecific social contacts spread gut microbiota in wild rodent communities

Background: The mammalian gut microbiota influences a wide array of host phenotypes and varies substantially among individuals. Among conspecifics, microbiota composition is strongly shaped by microbial transmission through social interactions, yet the extent to which such transmission also occurs across species boundaries remains poorly understood. Here, we combine high-resolution tracking data collected over more than 10 months with gut microbiota profiling to examine social associations, space use, and microbiota similarity among individuals of three sympatric rodent species - wood mice (Apodemus sylvaticus), yellow-necked mice (A. flavicollis) and bank voles (Myodes glareolus), in two woodlands. By integrating multi-species social networks and spatial overlap with individual microbiota data, we test how both conspecific and interspecific interactions shape gut microbiota composition. Results: At both study sites, social associations strongly predicted microbiota similarity among conspecific individuals, whereas spatial proximity consistently predicted microbiota similarity among interspecific pairs. In addition, social associations between mice of different species predicted microbiota similarity, although this effect was weaker than that observed within species and was asymmetric, with evidence for stronger microbial transmission from wood mice to yellow-necked mice than vice versa. By focusing on species-indicative bacterial taxa, we further show that wood mice with more social connections to yellow-necked mice harboured a greater richness of gut bacteria typical of yellow-necked mice. Conclusions: Together, these results demonstrate that individual-level social behaviour can influence gut microbial transmission across species boundaries, particularly among closely related species with overlapping ecological niches. Interspecific social interactions may therefore represent an underappreciated pathway for the acquisition of novel gut symbionts in multi-species communities.

ecology↗

Energetic and functional development of soil food webs along secondary succession

1. As ecosystems develop, aboveground biomass and belowground organic matter accumulate, while energy turnover declines. This trend is largely supported by vegetation studies, but remains unexplored for soil food webs that channel the majority of energy in terrestrial ecosystems. 2. Here, we tested whether successional theory applies to soil food webs across size-based compartments, ranging from microfauna (nematodes) to macrofauna (soil arthropods and earthworms), along a secondary succession in southwestern China, using an energy-flux approach. To assess whether forest restoration by planting follows natural succession, we also compared spruce and larch plantations with secondary birch forest of the same successional stage. 3. Supporting expectations of reduced energy turnover, the results showed an increasing animal biomass-to-energy flux ratio and a functional shift from herbivory-dominated (green) to detritivory-dominated (brown) energy channelling along succession. Soil food web compartments showed contrasting trends: macro-food webs shifted towards bacterial energy channels with decreasing predation, while micro-food webs maintained similar bacterial/fungal energy flux ratios and tended towards increasing predation. The larch plantation supported lower animal biomass than the secondary birch forest, whereas the spruce plantation did not differ. We further found that energy flux correlated positively with microbial biomass and soil animal diversity, but negatively with litter biomass during succession. 4. Overall, we expand successional theory by revealing the transformations in energy use and pathways within soil food webs along secondary succession, thereby advancing understanding of ecosystem functioning and guiding ecosystem restoration. Our results further suggest that tree plantations do not necessarily replicate the belowground development of natural succession, which should be considered in ecosystem restoration.

ecology↗