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

Strange Code in Dataset.py #77

Open
ojipadeson opened this issue Apr 5, 2022 · 0 comments
Open

Strange Code in Dataset.py #77

ojipadeson opened this issue Apr 5, 2022 · 0 comments

Comments

@ojipadeson
Copy link

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.

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