Skip to content

Get annotated objects in map #265

Open
@HLCaptain

Description

@HLCaptain

I have a problem, where I would like to get annotated object information (like position, scale, etc.), usually used for object recognition with camera with bng.camera.get_annotations() and bng.camera.get_annotation_classes(annotations) via CameraApi.

My first idea was to filter static objects and return their respective fields, like positions, etc. which worked quite well:

static_objects = bng.scenario.find_objects_class('TSStatic') # Or use `scenario.find_static_objects()`
for obj in static_objects:
    print(obj.opts['annotation'])

The problem with this, is that I cannot get foliage and NATURE annotated objects. I did find, that the NATURE annotation applies with a material in the world editor and foliage are not static objects.

Is there a way to get all annotated objects in a map, which are shown by the object recognition camera API without taking images?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions