Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

target by object area #91

Open
PT0X0E opened this issue Jul 12, 2022 · 0 comments
Open

target by object area #91

PT0X0E opened this issue Jul 12, 2022 · 0 comments

Comments

@PT0X0E
Copy link

PT0X0E commented Jul 12, 2022

Hi, thanks for the work. I see in the code that targets are built by object areas as

output = torch.zeros((3, 80), dtype=torch.long)
for obj in target:
    if obj['area'] < 32 * 32:
        output[0][self.cat2cat[obj['category_id']]] = 1
    elif obj['area'] < 96 * 96:
        output[1][self.cat2cat[obj['category_id']]] = 1
    else:
        output[2][self.cat2cat[obj['category_id']]] = 1
target = output

and

for i, (inputData, target) in enumerate(train_loader):
    inputData = inputData.cuda()
    target = target.cuda()  # (batch,3,num_classes)
    target = target.max(dim=1)[0]

Why the targets are processed like this please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant