lyft / nuscenes-devkit

Devkit for the public 2019 Lyft Level 5 AV Dataset (fork of https://github.com/nutonomy/nuscenes-devkit)
Other
366 stars 103 forks source link

Issue regarding box visibility #40

Open pyaf opened 4 years ago

pyaf commented 4 years ago

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 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 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.