Spaces:
Running
Running
# Medical AI Suite - Unified Interface | |
A comprehensive web application that combines wound classification and depth estimation capabilities in a single, modern interface. | |
## π Quick Start | |
### Option 1: Use the Launcher (Recommended) | |
```bash | |
python launcher.py | |
``` | |
This will show you a menu to choose which application to run. | |
### Option 2: Run the Unified Interface Directly | |
```bash | |
python main_app.py | |
``` | |
### Option 3: Run Individual Applications | |
```bash | |
# Wound Classification only | |
python app2.py | |
# Depth Estimation only | |
python app.py | |
``` | |
## π₯ Features | |
### Tab 1: Wound Classification | |
- **AI-powered wound type classification** | |
- **Grad-CAM visualization** - See which areas the model focuses on | |
- **Confidence scores** with color-coded bars | |
- **Real-time analysis** - Results update as you upload images | |
### Tab 2: Depth Estimation & 3D Visualization | |
- **Depth map generation** using DepthAnythingV2 model | |
- **Interactive 3D point cloud visualization** | |
- **Adjustable parameters** (focal length, point density) | |
- **Multiple output formats** (grayscale, raw, PLY point cloud) | |
- **Image slider comparison** between original and depth map | |
## π¨ Interface Features | |
- **Modern dark theme** with gradient backgrounds | |
- **Tabbed navigation** between applications | |
- **Responsive design** that works on different screen sizes | |
- **Professional medical interface** styling | |
- **Real-time feedback** and progress indicators | |
## π File Structure | |
``` | |
βββ main_app.py # Unified interface (NEW) | |
βββ launcher.py # Application launcher (NEW) | |
βββ app.py # Original depth estimation app | |
βββ app2.py # Original wound classification app | |
βββ checkpoints/ | |
β βββ keras_model.h5 # Wound classification model | |
β βββ depth_anything_v2_vitl.pth # Depth estimation model | |
βββ labels.txt # Wound classification labels | |
βββ depth_anything_v2/ # Depth model implementation | |
``` | |
## π§ Requirements | |
The unified interface requires all the same dependencies as the individual applications: | |
- `gradio` | |
- `tensorflow` | |
- `torch` | |
- `opencv-python` | |
- `pillow` | |
- `numpy` | |
- `matplotlib` | |
- `plotly` | |
- `open3d` | |
- `gradio-imageslider` | |
## π Access | |
Once launched, the interface will be available at: | |
- **Local**: http://localhost:7860 | |
- **Public**: A public link will be provided when the server starts | |
## π‘ Usage Tips | |
### Wound Classification | |
1. Upload a clear image of the wound | |
2. The model will automatically classify the wound type | |
3. View the Grad-CAM heatmap to see which areas influenced the decision | |
4. Check confidence scores for all possible classifications | |
### Depth Estimation | |
1. Upload an image for depth analysis | |
2. Adjust the number of 3D points (higher = more detailed but slower) | |
3. Set focal length parameters if you know your camera specs | |
4. Click "Compute Depth" to generate results | |
5. Download depth maps and point clouds as needed | |
6. Explore the interactive 3D visualization | |
## π οΈ Troubleshooting | |
### Model Loading Issues | |
If models fail to load, the interface will show appropriate error messages and continue to function with limited capabilities. | |
### Performance | |
- For large images, consider reducing the number of 3D points | |
- Depth estimation works best with good lighting and clear subjects | |
- Wound classification works best with well-lit, focused images | |
### Browser Compatibility | |
The interface works best with modern browsers (Chrome, Firefox, Safari, Edge). | |
## π Navigation | |
You can easily switch between the two main functionalities using the tabs at the top of the interface. Each tab maintains its own state, so you can work on both applications simultaneously. | |
## π Support | |
If you encounter any issues: | |
1. Check that all required model files are present | |
2. Ensure all dependencies are installed | |
3. Try running individual applications first to isolate issues | |
4. Check the console output for error messages | |
--- | |
**Enjoy using the Medical AI Suite! π₯β¨** |