107 lines
4.0 KiB
Markdown
107 lines
4.0 KiB
Markdown
<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.js"></script>
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.css">
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
const swiper = new Swiper('.swiper1', {
|
|
loop: true,
|
|
slidesPerView: 3,
|
|
spaceBetween: 20,
|
|
navigation: {
|
|
nextEl: '.swiper-button-next',
|
|
prevEl: '.swiper-button-prev',
|
|
},
|
|
centeredSlides: false,
|
|
noSwiping: true,
|
|
noSwipingClass: 'swiper-no-swiping',
|
|
watchSlidesProgress: true,
|
|
});
|
|
const modelViewers = document.querySelectorAll('model-viewer');
|
|
let loadedCount = 0;
|
|
modelViewers.forEach(mv => {
|
|
mv.addEventListener('load', () => {
|
|
loadedCount++;
|
|
if (loadedCount === modelViewers.length) {
|
|
swiper.update();
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
|
|
|
|
# 🖼️ Image-to-3D Service
|
|
[](https://huggingface.co/spaces/HorizonRobotics/EmbodiedGen-Image-to-3D)
|
|
|
|
This service launches a web application to generate physically plausible 3D asset URDF from single input image, offering high-quality support for digital twin systems.
|
|
|
|
<div class="swiper swiper1" style="max-width: 1000px; margin: 20px auto; border-radius: 12px;">
|
|
<div class="swiper-wrapper">
|
|
<div class="swiper-slide model-card">
|
|
<model-viewer
|
|
src="https://raw.githubusercontent.com/HochCC/ShowCase/main/image/astronaut.glb"
|
|
auto-rotate
|
|
camera-controls
|
|
style="display:block; width:100%; height:250px; background-color: #f8f8f8;">
|
|
</model-viewer>
|
|
</div>
|
|
<div class="swiper-slide model-card">
|
|
<model-viewer
|
|
src="https://raw.githubusercontent.com/HochCC/ShowCase/main/image/robot_i.glb"
|
|
auto-rotate
|
|
camera-controls
|
|
style="display:block; width:100%; height:250px; background-color: #f8f8f8;">
|
|
</model-viewer>
|
|
</div>
|
|
<div class="swiper-slide model-card">
|
|
<model-viewer
|
|
src="https://raw.githubusercontent.com/HochCC/ShowCase/main/image/desk.glb"
|
|
auto-rotate
|
|
camera-controls
|
|
style="display:block; width:100%; height:250px; background-color: #f8f8f8;">
|
|
</model-viewer>
|
|
</div>
|
|
<div class="swiper-slide model-card">
|
|
<model-viewer
|
|
src="https://raw.githubusercontent.com/HochCC/ShowCase/main/image/chair.glb"
|
|
auto-rotate
|
|
camera-controls
|
|
style="display:block; width:100%; height:250px; background-color: #f8f8f8;">
|
|
</model-viewer>
|
|
</div>
|
|
<div class="swiper-slide model-card">
|
|
<model-viewer
|
|
src="https://raw.githubusercontent.com/HochCC/ShowCase/main/image/desk2.glb"
|
|
auto-rotate
|
|
camera-controls
|
|
style="display:block; width:100%; height:250px; background-color: #f8f8f8;">
|
|
</model-viewer>
|
|
</div>
|
|
</div>
|
|
<div class="swiper-button-prev"></div>
|
|
<div class="swiper-button-next"></div>
|
|
</div>
|
|
|
|
---
|
|
|
|
## ☁️ Run the App Service
|
|
|
|
!!! note "Note"
|
|
Gradio servive is a simplified demonstration. For the full functionality, please refer to [img3d-cli](../tutorials/image_to_3d.md).
|
|
|
|
Run the image-to-3D generation service locally. Models are automatically downloaded on first run, please be patient.
|
|
|
|
```sh
|
|
# Run in foreground
|
|
python apps/image_to_3d.py
|
|
|
|
# Or run in the background
|
|
CUDA_VISIBLE_DEVICES=0 nohup python apps/image_to_3d.py > /dev/null 2>&1 &
|
|
```
|
|
|
|
---
|
|
|
|
!!! tip "Getting Started"
|
|
- Try it directly online via our [Hugging Face Space](https://huggingface.co/spaces/HorizonRobotics/EmbodiedGen-Image-to-3D) — no installation required.
|
|
- Explore EmbodiedGen generated sim-ready [Assets Gallery](https://huggingface.co/spaces/HorizonRobotics/EmbodiedGen-Gallery-Explorer).
|
|
- For instructions on using the generated asset in any simulator, see [Any Simulators Tutorial](tutorials/any_simulators.md). |