CAMMA-public / cholect50

A repository for surgical action triplet dataset. Data are videos of laparoscopic cholecystectomy that have been annotated with <instrument, verb, target> labels for every surgical fine-grained activity.
Other
42 stars 4 forks source link

get_binary_labels returned non binary labels. #1

Closed Salamander321 closed 1 year ago

Salamander321 commented 1 year ago

In get_binary_labels function in dataloader (pytorch) i found,

if triplet[0] != -1.0:
                triplet_label[triplet[0]] =+ 1

So when i try printing the labels of instrument i found this. image Instead, of +=, shouldn't it be = like following ?

if triplet[0] != -1.0:
                triplet_label[triplet[0]] = 1
TheBlackCat22 commented 1 year ago

Has this issue been solved?

nwoyecid commented 1 year ago

Dear @Salamander321, the code is correct depending on your usage. For classification task, setting label = 1 is fine, or you can write another code to convert every number > 0 to 1. For instance localization, setting label += 1 preserves the number of instances.