Spaces:
Sleeping
Sleeping
File size: 5,647 Bytes
596b739 463afdd 7360d11 596b739 463afdd 596b739 463afdd 596b739 463afdd 3e127b0 463afdd 2db5ce7 463afdd 3e127b0 463afdd 3e127b0 463afdd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
---
title: DimensioDepth
emoji: π¨
colorFrom: blue
colorTo: purple
sdk: streamlit
sdk_version: 1.28.0
app_file: app.py
pinned: true
license: mit
tags:
- depth-estimation
- computer-vision
- depth-anything-v2
- 3d-visualization
- image-processing
---
# π¨ DimensioDepth - Add Dimension to Everything
Transform 2D images into stunning 3D depth visualizations with state-of-the-art AI depth estimation.
## β¨ Features
### π― Advanced Depth Estimation
- **π REAL AI Models** - Depth-Anything V2 BASE (372MB) from Hugging Face Transformers! π₯
- **SUPERB Quality** - Best available depth estimation quality, production-ready results
- **Auto-Download** - Models download automatically on first run (~60-90 seconds one-time)
- **Fast Inference** - Professional depth estimation (~800ms on CPU, <200ms on GPU)
- **Multiple Colormaps** - Inferno, Viridis, Plasma, Turbo, Magma, Hot, Ocean, Rainbow
- **Smart Fallback** - Gracefully falls back to Demo Mode if models fail to load
- **No Manual Setup** - Just clone and run, models auto-download from HuggingFace Hub!
### π¬ Visualization Options
- **Colored Depth Maps** - Beautiful visualization with customizable color schemes
- **Grayscale Depth** - Classic depth representation
- **Side-by-Side Comparison** - Original vs. Depth view
- **3D Parallax Effect** - Create depth displacement visualizations
### π¦ Batch Processing
- Process multiple images at once
- Consistent depth estimation across your dataset
- Perfect for batch workflows
## π How to Use
### Basic Usage
1. **Upload an Image** - Drag & drop or click to upload
2. **Choose Quality Mode** - Fast for preview, High Quality for final output
3. **Select Colormap** - Pick your favorite depth visualization style
4. **Generate** - Click the button and watch the magic happen! β¨
### Advanced Features
- **Side-by-Side**: Compare original and depth maps
- **3D Parallax**: Create depth displacement effects
- **Batch Processing**: Process multiple images efficiently
## π οΈ Technical Details
### Architecture
- **Model**: Depth-Anything V2 (ViT-S and ViT-L variants)
- **Inference**: ONNX Runtime with GPU acceleration
- **Backend**: FastAPI + Python
- **Frontend**: Gradio
- **3D Rendering**: Custom GLSL shaders (original web app)
### Performance
| Mode | Model | Speed (CPU) | Quality |
|------|-------|-------------|---------|
| Real AI | BASE (372MB) | ~800ms | SUPERB β |
| Demo Mode | Synthetic | <50ms | Decent |
**Note**: This Space uses the BASE model for best quality. GPU inference is ~200ms.
### Demo Mode
Don't have models downloaded? No problem! DimensioDepth includes a **Demo Mode** that uses:
- Edge detection
- Intensity analysis
- Gaussian smoothing
- Depth synthesis algorithms
This creates surprisingly good depth maps without any AI models!
## π Use Cases
### π¨ Creative & Artistic
- Create depth-enhanced photos
- Generate 3D parallax effects
- Artistic depth visualization
### π¬ VFX & Film Production
- Depth map generation for compositing
- 3D reconstruction preparation
- Scene depth analysis
### π¬ Research & Development
- Computer vision research
- Depth perception studies
- Dataset augmentation
### π± Social Media & Content Creation
- Create engaging 3D effects
- Enhance photos with depth
- Generate unique visual content
## π About Depth-Anything V2
Depth-Anything V2 is a state-of-the-art monocular depth estimation model that:
- Works on any image (indoor/outdoor, any domain)
- Produces high-quality depth maps
- Runs efficiently on consumer hardware
- Supports both fast and accurate modes
[Read the Paper](https://arxiv.org/abs/2406.09414)
## π Examples
Try these types of images:
- **Portraits** - See facial depth structure
- **Landscapes** - Visualize scene depth layers
- **Architecture** - Analyze building geometry
- **Street Scenes** - Understand urban depth
- **Nature** - Explore organic depth patterns
## π‘ Tips for Best Results
1. **Image Quality**: Higher resolution = better depth detail
2. **Lighting**: Well-lit images produce clearer depth maps
3. **Contrast**: Images with good contrast show better depth separation
4. **Colormap**: Inferno is great for general use, Viridis for scientific visualization
5. **Mode Selection**: Use Fast for experimentation, High Quality for final output
## π§ Running Locally
Want to run DimensioDepth on your own machine?
```bash
# Clone the repository
git clone https://github.com/chromahubz/dimensiodepth.git
cd dimensiodepth
# Install dependencies
pip install -r requirements.txt
# Run the Gradio app
python app.py
```
For the full web experience with Three.js 3D viewer:
```bash
# Backend
cd backend
pip install -r requirements.txt
python -m uvicorn api.main:app --reload
# Frontend (separate terminal)
cd frontend
npm install
npm run dev
```
## π― Roadmap
- [ ] Video depth estimation
- [ ] Point cloud export
- [ ] 3D mesh reconstruction
- [ ] Real-time webcam depth
- [ ] Depth-guided editing tools
- [ ] Multi-frame temporal consistency
## π License
MIT License - Feel free to use in your projects!
## π Acknowledgments
- **Depth-Anything V2** - For the amazing depth estimation model
- **Hugging Face** - For the incredible Spaces platform
- **Gradio** - For making ML demos beautiful and easy
## π Contact & Links
- **GitHub**: [DimensioDepth Repository](https://github.com/chromahubz/dimensiodepth)
- **Original Web App**: Full-featured web application with 3D viewer and video export
- **Issues**: Report bugs on GitHub Issues
---
**Made with β€οΈ for the AI community**
*Transform your 2D world into 3D magic! π¨β¨*
|