# Fully automated detection and identification of CSF shunt valves using YOLOv8 and a class-based reference image assignment as a safety mechanism

**Authors:** Mathias Holtkamp, Jannis Straus, Luca Salhöfer, Hanna Styczen, Maharani Budi Santoso, Sebastian Zensen, Cornelius Deuschl, René Hosch, Michael Forsting, Yan Li, Lale Umutlu, Felix Nensa, Johannes Haubold

PMC · DOI: 10.1038/s41598-025-29201-0 · Scientific Reports · 2025-11-21

## TL;DR

This paper presents an automated system using YOLOv8 to detect and identify CSF shunt valves in radiographs, improving diagnostic efficiency and accuracy.

## Contribution

A novel class-based reference image assignment safety mechanism is introduced to enhance algorithm reliability in shunt valve classification.

## Key findings

- The algorithm achieved a weighted mAP50 of 0.884 and a weighted average F1-score of 94.8%.
- Radiologists identified correct and incorrect classifications with 100% accuracy using the safety mechanism.
- High F1-scores were observed for common valves, but lower scores were noted for less common types like proGAV.

## Abstract

The study aimed to develop and evaluate an algorithm based on the YOLOv8x framework to automatically detect and identify cerebrospinal fluid (CSF) shunt valves. This approach seeks to streamline the diagnostic process identifying shunt valve types and pressure levels. A retrospective cohort of 2701 anonymized radiographs comprising six types of CSF shunt valves was used. Data augmentation techniques such as flipping, scaling, and mosaic augmentation were applied during training to enhance robustness. The dataset was split into 80% training and 20% testing subsets as part of a 5-fold cross-validation. Validation was conducted on a separate test set of 295 images using metrics such as mean Average Precision (mAP) at intersection over union thresholds of 50% (mAP50) as well as precision, recall, and F1-scores as metrics. Additionally, a class-based reference image assignment system was used to link the detected valves with the corresponding manufacturer images. These paired images were then independently reviewed by two radiologists to assess the accuracy of the algorithm’s classifications. The algorithm achieved a weighted mAP50 of 0.884 and a weighted average F1-score of 94.8%. High F1-scores were observed for Codman Certas (99.6%) and Codman Hakim (99.6%), with lower scores for less common valves like proGAV (30.8%). Radiologists were able to identify both correct and incorrect classifications made by the algorithm with 100% accuracy, due to the integrated safety mechanism. This safety mechanism relies on the fully automated linking of detected valves with the corresponding manufacturer images. In Conclusion the automated system demonstrated high efficiency in detecting and classifying CSF shunt valves, significantly simplifying the diagnostic workflow. Moreover, the integration of a robust safety mechanism ensures that potential misclassifications are identified and corrected.

The online version contains supplementary material available at 10.1038/s41598-025-29201-0.

## Full-text entities

- **Genes:** CSF2 (colony stimulating factor 2) [NCBI Gene 1437] {aka CSF, GMCSF}
- **Diseases:** hemiparesis (MESH:D010291), headache (MESH:D006261), ataxia (MESH:D001259), VP shunt (MESH:D046350), cerebral edema (MESH:D001929), CSF Shunt (MESH:D002559), dilation of the brain ventricles (MESH:D002311), epilepsy (MESH:D004827), Hydrocephalus (MESH:D006849), visual disturbance (MESH:D014786)
- **Chemicals:** CBRIA (-)

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12639084/full.md

## Figures

4 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12639084/full.md

## References

5 references — full list in the complete paper: https://tomesphere.com/paper/PMC12639084/full.md

---
Source: https://tomesphere.com/paper/PMC12639084