Package: rplatypus 0.2.1

Michal Maj

rplatypus: Computer Vision for Medical Imaging

Semantic segmentation and object detection for medical images, from a folder of pictures to a trained model and a figure, in a handful of lines or one configuration file. Architectures, losses and training run on 'PyTorch' through 'pyplatypus', a 'Python' package which is installed and isolated automatically; nothing has to be set up by hand. R keeps the parts that make an analysis fast - reading and combining masks, drawing boxes, plotting, comparing models.

Authors:Michal Maj [aut, cre]

rplatypus_0.2.1.tar.gz
rplatypus_0.2.1.zip(r-4.7-any)rplatypus_0.2.1.zip(r-4.6-any)
rplatypus_0.2.1.tar.gz(r-4.7-any)rplatypus_0.2.1.tar.gz(r-4.6-any)
rplatypus_0.2.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
rplatypus/json (API)

# Install 'rplatypus' in R:
install.packages('rplatypus', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/maju116/rplatypus/issues

Pkgdown/docs site:https://maju116.github.io

On CRAN:

Conda:

3.65 score 18 scripts 95 exports 27 dependencies

Last updated from:3bd95253d5. Checks:6 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK175
source / vignettesOK211
linux-releaseOK195
windows-develOK86
windows-releaseOK113
wasm-releaseOK114

Exports:augmentation_stepavailable_callbacksavailable_lossesavailable_metricsavailable_modelsavailable_optimizersavailable_tasksavailable_transformsavailable_weightsbinary_colormapbinary_labelscallback_cosine_annealingcallback_csv_loggercallback_early_stoppingcallback_model_checkpointcallback_reduce_lr_on_plateaucallback_swacallback_terminate_on_nanclasses_to_colourscolours_to_classesct_windowsdecode_connected_componentsdecode_follow_flowsdecode_nearest_seeddecode_watersheddetection_anchorsdetection_cropsdetection_datadrawing_styleevaluateevaluate_casesevaluate_classesevaluate_imagesexport_weightsinspect_masksinstance_datalinknetloss_boundaryloss_cceloss_cce_diceloss_comboloss_diceloss_focalloss_focal_tverskyloss_iouloss_l1loss_lovaszloss_mseloss_smooth_l1loss_tverskymask_coveragemask_volumemetric_cldicemetric_dicemetric_ioumetric_tverskyoptimizer_adadeltaoptimizer_adagradoptimizer_adamoptimizer_adamaxoptimizer_adamwoptimizer_nadamoptimizer_rmspropoptimizer_sgdoverlay_agreementoverlay_maskplatypus_deviceplatypus_fitplatypus_specplatypus_statusplatypus_use_torchplot_anchorsplot_boxesplot_masksread_imagesread_masksread_recordres_u_netsave_maskssave_specsave_volumessegmentation_dataseparation_flowsseparation_rimseries_reportsplit_datasetsplit_pathtraining_historyu_netu_net_plus_plusunite_masksvoc_colormapvoc_labelsvolume_infoyolo3

Dependencies:clicpp11farverggplot2gluegtablehereisobandjsonlitelabelinglatticelifecycleMatrixpngR6rappdirsRColorBrewerRcppRcppTOMLreticulaterlangrprojrootS7scalesvctrsviridisLitewithr

Finding blood cells with YOLOv3
Before any of that: boxes in a few lines | And here, unlike the nuclei vignette, a score means something | One refusal worth meeting now | Anchors, which a detector has and a U-Net does not | What the loss is doing | Scoring, and the number that is missing on purpose | [email protected], mAP@[.50:.95], and which to believe | Looking at it | What this does not do | Notes on the machine

Last update: 2026-11-04
Started: 2026-11-04

Finding nuclei in the 2018 Data Science Bowl
Before any of that: a mask in four lines | The data | Look at it before training on it | The specification | Train | Compare | Look at what it did | The same thing from a file | A note on older graphics cards

Last update: 2026-11-04
Started: 2026-11-04

Retinal vessels: tiling, and a metric Dice cannot replace
Why a vessel cannot be resized | The data | The configuration | Training | One number hides the finding | clDice beside Dice | The worst case, drawn | Notes

Last update: 2026-11-04
Started: 2026-11-04

Segmenting volumes: CT, spacing and per-patient scores
Making something to segment | Splitting by patient, not by scan | The specification | Training | Scores per patient, not per dataset | Looking at a slice | Millilitres, not voxels | Writing a mask back onto its scan | DICOM, which is how the data usually arrives | What this leaves out

Last update: 2026-11-04
Started: 2026-11-04

Writing a configuration
One file, one run | Several models at once | Dividing one folder | Augmentation, callbacks, and the rest of a model | Instances instead of one mask | Detection instead of segmentation | Not training at all | What is checked, and when | The same run from code

Last update: 2026-11-04
Started: 2026-11-04

Readme and manuals

Help Manual

Help pageTopics
Turn a specification back into plain R dataas.list.platypus_spec
An augmentation stepaugmentation_step
What this package can do, asked of the packageavailable_callbacks available_components available_losses available_metrics available_models available_optimizers available_tasks
Which augmentations are availableavailable_transforms
The published weights, and what they areavailable_weights
Average the weights over the last part of the runcallback_swa
Callbackscallbacks callback_cosine_annealing callback_csv_logger callback_early_stopping callback_model_checkpoint callback_reduce_lr_on_plateau callback_terminate_on_nan
Paint a mask with its colormapclasses_to_colours
Colormaps and their labelsbinary_colormap binary_labels colormaps voc_colormap voc_labels
Read a colour mask back to class indicescolours_to_classes
The named CT windowsct_windows
How predicted channels become objectsdecode_connected_components decode_follow_flows decode_nearest_seed decode_watershed decodings
The anchors a detector used, and whether they were fitteddetection_anchors
Cut every detection out of the image it was found indetection_crops
Where the images and their annotation files aredetection_data
The decisions a drawing makesdrawing_style
Pretrained encoders, and what they are worthencoders
Compare the trained modelsevaluate evaluate.platypus_fit
Score every case separatelyevaluate_cases evaluate_cases.platypus_fit summary.platypus_cases
Average precision per classevaluate_classes evaluate_classes.platypus_fit
Score every image separatelyevaluate_images evaluate_images.platypus_fit
Save a trained model's weightsexport_weights
What the colormap or labels match in your masksinspect_masks
Data for instance segmentation: tell the objects apart, not just find theminstance_data
A loss that knows how far a wrong voxel is from the truthloss_boundary
Loss functionslosses loss_cce loss_cce_dice loss_combo loss_dice loss_focal loss_focal_tversky loss_iou loss_l1 loss_lovasz loss_mse loss_smooth_l1 loss_tversky
How much of each class a mask coversmask_coverage
How much of a volume a class occupies, in millilitresmask_volume
Metricsmetrics metric_cldice metric_dice metric_iou metric_tversky
Segmentation modelslinknet models res_u_net u_net u_net_plus_plus
Optimisersoptimizers optimizer_adadelta optimizer_adagrad optimizer_adam optimizer_adamax optimizer_adamw optimizer_nadam optimizer_rmsprop optimizer_sgd
Where a prediction and the truth disagreeoverlay_agreement
Lay a mask over the image it belongs tooverlay_mask
When something is wrong: the conditions this package raisesplatypus_conditions
Where the work will happenplatypus_device
Train the models in a specificationplatypus_fit
Build an experiment specificationplatypus_spec
Is the engine ready?platypus_status
Ask for a particular PyTorch buildplatypus_use_torch
Draw the anchors against the boxes they were fitted toplot_anchors
Draw boxes on imagesplot_boxes
Look at masks beside the images they came fromplot_masks
Plot what happened during trainingplot.platypus_fit
Predict maskspredict.platypus_fit
Read images as the model sees themread_images
Read mask files as class indicesread_masks
Read what a run wrote down about itselfread_record
Write masks to filessave_masks
Write a specification back out as YAMLsave_spec
Save predicted volumes as NIfTIsave_volumes
Where the images and masks aresegmentation_data
What the network predicts, so objects can be told apartseparations separation_flows separation_rim
Check folders of DICOM slices before training on themseries_report
Split a dataset into training, validation and test setssplit_dataset
The files in one part of a splitsplit_path
The epoch-by-epoch recordtraining_history
Combine several binary masks into oneunite_masks
What is in a volume filevolume_info
YOLOv3yolo3