Closed Xz-Alan closed 2 years ago
Thanks for your interest in our work. As explained in the comment of the referenced code self.source[i1]
samples a new crop from i1. The cropping is included in the data loading pipeline, which is applied when calling self.source[i1]
. Please, have a look at https://github.com/lhoyer/DAFormer/blob/9d17603046f76303fd8711173dcd13ae69ee547c/mmseg/datasets/custom.py#L184 for more details.
Thanks for your interest in our work. As explained in the comment of the referenced code
self.source[i1]
samples a new crop from i1. The cropping is included in the data loading pipeline, which is applied when callingself.source[i1]
. Please, have a look atfor more details.
I directly cancel these line of code when not use crop enhance method as follow: Its OK? or others? Thanks
If you comment out these lines, the image is chosen to contain a rare class. However, there is no guarantee that the random crop of the image will contain this rare class as also a crop of the image that does not contain the rare class can be sampled.
Thanks for your wonderful work, and Rare Class Sampling is a very good idea. But in get_rare_class_sample, idx i1 in the for loop is not updated, what is the significance of 10 loops? Is the code of Sample a new Random Crop missing in the loop?
I would appreciate it if you could answer it.
https://github.com/lhoyer/DAFormer/blob/9d17603046f76303fd8711173dcd13ae69ee547c/mmseg/datasets/uda_dataset.py#L85-L107