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

Hello,I have a question.how do you get images about ai2thor?Could you share the oral images?thanks! #6

Open
Dilemma111 opened this issue Dec 15, 2023 · 4 comments

Comments

@Dilemma111
Copy link

No description provided.

@Gary3410
Copy link
Owner

Hello, getting images from ai2thor is easy, after initializing the scene, the following code is executed to get the RGB image, depth image, and instance segmentation masks.

last_event = controller.last_event
rgb_image = last_event.cv2img
depth_image = last_event.depth_frame
instance_segmentation_frame = last_event.instance_segmentation_frame
color_to_object_id = last_event.color_to_object_id

Hope this can help you!

@Dilemma111
Copy link
Author

Dilemma111 commented Dec 15, 2023

Hello, getting images from ai2thor is easy, after initializing the scene, the following code is executed to get the RGB image, depth image, and instance segmentation masks.

last_event = controller.last_event
rgb_image = last_event.cv2img
depth_image = last_event.depth_frame
instance_segmentation_frame = last_event.instance_segmentation_frame
color_to_object_id = last_event.color_to_object_id

Hope this can help you!

thank you!!!but I have problem about running ai2thor.It sounds like an environment configuration issue:ModuleNotFoundError: Exception: Unity process has exited - check ~/.config/unity3d/Allen\ Institute\ for\ Artificial\ Intelligence/AI2-THOR/Player.log for errors. Confirm that Vulkan is properly configured on this system using vulkaninfo from the vulkan-utils package. returncode=-11'. And now I just want 100 images about iTHOR to process and test.

@Gary3410
Copy link
Owner

Well, this may seem like a problem with the environment initiation, try starting it with the following code:

from ai2thor.controller import Controller
from ai2thor.platform import CloudRendering

controller = Controller(
agentMode="default",
visibilityDistance=1.5,
scene="FloorPlan319",
platform=CloudRendering,
makeAgentsVisible=False,
# step sizes
gridSize=0.75,
snapToGrid=False,
rotateStepDegrees=90,
# image modalities
renderDepthImage=True,
renderInstanceSegmentation=True,
# camera properties
width=1024,
height=1024,
fieldOfView=90
)

If the above code does not work, you can get some images of the scene from this link.
Hope this can help you!

@Dilemma111
Copy link
Author

Well, this may seem like a problem with the environment initiation, try starting it with the following code:

from ai2thor.controller import Controller
from ai2thor.platform import CloudRendering

controller = Controller(
agentMode="default",
visibilityDistance=1.5,
scene="FloorPlan319",
platform=CloudRendering,
makeAgentsVisible=False,
# step sizes
gridSize=0.75,
snapToGrid=False,
rotateStepDegrees=90,
# image modalities
renderDepthImage=True,
renderInstanceSegmentation=True,
# camera properties
width=1024,
height=1024,
fieldOfView=90
)

If the above code does not work, you can get some images of the scene from this link.
Hope this can help you!

thank you very much!!!Have a good time!!!

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

2 participants