Downloads · 30 days
0
LeafNet75/Leaf-Annotate-v2
Leaf-Annotate-v2 is a image segmentation model from LeafNet75. Use it for the image segmentation task on the model card, and read the license before you ship it in a product. It is set up for segmentation-models-pytorch. The card lists the license as apache-2.0.
[](https://opensource.org/licenses/Apache-2.0) [](https://pytorch.org/) [](https://huggingface.co/spaces/LeafNet75/Segment-Leaf)
Downloads · 30 days
0
Access
Public
Updated Nov 18, 2025
Repo size
28.6 MB
Likes
1
Public
Click a slice to open those files.
.pth26.8 MB · 94%
From the Hugging Face model README
Precise segmentation of leave(s) with cpu-friendly U-Net architecture.
<p style="color:red;"> <b>NOTE:</b> The model is well-suited for single-leaf images as it is only trained for that. For "in-the-wild" multi-leaf images, it may fail and directly predict all the leaves it detects. </p>This model is a U-Net with a lightweight MobileNetV2 backbone. It's designed for interactive segmentation: it takes a 4-channel input (RGB image + a single-channel user scribble) and outputs a binary segmentation mask of the indicated leaf.
This model was trained on the LeafNet75/In_the_Lab_masks dataset.
This model is created for auto-annotation of leave(s) with cpu-friendly computation, focusing on precise segmentation over hardware. For the current trained weights, here are some example outputs:
<table> <tr> <td><img src="test/s1.png" width="375"/></td> <td><img src="test/s2.png" width="375"/></td> </tr> <tr> <td><img src="test/s3.png" width="375"/></td> <td><img src="test/s4.png" width="375"/></td> </tr> <tr> <td><img src="test/s5.png" width="375"/></td> <td><img src="test/s6.png" width="375"/></td> </tr> </table>The model was trained for 50 epochs with a final validation loss of 0.0736 and a final Dice score of 0.9856.
<table> <tr> <td><img src="training_plots.png" width="500"/></td> </tr> </table>This model provides automated image segmentation, but it may produce errors even on simple images and may not generate accurate segmentations for all types of images. In such cases, human intervention is required, and corrections can be made using tools like CVAT
You can run this model on a collection of unsegmented images using the Batch_Inference.py script.
masks/ directory with the same base filename as the original images, in .png format.COCO 1.1-compatible JSON annotation file, which can be imported into CVAT for polygon editing.In this way annotations can be corrected without doing from scratch.
We welcome contributions of any kind—whether it’s improving the model, enhancing datasets, or adding new tools and utilities.
Thanks