ilnehc96 / HKU-DASC7606-A1

HKU DASC 7606 Assignment 1 (Computer Vision), 2023-24 Spring
18 stars 17 forks source link

A question about focal loss #3

Open PomponWang opened 5 months ago

PomponWang commented 5 months ago

In losses.py, we're required to finish the part of Focal Loss from 107th line to 117th line.

focal_weight = "?"

bce = "?"

cls_loss = focal_weight * bce

However, I'm a little bit confused about bce since we are handling multiclasses. Are we supposed to use cce(categorical cross entropy) instead?

Another question is about evaluation, since the evaluation metric (the AP score) is wrapped in COCOeval, I can't see very clearly. I want to ask, does the model's performance on categorical classification is taken into consideration in evaluation? Also, does model's ability of correctly classify the category will influence the performance of correctly positioning the object?

Really thanks!!

PomponWang commented 4 months ago

It confused me a lot about the intepretation of classification loss because I formerlly thought the output layer head of classification head is a softmax layer... Until I find similar question on the stackoverflow. In case others get similar confusion. I post this issue.