allenai / ai2thor

An open-source platform for Visual AI.
http://ai2thor.allenai.org
Apache License 2.0
1.17k stars 217 forks source link

2.7.2 `renderObjectImage` during action taking no longer functions #626

Closed thomason-jesse closed 3 years ago

thomason-jesse commented 3 years ago

Previously, initializing the controller with renderObjectImage=False meant the event instance_segmentation_frame was None until taking an action with renderObjectImage=True, where one frame of instance_segmentation_frame would be generated, e.g.,

controller = Controller()
print(controller.last_event.instance_segmentation_frame)  // Prints "None"
controller.step(action='Pass', renderObjectImage=True)
print(controller.last_event.instance_segmentation_frame)  // Prints np array

With the 2.7.2 release, the following happens instead:

controller = Controller()
print(controller.last_event.instance_segmentation_frame)  // Prints "None"
controller.step(action='Pass', renderObjectImage=True)
print(controller.last_event.instance_segmentation_frame)  // Prints "None"
ekolve commented 3 years ago

This works for me with 2.7.2:

c = ai2thor.controller.Controller(scene='FloorPlan28')
print(c._build.url)
print(c.last_event.instance_segmentation_frame)
c.step('Pass', renderObjectImage=True)
print(c.last_event.instance_segmentation_frame.shape)

c.step('Pass')
print(c.last_event.instance_segmentation_frame)

The output is:

http://s3-us-west-2.amazonaws.com/ai2-thor-public/builds/thor-OSXIntel64-a6674babc132c5d63d18c82a0e14c01d236aa981.zip
None
(300, 300, 3)
None

Can you confirm that you have the same (or similar _build.url)?

thomason-jesse commented 3 years ago

You're right, my mistake.

This issue is present for a local build I made from this commit: https://github.com/allenai/ai2thor/commit/d46f9e61fe79f4c2840d36ff13884c9103438249 It may be an issue with my local unity compilation, or perhaps this just isn't a stable release yet since there are a few other oddities (e.g., TeleportFull expecting a standing parameter, which doesn't appear to be documented yet). I'll hold off for the next full release.