Medical Image Analysis Assistant: an open-source web application for in-browser brain MRI classification with large language model report drafting
Background: Imaging AI tools often need dedicated servers, which limits their use where computing resources and radiologists are scarce, and sending scans to a server raises privacy concerns. We developed an open-source web application that classifies brain MRI inside the browser and uses a large language model (LLM) to draft a preliminary text report from the classifier output. Results: The application is built with Next.js 15, React 19 and TypeScript. A four-class convolutional neural network (no tumour, glioma, meningioma, pituitary tumour) runs in the browser with TensorFlow.js, and Grad-CAM marks the region that most influenced the prediction. Only the class probabilities and the user's question are sent to the server, which asks Google Gemini, with OpenAI and a template generator as fallbacks, to draft a report. On 354 held-out images from a deduplicated public dataset, the model reached 78.8% accuracy (95% CI 74.3-82.7) and Cohen's kappa of 0.71; for tumour versus no tumour, sensitivity was 95.5% and AUC 0.963. The browser model reproduced the reference predictions on all 354 test images. Median inference time in a headless browser on a two-core virtual machine without a GPU was 417 ms. Conclusions: In-browser MRI classification with LLM-drafted reports is feasible on standard hardware without uploading images. Grad-CAM regions are coarse and often fall outside the lesion, and LLM report quality has not yet been evaluated; the tool is a research prototype, not a diagnostic device. Source code: https://github.com/John-pels/mri-analyze-and-report (MIT licence). Live demonstration: https://mri-analyze-and-report.vercel.app. Companion paper: https://doi.org/10.5281/zenodo.24266352
Authors
- Caston Sigauke (ORCID: https://orcid.org/0000-0002-7406-5291)
- Christopher Godwin Udomboso (ORCID: https://orcid.org/0000-0002-0338-8261)
- George Edeki
- John Oluwaseyi Emmanuel (ORCID: https://orcid.org/0009-0009-0377-2958)
Institutions
- The Abdus Salam International Centre for Theoretical Physics (ICTP) (IT)
- University of Ibadan (NG)
- University of Venda (ZA)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-16
- DOI
- https://doi.org/10.5281/zenodo.24266465
- Primary Topic
- Brain Tumor Detection and Classification
- Type
- preprint