semantic-segmentation-pytorch icon indicating copy to clipboard operation
semantic-segmentation-pytorch copied to clipboard

Preparation of the dataset

Open yashagarwal9 opened this issue 5 years ago • 8 comments

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 avatar Jun 24 '19 16:06 yashagarwal9

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

yashagarwal9 avatar Jun 24 '19 20:06 yashagarwal9

The annotated images format are grayscale .png files

hangzhaomit avatar Jul 24 '19 20:07 hangzhaomit

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?

nanditam1 avatar Sep 19 '19 13:09 nanditam1

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

hangzhaomit avatar Oct 06 '19 09:10 hangzhaomit

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.

bluesky314 avatar Oct 07 '19 06:10 bluesky314

@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?

Zenobia7 avatar Dec 31 '19 10:12 Zenobia7

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?

Param-Raval avatar Jul 14 '20 11:07 Param-Raval

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

ShihuaiXu avatar Jul 20 '20 06:07 ShihuaiXu