Inside Our Two-Stage AI for Brain Hemorrhage Detection

Today we’re making a piece of the Smart Surgical Assistant more transparent: we’ve published the technical documentation and a runnable demo skeleton of our intracranial hemorrhage (ICH) detection module on GitHub. This post explains the reasoning behind its core design decision — a two-stage AI architecture.

The Problem

In an emergency department, a non-contrast head CT is often the first exam that decides whether a patient with a suspected brain bleed goes to surgery. Five subtypes matter clinically — epidural, intraparenchymal, intraventricular, subarachnoid, and subdural — and they differ in urgency and treatment. A tool that reads the scan has to do two things at once: see fine spatial detail in every slice, and reason across the whole series the way a radiologist does.

One model doing both jobs well is asking a lot. So we split the task.

Stage One: A CNN That Reads Slices

The first stage is a convolutional neural network based on SE-ResNeXt, a squeeze-and-excitation architecture that adaptively reweights feature channels. We run two variants — SE-ResNeXt50 at 512×512 and SE-ResNeXt101 at 480×480 — pretrained on ImageNet and fine-tuned on head CT data.

The head is a multi-label problem: a single scan can show more than one type of bleed, or none. So the network ends in six independent sigmoid outputs — the five subtypes plus an aggregate “any hemorrhage” class, which we weight higher during training because missing a bleed entirely is the worst possible error.

Stage Two: A Meta-Classifier That Reads Studies

A radiologist doesn’t judge one slice in isolation; a small bleed can live in a single slice, and a scan-level verdict needs context. That’s what stage two is for.

We take the CNN’s slice predictions and enrich them with study-level context: the predictions of the nine neighbouring slices on each side, the slice’s position in the series, the total slice count, and the study-wide mean of all slice predictions. This feature set feeds three gradient-boosting models — LightGBM, CatBoost, and XGBoost — each trained as an independent binary classifier per class with 8-fold cross-validation. The final probability is the average of the three models’ predictions.

Combining a deep feature extractor with a classical ensemble on top is a deliberate choice: the CNN captures spatial patterns, while gradient boosting handles tabular, context-rich features well — and the ensemble smooths out each model’s individual blind spots.

What We Published, and What We Didn’t

The GitHub repository contains the architecture documentation, the API contract, the deployment guide, and a demo service you can run yourself — including the full preprocessing pipeline (DICOM reading, Hounsfield rescaling, three-channel windowing, normalization) with tests. What we did not publish, and never will: trained model weights and clinical datasets. Those are proprietary and, more importantly, patient data is not something to share casually.

We’ll share quantitative evaluation results as our clinical validation progresses. For now, we’d rather show the engineering than claim numbers we can’t yet defend publicly.

Documentation and demo on GitHub

Scroll to Top