/ Модель

Характеристики

Лицензия
Apache 2.0
Библиотека
segmentation-models-pytorch
Опубликована
6 окт 2026

lm3_specimen_segmenter__unetpp_effb7_1024

Сегментация изображенийИзображение → mask3 профессии
1скачиваний за 30 дней0лайковвеса обновлены24 окт 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Сегментатор LeafMachine3 на базе UNet++ и EfficientNet-B7 выделяет растения на листах гербария для удаления фона.

Модель phyloforfun/lm3_specimen_segmenter__unetpp_effb7_1024 — сегментатор листов гербария для LeafMachine3. Она выделяет растительный материал на листе и формирует бинарную маску переднего плана, которую можно использовать для удаления фона и получения вырезки растения. Модель была стандартным сегментатором образцов в LeafMachine3 с версий 3.0.0 по 3.0.1041; теперь она доступна как альтернативная модель.

Архитектура — UNet++ с энкодером EfficientNet-B7, предварительно обученным на ImageNet; веса всей сети дообучены для сегментации. В README описан входной размер 1024 × 1024 и вывод логитов одного канала. Для запуска в LeafMachine3 предоставлена версия ONNX; также доступны чекпойнт PyTorch и TorchScript. Обучение проводилось на 18 904 изображениях гербарных листов с машинно созданными и уточнёнными масками одного класса — «растение».

На отложенной выборке согласие с машинно созданными масками составило в среднем Dice 0,948 и IoU 0,916; эти оценки отражают воспроизведение автоматической разметки, а не сравнение с экспертными аннотациями. Известная слабость — недосегментация бледного высохшего материала на бумаге похожего цвета. Лицензия репозитория — Apache-2.0.

Сценарии применения

  • создание бинарных масок растений на сканах гербарных листов
  • удаление фона с изображений гербарных образцов
  • получение RGB-вырезки растения из листа гербария
  • визуализация маски образца в рабочем процессе LeafMachine3

Ограничения

Оценки качества рассчитаны относительно автоматически созданных масок, а не ручной экспертной разметки. Модель может недосегментировать бледный высохший растительный материал на бумаге похожего цвета.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

lm3_specimen_segmenter__unetpp_effb7_1024

UNet++ with an EfficientNet-B7 encoder that separates plant material from everything else on a herbarium specimen sheet (binary foreground mask, used for background removal). Was the default specimen_segmenter model in LeafMachine3 3.0.0 to 3.0.1041; the current default is lm3_specimen_segmenter__unetpp_effb7_1024_dinov3_vith16plus_2048_consensus (UNet++ v8). This model stays available as an alternate (lm3 models install --model specimen_segmenter=unetpp_effb7_1024).

LM3 metadata

FieldValue
LM3 actionspecimen_segmenter
LM3_default_modelfalse (the default in 3.0.0 to 3.0.1041; now unetpp_effb7_1024_dinov3_vith16plus_2048_consensus)
LM3_version3.0.0 (minimum supported; later releases remain compatible)
Model keyunetpp_effb7_1024 (training run unet_masksFromSam3_paperclean_control_1024)
Inputwhole sheet image, letterboxed onto a white 1024 x 1024 square, RGB, ImageNet mean/std normalization; tensor input [1, 3, 1024, 1024] float32
Outputlogits [1, 1, 1024, 1024]; apply sigmoid, threshold 0.5, remove the letterbox pad, resize to the sheet
Classes (1)plant (foreground)
Trained2026-07-28

Architecture

ComponentDetail
NetworkUNet++ (nested, densely connected skip pathways), segmentation_models_pytorch.UnetPlusPlus
EncoderEfficientNet-B7, initialized from ImageNet weights (encoder_weights="imagenet")
Head1 output channel, no activation (logits)
Parameters66.4 M
Exported weightsthe exponential-moving-average copy (decay 0.9998) of the best epoch

The whole network is fine-tuned; only the encoder starts from pretrained weights.

Credits

  • segmentation_models.pytorch (Pavel Iakubovskii, MIT): the UNet++ implementation and the pretrained encoder loader. https://github.com/qubvel-org/segmentation_models.pytorch
  • UNet++: Zhou et al., "UNet++: A Nested U-Net Architecture for Medical Image Segmentation", 2018.
  • EfficientNet-B7: Tan and Le, "EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks", 2019; ImageNet weights from EfficientNet-PyTorch (Apache-2.0).
  • SAM 3 (Meta): produced the first-generation masks the training targets descend from (see Training data).

Files

FolderFileUse
pytorch/best.pttraining checkpoint (model, EMA, optimizer); retraining
onnx/model.onnxLM3 default runtime (onnxruntime), opset 17
torchscript/model.torchscript.ptlibtorch
coreml/model.mlpackage/Apple devices
docs/compare_*.jpgexample panels (see Examples)

SHA-256 of every file is in manifest.json.

Training data

There is no hand-drawn ground truth for this task. The training targets are machine-generated masks, refined in three steps:

  1. Boxes to masks. Specimen boxes from the LeafMachine3 plant detection set prompt SAM 3; the per-box masks are unioned, holes filled, and failed masks gated out. 21,098 sheets kept.
  2. Self-training. A first UNet++ trained on those masks re-predicts every herbarium sheet; its cleaner predictions replace the SAM 3 masks. 2,193 field photographs are excluded as out of domain. 18,904 sheets.
  3. Paper removal. A color rule samples the mounting paper around each mask and deletes large in-mask regions that match it.

The result is dataset LM3_Specimen_Segmentation-specimen-unetMasksFromSam3-paperclean: 18,904 sheet images from 75 labeling projects, one plant class. Images and masks are not distributed.

SplitImages
train15,154
val1,910
test1,840

Training

34 epochs, batch 4, 1024 x 1024 letterbox, AdamW (lr 1e-4, weight decay 1e-4), cosine schedule, mixed precision, EMA. Loss: Dice + binary cross-entropy + 0.5 x boundary (Sobel edge) term. Augmentation: horizontal and vertical flips, 90-degree rotations, transpose, brightness/contrast 0.2, hue/saturation/value 10/15/10.

Evaluation

Scores are agreement with the machine-generated masks described above, not with human annotation. They measure how well the model reproduces its training targets on held-out sheets; a model that corrects a flawed target is penalized for it. Read them as a consistency check and judge quality from the examples.

SplitSheets scoredDice (mean)Dice (median)IoU (mean)
val, during training (best epoch)1,9100.946
val, exported ONNX150 of 1,9100.9410.9790.909
test, exported ONNX150 of 1,8400.9480.9770.916

The ONNX rows are random samples of each split, scored at native sheet resolution; 2% of test sheets and 3% of val sheets score below 0.5 Dice. Known weakness: faint, dried-brown material on similarly colored paper can be under-segmented.

Examples

Background removal on the same sheets by this model (UNet++) and by the two other LeafMachine3 specimen segmenters trained on the same data, BiRefNet and YOLO26x-seg, for comparison. Black marks what each model removed; the percentage is the share of the sheet kept. Raw model masks, before LeafMachine3's paper-removal follow-up. File names give each sheet's dataset split. Panels 1 to 12 are a standing comparison set that includes deliberately hard sheets (several from the training split); panels 13 to 20 are random held-out test sheets.

Use in LeafMachine3

Stage specimen_segmenter (no dependencies; runs on the whole working image, independent of the plant boxes). ONNX at 1024, sigmoid threshold conf (default 0.5), then the paper-removal follow-up (paperclean: true). One mask per specimen is stored; the Reporter draws it as Overlay_Specimen_Segmentation and exports it under Specimen_Masks (binary mask and RGB cutout).

from huggingface_hub import hf_hub_download
path = hf_hub_download("phyloforfun/lm3_specimen_segmenter__unetpp_effb7_1024", "onnx/model.onnx")

Citation

Weaver, W. N. (2026) LeafMachine3. https://leafmachine.org

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · segmentation-models-pytorch

Нельзя запустить

Библиотека «segmentation-models-pytorch» рантаймом не поддерживается.

Ревизия весов
15636b5

0 моделей