Skip to content

Question about frame ordering in the agent disappearance metric #5

Description

@phymhan

Hi, thanks for releasing DrivingGen!

I noticed that video_a_missing.py loads frames with:

gen_video_path = [
    os.path.join(img_dirs[scene_id], f)
    for f in os.listdir(img_dirs[scene_id])
]
sorted(gen_video_path)

Since sorted() returns a new list, gen_video_path remains in filesystem order. Later, temporal frame IDs are used to index this list, for
example:

first_img = cv2.imread(gen_video_path[first_fid])

On our filesystem, os.listdir() is not chronological, so the frame ID can point to a different image.

Would assigning the sorted result, or directly constructing paths from frame IDs, better match the intended behavior?

gen_video_path = [
    os.path.join(img_dirs[scene_id], f"{i:05d}.png")
    for i in range(101)
]

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions