Fewshot_Detection icon indicating copy to clipboard operation
Fewshot_Detection copied to clipboard

Strange Code in Dataset.py

Open ojipadeson opened this issue 3 years ago • 0 comments

Here is code in class MetaDataset in dataset.py:

    def get_metain(self, clsid, metaind):
        meta_img, meta_lab = self.get_metaimg(clsid, metaind)
        if meta_lab:
            for lab in meta_lab:
                # print(lab)
                img, mask = self.get_img_mask(meta_img, lab, merge=False)    # <<<<<<------------
                if mask is None:
                    continue
                return (img, mask)

The line with <- symbol is strange. In each loop, the mask will be covered by a new return value, so that mask will only contain 1 bounding box no matter how many boxes there is in images. So should it be modified?

Thanks.

ojipadeson avatar Apr 05 '22 03:04 ojipadeson