depth-map-generation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDepth Map Generation
深度图生成
Generate accurate depth maps from any image using each::sense. This skill extracts depth information from 2D images for 3D effects, parallax animations, VR/AR applications, computational photography, and more.
借助each::sense从任意图像生成精准的深度图。该技能可从2D图像中提取深度信息,用于3D效果、视差动画、VR/AR应用、计算摄影等场景。
Features
功能特性
- Monocular Depth Estimation: Extract depth from single images
- Portrait Depth Maps: Precise depth for portrait photography effects
- Landscape Depth: Scene depth for panoramic and landscape images
- Product Depth: 3D-ready depth maps for e-commerce
- Architectural Depth: Building and interior depth analysis
- 3D Parallax Effects: Depth data for Ken Burns-style animations
- VR/AR Depth: Real-time depth estimation for immersive experiences
- Stereo Image Generation: Convert 2D to stereoscopic 3D
- Focus Stacking: Depth-based focus plane selection
- Background Blur: Depth-aware bokeh and blur effects
- 单目深度估计:从单张图像中提取深度信息
- 人像深度图:为肖像摄影效果提供精准深度数据
- 风景深度:为全景图及风景图像提供场景深度信息
- 商品深度:为电商场景生成可用于3D展示的深度图
- 建筑深度:对建筑及室内场景进行深度分析
- 3D视差效果:为Ken Burns风格动画提供深度数据
- VR/AR深度:为沉浸式体验提供实时深度估计
- 立体图像生成:将2D图像转换为立体3D图像
- 焦点堆叠:基于深度选择对焦平面
- 背景模糊:基于深度实现散景及模糊效果
Quick Start
快速开始
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Generate a depth map from this photo"}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/photo.jpg"],
"mode": "max"
}'bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Generate a depth map from this photo"}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/photo.jpg"],
"mode": "max"
}'Depth Map Output Formats
深度图输出格式
| Format | Description | Use Case |
|---|---|---|
| Grayscale | 8-bit depth (white=near, black=far) | General purpose, visualization |
| Inverse Grayscale | 8-bit depth (black=near, white=far) | Some 3D software compatibility |
| Normalized | 0-1 range depth values | Machine learning pipelines |
| Metric | Real-world distance estimation | AR/VR, robotics |
| Format | 说明 | 适用场景 |
|---|---|---|
| Grayscale | 8位深度(白色=近处,黑色=远处) | 通用场景、可视化展示 |
| Inverse Grayscale | 8位深度(黑色=近处,白色=远处) | 适配部分3D软件 |
| Normalized | 0-1范围的深度值 | 机器学习流水线 |
| Metric | 真实世界距离估计 | AR/VR、机器人领域 |
Use Case Examples
应用场景示例
1. Generate Depth Map from Photo
1. 从照片生成深度图
Basic depth extraction from any image.
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Generate a depth map from this image. Output as grayscale where white represents closer objects and black represents distant objects."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/scene.jpg"],
"mode": "max"
}'从任意图像提取基础深度信息。
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Generate a depth map from this image. Output as grayscale where white represents closer objects and black represents distant objects."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/scene.jpg"],
"mode": "max"
}'2. Portrait Depth Map
2. 人像深度图
Extract precise depth from portrait photos for bokeh effects and 3D portraits.
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create a high-precision depth map from this portrait photo. Focus on accurate edge detection around the subject, especially hair and facial features. I need this for applying realistic depth-of-field effects."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/portrait.jpg"],
"mode": "max"
}'从人像照片提取精准深度数据,用于散景效果及3D人像制作。
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create a high-precision depth map from this portrait photo. Focus on accurate edge detection around the subject, especially hair and facial features. I need this for applying realistic depth-of-field effects."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/portrait.jpg"],
"mode": "max"
}'3. Landscape Depth Map
3. 风景深度图
Generate depth from landscape and outdoor scenes with extended depth range.
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Generate a depth map from this landscape photo. The scene has foreground elements, mid-ground terrain, and distant mountains. Capture the full depth range from near to far with good separation between depth layers."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/landscape.jpg"],
"mode": "max"
}'从风景及户外场景生成深度图,覆盖更广的深度范围。
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Generate a depth map from this landscape photo. The scene has foreground elements, mid-ground terrain, and distant mountains. Capture the full depth range from near to far with good separation between depth layers."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/landscape.jpg"],
"mode": "max"
}'4. Product Depth for 3D Effect
4. 用于3D效果的商品深度图
Create depth maps for product images to enable 3D viewing experiences.
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Extract a depth map from this product photo. I need accurate depth information to create a 3D interactive view for an e-commerce website. Focus on capturing the product shape and surface details."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/product-sneaker.jpg"],
"mode": "max"
}'为商品图像创建深度图,实现3D浏览体验。
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Extract a depth map from this product photo. I need accurate depth information to create a 3D interactive view for an e-commerce website. Focus on capturing the product shape and surface details."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/product-sneaker.jpg"],
"mode": "max"
}'5. Architectural Depth Map
5. 建筑深度图
Generate depth from architectural and interior photos for visualization.
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create a depth map from this interior architecture photo. Capture the spatial relationships between walls, furniture, and architectural elements. I need this for a virtual tour with depth-based transitions."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/interior.jpg"],
"mode": "max"
}'从建筑及室内照片生成深度图,用于可视化展示。
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create a depth map from this interior architecture photo. Capture the spatial relationships between walls, furniture, and architectural elements. I need this for a virtual tour with depth-based transitions."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/interior.jpg"],
"mode": "max"
}'6. 3D Parallax Effect Creation
6. 3D视差效果制作
Generate depth maps optimized for creating parallax animations and Ken Burns effects.
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Generate a depth map from this photo that I will use for a 3D parallax animation. I need clear depth separation between foreground, midground, and background elements. The depth should be smooth with distinct layers for a compelling parallax effect."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/scene-for-parallax.jpg"],
"mode": "max"
}'生成优化后的深度图,用于制作视差动画及Ken Burns效果。
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Generate a depth map from this photo that I will use for a 3D parallax animation. I need clear depth separation between foreground, midground, and background elements. The depth should be smooth with distinct layers for a compelling parallax effect."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/scene-for-parallax.jpg"],
"mode": "max"
}'7. VR/AR Depth Estimation
7. VR/AR深度估计
Create depth maps suitable for virtual and augmented reality applications.
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Generate a depth map from this room photo for AR/VR use. I need metric depth estimation that accurately represents real-world distances. This will be used for placing virtual objects in an augmented reality application."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/room.jpg"],
"mode": "max"
}'创建适用于虚拟现实及增强现实应用的深度图。
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Generate a depth map from this room photo for AR/VR use. I need metric depth estimation that accurately represents real-world distances. This will be used for placing virtual objects in an augmented reality application."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/room.jpg"],
"mode": "max"
}'8. Stereo Image Generation
8. 立体图像生成
Convert 2D images to stereoscopic 3D using depth estimation.
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Generate a depth map from this photo and use it to create a stereoscopic 3D image pair (left and right eye views). The stereo effect should be subtle enough for comfortable viewing but noticeable enough to create depth perception."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/photo-for-stereo.jpg"],
"mode": "max"
}'借助深度估计将2D图像转换为立体3D图像。
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Generate a depth map from this photo and use it to create a stereoscopic 3D image pair (left and right eye views). The stereo effect should be subtle enough for comfortable viewing but noticeable enough to create depth perception."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/photo-for-stereo.jpg"],
"mode": "max"
}'9. Focus Stacking Depth
9. 焦点堆叠深度图
Generate depth maps for computational focus stacking and all-in-focus composites.
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create a depth map from this macro/close-up photo. I need precise depth information to identify focus planes for computational focus stacking. Each depth layer should be clearly defined so I can select which areas should be in focus."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/macro-photo.jpg"],
"mode": "max"
}'生成深度图用于计算焦点堆叠及全焦合成。
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create a depth map from this macro/close-up photo. I need precise depth information to identify focus planes for computational focus stacking. Each depth layer should be clearly defined so I can select which areas should be in focus."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/macro-photo.jpg"],
"mode": "max"
}'10. Depth-Aware Background Blur
10. 基于深度的背景模糊
Generate depth for applying realistic bokeh and background blur effects.
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Generate a depth map from this photo for applying depth-aware background blur. The subject in the foreground should be clearly separated from the background. I need accurate edge detection so the blur transition looks natural, similar to a portrait mode effect."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/photo-for-blur.jpg"],
"mode": "max"
}'生成深度数据用于实现真实的散景及背景模糊效果。
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Generate a depth map from this photo for applying depth-aware background blur. The subject in the foreground should be clearly separated from the background. I need accurate edge detection so the blur transition looks natural, similar to a portrait mode effect."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/photo-for-blur.jpg"],
"mode": "max"
}'Multi-Turn Depth Processing
多轮深度处理
Use to refine depth maps or process multiple related images:
session_idbash
undefined使用优化深度图或处理多张相关图像:
session_idbash
undefinedInitial depth estimation
初始深度估计
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Generate a depth map from this photo"}], "model": "eachsense/beta", "stream": true, "image_urls": ["https://example.com/scene.jpg"], "session_id": "depth-project-001" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Generate a depth map from this photo"}], "model": "eachsense/beta", "stream": true, "image_urls": ["https://example.com/scene.jpg"], "session_id": "depth-project-001" }'
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Generate a depth map from this photo"}], "model": "eachsense/beta", "stream": true, "image_urls": ["https://example.com/scene.jpg"], "session_id": "depth-project-001" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Generate a depth map from this photo"}], "model": "eachsense/beta", "stream": true, "image_urls": ["https://example.com/scene.jpg"], "session_id": "depth-project-001" }'
Refine the depth map
优化深度图
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "The depth map looks good but can you enhance the edge detection around the main subject? The boundaries are a bit fuzzy."}], "model": "eachsense/beta", "stream": true, "session_id": "depth-project-001" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "The depth map looks good but can you enhance the edge detection around the main subject? The boundaries are a bit fuzzy."}], "model": "eachsense/beta", "stream": true, "session_id": "depth-project-001" }'
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "The depth map looks good but can you enhance the edge detection around the main subject? The boundaries are a bit fuzzy."}], "model": "eachsense/beta", "stream": true, "session_id": "depth-project-001" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "The depth map looks good but can you enhance the edge detection around the main subject? The boundaries are a bit fuzzy."}], "model": "eachsense/beta", "stream": true, "session_id": "depth-project-001" }'
Apply the depth map for an effect
应用深度图实现效果
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Now use this depth map to create a 3D parallax video animation with subtle camera movement"}], "model": "eachsense/beta", "stream": true, "session_id": "depth-project-001" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Now use this depth map to create a 3D parallax video animation with subtle camera movement"}], "model": "eachsense/beta", "stream": true, "session_id": "depth-project-001" }'
undefinedcurl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Now use this depth map to create a 3D parallax video animation with subtle camera movement"}], "model": "eachsense/beta", "stream": true, "session_id": "depth-project-001" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Now use this depth map to create a 3D parallax video animation with subtle camera movement"}], "model": "eachsense/beta", "stream": true, "session_id": "depth-project-001" }'
undefinedBatch Depth Processing
批量深度处理
Process multiple images for consistent depth estimation:
bash
undefined处理多张图像以获得一致的深度估计结果:
bash
undefinedProcess first image
处理第一张图像
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Generate a depth map from this product photo. I will be sending more product images that need consistent depth estimation."}], "model": "eachsense/beta", "stream": true, "image_urls": ["https://example.com/product1.jpg"], "session_id": "product-depth-batch", "mode": "eco" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Generate a depth map from this product photo. I will be sending more product images that need consistent depth estimation."}], "model": "eachsense/beta", "stream": true, "image_urls": ["https://example.com/product1.jpg"], "session_id": "product-depth-batch", "mode": "eco" }'
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Generate a depth map from this product photo. I will be sending more product images that need consistent depth estimation."}], "model": "eachsense/beta", "stream": true, "image_urls": ["https://example.com/product1.jpg"], "session_id": "product-depth-batch", "mode": "eco" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Generate a depth map from this product photo. I will be sending more product images that need consistent depth estimation."}], "model": "eachsense/beta", "stream": true, "image_urls": ["https://example.com/product1.jpg"], "session_id": "product-depth-batch", "mode": "eco" }'
Process second image with same settings
使用相同设置处理第二张图像
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Generate depth map for this product using the same approach as before"}], "model": "eachsense/beta", "stream": true, "image_urls": ["https://example.com/product2.jpg"], "session_id": "product-depth-batch", "mode": "eco" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Generate depth map for this product using the same approach as before"}], "model": "eachsense/beta", "stream": true, "image_urls": ["https://example.com/product2.jpg"], "session_id": "product-depth-batch", "mode": "eco" }'
undefinedcurl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Generate depth map for this product using the same approach as before"}], "model": "eachsense/beta", "stream": true, "image_urls": ["https://example.com/product2.jpg"], "session_id": "product-depth-batch", "mode": "eco" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Generate depth map for this product using the same approach as before"}], "model": "eachsense/beta", "stream": true, "image_urls": ["https://example.com/product2.jpg"], "session_id": "product-depth-batch", "mode": "eco" }'
undefinedMode Selection
模式选择
| Mode | Best For | Speed | Quality |
|---|---|---|---|
| Final production depth maps, VR/AR applications, professional compositing | Slower | Highest precision |
| Quick previews, batch processing, prototyping | Faster | Good quality |
Recommendation: Use mode when depth accuracy is critical (VR/AR, 3D conversion, professional compositing). Use mode for rapid iteration and batch processing.
maxeco| Mode | 适用场景 | 速度 | 质量 |
|---|---|---|---|
| 最终生产级深度图、VR/AR应用、专业合成 | 较慢 | 最高精度 |
| 快速预览、批量处理、原型制作 | 较快 | 良好质量 |
建议:当深度精度至关重要时(如VR/AR、3D转换、专业合成),使用模式。快速迭代及批量处理时使用模式。
maxecoBest Practices
最佳实践
Input Image Quality
输入图像质量
- Resolution: Higher resolution inputs produce more detailed depth maps
- Lighting: Even lighting helps with accurate depth estimation
- Contrast: Clear contrast between objects improves depth separation
- Focus: Sharp images yield better edge detection in depth maps
- 分辨率:更高分辨率的输入图像可生成更精细的深度图
- 光照:均匀光照有助于精准的深度估计
- 对比度:物体间清晰的对比度可提升深度分离效果
- 对焦:清晰的图像能在深度图中实现更好的边缘检测
Depth Map Applications
深度图应用
- Parallax Effects: Use 3-5 distinct depth layers for best results
- Bokeh/Blur: Ensure clean subject edges for natural blur falloff
- 3D Conversion: Provide context about scene scale for metric depth
- VR/AR: Request metric depth for real-world distance accuracy
- 视差效果:使用3-5个不同的深度层可获得最佳效果
- 散景/模糊:确保主体边缘清晰,实现自然的模糊过渡
- 3D转换:提供场景尺度信息以获取度量深度
- VR/AR:请求度量深度以保证真实世界距离的准确性
Prompt Tips
提示词技巧
- Specify output format: Grayscale, normalized, or metric depth
- Describe the scene: Help the model understand spatial relationships
- State your use case: Different applications benefit from different depth characteristics
- Request edge quality: Specify if you need sharp or smooth depth transitions
- 指定输出格式:灰度图、归一化或度量深度
- 描述场景:帮助模型理解空间关系
- 说明使用场景:不同应用场景需要不同特性的深度数据
- 要求边缘质量:明确是否需要锐利或平滑的深度过渡
Error Handling
错误处理
| Error | Cause | Solution |
|---|---|---|
| Insufficient balance | Top up at eachlabs.ai |
| Image loading failed | Invalid or inaccessible image URL | Verify image URL is publicly accessible |
| Timeout | Complex or high-resolution image | Set client timeout to minimum 10 minutes |
| Low quality depth output | Poor input image quality | Use higher resolution, better lit source image |
| 错误 | 原因 | 解决方案 |
|---|---|---|
| 余额不足 | 在eachlabs.ai进行充值 |
| 图像加载失败 | 图像URL无效或无法访问 | 验证图像URL可公开访问 |
| 超时 | 图像复杂或分辨率过高 | 将客户端超时设置为至少10分钟 |
| 深度图质量低下 | 输入图像质量差 | 使用更高分辨率、光照更好的源图像 |
Technical Notes
技术说明
- Client Timeout: Set your HTTP client timeout to minimum 10 minutes for complex depth estimation
- Image Formats: Supports JPEG, PNG, WebP input images
- Output Format: Depth maps are typically output as grayscale PNG images
- Depth Range: Relative depth (0-1) by default; metric depth available on request
- 客户端超时:对于复杂的深度估计,将HTTP客户端超时设置为至少10分钟
- 图像格式:支持JPEG、PNG、WebP输入图像
- 输出格式:深度图通常以灰度PNG图像输出
- 深度范围:默认提供相对深度(0-1);可请求度量深度
Related Skills
相关技能
- - Core API documentation
each-sense - - Full 3D model generation from images
image-to-3d - - Apply depth-based effects to images
image-editing - - Create parallax videos from depth maps
video-generation
- - 核心API文档
each-sense - - 从图像生成完整3D模型
image-to-3d - - 为图像应用基于深度的效果
image-editing - - 从深度图生成视差视频
video-generation