{"name":"frontvegV2","display_name":"FrontVeg V2","visibility":"public","icon":null,"categories":[],"schema_version":"0.2.1","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"frontvegV2.make_frontveg_widget","title":"Open FrontVeg V2","python_name":"napari_frontveg:make_frontveg_widget","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":null,"writers":null,"widgets":[{"command":"frontvegV2.make_frontveg_widget","display_name":"FrontVeg V2 Studio","autogenerate":false}],"sample_data":null,"themes":null,"menus":{},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.4","name":"frontvegV2","version":"0.1.4","dynamic":["license-file"],"platform":null,"supported_platform":null,"summary":"Automated plant organ segmentation and leaf area estimation in trellised crops using side view monocular RGB images.","description":"# FrontVeg V2: Foreground-Aware Zero-Shot Plant Trait Segmentation in Trellised Crops\n\n<!-- ## Authors -->\n**Abdoul Djalil Ousseini Hamza** ([ORCID](https://orcid.org/0009-0008-6172-4439)), **Herearii Metuarea** ([ORCID](https://orcid.org/0009-0008-2716-0617)), **Corentin Lothodé** ([ORCID](https://orcid.org/0000-0002-8209-317X)), **Morgane Roth** ([ORCID](https://orcid.org/0000-0002-5244-4215)), **Eric Duchêne** ([ORCID](https://orcid.org/0000-0003-2712-1892)), **Lionel Ley**, **David Alletru** ([ORCID](https://orcid.org/0009-0006-6238-6123)), and **David Rousseau**<sup>*</sup> ([ORCID](https://orcid.org/0000-0002-7935-1609))\n\n*\\* Project Supervisor* \n\n<!-- <img src=\"https://raw.githubusercontent.com/djaliloh/FrontVegV2/main/assets/logo.png\" alt=\"Project Logo\" style=\"max-width: 100%; height: auto;\"> -->\n\n<!-- ![Logo](https://raw.githubusercontent.com/djaliloh/FrontVegV2/main/assets/logo.png)  -->\n\n<!-- <img src=\"assets/logo.png\" alt=\"Project Logo\" style=\"max-width: 100%; height: auto;\"> -->\n\n<!-- <img src=\"https://i.imgur.com/NcQWGjS.png\" alt=\"Project Logo\" style=\"max-width: 100%; height: auto;\"> -->\n<img src=\"https://raw.githubusercontent.com/djaliloh/Deep-learning-training/main/results/logo_parteneaire.png\" alt=\"Partner Logo\" style=\"max-width: 100%; height: auto;\">\n\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/frontvegv2)](https://napari-hub.org/plugins/frontvegv2.html) [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/) \n[![PyTorch](https://img.shields.io/badge/PyTorch-%23EE4C2C.svg?style=flat&logo=PyTorch&logoColor=white)](https://pytorch.org/)\n[![License: BSD 3-Clause](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n\n<!-- uncomment this when the repos become public -->\n<!-- [![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/djaliloh/FrontVegV2)](https://github.com/djaliloh/FrontVegV2) --> \n\n\n\n# FrontVeg V2\n\nA napari plugin for automated plant organ segmentation and leaf area estimation in trellised crops using side view monocular RGB images.\n\n<!-- > ⚠️ **Important:** SAM3 requires gated model weights from Hugging Face. Please follow the setup instructions below before running the plugin. -->  \n\nSome examples of organ segmentation on different trellised crops: \n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/djaliloh/Deep-learning-training/main/results/frontvegv2_expl_grid.png\" alt=\"FrontVeg V2 Segmentation Examples Grid\" style=\"max-width: 100%; height: auto;\">\n</p>\n\n---\n\n## Prerequisites\n\n1. **Create a virtual environment** \n   ```bash\n   conda create -n <env_name> python=3.10 -y\n   conda activate <env_name>\n   pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121\n   ```\n\n2. **Request SAM3 Weights Access:**\n   Request access to the SAM3 checkpoint on [Hugging Face](https://huggingface.co/facebook/sam3). Once approved, download `sam3.pt`.\n\n3. **Download Depth-Anything V2 Weights:**\n   Download the Large model checkpoint (`depth_anything_v2_vitl.pth`) from the official [Depth-Anything V2 repository](https://github.com/DepthAnything/Depth-Anything-V2).\n\n4. **Place your downloaded checkpoints inside the project folder:** \n   - Place sam3.pt into: checkpoints/sam3_ckpts/sam3.pt\n   - Place depth checkpoints into: checkpoints/depthanything_ckpts/\n\n---\n\n## Installation\n\n### Option 1: Recommended (Git Clone + Editable Install)\n\nThis option automatically sets up the relative paths for `external/` submodules and `checkpoints/`.\n\n```bash\n# 1. Clone the repository \ngit clone https://github.com/djaliloh/FrontVegV2.git\ncd FrontVegV2\n\n# 2. Clone and install external models in the external/ folder:\ncd external\n\n# Depth-Anything V2\ngit clone https://github.com/DepthAnything/Depth-Anything-V2.git\n\n# SAM3\ngit clone https://github.com/facebookresearch/sam3.git\ncd sam3\npip install -e .\ncd ../..\n\n# 3. Install in editable mode \npip install -e .\n```\n\n### Option 2: Direct PyPI Install (Coming Soon) \n\n> ℹ️ **Note:** Standalone installation via `pip install` will be released soon. \n> In the meantime, please follow **Option 1** to use the plugin. \n\n\n<!-- ### Option 2: Direct PyPI Install + Environment Variables  -->\n\n<!-- ```powershell\n# If you installed the plugin directly via PyPI (pip install frontvegv2), you must specify the paths to your local SAM3 code repository and checkpoints using environment variables : \n\n# Windows (PowerShell):\n$env:FRONTVEG_SAM3_REPO = \"<path_to_sam3_repo>\"\n$env:FRONTVEG_SAM3_CKPT = \"<path_to_sam3.pt>\"\n$env:FRONTVEG_DEPTH_REPO = \"<path_to_depth_anything_v2_repo>\"\n$env:FRONTVEG_DEPTH_CKPT_DIR = \"<path_to_depth_ckpts_folder>\"\n\nnapari\n\n\n# Linux / macOS (Bash):\nexport FRONTVEG_SAM3_REPO=\"<path_to_sam3_repo>\"\nexport FRONTVEG_SAM3_CKPT=\"<path_to_sam3.pt>\"\nexport FRONTVEG_DEPTH_REPO=\"<path_to_depth_anything_v2_repo>\"\nexport FRONTVEG_DEPTH_CKPT_DIR=\"<path_to_depth_ckpts_folder>\"\n\nnapari\n``` -->\n\n\n\n## Usage in Napari\n\n1. Launch Napari: `napari`\n2. Open an RGB image of a row crop.\n3. Select **Plugins > FrontVeg V2 Studio**.\n4. Set your prompt (e.g., \"leaf\") and adjust parameters (Tile Overlap, Sigma, etc.).\n5. Click **Run Complete Pipeline**.\n\n\n<!-- ## Citing FrontVeg V2\n\n```bibtex\n@article{djaliloh2026frontvegv2,\n  title={FrontVeg-V2: Foreground-Aware Zero-Shot Plant Trait Segmentation in Trellised Crops Using Side View Monocular RGB Images},\n  author={A-D. Ousseini Hamza, et al.}, \n  journal={SoftwareX}, \n  year={2026},\n  url={https://github.com/djaliloh/FrontVeg2} \n}\n```  -->\n\n<!-- ## License\nLicense is pending. -->\n\n## Acknowledgements\n\nThis work was supported by the French **Programme et Équipements Prioritaires de Recherche (PEPR) AgroEcoNum** ([pepr-agroeconum.fr](https://www.pepr-agroeconum.fr/)), the **France 2030** program through the Agence Nationale de la Recherche (ANR), and the European Union’s **Horizon Europe** research and innovation programme (Grant No. 101094587, **PHENET**). \n\nThis research used computing resources from the **GLiCID Computing Facility** (Ligerien Group for Intensive Distributed Computing, [doi:10.60487/glicid](https://doi.org/10.60487/glicid), Pays de la Loire, France), as well as HPC and storage resources provided by **GENCI at IDRIS** on the Jean Zay supercomputer’s H100 partition (Grant 2025-AD010115553R1).\n\nThe authors would like to thank **Sirine Gharbi**, **Oumaima Karia**, **Justin Langlois**, **Paul**, and **Thomas** for their valuable assistance in annotating the image dataset used in this study.\n\n## Contact\n\nImhorphen team, bioimaging research group, <br> \nIRHS, UMR 1345, INRAE, <br>\n42 Rue Georges Morel, 49070 Beaucouzé, France\n\n- David Rousseau - Professor, david.rousseau@univ-angers.fr\n- Corentin Lothode - Researcher Engineer, corentin.lothode@inrae.fr\n- Herearii Metuarea - PhD student, herearii.metuarea@univ-angers.fr\n- Abdoul Djalil Ousseini Hamza - Engineer, abdoul-djalil.ousseini-hamza@inrae.fr\n\n\n## Troubleshooting\n\n- Missing Module 'triton': On Windows, install the Windows-compatible Triton build: pip install triton-windows.\n- RuntimeError: mat1 and mat2 must have the same dtype: If running on GPUs older than NVIDIA Ampere (e.g., GTX 10xx, RTX 20xx), ensure autocast is set to float16 or float32 instead of bfloat16.\n- Missing Checkpoints Error: Verify that sam3.pt exists at the expected path or set FRONTVEG_SAM3_CKPT manually.\n","description_content_type":"text/markdown","keywords":null,"home_page":"https://github.com/djaliloh/FrontVegV2","download_url":null,"author":"Abdoul Djalil OUSSEINI HAMZA","author_email":"abdouldjalilo@gmail.com","maintainer":null,"maintainer_email":null,"license":"BSD-3-Clause","classifier":["Framework :: napari","Programming Language :: Python :: 3","Programming Language :: Python :: 3.10","Operating System :: OS Independent"],"requires_dist":["napari[all]","numpy==1.26.4","opencv-python==4.8.1.78","pillow","scipy","matplotlib","einops","triton-windows; sys_platform == \"win32\"","triton; sys_platform == \"linux\"","setuptools==69.5.1","scikit-learn","decord","psutil","pycocotools","pandas","scikit-image","setuptools==69.5.1; extra == \"dev\"","scikit-learn; extra == \"dev\"","decord; extra == \"dev\"","psutil; extra == \"dev\""],"requires_python":null,"requires_external":null,"project_url":null,"provides_extra":["dev"],"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}