Skip to content

Export feature: export for bounding box tasks malfunction #82

@e-platini

Description

@e-platini

When exporting a bounding box task, the files that should contain the annotations are created with the same name and so they override each other.

Expected behavior:
When exporting a bbox task, a folder is created for each subject. Inside each subject folders, 1 file is created for each image sequence from this subject, and each file contains the bboxes for this image sequence.

Actual behavior:
Files containing annotations are named based on the frame number on which the bbox was drawn. Therefore, for the same subject, annotations taken on the same frame of different sequences will override each other.

Example:
Subject bob contains image sequences with only 1 image per sequence. A "bob" folder is created to save all the annotations for this subject. The first frame number is 0, therefore all the annotations for bob are on frame 0. For all the different image sequences, the annotations will be written out on files all named "0.txt" and saved in the "bob" folder. Since they all have the same name and location, they override each other and only the file for the last image sequence remains.

Location of the issue:

with open(join(subject_path, str(frame.frame_nr) + '.txt'), 'w') as f:

Quick fix:
Replace frame.frame_nr by frame.image_annotation.id like in the landmark exporter, so every file has a unique name.

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