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

Instance ImageGoal Navigation Task #936

Merged
merged 6 commits into from
Sep 7, 2022
Merged

Conversation

jacobkrantz
Copy link
Contributor

@jacobkrantz jacobkrantz commented Aug 31, 2022

Motivation and Context

This PR introduces the Instance Image Goal Navigation task. Given an image of an object, an agent is tasked with navigating to that specific object. The goal criteria is adapted from ObjectNav to apply to a singular object. The goal image is specified by extrinsic and intrinsic parameters supplied by the dataset, i.e., the goal image can have a different camera height, viewing angle, and HFOV than the agent's observation space.

instance_imagegoal.mp4

A link to the dataset has been added to the datasets page.

How Has This Been Tested

Task tests added in test/test_instance_image_nav_task.py modeled after other nav task tests.

This has been forward-tested with habitat_baselines code that trains a DDPPO agent. I plan to introduce a follow-up PR to support this.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Aug 31, 2022
habitat/datasets/image_nav/__init__.py Outdated Show resolved Hide resolved
class InstanceImageGoalHFOVSensor(Sensor):
"""A sensor that returns the horizontal field of view (HFOV) in degrees
of the current episode's instance image goal.
"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the HFoV so special among all the intrinsics?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the others are zero so it implies the complete K. We provide HFoV to allow task methods to apply various transforms.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Does it make sense for the task dataset to involve some randomization over entries in K?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thought is no. FOV tends to be an intentional choice whereas other instrinsics like distortion effects are not. Dealing with these effects does not seem like a beneficial complication at this time. I chatted with Devendra and he is on board with this as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, that's fair.

One last question -- are we letting people pick both H and V FoV or are we committing them to an aspect ratio?

Copy link
Contributor Author

@jacobkrantz jacobkrantz Sep 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our dataset commits to a 1:1 aspect ratio and 512x512 resolution, but the code and dataset format supports an arbitrary aspect ratio, resolution, and FOV on a per-image basis.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, fair enough. And you'll release the code for dataset generation as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! Not for this core task PR, but as a follow-up.

@vincentpierre vincentpierre self-requested a review September 6, 2022 20:36
habitat/datasets/image_nav/instance_image_nav_dataset.py Outdated Show resolved Hide resolved
habitat/tasks/nav/instance_image_nav_task.py Outdated Show resolved Hide resolved
habitat/tasks/nav/instance_image_nav_task.py Outdated Show resolved Hide resolved
habitat/tasks/nav/instance_image_nav_task.py Outdated Show resolved Hide resolved
test/test_instance_image_nav_task.py Outdated Show resolved Hide resolved
Copy link
Contributor

@mathfac mathfac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for bringing Instance ImageNav to Habitat Lab and for adding appropriate tests.

@mathfac mathfac merged commit 9e081e6 into facebookresearch:main Sep 7, 2022
@jacobkrantz jacobkrantz deleted the iig branch September 7, 2022 22:59
dannymcy pushed a commit to dannymcy/habitat-lab that referenced this pull request Jul 8, 2024
Instance Image Goal Navigation task. Given an image of an object, an agent is tasked with navigating to that specific object.
HHYHRHY pushed a commit to SgtVincent/EMOS that referenced this pull request Aug 31, 2024
Instance Image Goal Navigation task. Given an image of an object, an agent is tasked with navigating to that specific object.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants