Skip to content
ModelListedExternal
Download

Pseudo Nitzschia Yolo11s Seg

A YOLO11s instance segmentation model fine-tuned to detect and count individual Pseudo-nitzschia cells within chain colonies in Imaging FlowCytobot (IFCB) images.

KindOtherVersionRevision 0ac42b1

Model source

Kind
Other
File size
19.5 MB
Version
vRevision 0ac42b1
Updated
Sep 15, 2026
Downloads
16
Source
Hugging Face

Source description

Pseudo-nitzschia Cell Counter — YOLO11s-seg

A YOLO11s instance segmentation model fine-tuned to detect and count individual Pseudo-nitzschia cells within chain colonies in Imaging FlowCytobot (IFCB) images.

Try it out: Interactive demo on HF Spaces

Performance

MetricBoxMask
Precision0.9830.983
Recall0.9650.965
mAP500.9760.973
mAP50-950.7060.659

Trained for 100 epochs on Apple MPS (M-series GPU). Training time: ~1.5 hours.

Training Curves

Training Results

Confusion Matrix

Confusion Matrix

Quick Start

from ultralytics import YOLO
from huggingface_hub import hf_hub_download

# Download model
model_path = hf_hub_download("patcdaniel/pseudo-nitzschia-yolo11s-seg", "best.pt")
model = YOLO(model_path)

# Run inference
results = model("image.png", conf=0.25)

# Count cells
for r in results:
    n_cells = len(r.masks) if r.masks is not None else 0
    print(f"Detected {n_cells} cells")

Training

1. Download the dataset

huggingface-cli download patcdaniel/pseudo-nitzschia-cell-segmentation \
    --repo-type dataset --local-dir ./dataset

2. Train

python scripts/train_yolo.py \
    --config configs/cell_seg.yaml \
    --model yolo11s-seg.pt \
    --epochs 100 \
    --batch 24 \
    --name pn_cell_seg_yolo11s

3. Evaluate

python scripts/inference.py \
    --weights runs/segment/pn_cell_seg_yolo11s/weights/best.pt \
    --source dataset/data/images/ \
    --conf 0.25 \
    --save_viz

Model Details

  • Architecture: YOLO11s-seg (Ultralytics)
  • Base weights: yolo11s-seg.pt (COCO pre-trained)
  • Input size: 640x640
  • Classes: 1 (Pseudo_nitzschia_cell)
  • Parameters: ~11.8M
  • Model size: 20 MB

Training Hyperparameters

ParameterValue
Epochs100
Batch size24
Image size640
Optimizerauto (SGD)
Initial LR0.01
Final LR factor0.01
Weight decay0.0005
Warmup epochs3.0
Patience (early stopping)30
IoU threshold (NMS)0.7
Augmentationhsv, translate, scale, fliplr, erasing

Repository Structure

├── best.pt              # Model weights
├── configs/
│   └── cell_seg.yaml    # Dataset config (relative paths)
├── scripts/
│   ├── train_yolo.py    # Training script
│   ├── inference.py     # Inference & cell counting
│   ├── prepare_dataset.py
│   ├── coco_to_yolo_seg.py
│   ├── utils.py
│   ├── sample_inference.py
│   └── run_inference_on_dataset.py
├── results/             # Training metrics & curves
├── args.yaml            # Full training arguments
└── requirements.txt

Dataset

Trained on patcdaniel/pseudo-nitzschia-cell-segmentation — 302 annotated IFCB images from IFCB104 (Santa Cruz Municipal Wharf).

Citation

@model{pseudo_nitzschia_yolo11s_seg,
  author = {Daniel, Patrick C.},
  title = {Pseudo-nitzschia Cell Counter — YOLO11s-seg},
  year = {2025},
  publisher = {Hugging Face},
  url = {https://huggingface.co/patcdaniel/pseudo-nitzschia-yolo11s-seg}
}

Sources

1 source
Hugging FacePrimaryVersion 0ac42b152b3ab3ab86a4c408820f85240959aa4c
huggingface.co/patcdaniel/pseudo-nitzschia-yolo11s-seg/tree/0ac42b152b3ab3ab86a4c408820f85240959aa4c

Verified Sep 15

Model artifacts

1 artifact

best.pt

pt · 19.5 MB · SHA-256 9bbaeb8e93d6…7058 · Hugging Face

Download

Source excerpts

2 excerpts

--- license: mit tags: - yolo - ultralytics - instance-segmentation - object-detection - phytoplankton - pseudo-nitzschia - ifcb - cell-counting - marine-biology pipeline_tag: image-segmentation datasets: - patcdaniel/pseudo-nitzschia-cell-segmentation --- # Pseudo-nitzschia Cell Counter — YOLO11s-seg A YOLO11s instance segmentation model fine-tuned to detect and count individual *Pseudo-nitzschia* cells within chain colonies in Imaging FlowCytobot (IFCB) images. **Try it out:** [Interactive demo on HF Spaces](https://huggingface.co/spaces/patcdaniel/pseudo-nitzschia-counter) ## Performance | Metric | Box | Mask | |--------|-----|------| | Precision | 0.983 | 0.983 | | Recall | 0.965 | 0.965 | | mAP50 | 0.976 | 0.973 | | mAP50-95 | 0.706 | 0.659 | Trained for 100 epochs on Apple MPS (M-series GPU). Training time: ~1.5 hours. ### Training Curves ![Training Results](results/results.png) ### Confusion Matrix ![Confusion Matrix](results/confusion_matrix.png) ## Quick Start ```python from ultralytics import YOLO from huggingface_hub import hf_hub_download # Download model model_path = hf_hub_download("patcdaniel/pseudo-nitzschia-yolo11s-seg", "best.pt") model = YOLO(model_path) # Run inference results = model("image.png", conf=0.25) # Count cells for r in results: n_cells = len(r.masks) if r.masks is not None else 0 print(f"Detected {n_cells} cells") ``` ## Training ### 1. Download the dataset ```bash huggingface-cli download patcdaniel/pseudo-nitzschia-cell-segmentation \ --repo-type dataset --local-dir ./dataset ``` ### 2. Train ```bash python scripts/train_yolo.py \ --config configs/cell_seg.yaml \ --model yolo11s-seg.pt \ --epochs 100 \ --batch 24 \ --name pn_cell_seg_yolo11s ``` ### 3. Evaluate ```bash python scripts/inference.py \ --weights runs/segment/pn_cell_seg_yolo11s/weights/best.pt \ --source dataset/data/images/ \ --conf 0.25 \ --save_viz ``` ## Model Details - **Architecture:** YOLO11s-seg (Ultralytics) - **Base weights:** `yolo11s-seg.pt` (COCO pre-trained) - **Input size:** 640x640 - **Classes:** 1 (`Pseudo_nitzschia_cell`) - **Parameters:** ~11.8M - **Model size:** 20 MB ### Training Hyperparameters | Parameter | Value | |-----------|-------| | Epochs | 100 | | Batch size | 24 | | Image size | 640 | | Optimizer | auto (SGD) | | Initial LR | 0.01 | | Final LR factor | 0.01 | | Weight decay | 0.00...

Source context: 16 downloads · 0 likes · Pipeline image-segmentation · Library ultralytics · Repo patcdaniel/pseudo-nitzschia-yolo11s-seg