A convolutional neural network (CNN) is a neural net built for grids: a small kernel slides across an image, detects local patterns, and stacks those detections into a label, a box, or a mask. It is not a vision transformer. It is not “machine learning for medical imaging” as a field.
If you meant CNN vs ViT on medical images → CNNs or ViT for medical imaging. If you meant what imaging ML returns (mark / mask / score) → machine learning for medical imaging. If you meant how you check a trained model → machine learning model evaluation.
PYCAD builds custom web DICOM viewers and imaging models. This page is the architecture, not a product.
The three stations
| Layer | What it does | What you have after |
|---|---|---|
| Convolution | A small kernel (often 3×3) multiplies a neighborhood, then steps. Each kernel is one pattern: an edge, a texture, later a shape | A feature map: where that pattern fired |
| Pooling | Usually max-pool: keep the strongest value in a 2×2 window. Shrinks the map | Fewer pixels, some shift invariance. The exact location is fuzzier |
| Fully connected / head | Takes the stacked maps and writes a vector: class scores, box coords, or (in a U-Net) a full-resolution mask | The thing you evaluate |
A dense net flattens the image into one long vector and throws the grid away. A CNN keeps the grid. Neighboring pixels stay neighbors. That is why a CNN is cheaper on a 512×512 film than a fully connected net of the same depth, and why it is the default backbone for 2D X-ray and 3D CT / MRI.
A non-linear activation (ReLU is the usual one) sits after the convolution so stacked layers can represent more than a single linear filter. Without it the whole stack collapses to one matrix multiply.
How it learns
Three steps, repeated on labeled images:
- Forward. Pixels go through the stack. The head guesses.
- Loss. A number for how wrong the guess was (cross-entropy for a class, Dice / cross-entropy for a mask).
- Backprop. That error is sent backward. Each kernel weight is nudged a little. An optimizer (SGD, Adam) owns the step size.
A new net guesses at random. After enough labeled studies the kernels become edge detectors, then texture detectors, then task detectors. How you trust that number on a new hospital’s scanner is model evaluation, not this page.
Landmark architectures
| Name | Year | What it added | Usual citation task |
|---|---|---|---|
| LeNet-5 | 1998 | Conv + pool as a working stack | Handwritten digits (MNIST) |
| AlexNet | 2012 | Depth, ReLU, GPU training. ImageNet top-5 error 15.3% vs 26.2% for the previous winner (Krizhevsky et al.) | ImageNet classification |
| VGG | 2014 | Stacked 3×3 convs, simple and deep | Recognition; a common feature backbone |
| GoogLeNet | 2014 | Inception: several kernel sizes in one block | ImageNet, fewer parameters than a plain stack |
| ResNet | 2015 | Skip connections so a 50–150 layer net can train. ImageNet top-5 around 3.6% (He et al.) | The default residual backbone |
U-Net (2015, Ronneberger et al.) is the medical fork: an encoder–decoder with skips so the output is a mask the same size as the input, not a single class. That is the architecture most organ-segmentation papers still start from. The methods page is medical image segmentation.
On medical images
2D CNNs sit on X-ray, fundus, mammography, a single CT slice. 3D CNNs (and 3D U-Nets) sit on CT / MRI volumes because the finding has a z-extent. A 2D net on one slice will miss a nodule that is obvious two slices later.
A CNN does not sign a report. It returns a mark, a mask, or a score. The clinician uses or ignores it. That sentence is the job description on machine learning for medical imaging.
What this page is not
- Not CNN vs ViT. Architectures and the 2023 PYCAD run → CNNs or ViT for medical imaging.
- Not the imaging-ML field explainer → machine learning for medical imaging.
- Not a market forecast, a GitHub tour, or a “95% diabetic-retinopathy” claim. Those numbers belong to a named study, not this URL.
If a CNN has to run inside a viewer a clinic already uses, that is the imaging piece. Case studies.