What is the idea behind breaking if classes[cls] >= self.shots in metadata creation?
See original GitHub issueIn earlier versions of metadata_coco.py
, the loop over annotations of an image would always break if we find an annotation for a category we already sampled enough annotations for:
https://github.com/YoungXIAO13/FewShotDetection/blob/78e95a32ec7b955e93fec5c17e7bdc6ebc01271c/lib/datasets/metadata_coco.py#L217-L218
Now, we only break in this case if we are in phase 1 and continue sampling of annotations for phase 2:
https://github.com/YoungXIAO13/FewShotDetection/blob/fc0b453029cffb8719b9d65421f9a91019c1a392/lib/datasets/metadata_coco.py#L221-L225
What is generally the idea of breaking instead of continuing in this case?
Why having phase-dependent actions in the current version and why don’t always continue the loop and thus look if there are some annotations of categories we haven’t yet sampled enough annotations for?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Do you mean the used RAM when finally saving the sampled images and masks to a file? How would a firm
continue
cause more RAM usage as abreak
? Shouldn’t the memory only depend on the amount of images and annotations sampled? I could imagine that we could save some memory when allowing to sample multiple annotations from a single image, since we would use less images which would result in smallerprn_images.pt
file. Theprn_mask.pt
file however should be always of the same size (for same shots parameter).No problem. Thank you for the interesting discussion and clarification.
I finally would think that there is no reason left for using
break
overcontinue
in both phases.