Inspiration
Named after the legendary polymath and father of early modern medicine, Avicenna (Ibn Sina), our project was born out of a critical need for faster, more accessible, and highly accurate diagnostic support in healthcare. In many regions, radiologists are overwhelmed by high patient volumes, leading to diagnostic delays and human fatigue. We were inspired to combine centuries-old medical wisdom with cutting-edge artificial intelligence to create a reliable second-opinion tool for doctors—helping detect thoracic pathologies early and save lives.
What we learned
Building Avicenna was an intense, eye-opening research journey. We dove deep into medical computer vision, clinical data preprocessing, and ethical AI deployment in healthcare. Specifically, we learned:
- How to handle highly imbalanced medical datasets and subtle radiographic features (such as cardiomegaly, pleural effusion, and pneumonia).
- The critical importance of model interpretability—doctors do not just want a prediction; they need to see where the model is looking using techniques like Grad-CAM.
- How to optimize deep learning architectures so they remain lightweight enough for real-world clinical environments without sacrificing sensitivity.
How we built it
We anchored our research and model training on Harvard’s Chest X-Ray dataset (leveraging large-scale clinical imaging benchmarks) to ensure medical-grade reliability.
- Data Preprocessing: We standardized thousands of chest radiographs, applying histogram equalization, normalization, and targeted data augmentation to preserve anatomical integrity.
- Model Architecture: We utilized Convolutional Neural Networks (CNNs) and Vision Transformers fine-tuned for multi-label classification of thoracic conditions. To address class imbalance in clinical pathologies, we optimized our training using a weighted Binary Cross-Entropy loss function:
$$\mathcal{L} = -\frac{1}{N} \sum_{i=1}^{N} \left[ w_p y_i \log(\hat{y}_i) + (1 - y_i) \log(1 - \hat{y}_i) \right]$$
- Evaluation & Interface: We validated our model primarily using the Area Under the ROC Curve ($\text{AUC-ROC}$) across multiple pathologies, wrapping the inference engine in a clean, intuitive interface designed for rapid clinical workflow.
Challenges we ran into
The path to building Avicenna was extremely challenging and required relentless research:
- Computational Bottlenecks: Processing and training on massive high-resolution Harvard chest X-ray datasets pushed our hardware limits to the edge, forcing us to experiment extensively with batch sizes, mixed-precision training, and cloud GPU optimization.
- Subtle Visual Differences: Unlike standard object detection, distinguishing between overlapping pulmonary conditions on grayscale X-rays required weeks of hyperparameter tuning and literature review.
- Data Noise & Uncertainty: Real-world clinical labels often contain uncertainty tags, requiring us to carefully design label-smoothing strategies to prevent the model from overfitting to noisy annotations.
Built With
- computer-vison
- deep-learning
- fastapi
- git
- github
- google-collab
- machine-learning
- medical-imaging
- numpy
- opencv
- python
- react
- scikit-learn
- tailwindcss