/ Модель

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

Лицензия
Своя лицензия
Библиотека
pyplatypus
Опубликована
27 сен 2026

platypus-weights

Сегментация изображенийИзображение → mask3 профессии

Набор весов pyplatypus и rplatypus для сегментации изображений и связанных задач компьютерного зрения, в том числе на медицинских снимках.

0скачиваний за 30 дней1лайквеса обновлены8 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

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

maju116/platypus-weights — набор обученных весов для библиотек pyplatypus и rplatypus, предназначенных для сегментации изображений и обнаружения объектов. Репозиторий содержит веса с сопутствующими JSON-файлами, описывающими назначение и обучающие данные; конкретный пример в карточке использует модель U-Net для предсказания масок, а также упомянуты веса для других наборов данных и задач медицинской визуализации.

Модель применяется для сегментации объектов на изображениях, включая медицинские изображения и микроскопию; примеры в метаданных охватывают сосуды сетчатки, клетки и фетальную биометрию. Веса загружаются по имени, закреплённому за коммитом репозитория. Метаданные указывают библиотеку pyplatypus, формат safetensors и задачу image-segmentation. Для весов HC18 заявлена лицензия CC BY 4.0; общая лицензия всего набора указана как other, поэтому условия конкретных весов следует сверять с их карточками и сопутствующими файлами.

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

  • сегментация сосудов сетчатки на снимках глазного дна
  • сегментация клеток на микроскопических изображениях
  • сегментация структур на медицинских изображениях
  • измерение окружности головы плода по УЗИ
  • сегментация и обнаружение объектов на подготовленных наборах изображений

Ограничения

Это набор весов для библиотек pyplatypus и rplatypus, а не универсальная модель: применимость зависит от конкретного файла весов и соответствующих ему данных и настроек. Условия лицензии могут различаться между весами; для HC18 указана CC BY 4.0.

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

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

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

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

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

Открыть на Hugging Face

platypus weights

Trained weights for pyplatypus and the rplatypus R package - segmentation and object detection. Every weights file has a .json beside it recording what it was trained for and on.

Weights are loaded by name, and a name is pinned to a commit of this repository, so it always means the same numbers:

from pyplatypus import Engine, from_dict

engine = Engine(from_dict({
    "data": {"train_path": "images/", "validation_path": "images/",
             "colormap": [[0, 0, 0], [255, 255, 255]]},
    "models": [{"name": "nuclei", "input_shape": [256, 256], "channels": 3, "n_class": 2,
                "blocks": 4, "filters": 16, "weights": "dsbowl-unet", "fit": False}],
}))
engine.fit()                      # loads the weights, trains nothing
masks = engine.predict("nuclei", split="validation")
library(rplatypus)

spec <- platypus_spec(
  data = segmentation_data("images/", "images/", colormap = binary_colormap),
  models = list(u_net("nuclei", input_shape = c(256, 256), blocks = 4, filters = 16,
                      weights = "dsbowl-unet", fit = FALSE))
)
masks <- predict(platypus_fit(spec), split = "validation")

Fetching by name needs pip install "pyplatypus[hub]". A local path to a downloaded file works without it, which is the route for machines with no internet access.

The licences differ per file, which is why the repository declares other. dsbowl-unet, dsbowl-instances and bccd-yolo3 are MIT. fives-unet and hc18-unet are CC BY 4.0, because FIVES and HC18 are, and weights trained on them are plausibly a derivative work - attribution travels with those. Each file's .json carries its own weights_licence, and each section below says so.


dsbowl-unet

A plain U-Net that separates cell nuclei from background in light microscopy images.

ArchitectureU-Net, 4 blocks, 16 base filters
Input256 × 256, 3 channels
Output2 classes: background, nucleus
Parameters1,942,594
File7.8 MB, safetensors
LossCCE-Dice

What it was trained on

BBBC038v1, the 2018 Data Science Bowl image set, stage1_train, from the Broad Bioimage Benchmark Collection. 670 images of nuclei in varied cell types, magnifications and imaging modalities, split 536 / 134 by image with seed 1.

The data is CC0: "the various contributors of the imagesets have waived all copyright and related or neighboring rights to BBBC038v1". Taken from the Broad rather than from the Kaggle mirror on purpose — the images are the same, but the Kaggle copy is governed by competition rules accepted at download, and weights are a derivative of the data behind them.

Citation, which CC0 does not require and which is owed anyway:

Caicedo et al., Nucleus segmentation across imaging experiments: the 2018 Data Science Bowl, Nature Methods, 2019. Image set BBBC038v1, Broad Bioimage Benchmark Collection.

How it scores

On the 134 held-out images, per image rather than pooled:

metricmeansdmedianminmax
Dice0.92050.05320.93140.72400.9861
IoU0.85700.08650.87160.56750.9725

The minimum is there deliberately. A mean of 0.92 with a worst case of 0.72 is a different model from a mean of 0.92 with a worst case of 0.90, and only one of those numbers tells you which you have. The five worst images are listed in dsbowl-unet.json.

Why a U-Net, and not one of the others

pyplatypus builds four architectures from one specification, so the question was settled by running all four on this data - same split, same augmentation, same 60 epochs, one command:

modelparameterss/epochepochsDice meansdmedianmin
U-Net1,942,59415.5600.92170.0540.93530.7227
U-Net++2,263,73018.8440.92120.0550.93230.7459
LinkNet1,746,75414.0600.92030.0530.92930.7205
Res-U-Net2,029,68214.2550.91870.0580.92930.6706

The spread across all four is 0.0030. The spread across images within any one of them is 0.054. The architectures are eighteen times closer to each other than the images are, which means they are not distinguishable on this data.

One number makes it plainer. These published weights score 0.9205; the U-Net in the table, same configuration and a different random seed, scored 0.9217. That 0.0012 of seed noise is 40% of the entire spread between the four architectures — switching from LinkNet to U-Net++ buys about what re-running the same model buys.

So only one set of weights is published, and the choice of U-Net is arbitrary but measured. If you are deciding where to spend effort on a problem like this one, the table says it is not on the architecture: more data, better augmentation or a longer run will all move the number further than swapping the decoder.

Reproduce it with python examples/compare_dsbowl_architectures.py.

What it does not do

It does not separate touching nuclei. This is semantic segmentation: every nucleus pixel gets the same class, so two nuclei in contact come back as one region. The 2018 Data Science Bowl was scored on instances, and the numbers above are not comparable to that leaderboard — they answer "which pixels are nuclei", not "how many nuclei are there". If you need counts, or per-nucleus measurements, you need an instance step on top (watershed on a distance transform is the usual starting point) and these weights are a reasonable input to it, not a replacement for it.

It has seen one collection. BBBC038v1 is varied by design, which is the point of the challenge, but generalisation was measured on a held-out split of the same collection and nothing else. On a microscope or a stain unlike anything in it, measure before trusting.

It is an alpha. pyplatypus is pre-1.0 and its API still moves. The weights will keep working - a pinned commit does not change - but the code that loads them may.

Reproducing it

pip install "pyplatypus[hub]"
python examples/publish_dsbowl_weights.py --out weights/

The script downloads BBBC038v1 from the Broad, splits it with the same seed, trains, measures per image, and writes the weights with this provenance in their sidecar. Trained on a GTX 1070: 60 epochs, about 15 seconds each.


dsbowl-instances

A U-Net trained to tell touching nuclei apart, on the same images as dsbowl-unet.

ArchitectureU-Net, 4 blocks, 16 base filters
Input256 × 256, 3 channels
Output3 channels: background, interior, rim - separation: rim, width 2
Parameters1,942,611
File7.8 MB, safetensors
LossCCE-Dice
LicenceMIT

What it was trained on

BBBC038v1, the 2018 Data Science Bowl's stage1_train: 670 light-microscopy fields with one mask per nucleus, 536 for training and the same 134 held-out cases dsbowl-unet reports, taken by case name. 5,999 ground-truth objects in that half, which is the number that says it is the same 134 - any other 134 directories would give a different count. CC0. Seed 0, 120 epochs, 102 minutes on one GTX 1070.

The per-object masks are what make this model possible and they say nothing about what kind of object it is: every nucleus is one class.

How it scores

Instance average precision on the 134 held-out images - objects matched to objects, averaged over ten IoU thresholds from 0.50 to 0.95 - one score per image:

decodingAPsdmedianworstobjects found
nearest_seed0.54450.25540.52750.0154 (538b7673)5,378 of 5,999
watershed0.53900.25320.52670.0136 (538b7673)5,378 of 5,999
connected_components0.48220.24400.45330.0066 (538b7673)4,914 of 5,999
Foreground Dice0.9118 - the mask all three rows share
Class Dice0.8542 - the training metric, a mean over the three channels

Name the decoding, or the number means nothing

These are one file of weights and three scores. The network predicts channels; turning them into objects is a separate step, the specification takes a list of decodings, and evaluate() returns a row per decoding on one forward pass - a second decoding of these 134 images costs 1.41 s against 102 minutes of training. The spread between the best and the worst row above is 0.0623, about seven times this configuration's run-to-run noise, so a score quoted from this card without its decoding is not a property of the weights.

connected_components is in that table as the yardstick rather than as a recommendation: it labels connected foreground and ignores the signal these weights were trained to carry, so touching nuclei come back as one object. The signal is therefore worth +0.0623 here. Substituting a perfect semantic mask into the same route is worth +0.2398, and a perfect mask through connected_components scores 0.7655 - the ceiling every row above sits under. The mask is the limit on this data by nearly four to one, and these weights do not change that.

A bigger model was measured and it is not the answer

The published run, and then three more with one field changed in each, 120 epochs every time:

foreground DiceAP (nearest_seed)
as published0.91180.5445
seed 1, nothing else changed0.91330.5527
filters: 32 instead of 160.90960.5435
ResNet-34 encoder, pretrained, 5 frozen epochs0.87700.4389

Doubling the filters moved the score by less than a tenth of the run-to-run spread. A pretrained ResNet-34 encoder lost 0.1053 - twelve times that spread - and lost the mask with it. Where the mask moved far enough to read at all, the score followed it at about 2.7 points of average precision per point of foreground Dice, against the 2.85 implied by substituting a perfect mask. Two ways of asking and one answer: effort spent on the mask pays here and effort spent on capacity does not.

What it does not do

  • One kind of object. Nuclei against background.
  • Trained at 256 × 256 on light microscopy. The dataset spans stains, magnifications and fluorescence, and a slide unlike anything in it is outside what was measured.
  • 621 objects of 5,999 are not found by the best row above, and 1,085 by the worst. An average precision is not a count, and counting nuclei with these weights means accepting that.
  • The number is one machine's. A seed reproduces a direction and not digits: the same configuration with the seed changed scored 0.0082 away, and the run-to-run spread recorded for this family is 0.009 - which is the spread every claim above is measured against, and a third of the band the publishing script refuses outside.

dsbowl-unet is the sibling to compare it with

The same dataset and the same 134 images, with one foreground class: it finds the nuclei and cannot tell two touching ones apart. These weights can, at the cost of a thinner interior - the rim band is carved out of the object. Choose by whether the answer you want is an area or a count.

Reproducing it

# BBBC038v1 is fetched by the script from the Broad's own address
python examples/publish_dsbowl_instance_weights.py --out weights/

The script re-draws nothing: it takes the split by case name, refuses to write anything unless all three decodings land within ±0.027 of the numbers above - two-sided, because a run far above that band is a different recipe than this section describes - and writes the sidecar, the per-case scores and this section's numbers. It uploads nothing.


bccd-yolo3

A YOLOv3 that finds red blood cells, white blood cells and platelets in blood-smear photographs.

ArchitectureYOLOv3, Darknet-53 backbone, 3 anchors per grid
Input416 × 416, 3 channels, letterboxed
Output3 classes: RBC, WBC, Platelets
Parameters61,534,504
File246 MB, safetensors
Anchorsfitted to this data, recorded in the sidecar

The anchors are not optional. A detector's weights decode boxes relative to the anchors they were trained with, so the same numbers read with other anchors produce boxes scaled by a fixed factor - plausible boxes, plausible scores, wrong places, and nothing in the output to say so. pyplatypus takes them from the sidecar when it loads, and refuses a specification that names its own.

What it was trained on

BCCD: 364 blood-smear photographs with 4,888 boxes, in the dataset's own train/validation/test split of 205 / 87 / 72. MIT licence, copyright 2017 shenggan, with the original images and annotations from cosmicad and akshaylamba, re-organised into Pascal VOC format.

Taken from that repository rather than the Kaggle mirror. The images are the same, but the Kaggle copy is governed by competition rules accepted at download, and weights are a derivative of the data behind them — the same reasoning as dsbowl-unet above.

The split is the dataset's own, which is the only reason these numbers can be compared with anybody else's on BCCD.

How it scores

On the 72 held-out test images, at IoU 0.5 and averaged over 0.50–0.95, with precision and recall read at confidence 0.5:

classAP@0.5IoU of matchestruthprecisionrecall
RBC0.79340.8108050.7150.793
WBC0.95870.849710.9221.000
Platelets0.81910.715690.5430.913
all0.85710.8058945

mAP@[.50:.95] is 0.5003. The gap between that and 0.8571 is localisation: the objects are found and the boxes fit them loosely, which mean_matched_iou says in one number instead of through the difference between two.

These are the median seed, and that matters here

Five runs of this exact recipe, differing only in the seed:

meansdminmax
mAP@0.50.86600.01590.85330.8868
mAP@[.50:.95]0.51590.01990.50030.5436
IoU of matches0.80410.00260.80020.8068

Published here is the median by mAP@0.5, not the best. The spread is wide enough that a single reported number would be whichever seed got chosen: the best run scores 0.8868, three points above this one, on the same code and the same data.

And one row of that table is six times steadier than another. How well the boxes fit barely varies between seeds; how many are found does. Which rank the model gives a borderline cell moves average precision and leaves the overlap alone. On a dataset this size, read mean_matched_iou first.

What it does not do

Platelets are the unreliable class, and that is where almost all of the variance lives. Across the five seeds:

classAP spreadIoU spread
RBC± 0.0100± 0.0048
WBC± 0.0052± 0.0049
Platelets± 0.0409± 0.0208

Platelets are small — a median side of 41 pixels against 103 for a red cell — and their boxes fit worst (IoU 0.715) and vary four to eight times more than the other two classes. Precision on them at confidence 0.5 is 0.543, meaning roughly half the platelets it reports are not there. If platelets are what you are counting, these weights are a starting point and not an answer.

It has seen one small collection. 205 training images of blood smears at one magnification, stained one way. BCCD is a demonstration dataset, not a clinical one, and generalisation was measured on its own held-out split and nowhere else.

It is not a diagnostic tool. Nothing about this was validated for clinical use, and a cell count from it is not a laboratory result.

About 0.1% of the training boxes could not be represented at all — 3 of 2,804. Two cells of similar shape whose centres land in the same grid cell share a target slot, so the second is dropped: never shown to the model, never counted as missed. At 416 on this data it is negligible, and pyplatypus reports the figure before training rather than after.

It is an alpha. The weights will keep working — a pinned commit does not change — but the code that loads them still moves, and detection is not in a released pyplatypus yet.

Reproducing it

# BCCD from https://github.com/Shenggan/BCCD_Dataset
python examples/detect_blood_cells.py --data path/to/BCCD --epochs 150 --seed 1 \
    --save weights/bccd-yolo3.safetensors

150 epochs, about 37 minutes on a GTX 1070. The script writes the YAML of the run beside its results, so the recipe in bccd-yolo3.json can be read back and run again.

fives-unet

A U-Net that segments the retinal vessel tree in colour fundus photographs.

ArchitectureU-Net, 4 blocks, 16 base filters
Input512 × 512, 3 channels, tiled over the 2048 × 2048 source
Output2 classes: background, vessel
Parameters1,942,594
File7.8 MB, safetensors
LossCCE-Dice
LicenceCC BY 4.0, not MIT - see below

What it was trained on

FIVES, the dataset's own split: 600 training and 200 test images, 50 of each of normal, AMD, diabetic retinopathy and glaucoma in the test set. Seed 1.

Images are 2048 × 2048 and the model sees 512 × 512 tiles. Scores below are measured on masks reassembled from the tiles, not on the tiles, because a vessel tree cut into quarters is not the structure the metric is asking about.

How it scores

On the 200 held-out images, one score per image:

meansdmedianworst
Dice0.87890.10510.90920.1055 (122_G)
IoU0.79560.12800.83350.0557 (122_G)
clDice0.87790.10990.90820.1343 (123_G)

The clDice row was re-measured on 2026-11-06 under 0.8.0a73, after 0.8.0a72 changed the soft skeleton's erosion to the cross the reference implementation uses. The Dice and IoU rows are unchanged and reproduce to seven decimals from the same weights, which is what says this is one metric's definition moving rather than a different scoring pass.

And it is measured at 12 skeleton peels, which is not the engine's default of 5. At the default this same file scores 0.7971, which is 0.0809 lower - so the figure above cannot be reproduced from the weights alone, and the sidecar states the parameter in cldice_iterations beside the engine in cldice_measured_with. 12 is the example's own setting, argued there against vessels a few pixels across; it is not a better number, it is a different question, and a clDice quoted off this card without the peel count means nothing.

clDice is there because Dice on a vessel tree rewards filling in thick vessels and barely notices a broken thin one. It measures the overlap of the skeletons instead.

Read the per-disease table with the quality grading beside it

all imagessdn graded cleangraded cleansd
AMD0.91070.0518420.92290.0413
diabetic retinopathy0.88180.0671360.90560.0396
glaucoma0.83470.1774220.93150.0219
normal0.88840.0556330.90060.0341

The left-hand column is not a finding about disease. FIVES ships a quality grading - every image rated for illumination and contrast, blur, and low contrast - that nothing in the training pipeline uses, and 14 of the 15 test images flagged for low contrast are glaucoma. Joined to the scores it inverts the reading:

nDicesd
graded clean on all three axes1330.91410.0380
flagged on at least one670.80890.1515

That gap - 0.1052 of Dice - is larger than the 0.0761 between the best and worst disease over all images, and larger again than the 0.0309 between them once the flagged images are set aside. glaucoma is the weakest group over all images and normal over the clean ones, so a per-disease number taken off this card is a statement about picture quality as much as about pathology. A clinical conclusion drawn from the left-hand column would be wrong.

The five worst images are 122_G 0.11, 123_G 0.14, 136_G 0.52, 119_G 0.58, 153_N 0.65 - four of the five glaucoma, and the two below 0.15 are both flagged for low contrast.

What it does not do

It is not a diagnostic tool. Nothing here was validated for clinical use. A vessel mask from it is not a measurement of anybody's retina.

Vessels, not lesions. One foreground class, the vessel tree. It says nothing about haemorrhages, exudates, the optic disc or the fovea.

It was trained on tiles. Predicting a resized 512 × 512 whole image instead of tiling gives vessels about a quarter the width the model was trained on, and the score falls.

The digits are one machine's. A seed gives identical results to twelve decimal places on a processor and differs in the fourth on a card, so these numbers reproduce in direction and not in digits. trained_with in the sidecar records the engine version.

It is an alpha, like the other two: the weights keep working, because a pinned commit does not change, but the code that loads them still moves.

The licence is CC BY 4.0, which the other two are not

FIVES is published under CC BY 4.0. These weights are plausibly a derivative work of it, so attribution travels with them and the sidecar carries the citation, the source and weights_licence. dsbowl-unet was trained on CC0 data and bccd-yolo3 on MIT, so neither constrained anything.

Jin et al., FIVES: A Fundus Image Dataset for Artificial Intelligence based Vessel Segmentation, Scientific Data 9, 475 (2022). figshare 19688169.

Reproducing it

# FIVES from the figshare link above, unpacked so that the four disease folders are under it
python examples/publish_fives_weights.py --data path/to/FIVES --out weights/

40 epochs asked for, stopped by early_stopping at epoch 24 with the best epoch restored, 3.7 hours on a GTX 1070. The script writes the sidecar and this section's numbers; it uploads nothing.


hc18-unet

A U-Net that segments the fetal skull in 2D ultrasound, trained on HC18, for measuring head circumference in millimetres. 597 training images, 199 validation and 199 test, divided by examination rather than by row: the dataset contains several images of the same echoscopic examination, and a row-wise split puts near-duplicates on both sides of it.

The headline here is not an overlap score, and that is deliberate.

whatvalue
median absolute error against the sonographer's measurement2.44 mm
mean absolute error against it3.84 mm
75th and 90th percentile4.63 mm, 7.23 mm
bias against it+1.46 mm
worst case48.07 mm
mean absolute error against the truth mask's own circumference3.41 mm
bias against it+0.33 mm
mean Dice (foreground)0.9494
worst Dice0.6135

The median and the mean are both here because they disagree. The error distribution has a long tail - half the cases are inside 2.44 mm and a tenth are outside 7.23 mm - so the mean describes the tail rather than a typical case, and the median alone would hide that some cases are out by the width of a head. Read the worst case as the reason this model is not a measuring instrument without a human looking at it.

Two references, and both belong here. The first pair is against what the sonographer recorded, which is what somebody acting on the number sees; it carries +0.69 mm that belongs to the dataset rather than to this model. HC18's annotation is a drawn curve 2.52 px wide and the training masks are that curve filled, so every mask is half a line width outside the ellipse the sonographer drew: pi * w * pixel predicts +0.69 mm against the +0.69 measured by putting the truth masks through this same pipeline, a correlation of 0.9994 over 200 cases with 0.008 mm left unexplained. The second pair is against the circumference of the truth mask - the same arithmetic on both sides - and is therefore this model's own contribution.

Do not choose these weights on the Dice

The two columns rank the same cases differently: Spearman 0.15 between the ordering by Dice and the ordering by absolute millimetre error. Of the 144 test cases scoring 0.95 or better - a figure anybody would publish - 85 are still wrong by more than 2 mm (59%), the worst of them 575_HC at Dice 0.9531 and +9.13 mm. The best decile by Dice averages 0.9864 and still has a mean absolute error of 2.15 mm, worst 3.59 mm.

And the magnitude of that disagreement is one draw. The same recipe was run 3 times and the Spearman moved from 0.62 to 0.15. The direction holds in all 3 - every one of them is far from 1, and every run that counted the share found tens of publishable cases wrong by more than 2 mm - so read this section as the two orderings disagree rather than as any one number.

runmean DiceSpearmanof the publishable, over 2 mm
the run measure_fetal_head_circumference.py measures0.93470.62not counted
a second run, nothing changed, refused by the floor0.94180.4343%
the run published here0.94940.1559%

Which way it moves is worth the sentence: the better the Dice, the less it orders anything, which is what a rank statistic does when the thing it ranks has a narrower spread. 3 runs is a direction and not a law, and the published row is the one this card's figures come from.

Why: a ragged boundary barely moves an integral over the region, and a mask that is systematically fat or thin moves it linearly. Those are the two errors Dice is respectively most and least able to see, and they are the wrong way round for anybody measuring a length.

Measuring with them

Predict on the source grid and measure there. The pixel size is a property of the file, so a prediction resized to this model's input shape has pixels of a size nobody recorded, and multiplying by the file's number would be wrong by the ratio of the two shapes.

from pyplatypus import ellipse_circumference

for case, prediction in engine.predict_stream("skull", split="test", space="source"):
    mask = prediction.argmax(axis=-1) == 1
    mm = ellipse_circumference(mask, spacing=(pixel_mm, pixel_mm))

From R, the same thing is ellipse_measure(mask, spacing = c(px, px)).

Data and licence

HC18, CC BY 4.0 (https://zenodo.org/records/1327317). These weights are released under CC BY 4.0 rather than MIT because the data is, and attribution travels with them.

van den Heuvel, de Bruijn, de Korte and van Ginneken, Automated measurement of fetal head circumference using 2D ultrasound images, PLoS ONE 13(8), e0200412 (2018). Zenodo 10.5281/zenodo.1327317.

Trained with pyplatypus 0.8.0a39, 40 epochs, 32 minutes on one GTX 1070.

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

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

GPU в ailist

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

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

В репозитории нет config.json: не понять архитектуру модели.

Ревизия весов
d342f3a

0 моделей