CSAILVision / semantic-segmentation-pytorch

Pytorch implementation for Semantic Segmentation/Scene Parsing on MIT ADE20K dataset
http://sceneparsing.csail.mit.edu/
BSD 3-Clause "New" or "Revised" License
4.92k stars 1.1k forks source link

Preparation of the dataset #181

Open yashagarwal9 opened 5 years ago

yashagarwal9 commented 5 years ago

Hello, I decreased the number of classes to 11 and retaining the network on my dataset. But ended with the ERROR- "RuntimeError: cuDNN error: CUDNN_STATUS_NOT_INITIALIZED". I think this is because of the annotated images(coloured) that I created. Can you tell me the procedure to create my own dataset properly. I'm only retraining the last conv layers of the decoder network.

yashagarwal9 commented 5 years ago

I'm getting this error for my dataset.

samples: 11 1 Epoch = 5000 iters Traceback (most recent call last): File "train.py", line 347, in main(args) File "train.py", line 222, in main train(segmentation_module, iterator_train, optimizers, history, epoch, args) File "train.py", line 41, in train loss, acc = segmentation_module(batch_data) File "/media/crrl/ssd/venv/lib/python3.6/site-packages/torch/nn/modules/module.py", line 494, in call result = self.forward(*input, **kwargs) File "/media/crrl/ssd/semantic-segmentation-pytorch/models/models.py", line 42, in forward acc = self.pixel_acc(pred, feed_dict['seg_label']) File "/media/crrl/ssd/semantic-segmentation-pytorch/models/models.py", line 17, in pixel_acc acc = acc_sum.float() / (pixel_sum.float() + 1e-10) RuntimeError: CUDA error: device-side assert triggered

hangzhaomit commented 5 years ago

The annotated images format are grayscale .png files

nanditam1 commented 5 years ago

Hi I tried training with 1 class. Converted the label images to .png files with 1 channel. the pixel values are 0 for background and 1 for class-of-interest. However training is not happening. The loss is just coming as 0 and accuracy as 100. The output of any trained model is showing completely segmented as 'class-of-interest'. Any suggestions on whats going wrong? Thank you.

Are there any other changes to be made other than in config file?

hangzhaomit commented 4 years ago

In our setup, label 0 is ignored during training. So if you have two classes, please set the labels as 1 and 2. @nanditam1

bluesky314 commented 4 years ago

Hey I am unable to understand how to subset the classes as I cannot understand the accurate label to class association. I also want to only use a subset of classes.

Screen Shot 2019-10-07 at 11 57 42 AM

As you can see in image, after using encoding function provided I am getting two different class numbers for the class of person. It is not corrosponding to colours and numbers given in https://docs.google.com/spreadsheets/d/1se8YEtb2detS7OuPE86fXGyD269pMycAWe2mtKUj2W8/edit?usp=sharing.

Zenobia7 commented 4 years ago

@hangzhaomit Hello, when i use custom dataset with 5 class,getting this error: RuntimeError: cuda runtime error (710) : device-side assert triggered at /pytorch/aten/src/THC/generic/THCTensorMath.cu:226 You mentioned earlier that you can change labes to fix bugs. i want chang the labes, which file can change labes?

Param-Raval commented 4 years ago

In our setup, label 0 is ignored during training. So if you have two classes, please set the labels as 1 and 2. @nanditam1

Hello, where do I change the labels for training? The objectInfo150 and such txt filesare not being read during training. So, where exactly is the labels list?

ShihuaiXu commented 4 years ago

Hi I tried training with 1 class. Converted the label images to .png files with 1 channel. the pixel values are 0 for background and 1 for class-of-interest. However training is not happening. The loss is just coming as 0 and accuracy as 100. The output of any trained model is showing completely segmented as 'class-of-interest'. Any suggestions on whats going wrong? Thank you.

Are there any other changes to be made other than in config file?

I change the num_class to 2 and the loss is normal, but the inference effect is pool