AI-powered Lung Cancer Detection from Chest X-ray & CT Scan Images
LungRadar is an Android mobile application designed to assist users in analyzing lung medical images (X-rays and CT scans) using a deep learning model to predict the presence of lung cancer. It offers a simple interface for uploading images, running predictions, and receiving actionable feedback and educational resources.
-
π· Camera & Gallery Support
Capture lung images directly or select from your gallery for analysis. -
π§ AI-Powered Classification
Uses a trained convolutional neural network (CNN) to identify:- Normal (No cancer)
- Adenocarcinoma
- Large-cell carcinoma
- Squamous cell carcinoma
-
π Confidence Score
Displays the modelβs confidence level (%) in its prediction. -
π‘ Actionable Insights
Based on results, the app shows:- Personalized advice
- Risk level
- Recommended actions (e.g., consult a doctor, maintain a healthy lifestyle)
-
π Resources Section
Direct links to external articles on healthy living and lung cancer screening.
| Splash Screen | Upload Screen | Normal Result | Cancer Detected |
|---|---|---|---|
| π± Splash | π Select Image | β No Cancer |
- User uploads an image via camera or gallery.
- The app loads the image into a classifier powered by TensorFlow Lite.
- The classifier predicts:
- Whether the image is cancerous or not
- The type of cancer (if present)
- Based on prediction:
- Redirects to
ReviewNormalActivityorReviewCancerActivity - Displays analysis, confidence score, and resources
- Redirects to
app/ βββ ui/ β βββ AnalyseFragment.kt # Core image input + classification β βββ ReviewNormalActivity.kt # Normal result screen β βββ ReviewCancerActivity.kt # Cancer result screen βββ classifier/ β βββ LungCancerClassifier.kt # TensorFlow Lite classifier βββ res/ β βββ layout/ β βββ drawable/ β βββ values/colors.xml # App-wide color palette β βββ values/strings.xml
- Android Studio Hedgehog or newer
- Android Gradle Plugin 8.5+
- Android 8.0 (API 26) and above
- Model type: CNN / TensorFlow Lite
- Input: Chest X-ray or CT scan (PNG, JPEG)
- Output: Label (
normal,adenocarcinoma,large-cell,squamous) + confidence score
-
Clone the repo:
git clone https://github.com/yourusername/lungradar.git cd lungradar -
Open in Android Studio
-
Connect an Android device or emulator
-
Click Run βΆ
π External Resources Used
-
TensorFlow Lite
-
Lung Cancer Screening Guidelines
-
American Lung Association
π€ Contributors Sharon Akinyi β Developer & ML Integrator
OpenAI GPT Support β Design and coding assistance
π License This project is open source and available under the MIT License.