smistad / annotationweb

A web-based annnotation system for easy annotation of image sequences such as ultrasound and camera recordings
MIT License
32 stars 18 forks source link

Issues related to classification task #69

Open miaroe opened 11 months ago

miaroe commented 11 months ago

Annotated images does not show in list view for classification task

Solution:

User frame selection logic is faulty in regard to labeling an entire sequence

Goal functionality: Label an entire video without manually selecting key frames

When creating a new task, if the box for user frame selection is not ticked, the annotation task is marked as finished because "This image sequence has no key frames. An admin must select key frames before annotating."

In annotationweb.js there exists logic for setting the last frame as a key frame which will make it possible to classify the video as a whole with one label. At the moment, the logic is set up as follows:

if(!user_frame_selection && annotate_single_frame && frames_to_annotate.length === 0) {
        // Select last frame as target frame
        frames_to_annotate.push(nrOfFrames-1);
    }

At the moment, as long as User frame selection is ticked the annotations will be saved in the table classification_imagelabel when key frames are selected manually by user. However, due to the logic above if a key frame is not selected only the annotation will be saved, not a key frame which means the label is not saved, and it will not show up in the list view as annotated.

Temporary solution:

Problem with temporary solution that need to be addressed:

When n key frames are selected, the video is listed n times in list view

At the moment, the query used to generate the list view for the classification task will retrieve all key frame annotations, while not considering if they belong to the same sequence. There is already added information about the number of key per annotation, so this seems unnecessary.

Suggested solution: