Looking back, written a few days after the national final in Heilbronn.
PneuNet: eighteen months of chest X-rays, three competition rounds
How a school research project on pneumonia detection made it to the national final of Jugend forscht, and why the DICOM viewer is the real product in the end.
Written
Event
Jugend forscht 2024, February to June 2024
Reading time
3 min read
Topics
jugend-forscht
machine-learning
school
Fig. 1 Jugend forscht national final, Heilbronn 2024
Heilbronn is done. We got the special prize for prevention and rehabilitation from the German Social Accident Insurance (DGUV), 1,000 euros. Not a national win. For something that started as a school research paper, I’ll happily take it.
It started with a number we found early on: diagnosing pneumonia from chest X-rays by eye is right about 76 percent of the time, and rural areas don’t have enough radiologists. Nico, Dustin and I wanted to know whether a neural network could help doctors there. That became our extended research project at the specialist maths and science school in Erfurt, starting in eleventh grade. We worked with a university hospital on it, which mostly took persistence.
I didn’t start with PyTorch. I started with NumPy: my own network, backpropagation written by hand. Slow, but afterwards I knew what the frameworks actually do. Then the systematic comparison. ResNet, DenseNet, EfficientNet, ConvNeXt and VGG19 on four public datasets with up to 30,000 images, plus lung segmentation with an attention U-Net and class activation maps so you can see where the model is looking. In the end it all ran inside a DICOM viewer.
The viewer is the part you can actually touch, and for me it’s the real product. DICOM is the format hospitals store X-rays in, image and patient data in one file. A model that only runs in a notebook doesn’t help any doctor. So the model has to go where doctors already look. The viewer shows the files and a patient list, with the X-ray in the middle. It runs the models over the image and shows the result right inside it: pneumonia or healthy, the lung mask from the segmentation, and the class activation map as a heatmap. The heatmap shows which regions counted most for the decision. If it lights up next to the lung instead of inside it, something is wrong, no matter how confident the model sounds. That’s exactly what it’s for. There’s a full version in C++ with Qt and a test version in Python. The demo on this page rebuilds the Python version with public sample images and a lens for the heatmap. It doesn’t make a diagnosis.
Fig. 2 · Live demoThe DICOM viewer from PneuNet, rebuilt: open a study, window/level, zoom and measure in mm, segmentation, the AI’s second opinion and the CAM heatmap. Sample X-rays from the RSNA Pneumonia Detection Challenge (2018); overlays partly illustrative. Not a diagnosis.
illustrative overlay
Select a .dcm file and press “open”
Not a diagnosis · research prototype
AI running …
6Class activation mapping shows where the ResNet-34 looked: 7 × 7 grid from the last conv layer, upsampled and coloured. Drag the opacity slider.
Images: sample DICOMs from the public repo, RSNA Pneumonia Detection Challenge (2018) / NIH ChestX-ray14, label “Lung Opacity”. Detection on image 1 and the lung mask on image 3 are traced from the viewer screenshots in the repo; all other overlays and every CAM heatmap are illustrative, because the model weights are not public.
Demo with sample data
Results on the validation split: above 87 percent for classification, above 95 percent for segmentation. That’s a validation split, not a hospital. I told every jury the same.
Jugend forscht is Germany’s big youth science competition, and you go through three rounds. February, regional round at Bauhaus University Weimar: regional win as the best interdisciplinary project, plus a spot at a founders’ summer school. April 9, state round in Jena: first prize in the “world of work” category and two special prizes. End of May, the 59th national final at the experimenta in Heilbronn. Four days at the stand, juries, a lot of explaining.
One thing I’m sure of after eighteen months: training the model is the small part. Finding data, measuring honestly and explaining the same project to three very different juries was the real work.
Tools and skills: Python with NumPy, PyTorch and TensorFlow, CNNs by hand and as ready-made architectures, transfer learning, segmentation with U-Nets, class activation mapping, OpenCV, DICOM, C++ with Qt for the viewer, and scientific writing.
My Abitur certificate comes in ten days. PneuNet isn’t finished, though. The code will keep growing.