Skip to content
This repository was archived by the owner on Feb 16, 2022. It is now read-only.
This repository was archived by the owner on Feb 16, 2022. It is now read-only.

objects prediction in script/extract_features.py #94

@BigodF

Description

@BigodF

Following code for predicting object in script/extract_features.py

# Predict the class label using the scores
objects = torch.argmax(scores[keep_boxes][start_index:], dim=1)
cls_prob = torch.max(scores[keep_boxes][start_index:], dim=1)

my understanding is as following:
the size of scores[keep_boxes] is (100, 1601), start_index is for classes, prediction objects exclude foreground when it is 1.
the size of scores[keep_boxes][start_index:] is (99, 1601), what we want is (100, 1601) or (100, 1600) for prediction scores.
so the code should be writen like this if we want to compare the prediction scores of expected classes:

# Predict the class label using the scores
objects = torch.argmax(scores[keep_boxes][:, start_index:], dim=1)
cls_prob = torch.max(scores[keep_boxes][:, start_index:], dim=1)

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