Closed SalarYakamoz closed 1 year ago
The original labels (in query_labels
) correspond to concrete classes (e.g., airplane, boat). In the few-shot setting, we need to convert those to abstract labels (e.g., the 2nd class out of 5 ways). They do not carry semantic information about the class, that is, we do not know if the 2nd class belongs to airplanes, boats, or anything else.
query_labels_tmp is returned (see https://github.com/kaixin96/PANet/blob/master/dataloaders/customized.py#L163).
Thank you for your quick response. About the first question, then why the same is not considered for support labels. Besides, why do we have to change the pixel values which will effect in the loss calculation. I understand the reason behind randomizing the class orders to randomly pick N-way K-shot support and query samples from the N-ways but why do we have to change the pixel values of the label mask of query image only?
Any about my second question, I made a mistake and wanted to ask why query_label_tmp
is not returned? It seems that some modifications on the query label is considered(which is called query_label_tmp
) but at last query_labels_tmp = [torch.zeros_like(x) for x in query_labels]
is returned.
About the first question, support_labels
are only used to compute support_mask
and are not returned. We need the semantic class information in the function getMask()
.
About the second question, the modification is in-place, that is, query_labels_tmp
is modified when we modify query_label_tmp
.
Thank you for your answers.
Hi, I read the paper and code but not sure why the query label's values are changed here:
My other question is why query_label_tmp is returned instead of query_labels_tmp?