AI & Healthcare

AuroXRay Bringing AI To Medical Imaging.

AuroXRay is an AI-assisted diagnostic platform that helps radiologists interpret chest X-Rays with greater confidence: combining deep learning, explainable heatmaps, and LLM-driven analysis into one reliable “second opinion”.

Built with
  • Java
  • Spring
  • AngularAngular
  • WekaWeka
  • PostgreSQL
AuroXRay – Bringing AI To Medical Imaging
Project TypeWeb Application
CategoryMachine Learning
Dataset224,316 Chest X-Rays
Avg. AUROC0.86 across 12 pathologies

Overview

Image processing has been proven effective across many disciplines; medicine is certainly no exception. Chest X-Rays remains one of the most important tools for diagnosing thoracic diseases, but radiology is a complex discipline where even experienced clinicians can still disagree, and a missed or misread finding carries real consequences.

AuroXRay is designed to support radiologist in making more reliable diagnoses, offering a valuable “second opinion”. Rather than producing a single opaque prediction, it lets radiologists classify based on patient’s specific symptoms, narrowing the selection to the radiological findings and pathologies relevant to that condition; instead of running every possible label against every image.

To make its reasoning legible, AuroXRay pairs its classifications with two layers of explanation:

  • LLM-generated analysis: Precise prompting is used to have an LLM interpret each finding, discussing visual patterns and symptoms typically associated with the selected radiological observations.
  • ScoreCAM heatmaps: Visual attention maps that highlight exact regions of the X-Ray which the model weighted most heavily in reaching its conclusion.

The heatmap methodology is inspired by WekaDeeplearning4J, an excellent Weka implementation for Deeplearning4J.

From the build log

Honestly, I never envisioned this turning to a full-stack application. The original idea was much smaller: experiment with the CheXpert dataset and build a “magical” SDK which combines Weka, Mulan and Deeplearning4J. The core plan was to process the dataset in iterative subsets, extracting features with a pre-trained transfer learning model at each step, appending them to disk as ARFF, and finally training with Weka, Deeplearning4J, and Mulan.

I never expected it to grow into a full implementation. But somewhere along the way, Spring Boot 3.0 and Angular 17 talked me into making it something better.

Glimpse For X-Ray Classification & Heatmap

AuroXRay: Glimpse For X-Ray Classification & Heatmap

Development Process of AuroXRay

Building AuroXRay: The Development Process (Part 1)

Dataset Overview

AuroXRay is built upon the CheXpert dataset, a large, well-known collection of 224,316 chest X-ray images, each annotated across multiple pathologies and radiological findings.

Much of the prior work treats CheXpert as a multi-label classification problem, often evaluating performance on substantially smaller subsets (as few as 234 images across only five labels). A common approach here is to treat missing labels as U_ZEROs, which further skews the label distribution and leads models to overfit to that assumption rather than learn genuine clinical patterns, highlighting the Label Sparsity problem.

AuroXRay takes a different approach. Instead of treating it as a multi-label classification task, each label is treated as its own binary classification problem. Instances with uncertain or missing label are dynamically excluded on the fly for that specific label, allowing each model to train only on the most reliable available supervision. The sole exception is Support Device, where missing values are treated as 0s to mitigate class imbalance.

Sparse Binary Relevance

The is conceptually similar to Binary Relevance, but with the sparsity-handling baked in, referred to in this project as Sparse Binary Relevance. It's the mechanism that ultimately enables radiologists to classify based on a patient's specific symptoms, rather than forcing every image through every label.

How it works

01Feature extraction & classification

224,316 images are preprocessed, normalized for uniformity, in iterative subsets. A pretrained transfer model extracts features which are written to disk in ARFF, and Weka-based classifier is trained using the Sparse Binary Relevance approach.

02Visual Explanation via ScoreCAM

Uses ScoreCAM methodology to generate a heatmap, giving the radiologist a visual anchor for the model's reasoning, not just a number.

03Explanation via LLM

In parallel, the selected finding is passed through an LLM with carefully engineered prompt, producing a written interpretation alongside its associated visual patterns and symptoms.

AuroXRay heatmap visualization showing saliency regions on a chest X-ray: bright yellow highlights the most salient areas, purple indicates moderate importance, and dark blue shows low-saliency regions

Explainable Heatmap. Bright yellow represents the most salient regions; those with the highest saliency values. Purple/Pink indicates moderate influence: somewhat important, but not highly significant. Dark blue marks areas of very low importance. This allows radiologists to see where the model is focusing and understand the reasoning behind it.

High Saliency
Moderate
Low
From the build log

This whole visualization approach and honestly the architectural backbone of the project draws direct inspiration from WekaDeeplearning4J, Weka and Mulan. Credit goes to the developers and maintainers of these projects.

Evaluation

The binary classification results varied across different labels, but several key conditions, i.e., Pleural Effusion, Consolidation, Cardiomegaly and Edema showed strong AUROC and F1-scores, AUROC ranging from 0.7991 (Pneumonia) to 0.9556 (Pleural Other). This indicates the model's strong ability to distinguish between positive and negative cases.

PathologyTrainValidTestAUROCRecallPrecisionF1-Score
Enlarged Cardiomediastinum24862308130950.84060.56880.69880.6272
Cardiomegaly38190467447560.87530.890.83320.8606
Lung Opacity8721510970109030.8260.99570.95410.9745
Lung Lesion9271117011550.84760.88370.90320.8934
Edema60160752675120.88280.93080.84570.8862
Consolidation36899453146760.91650.79260.76070.7763
Pneumonia72239608890.79910.84720.66210.7433
Atelectasis28397358135130.92330.99230.97750.9849
Pneumothorax61929775077490.80610.48420.55090.5154
Pleural Effusion10106512703127200.92880.94620.88470.9144
Pleural Other39535415050.95560.9530.96730.9601
Fracture10807141713160.8330.93790.76030.8398
Support Devices17800022251222460.82210.74580.74750.7467
Average0.86590.84370.81120.8248
Why recall is prioritized?

F1-score reflects the balance between precision and recall, but in medical imaging context, the two errors are not equally costly. A missed diagnosis (false negative) is typically more costly than a false positive. For this reason, Recall (True Positive Rate) is prioritized in the training process, ensuring the model captures as many true cases as possible, even at some cost to precision.

AUROC Performance Per Finding

AUROC Performance Per Finding Horizontal bar chart showing AUROC scores for 13 radiological findings. Pleural Other has the highest score at 0.9556, Pneumonia the lowest at 0.7991. 0.700.780.860.941.00 AVG 0.866 Enlarged Cardiomediastinum 0.8406 Cardiomegaly 0.8753 Lung Opacity 0.8260 Lung Lesion 0.8476 Edema 0.8828 Consolidation 0.9165 Pneumonia 0.7991 Atelectasis 0.9233 Pneumothorax 0.8061 Pleural Effusion 0.9288 Pleural Other 0.9556 Fracture 0.8330 Support Devices 0.8221
Total Images224,316
Final Pathologies12
AVG AUROC0.866
Best F1-Score0.985

The false positive rate (FPR) for Lung Opacity is comparatively high (0.90), partly due to data imbalance and partly because it’s a finding associated with several underlying conditions i.e., consolidation, pneumonia and pleural effusion. Given this limitation and the potential redundancy it introduces, Lung Opacity was excluded from the final model.

In summary: the model demonstrates strong performance across this range of thoracic diseases and findings, with AUROC and F1-scores indicated strong classification and diagnostics performance overall.

Bottom Line

  • Gives radiologists a symptom-driven second opinion instead of a flat list of every possible finding.

  • Recasting CheXpert as per-pathology binary classification, avoided the label-sparsity overfitting that limited earlier multi-label attempts.

  • Pairs each prediction with an LLM explanation and a ScoreCAM heatmap, so the output is something a clinician can actually evaluate, not just trust blindly.