AI-powered mobile app that detects systemic diseases through nail photo analysis
Demo Video β’ Documentation β’ Report Issue
NailHealth AI uses Google's Health AI Developer Foundations (HAI-DEF) models to detect serious diseases through nail signs captured via smartphone camera. The app provides instant clinical explanations and disease predictions.
Detects 7 nail conditions indicating systemic diseases:
- White Nails (Terry's Nails) β Liver disease, kidney disease, diabetes
- Blue Nails β Oxygen deficiency, lung disease, heart failure
- Clubbing β Lung cancer, COPD, heart disease
- Spoon Nails (Koilonychia) β Iron deficiency anemia
- Black Lines β Melanoma, trauma, endocarditis
- Psoriasis β Psoriatic arthritis, metabolic syndrome
- Onychogryphosis β Poor circulation, fungal infection
π± User Photo
β
βοΈ Hugging Face Inference API
β
π€ Model 1: MedSigLIP (Fine-tuned)
β Classifies nail sign type
β
π€ Model 2: MedGemma 4B (Fine-tuned)
β Generates clinical explanation
β Predicts diseases
β Recommends actions
β
π JSON Response β Mobile App
| Component | Technology |
|---|---|
| Mobile App | React Native + Expo |
| Backend API | Flask (Python) |
| Cloud Hosting | Hugging Face Inference Endpoints |
| ML Models | MedSigLIP + MedGemma 4B |
| Storage | Hugging Face Hub |
| Training | Kaggle GPU (Tesla T4) |
NailHealth-AI-Mobile-App/
βββ π± mobile-app/ # React Native Expo app
β βββ App.js # Main app component
β βββ app.json # Expo configuration
β βββ package.json # Dependencies
β βββ assets/ # Images, icons
β
βββ π§ api-server/ # Flask API for model inference
β βββ app.py # API endpoints
β βββ Dockerfile # Container configuration
β βββ requirements.txt # Python dependencies
β βββ models/ # Fine-tuned model checkpoints
β
βββ π docs/ # Documentation
β βββ SETUP_GUIDE.md # Local setup instructions
β βββ DEPLOYMENT_GUIDE.md # Cloud deployment steps
β βββ ARCHITECTURE.md # Technical architecture
β
βββ π notebooks/ # Training notebooks
β βββ medsiglip_training.ipynb
β βββ medgemma4b_training.ipynb
β
βββ π README.md # This file
- Node.js 18+ and npm
- Python 3.10+
- Hugging Face account
- Expo account (free)
- Smartphone (iOS/Android)
git clone https://github.com/isumenuka/NailHealth-AI-Mobile-App.git
cd NailHealth-AI-Mobile-Appcd mobile-app
npm install
npx expo startScan QR code with Expo Go app on your phone.
cd api-server
pip install -r requirements.txt
python app.pyAPI runs at http://localhost:8080
See HUGGING_FACE_SETUP.md for detailed steps.
- Create a model repository on Hugging Face
- Upload your model files
- Create an Inference Endpoint
- Use the provided URL in your app
- πΈ Camera integration with photo capture
- π Real-time image upload to API
- π€ AI-powered nail disease classification
- π Clinical explanation generation
- π₯ Disease probability ranking
- π Recommended medical tests
- π¨ Professional medical UI design
- β‘ Expo Go instant testing
- π± Cross-platform (iOS + Android)
- π Disease history tracking
- π Progress monitoring over time
- π Multi-language support
- π Appointment reminders
- π€ PDF report export
- π¨ββοΈ Doctor consultation booking
cd mobile-app
# Start development server
npm start
# Run on specific platform
npm run android # Android emulator
npm run ios # iOS simulator
npm run web # Web browsercd api-server
# Run with auto-reload
export FLASK_ENV=development
python app.py
# Build Docker image locally
docker build -t nailhealth-api .
docker run -p 8080:8080 nailhealth-apiTraining notebooks are in notebooks/ folder:
- MedSigLIP Fine-tuning: Nail image classification
- MedGemma 4B Fine-tuning: Clinical explanation generation
Both trained on Kaggle with Tesla T4 GPU (free tier).
| Metric | Value |
|---|---|
| Nail Sign Classification Accuracy | 91.2% |
| F1-Score (Weighted) | 0.89 |
| API Response Time | ~2.1 seconds |
| App Load Time | <1 second |
| Supported Image Formats | JPG, PNG |
| Max Image Size | 5 MB |
MedSigLIP Fine-tuned
- Base: google/medsiglip-448
- Parameters: 400M
- Training: LoRA (Low-Rank Adaptation)
- Dataset: 700+ nail images (custom collected)
MedGemma 4B Fine-tuned
- Base: google/medgemma-4b-it
- Parameters: 4B
- Training: Instruction fine-tuning
- Dataset: 250+ clinical text pairs
We recommend using Hugging Face Inference Endpoints for the easiest setup without managing complex cloud infrastructure.
- β No Google Cloud required
- β specific hardware selection (CPU/GPU)
- β Auto-scaling (including scale-to-zero to save money)
- β secure & private
π Follow the Hugging Face Setup Guide to get started.
| Document | Description |
|---|---|
| SETUP_GUIDE.md | Complete local development setup |
| HUGGING_FACE_SETUP.md | Cloud deployment instructions |
| ARCHITECTURE.md | Technical architecture details |
API_URL=https://your-api-url.run.app
ENVIRONMENT=productionMODEL_PATH=/app/models
PORT=8080- MedSigLIP fine-tuning
- MedGemma 4B fine-tuning
- Flask API development
- React Native mobile app
- Hugging Face deployment
- Basic UI/UX
- Improve classification accuracy to 95%+
- Add disease history tracking
- Implement user authentication
- Create admin dashboard
- Multi-language support
- Clinical validation study
- Regulatory compliance (FDA/CE)
- Doctor consultation integration
- App Store publication
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open Pull Request
This project uses models from Google's Health AI Developer Foundations (HAI-DEF):
- MedSigLIP: Apache 2.0 License
- MedGemma 4B: Apache 2.0 License
Project License: Apache 2.0
IMPORTANT: This application is for educational and research purposes only.
- β NOT a substitute for professional medical advice
- β NOT approved by FDA or medical authorities
- β NOT for clinical diagnosis
- β Use only as a screening tool
- β Always consult licensed healthcare professionals
- Google Health AI: For HAI-DEF models (MedSigLIP, MedGemma)
- Kaggle: For free GPU resources
- Expo Team: For amazing mobile development framework
- Medical Community: For nail disease datasets and research
Developer: K.G.I Enuka
GitHub: @isumenuka
Twitter: @ezsumm
Website: isumenuka.me
Project Link: https://github.com/isumenuka/NailHealth-AI-Mobile-App
β Star this repo if you find it helpful!
Made with β€οΈ by K.G.I Enuka