Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load generated JSON file in AI2THOR #17

Closed
mlodel opened this issue Jan 25, 2024 · 1 comment
Closed

Load generated JSON file in AI2THOR #17

mlodel opened this issue Jan 25, 2024 · 1 comment

Comments

@mlodel
Copy link

mlodel commented Jan 25, 2024

Is it possible to load the generated scene in ai2thor? I have been trying to do so by loading the JSON file content into the scene parameter of the ai2thor Controller, but when I visualize the scene I can see that all the objects are missing, only the rooms are generated.

This makes me think that the Objaverse data are not available, while they are for the generation with the main.py of Holodeck. How can I resolve this issue?
Thanks for any help!

@mlodel
Copy link
Author

mlodel commented Jan 25, 2024

Found the solution:

from ai2thor.controller import Controller
from ai2thor.hooks.procedural_asset_hook import ProceduralAssetHookRunner

scene = json.load(
    open(
        "data/scenes/<scene-XXX>/<scene>.json"
    )
)
objaverse_dir = (
    "./data/objaverse_holodeck/09_23_combine_scale/processed_2023_09_23_combine_scale"
)
controller = Controller(
    scene=scene,
    width=1000,
    height=1000,
    action_hook_runner=ProceduralAssetHookRunner(
        asset_directory=objaverse_dir,
        asset_symlink=True,
        verbose=True,
    ),
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant