SysCV / sam-hq

Segment Anything in High Quality [NeurIPS 2023]
https://arxiv.org/abs/2306.01567
Apache License 2.0
3.73k stars 224 forks source link

Questions about training class information. #95

Open sweetdream33 opened 1 year ago

sweetdream33 commented 1 year ago

In Segment Anything in High Quality, do model recognize and learn the gt mask by class?

If you look at the code: class OnlineDataset(Dataset) in train/utils/dataloder.py: if len(gt.shape) > 2: gt = gt[:, :, 0] if len(im.shape) < 3: im = im[:, :, np.newaxis] if im.shape[2] == 1: im = np.repeat(im, 3, axis=2) Looking at this code, it looks like the gt mask is changed to a black and white image even though it is divided into colors by class. Does it have no effect on accuracy even if the model does not learn class information?