One PNG carries the MRI and its AI mask

Research demo, not for diagnosis. / 研究用デモであり、診断用ではありません。 ← Demos / デモ一覧

Reversible data hiding stores a compressed segmentation mask in the pixels of an 8-bit PNG. This walkthrough uses a pre-embedded public lumbar T2 slice. Nothing here needs a network. Embedding is not run live (median 27.9 s per image on CPU in the mid-slice record).

Open the pre-embedded PNG

This file looks like an ordinary 8-bit MRI PNG (512×640). The payload lives in the pixels, not in sidecar tags. Embedded payload: 14048 bits (lzma).

Pre-embedded 8-bit lumbar MRI PNG
Pre-embedded PNG (public SPIDER standard T2, mid-slice)

Extract the mask and overlay it

The mask was read from the PNG pixels only, then overlaid in the same colors as the existing figure: vertebra red, canal green, disc blue.

Embedded MRI without overlay
Image as carried in the PNG
MRI with extracted segmentation overlay
Extracted mask overlaid on the image

Restore the original image

After extraction, the scan is restored bit-exactly. Exact match: 327,680 / 327,680 pixels

Original 8-bit cover image
Original 8-bit cover (saved before embedding)
Image restored from the embedded PNG
Restored from the embedded PNG

Change one pixel

One pixel at row 256, column 320 was changed from 187 to 188. Then extraction was run again on that altered copy.

Intact PNG: extract and match succeeded. Altered PNG: Extraction still finished, and the mask still matched (0 labels differed). The restored image did not: 1 / 327,680 pixels differed.

This is one slice and one pixel. Whether other locations behave the same is not yet checked.

Embedded PNG after changing one pixel, with the pixel marked
Altered PNG, with the changed pixel marked (ring and yellow dot)
Original 8-bit cover image
Original cover, which the intact PNG restores exactly

Keys: 1–4 or arrows. This file is offline and does not upload the image.