/LungLens-TB

LungLens TB is an innovative project designed to transform tuberculosis diagnosis in low to middle-income countries (LMICs) by leveraging advanced AI technologies. Developed for Philly CodeFest 2024, where it earned the first prize, this tool aims to alleviate the burden on healthcare systems by providing quick and accurate tuberculosis detection.

Primary LanguagePythonApache License 2.0Apache-2.0

LungLens TB: AI-powered Tuberculosis Detection Tool

LungLens TB is an innovative project designed to transform tuberculosis diagnosis in low to middle-income countries (LMICs) by leveraging advanced AI technologies. This tool was developed for Philly CodeFest 2024, where it earned the first prize. It aims to alleviate the burden on healthcare systems by providing quick and accurate tuberculosis detection.

There are two main aspects in this project and they are: Imaging Tool and Reporting Tool

Imaging Tool

The Imaging Tool provides an interface for users to upload X-ray images. Upon submission, our trained AI model analyzes the image to determine the presence of tuberculosis. The results include a heatmap overlay on the X-ray image, highlighting the regions the model focuses on, enhancing interpretability and trust in AI assessments.

Screenshot 2024-04-23 at 12 27 29 PM Screenshot 2024-04-23 at 12 27 03 PM

Reporting Tool

The Reporting Tool allows users to input radiology reports, which are then translated into language understandable by laypeople, targeted at a 6th-grade English reading level. Additionally, this simplified text can be translated into various languages, focusing on those prevalent in LMICs, making medical information more accessible globally. Screenshot 2024-04-23 at 12 27 33 PM

Screenshot 2024-04-23 at 12 27 39 PM Screenshot 2024-04-23 at 12 27 18 PM

Training Process

To start pretraining, assuming you have pytorch, do

pip install accelerate timm diffusers pillow wandb transformers datasets
accelerate launch pretraining.py
Screenshot 2024-04-23 at 12 50 04 PM

Deployment

For deployment do

pip install python-dotenv flask langchain-openai grad-cam
python model_deployment.py