NVIDIA / semantic-segmentation

Nvidia Semantic Segmentation monorepo
BSD 3-Clause "New" or "Revised" License
1.76k stars 388 forks source link

There are some problems may cause the input parameter "max_cu_epoch" couldn't work as you hope #189

Open MoriartyShan opened 1 year ago

MoriartyShan commented 1 year ago
  1. datasets/cityscapes.py:143 self.centroids = self.fine_centroids might be changed to self.centroids = copy.deepcopy(self.fine_centroids). As I see, self.centroids is a combination of self.fine_centroids and 'coarse_centroids', but if you just use = here, self.fine_centroids would be changed as self.centroids changing in the fowllowing codes: self.centroids[cid].extend(self.coarse_centroids[cid]), which locates at 163 in the same file. So when disable_coarse() is called, self.centroids is not really changed, because self.fine_centroids is the same as self.centroids.
  2. train.py:442: train_obj.disable_coarse(). In my test, even though we call this function, and it did execute, however, the dataset in DataLoader is not changed. If you print the id(self.imgs) inside function build_epoch() and __getitem__() separately after call disable_coarse(), you will find their id are different, which means self.imgs is changed in build_epoch(), but not used in __getitem__(). Maybe this is because of the implementation of DataLoader.
  3. When epoch > max_cu_epoch, new generated self.imgs should be all come from 'gtFine_trainvaltest', but as these two problems, it won't work. Screenshot from 2022-10-10 15-52-21 Screenshot from 2022-10-10 15-53-38 Screenshot from 2022-10-10 15-51-55