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

Receptacle unique_name filtering #1298

Merged
merged 4 commits into from
May 18, 2023
Merged

Receptacle unique_name filtering #1298

merged 4 commits into from
May 18, 2023

Conversation

aclegg3
Copy link
Contributor

@aclegg3 aclegg3 commented Apr 24, 2023

Motivation and Context

Current RearrangeEpisode generation relies on pre-configured filtering substrings to cull unwanted receptacles or split them into sets for different purposes. These substrings were checked against Receptacle names, which were not instance-unique and therefore could not differentiate between multiple instances of the same object.

This PR refactors all filtering to consider unique_name, a combination of object instance name and receptacle name, as well as adding support for per-scene filter files (output of Habitat-sim 2078).

Note: requires Habitat-sim 2081 (main merged 04/24).

Format example:
In my_scene.scene_instance.json, add a user_defined entry "scene_filter_file" referencing a dataset-local filepath to the filter JSON:

"user_defined":{
      "scene_filter_file": "scene_filter_files/104348361_171513414.rec_filter.json"
}

The filter file contains several lists of unique_names. See Habitat-sim 2078 for more details. Those currently parsed are:

{
  "manually_filtered": []
  "access_filtered": [],
  "stability_filtered": [],
  "height_filtered": [],
}

An example unique_name:

"cbb4633c95d4b985f10188b8d62be4a90593b07d_:0000|receptacle_mesh_cbb4633c95d4b985f10188b8d62be4a90593b07d.0000"

How Has This Been Tested

Locally with output from Habitat-sim 2078.

Types of changes

  • [Refactoring] Large changes to the code that improve its functionality or performance
  • [Development] A pull request that add new features to the habitat-lab task and environment codebase. Development Pull Requests must be small (less that 500 lines of code change), have unit testing, very extensive documentation and examples. These are typically new tasks, environments, sensors, etc... The review process for these Pull Request is longer because these changes will be maintained by our core team of developers, so make sure your changes are easy to understand!

Checklist

  • My code follows the code style of this project.
  • I have updated the documentation if required.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes if required.

…ort for filter files configured in scene instance config user_defined fields.
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Apr 24, 2023
Copy link
Contributor

@vincentpierre vincentpierre left a comment

Choose a reason for hiding this comment

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

Not sure I am the best positioned to review this code, but it seems like an improvement,

scene_user_defined = mm.get_scene_user_defined(scene_handle)
filtered_unique_names = []
if scene_user_defined is not None and scene_user_defined.has_value(
"scene_filter_file"
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these strings documented somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are using the "user_defined" fields for this, so there is no official documentation. It is documented in the Receptacle filtering process and the tools used to generate the configs.
Once we have everything working for the dataset release we should add a doc page to the website about the entire Receptacle system.

@aclegg3 aclegg3 merged commit 6d20cc3 into main May 18, 2023
@aclegg3 aclegg3 deleted the rearrange-rec-filter branch May 18, 2023 14:53
dannymcy pushed a commit to dannymcy/habitat-lab that referenced this pull request Jul 8, 2024
* refactor to use Receptacle unique_name for sample filtering. Add support for filter files configured in scene instance config user_defined fields.

* assert uniqueness of Receptacle names when loaded.
HHYHRHY pushed a commit to SgtVincent/habitat-lab that referenced this pull request Aug 31, 2024
* refactor to use Receptacle unique_name for sample filtering. Add support for filter files configured in scene instance config user_defined fields.

* assert uniqueness of Receptacle names when loaded.
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.

5 participants