gradui-1 / README_Unified.md
viranchi123's picture
Upload 75 files
ca46f55 verified

A newer version of the Gradio SDK is available: 5.38.0

Upgrade

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)

python launcher.py

This will show you a menu to choose which application to run.

Option 2: Run the Unified Interface Directly

python main_app.py

Option 3: Run Individual Applications

# 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:

πŸ’‘ 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! πŸ₯✨