lyft / lyft/nuscenes-devkit

Issue regarding box visibility

Open
#40 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
Dominant language
Jupyter Notebook
Stars
390
Forks
99
PR merge metrics
No merged PRs in 30d

Description

Hey,

We have three levels of box visibility:

```
"""Enumerates the various level of box visibility in an image."""

ALL = 0 # Requires all corners are inside the image.
ANY = 1 # Requires at least one corner visible in the image.
NONE = 2 # Requires no corners to be inside, i.e. box can be fully outside the image.
```

Notice how the description of ANY says "at least one corner *visible* in the image" and rest say "corners *inside* the image" This creates the confusion. As by visibility, people infer that the object should actually be visible in that particular image without occlusions.

Also, the docstring of [box_in_image](https://github.com/lyft/nuscenes-devkit/blob/master/lyft_dataset_sdk/utils/geometry_utils.py#L62) says
```
"""Check if a box is visible inside an image without accounting for occlusions.
...
...
Returns: True if visibility condition is satisfied.
"""
```

Here it talks about "visible inside an image without accounting for occlusions". I think this clears the confusion, and [BoxVisiblity](https://github.com/lyft/nuscenes-devkit/blob/master/lyft_dataset_sdk/utils/geometry_utils.py#L13) should also explicitly mention this in its docstring. I propose new docstring and comments for BoxVisiblity class:

```
class BoxVisibility(IntEnum):
"""Enumerates the various level of box visibility inside an image without accounting for occlusions"""

ALL = 0 # Requires all corners are visible inside the image.
ANY = 1 # Requires at least one corner is visible inside the image.
NONE = 2 # Requires no corners to be visible inside, i.e. box can be fully outside the image.
```

I would love to know your thoughts.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open lyft_dataset_sdk/utils/geometry_utils.py and compare the BoxVisibility docstring and comments with the existing box_in_image docstring. Update the wording so visibility clearly means corners inside the image without accounting for occlusions, then review the surrounding documentation for consistent terminology.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.