CT reconstruction with deep learning

Draw a slice or load one, simulate the scanner with its errors, and compare filtered back-projection with the trained U-Net. Everything runs in your browser, no data sent.

Model: not loaded Backend: …

Phantom

Tool
0.60
12 px
Overlap

Grid 256 × 256. Only the inscribed circle is scanned. Pixels denser than 0.90 count as metal.

Scanner and errors

trained: 10,000
0.20
trained: 0.20
trained: 180
Metal

Reconstruction

Sinogram

FBP

U-Net

Loading model…

Ground truth

phantom
what was scanned
vs. phantomPSNR dBSSIM
FBP––
U-Net––
Gain––
Line profile · row 128
PhantomFBPU-Net
Hover or tap an image to move the profile row.
About the model and the simulation

Network. U-Net, depth 4, 64 to 1024 filters, 31.0 million parameters. It takes the FBP image and returns the corrected slice. The weights are the best training checkpoint at epoch 33 (validation loss 0.00228), with BatchNorm folded into the convolutions and int8 weights (31 MB). On 48 validation slices simulated by this page, PSNR goes from 22.1 dB (FBP) to 42.6 dB (U-Net).

Scanner. Parallel beam, projections over 180°, 256 detectors, the same maths as skimage.radon / iradon with a ramp filter. Errors are applied in physical units (0.02 per pixel): beam hardening p − c·p², rays through metal scaled by 1.5 with extra noise, then Poisson noise with I₀ photons per ray.

Training data. Random circles, ellipses and polygons combined so that the denser shape wins, plus a Shepp-Logan variant. All training scans used 10,000 photons, beam hardening 0.20, metal artifacts and 180 projections. The anatomy examples and other settings are outside that range: they show where the model generalizes and where it does not. Large uniform areas enclosed by denser tissue, like the brain inside the skull, are a known weak spot. This is a 2D simulation with normalized densities, not a diagnostic tool.

Check. On load the network processes a 64×64 crop and compares the result with the output of the original Python model: the outcome appears at the top right.

Shortcuts. Ctrl+Z undo. Polygon: click to add points, click the first point or press Enter to close, Esc to cancel. Hold Shift for circles and squares.

From demo to project

The same techniques apply to non-destructive testing, reconstruction from limited data and artifact correction in medical and industrial images. We start from your data and your sensor, agree with you on the metrics that matter, train and validate the model on real cases and integrate it into your inspection or measurement workflow.

Tell us about your project