The napari hub is transitioning to a community-run implementation due to launch in June 2025.
Since October 1, 2024, this version is no longer actively maintained and will not be updated. New plugins and plugin updates will continue to be listed.

Frontveg

frontveg

Segmentation of vegetation located to close to camera

Workflow step:
Image annotation
Image segmentation

License BSD-3 PyPI Python Version tests codecov napari hub npe2 Copier

A plugin for foreground vegetation segmentation, tailored for trellised vegetation row images. It uses RGB images to perform inference and allows users to manually refine the generated mask.


The method was developped by Herearii Metuarea, PHENET PhD at LARIS (French laboratory located in Angers, France) and Abdoul Djalil Ousseini Hamza, AgroEcoPhen Engineer at IRHS (French Institute located in INRAe Angers, France) in Imhorphen team (bioimaging research group lead) under the supervision of Eric Duchêne (Research Engineer), Morgane Roth (Research Engineer) and David Rousseau (Full professor). This plugin was written by Herearii Metuarea and was designed in the context of the european project PHENET.

Data Warehouse


This napari plugin was generated with copier using the napari-plugin-template.

Installation

You can install frontveg via pip:

pip install frontveg

To install latest development version :

pip install git+https://github.com/hereariim/frontveg.git

Description

This plugin is a tool to perform image inference. This plugin contained two steps of image processing. First, from RGB image, a depth map is estimated and then thresholded based on the estimated depth histogram modes to detect foreground and background regions in image. Second, a Grounding DINO model detects foliage in the foreground. The output is a binary mask where white colour are associated to foliage in the foreground.

The plugin is applicable to images of trellised plants; in this configuration, it has been applied to images of pome fruit trees (apple), stone fruit trees (apricot) and climbing plants (grapevine).

sample_example

Contact

Imhorphen team, bioimaging research group

42 rue George Morel, Angers, France

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

License

Distributed under the terms of the BSD-3 license, "frontveg" is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

Version:

  • 0.3.4

Last updated:

  • 27 May 2025

First released:

  • 20 April 2025

License:

Supported data:

  • Information not submitted

Plugin type:

GitHub activity:

  • Stars: 0
  • Forks: 0
  • Issues + PRs: 0

Python versions supported:

  • Information not submitted

Operating system:

Requirements:

  • numpy
  • magicgui
  • qtpy
  • scikit-image
  • transformers==4.51.3
  • torch>=2.3.1
  • torchvision>=0.18.1
  • hydra-core==1.3.2
  • iopath>=0.1.10
  • pillow>=9.4.0
  • sam2==1.1.0