AIMedica
Update app configuration and add GitHub Pages setup
957df8a
# πŸš€ Quick Start Guide
## ⚑ Get Running in 5 Minutes
### 1. **Prerequisites Check**
- βœ… Python 3.8+ installed
- βœ… Model file `resnet50_dr_classifier.pth` present
- βœ… Internet connection (for first-time package installation)
### 2. **Easy Setup (Windows)**
```bash
# Option A: Double-click the batch file
run_app.bat
# Option B: Use PowerShell
.\run_app.ps1
# Option C: Use PowerShell with setup
.\run_app.ps1 -Setup
```
### 3. **Manual Setup (All Platforms)**
```bash
# Create virtual environment (recommended)
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Test the setup
python test_model.py
# Run the app
python app.py
```
### 4. **What Happens Next**
- 🌐 Web interface opens at `http://127.0.0.1:7860`
- πŸ“ Upload OCT images for analysis
- πŸ€– AI classifies images as DR or NoDR
- πŸ”₯ Grad-CAM heatmap shows AI focus areas
- πŸ’Ύ Results automatically saved to `saved_predictions/` folder
## 🎯 Usage Examples
### **Single Image Analysis**
1. Open `http://127.0.0.1:7860` in your browser
2. Upload an OCT image
3. View results and Grad-CAM visualization
### **Batch Processing**
```bash
python batch_process.py
```
- Process multiple images at once
- Get CSV report with all results
- Grad-CAM images saved to `batch_results/` folder
### **Testing & Validation**
```bash
python test_model.py
```
- Verify model loading
- Test basic functionality
- Check all dependencies
## πŸ”§ Troubleshooting
### **Common Issues**
| Problem | Solution |
|---------|----------|
| "Model file not found" | Ensure `resnet50_dr_classifier.pth` is in the project folder |
| "Package not found" | Run `pip install -r requirements.txt` |
| "CUDA errors" | App runs on CPU by default. GPU not required |
| "Port already in use" | Change port in `config.py` or kill existing process |
### **Get Help**
- Run `python setup.py` for comprehensive setup
- Check `README.md` for detailed documentation
- Use `python test_model.py` to diagnose issues
## πŸ“ Project Structure
```
Deep_Learning_for_Ophthalmologist/
β”œβ”€β”€ app.py # 🌐 Main web application
β”œβ”€β”€ batch_process.py # πŸ”„ Batch processing script
β”œβ”€β”€ test_model.py # πŸ§ͺ Testing and validation
β”œβ”€β”€ setup.py # βš™οΈ Automated setup
β”œβ”€β”€ config.py # πŸ”§ Configuration settings
β”œβ”€β”€ requirements.txt # πŸ“¦ Python dependencies
β”œβ”€β”€ resnet50_dr_classifier.pth # πŸ€– AI model weights
β”œβ”€β”€ run_app.bat # πŸͺŸ Windows batch launcher
β”œβ”€β”€ run_app.ps1 # πŸͺŸ Windows PowerShell launcher
β”œβ”€β”€ README.md # πŸ“š Complete documentation
β”œβ”€β”€ QUICK_START.md # πŸš€ This quick start guide
β”œβ”€β”€ saved_predictions/ # πŸ’Ύ Single image results
└── batch_results/ # πŸ“Š Batch processing results
```
## πŸŽ‰ You're Ready!
Your AI-powered diabetic retinopathy detection app is now ready to use!
**Next steps:**
1. πŸ–±οΈ Double-click `run_app.bat` (Windows) or run `python app.py`
2. 🌐 Open your web browser to the displayed URL
3. πŸ“ Upload OCT images for analysis
4. πŸ”¬ Explore the Grad-CAM visualizations
5. πŸ“Š Use batch processing for multiple images
**Remember:** This tool is for research and educational purposes. Always consult healthcare professionals for medical diagnosis.
---
*Need help? Check the full `README.md` or run `python setup.py` for detailed assistance.*