diff --git a/.dockerignore b/.dockerignore index 1908512..011378e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -13,13 +13,22 @@ build/ *.egg-info/ .env +.cache/ +.pytest_cache/ +.ruff_cache/ .idea/ .vscode/ *.log tmp/ .DS_Store +weights/ +wheels_*/ +apps/gradio_cache/ +apps/sessions/ +thirdparty/infinigen/ + Dockerfile .dockerignore -outputs/ \ No newline at end of file +outputs/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b51bc6b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,60 @@ +name: CI + +on: + pull_request: + push: + branches: [master] + +jobs: + release-smoke: + runs-on: ubuntu-22.04 + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Install validation tools + run: | + python -m pip install --upgrade pip + python -m pip install build ruff + + - name: Lint Python + run: ruff check embodied_gen apps tests + + - name: Validate shell scripts + run: bash -n install.sh install/*.sh + + - name: Build wheel + run: python -m build --wheel --outdir dist + + - name: Validate wheel contents + run: | + python - <<'PY' + from pathlib import Path + from zipfile import ZipFile + + wheels = list(Path("dist").glob("*.whl")) + assert len(wheels) == 1, wheels + + with ZipFile(wheels[0]) as archive: + names = archive.namelist() + + required = { + "embodied_gen/__init__.py", + "embodied_gen/scripts/imageto3d.py", + "embodied_gen/scripts/textto3d.py", + "embodied_gen/scripts/gen_texture.py", + "embodied_gen/utils/gpt_config.yaml", + } + missing = sorted(required.difference(names)) + assert not missing, f"Missing wheel files: {missing}" + assert any(name.endswith("/LICENSE") for name in names) + assert not any( + "__pycache__" in name or name.endswith((".pyc", ".pyo")) + for name in names + ) + PY diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index 81c9f75..4c475c5 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -38,7 +38,7 @@ jobs: run: echo "PYTHONPATH=$(pwd)" >> $GITHUB_ENV - name: Build docs (validation) - run: mkdocs build + run: mkdocs build --strict deploy: needs: build diff --git a/docs/documentation/LICENSE b/LICENSE similarity index 100% rename from docs/documentation/LICENSE rename to LICENSE diff --git a/MANIFEST.in b/MANIFEST.in index 35d708e..af7b6f3 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1,4 @@ -graft embodied_gen \ No newline at end of file +graft embodied_gen +global-exclude __pycache__ +global-exclude *.py[cod] +global-exclude .DS_Store diff --git a/README.md b/README.md index 739b828..a4615d0 100644 --- a/README.md +++ b/README.md @@ -6,17 +6,18 @@ [![πŸ“„ arXiv](https://img.shields.io/badge/πŸ“„-arXiv_v1-b31b1b)](https://arxiv.org/abs/2506.10600) [![πŸ“„ arXiv](https://img.shields.io/badge/πŸ“„-arXiv_v2-b31b1b)](https://arxiv.org/abs/2607.07459) [![πŸŽ₯ Video](https://img.shields.io/badge/πŸŽ₯-Video-red)](https://youtu.be/MIkJJSVM8L4) +[![中文介绍](https://img.shields.io/badge/中文介绍-07C160?logo=wechat&logoColor=white)](https://mp.weixin.qq.com/s/RbMPX3vTTSwrW0MjwjeXuA) + [![πŸ€— Dataset](https://img.shields.io/badge/πŸ€—-Dataset-blue)](https://huggingface.co/datasets/HorizonRobotics/EmbodiedGenData) - [![πŸ€— Hugging Face](https://img.shields.io/badge/πŸ€—-EmbodiedGen_Asset_Gallery-blue)](https://huggingface.co/spaces/HorizonRobotics/EmbodiedGen-Gallery-Explorer) [![πŸ€— Hugging Face](https://img.shields.io/badge/πŸ€—-Image_to_3D_Demo-blue)](https://huggingface.co/spaces/HorizonRobotics/EmbodiedGen-Image-to-3D) [![πŸ€— Hugging Face](https://img.shields.io/badge/πŸ€—-Text_to_3D_Demo-blue)](https://huggingface.co/spaces/HorizonRobotics/EmbodiedGen-Text-to-3D) [![πŸ€— Hugging Face](https://img.shields.io/badge/πŸ€—-Texture_Gen_Demo-blue)](https://huggingface.co/spaces/HorizonRobotics/EmbodiedGen-Texture-Gen) > **From intent to executable 3D worlds.** -> ***EmbodiedGen*** compiles language, images, and edit commands into **simulation-ready 3D worlds** β€” physically plausible assets, large-scale scenes, and task-driven interactive environments, deployable across every major robotics simulator. +> ***EmbodiedGen*** compiles language, images, and edit commands into **policy-ready 3D worlds** β€” physically plausible assets, large-scale scenes, and task-driven interactive environments, deployable across major simulators. -EmbodiedGen V2 Overview +EmbodiedGen V2 Overview --- @@ -27,7 +28,7 @@ - πŸ“¦ **One world, every simulator** β€” a standardized layout loads with consistent geometry, collision, and physics across **SAPIEN, Isaac Sim, Isaac Gym, MuJoCo, Genesis, and PyBullet**. - 🧩 **Pluggable 3D backends** β€” switch between **SAM3D**, **TRELLIS**, and the **Hunyuan3D Pro** cloud API with a single flag. - πŸ§₯ **Beyond rigid bodies** β€” text-conditioned garments deploy as deformable meshes in Genesis. -- 🦾 **Part-level affordance** β€” functional part segmentation, per-part semantics, and simulation-validated 6-DoF grasp poses for any generated asset. +- πŸ•ΉοΈ **Part-level affordance** β€” functional part segmentation, per-part semantics, and simulation-validated 6-DoF grasp poses for any generated asset. - πŸ€– **Closed-loop robot learning** β€” policies trained purely in EmbodiedGen-generated worlds transfer to real robots (task success **9.7 β†’ 79.8%** in sim, **21.7 β†’ 75.0%** on real robots, from [sim2real RL paper](https://arxiv.org/abs/2603.18532)). ## πŸ“‹ Table of Contents @@ -42,6 +43,7 @@ - [πŸ€– Train β€” Robot Learning](#robot-learning) - [βš™οΈ Articulated Object Generation](#articulated-object-generation) - [🧩 3D Scene Completion](#3d-scene-completion) +- [πŸ”„ Sim-to-Real Reinforcement Learning](#sim-to-real-reinforcement-learning) --- @@ -50,17 +52,27 @@ ```sh git clone https://github.com/HorizonRobotics/EmbodiedGen.git cd EmbodiedGen -git checkout v2.0.1 +git checkout v2.1.0 conda create -n embodiedgen python=3.10.13 -y conda activate embodiedgen # Manually install one CUDA toolkit when needed. cu126 remains the default. # bash install.sh cu126 # RTX 40-series. # bash install.sh cu128 # RTX 50-series / Blackwell. -bash install.sh basic # around 10 mins conda deactivate && conda activate embodiedgen +bash install.sh basic # around 10 mins ``` -Set up the GPT agent (required by most pipelines): update the API key in `embodied_gen/utils/gpt_config.yaml`. Then generate your first sim-ready asset: +Set up one GPT agent backend (required by most pipelines): + +- **Azure OpenAI / OpenRouter:** select the backend and update its API key in + `embodied_gen/utils/gpt_config.yaml`. +- **Codex CLI:** run `codex login`, then set `agent_type: codex` in + `embodied_gen/utils/gpt_config.yaml`; no project API key is required. + +See the [GPT Agent Setup guide](docs/documentation/gpt_agent.md) for complete +configuration, environment variables, and deployment recommendations. + +Then generate your first sim-ready asset: ```sh img3d-cli --image_path apps/assets/example_image/sample_00.jpg \ @@ -68,8 +80,6 @@ img3d-cli --image_path apps/assets/example_image/sample_00.jpg \ # β†’ outputs/imageto3d/sample_00/result: URDF + mesh(.obj/.glb) + 3DGS(.ply) + video ``` -A pre-built Docker image is also available on [Docker Hub](https://hub.docker.com/repository/docker/wangxinjie/embodiedgen). - ➑️ Full guide: [Installation & Setup](https://horizonrobotics.github.io/EmbodiedGen/docs/install.html) Β· [Docker](docker/README.md) --- @@ -133,7 +143,7 @@ room-cli -m embodied_gen.scripts.room_gen.gen_room \ # or specify the profile explicitly: --room-type Kitchen --seed 42 --complexity simple # 3DGS background scene from text (requires `bash install.sh scene3d`) -scene3d-cli --prompts "Art studio with easel and canvas" --output_dir outputs/bg_scenes/ --seed 0 +CUDA_VISIBLE_DEVICES=0 scene3d-cli --prompts "Art studio with easel and canvas" --output_dir outputs/bg_scenes/ --seed 0 ``` ➑️ Full guides: [Room Generation](https://horizonrobotics.github.io/EmbodiedGen/docs/tutorials/room_gen.html) Β· [3D Scene Generation](https://horizonrobotics.github.io/EmbodiedGen/docs/tutorials/scene_gen.html) @@ -252,6 +262,14 @@ See our paper **3D-Fixer** published in CVPR 2026: --- +

πŸ”„ Sim-to-Real Reinforcement Learning

+ +See our paper **Scaling Sim-to-Real Reinforcement Learning for Robot VLAs with Generative 3D Worlds** [[link]](https://arxiv.org/abs/2603.18532). + +Sim-to-real reinforcement learning with EmbodiedGen-generated worlds + +--- + ## For Developer ```sh @@ -263,17 +281,6 @@ python -m pytest # Pass all unit-test are required. If you use EmbodiedGen in your research or projects, please cite: -```bibtex -@misc{wang2026embodiedgenv2agenticsimulationready, - title={EmbodiedGen V2: An Agentic, Simulation-Ready 3D World Engine for Embodied AI}, - author={Xinjie Wang and Liu Liu and Taojun Ding and Andrew Choi and Chaodong Huang and Mengao Zhao and Ziang Li and Jackson Jiang and Chunlei Yu and Shengxiang Liu and Wei Xu and Zhizhong Su}, - year={2026}, - eprint={2607.07459}, - archivePrefix={arXiv}, - primaryClass={cs.RO}, - url={https://arxiv.org/abs/2607.07459}, -} -``` ```bibtex @misc{wang2025embodiedgengenerative3dworld, title = {EmbodiedGen: Towards a Generative 3D World Engine for Embodied Intelligence}, @@ -286,6 +293,18 @@ If you use EmbodiedGen in your research or projects, please cite: } ``` +```bibtex +@misc{wang2026embodiedgenv2agenticsimulationready, + title={EmbodiedGen V2: An Agentic, Simulation-Ready 3D World Engine for Embodied AI}, + author={Xinjie Wang and Liu Liu and Taojun Ding and Andrew Choi and Chaodong Huang and Mengao Zhao and Ziang Li and Jackson Jiang and Chunlei Yu and Shengxiang Liu and Wei Xu and Zhizhong Su}, + year={2026}, + eprint={2607.07459}, + archivePrefix={arXiv}, + primaryClass={cs.RO}, + url={https://arxiv.org/abs/2607.07459}, +} +``` + --- ## πŸ™Œ Acknowledgement @@ -297,4 +316,4 @@ EmbodiedGen builds upon the following amazing projects and models: ## βš–οΈ License -This project is licensed under the [Apache License 2.0](docs/LICENSE). See the `LICENSE` file for details. +This project is licensed under the [Apache License 2.0](LICENSE). See the `LICENSE` file for details. diff --git a/apps/app_style.py b/apps/app_style.py index 313ccd1..b5057a3 100644 --- a/apps/app_style.py +++ b/apps/app_style.py @@ -15,7 +15,7 @@ # permissions and limitations under the License. from gradio.themes import Soft -from gradio.themes.utils.colors import gray, neutral, slate, stone, teal, zinc +from gradio.themes.utils.colors import gray, stone lighting_css = """