Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Machine learning model training

Machine learning model training is teaching a network from labeled scans — data, annotation, architecture, then the knobs (learning rate, batch, loss) — so it returns a label, a box, or a mask on a study it has not seen. It is not deployment. It is not evaluation.

How you ship the trained file (Docker, API, monitor) is machine learning model deployment. How you know the model is good (metrics, k-fold, leakage) is machine learning model evaluation. The product page at /model-training/ is a service blurb, not this guide. Preprocess and augment as real code live on the MONAI how-tos, not here.

Deploying medical AI beyond a notebook?

Use PYCAD’s medical AI deployment checklist to scope data, validation, inference architecture, monitoring, and product integration before launch.

Open the medical AI deployment checklist

Data first, then the net

A fancy architecture on one vendor’s MRI is a demo. Training data has to cover the machines, sites, and people the model will see. Multi-vendor, multi-site, mixed protocols. A net trained only on GE will miss or over-call on Siemens. That is a dataset problem, not a “robustness module.”

Annotation is the teaching signal. A radiologist traces a tumor on the slices; a guideline says what counts as tumor versus edema. Ambiguous rules become noisy labels. Use a 3D tool for a 3D task — a 2D box-labeler on a volume is the wrong instrument. Write the rule, label a batch, review disagreements, revise the rule. That loop is the job.

Prep and split

Raw scans are not a batch. Intensity varies by vendor. Native sizes vary by modality. Standardize before the first epoch:

  • Normalize intensities so the net learns anatomy, not a GE versus Siemens histogram.
  • Resize to a fixed input — 512×512 is a common 2D starting point. Volumes need spacing and orientation too.
  • Augment so it does not memorize pose: ±10° rotate, horizontal flip when the anatomy allows it, small brightness / contrast jitter.

The MONAI code for that is elsewhere: preprocessing 3D volumes, 3D augmentation, and the broader data-preprocessing explainer. This page does not restate those tutorials.

Then split. A working default is 80 / 10 / 10 — train / validation / test — split by patient, not by slice. Slices from the same study in both train and test is leakage. The test set is used once, after you stop tuning. The validation set is for the knobs. Evaluation of those numbers is the next article, not a second training URL.

Pick the architecture for the output

Classification (one label for the study or the region) is a different head from segmentation (a pixel mask). Do not force U-Net onto a “pneumonia / not” label, and do not force ResNet onto a tumor outline.

Architecture Job Why people pick it Typical imaging use
ResNet Classification Skip connections let you train a deep net without the loss dying Chest X-ray label, DR grade
EfficientNet Classification Depth / width / resolution scaled together; fewer parameters for a given score Dermoscopic lesion class when GPU memory is tight
U-Net Segmentation Encoder–decoder with skips: context plus localization Tumor or organ mask on CT / MRI
VGGNet Classification / features Simple stack; a baseline, not a 2026 default Feature extract or a sanity-check model

Transfer versus from scratch. From-scratch on medical volumes wants a pile of labeled studies and a pile of GPU hours. Transfer learning starts from ImageNet (or a medical pretrain) and fine-tunes on your labels. For most clinic projects that is the default: the net already knows edges and textures; you teach it the finding.

The knobs that actually move the loss

  • Learning rate. 0.001 is a common Adam start. Too high and the loss jumps; too low and it crawls. A scheduler that drops the rate as you go is the usual fix, not a new architecture.
  • Batch size. 16 or 32 is a typical medical-image start. Larger is more stable and hungrier for VRAM.
  • Epochs and early stopping. One pass through the train set is an epoch. Stop when the validation loss stops improving. Extra epochs after that are memorization.
  • Optimizer. Adam is the default that works. SGD with momentum can beat it on some tasks; it wants more learning-rate care.
  • Loss. Classification: cross-entropy. Segmentation of a small lesion on a large volume: Dice, or Dice plus cross-entropy. Rare positives: focal loss, so the easy negatives do not dominate.

Those are the training-loop facts. There is no listing on this page. A paper training-cost figure is not a reason to pick Adam.

Then you measure, then you ship

Training stops when the validation curve says so. The held-out test set is scored on machine learning model evaluation — precision / recall / Dice, k-fold, patient-aware splits. After that, the file becomes a service on machine learning model deployment (container, API, drift). This page does not become a second deploy guide because the last step is “then you deploy.”

What this page is not

  • Not evaluation. Metrics and k-fold live on the evaluation URL. A short sensitivity reminder is not a second “is it good” article.
  • Not deployment. Docker, FastAPI, and monitoring live on the deployment URL.
  • Not preprocess. Intensity, spacing, and 3D augment are the 667 tutorials and the 680 prep explainer.
  • Not a market forecast. Dataset-market CAGRs and foundation-model training bills are not this page.

PYCAD builds the imaging side of this — annotation pipelines and training when the study has to become a clinic model. Case studies.

We build custom medical imaging platforms — advanced DICOM viewers, AI segmentation, and the clinical systems around them.

Get in Touch

Copyright © 2026 PYCAD. All Rights Reserved.