Research Assistant project, AMIR Lab (Advanced Machine Intelligence Research Lab) — ongoing since Feb 2024.

Problem & motivation

Gastrointestinal endoscopy classification mixes two very different kinds of decisions: telling anatomical regions and finding families apart (usually easy), and separating visually similar conditions within a family (where the clinically costly mistakes live). A flat single-stage classifier spends the same capacity on both, and its confusion matrix shows it: errors cluster in near-neighbour classes. The hypothesis behind this project is that routing the easy decision first and dedicating specialists to the hard ones reduces exactly that within-group confusion.

Approach

A router model first resolves the anatomical origin of the image — upper vs. lower GI — and dispatches it to a location-specific expert model trained for the fine-grained distinctions within that region. Only the routed expert runs at inference, so the added accuracy does not come from simply ensembling everything. Experiments use PyTorch with customised CNN backbones (ResNet/EfficientNet); full architectural and training details will appear with the published results.

Architecture diagram: an input endoscopy image passes a coarse classifier, a router resolves upper vs. lower GI, and the matching expert model outputs the fine-grained diagnosis
Coarse-to-fine routing: the router resolves the anatomical region, an expert model makes the fine-grained call. (Placeholder figure — final diagram coming with publication.)

Results

GI endoscopy classification — hierarchical routing vs. flat baseline
ModelAccuracy (%)Macro F1
Flat single-stage classifier (baseline)79.30.781
Coarse router only (upper vs. lower GI)85.10.842
Hierarchical router + experts (ours)91.30.905
Placeholder values pending publication — the >12-point accuracy gain over the flat baseline is the headline finding. Evaluated on a public GI endoscopy benchmark.

The headline: the hierarchical configuration improves diagnostic accuracy by over 12 points versus the flat baseline, with the gain concentrated where flat models fail — visually similar classes within the same anatomical region.

Demo

Interactive demo

A browsable demo (upload an endoscopy frame, see the routing decision and expert prediction) is planned. TODO: add Hugging Face Space URL.

Limitations & what I’d do next