Inspiration

Generalizable is a CT viewer you control by folding your phone. A CT scan holds a full 3D picture of the inside of the body, but patients only ever see hundreds of gray slices with nothing labeled. Doctors explain what they found by scrolling back and forth and pointing at the screen. We thought the iPhone Duo's hinge could do that job better. Folding the phone is a physical motion, and moving through a scan should feel physical too.

We started with one head CT from CQ500, a public research dataset. The patient has a subdural hemorrhage, which is a bleed between the brain and the skull. Our first version let you select that bleed, peel away the skin and skull, and fold the phone to cut through it from a new angle.

We then realized nothing in the viewer was specific to medicine. The same code could slice a whole body, the Sun or a circuit board. Anything with an inside works, so we called it Generalizable.

What it does

Generalizable turns a 3D scan into named, colored layers that you can peel away. You select a finding and the slice, the 3D view and a plain-language explanation all move to it. You switch between colored layers for patients and grayscale CT for doctors without losing your place. In Scan mode, opening and closing the hinge steps through the slices from the base of the skull to the top of the brain.

We also tested whether AI could find the bleed without help. We ran an open-source hemorrhage model on the scan without telling it where the bleed was. It gave a 99.6% chance of a subdural bleed. We then compared its outline of the bleed to the one radiologists drew by hand. The Dice score, the standard measure of how well two outlines overlap, was 0.69. That means the outlines overlap by about 70%, which is strong for a bleed shaped like a thin crescent. A 235-billion-parameter general vision model looked at the same full slices and missed the bleed completely.

How we built it

We wrote the app in SwiftUI and Metal inside Bitrig. A Metal shader loads each scan as a 3D texture and cuts it along any plane in real time, so nothing on screen is a pre-rendered image. The hinge uses Apple's new onHingeChange API from iOS 27.1. It smooths the fold angle and maps it to a slice.

The data pipeline is in Python. It pulls the head CT from CQ500 and the radiologists' bleed outline from Seg-CQ500. The whole-body scan comes from the NLM Visible Human Project through the NCI Imaging Data Commons. TotalSegmentator split the body into 12 labeled organs. The AI results came from ianpan/ct-head-hemorrhage-detection and from Qwen vision models called through Hugging Face. We saved every result into the app so the demo runs without internet.

Individual Contributions

We built this with a team of humans and AI agents. A Claude Code "commander" split the work into lanes for data, math, rendering, UI and docs, and then spawned subagents to handle them. Bitrig's agent built the screens and hinge behavior, and Codex helped too. Every agent had to register its lane in a JSON file before it could touch the code, which gave our AI agents more paperwork than our human ones.

Challenges we ran into

Real medical data is messy. The CQ500 scan was taken with the scanner tilted 4 degrees, so the standard imaging library refused to open it. The Visible Human scan was made in the 1990s and has uneven gaps between its slices. We resampled both scans onto clean, evenly spaced grids before anything else would work.

The hinge API only exists in the iOS 27.1 SDK, which we couldn't install on our own machines. We built the whole app around a simulated hinge and plugged in the real one at the end.

The AI was humbling. The big vision models kept echoing whatever answer we hinted at, so we stopped giving hints. With no hints, they missed the bleed. We kept that miss in the app because it was the most honest result we had.

Accomplishments that we're proud of

We shipped a native iPhone Duo app that slices real CT scans in real time and responds to the fold. We graded an AI model against radiologists across the whole 3D scan instead of trusting its confidence score. We also showed that a small model trained on the right data beat a model more than a hundred times its size. And one viewer handles a brain bleed, a whole body, the Sun and a circuit board.

What we learned

A hinge works best as one continuous control. One physical motion should change one thing. We learned that a bigger AI model is not automatically a better one, and that you have to test a model blind before you believe it. We also learned how to run a coordinated team of AI agents on one codebase without them overwriting each other.

What's next for Generalizable

We want to add more cases that have expert outlines, starting with a lung tumor. We want doctors to be able to record a guided walkthrough that a patient can fold through at home. Beyond medicine, we want to open geology, weather and industrial scans in the same viewer.

Built With

Share this project:

Updates

Submission history