Skip to content

Camera UID Assignment in loadCam - Using Enumeration Index vs cam_info.uid #1262

@duyiblue

Description

@duyiblue

Hi! I've been working with custom datasets and noticed that loadCam in utils/camera_utils.py assigns camera UIDs using the enumeration index rather than cam_info.uid:

# Current behavior (line 66)
uid=id  # id comes from enumerate(cam_infos)

# Potential alternative
uid=cam_info.uid  # Use the actual UID from dataset

This causes issues when:

  • I'm using non-consecutive views (e.g., [0, 5, 10, 15...]) for my test set.
  • Evaluating specific views - camera UID 5 might actually load the 6th camera in the list

Is this intentional? I'm happy to submit a PR to change it to uid=cam_info.uid if that would be helpful, but wanted to check first in case there's a specific reason for the current design.

Thanks for the great codebase!

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