GeorgeSeif / Semantic-Segmentation-Suite

Semantic Segmentation Suite in TensorFlow. Implement, train, and test new Semantic Segmentation models easily!
2.5k stars 880 forks source link

current losss is always 0.00000 #175

Open RobinHan24 opened 5 years ago

RobinHan24 commented 5 years ago

Information

Please specify the following information when submitting an issue:

What are your command line arguments?: python train.py --model DeepLabV3 --frontend MobileNetV2 Have you written any custom code?: no What have you done to try and solve this issue?: Nothing, I am not sure if this is an issue or intended behaviour. TensorFlow version?: 1.10.1 Describe the problem

The training routine seems to be running fine, but gives status updates that look like: [2018-09-05 12:20:49] Epoch = 0 Count = 20 Current_Loss = 0.0000 Time = 3.27 [2018-09-05 12:20:52] Epoch = 0 Count = 40 Current_Loss = 0.0000 Time = 2.86 [2018-09-05 12:20:54] Epoch = 0 Count = 60 Current_Loss = 0.0000 Time = 2.92 [2018-09-05 12:20:58] Epoch = 0 Count = 80 Current_Loss = 0.0000 Time = 3.17 etc.

I expected that the Current_Loss would be non-zero, and that it would decrease as learning progresses. But perhaps I am misunderstanding something?

Source code / logs

n/a 5 51 anyone can help me? Thank you .

ryohachiuma commented 5 years ago

How did you set about the cropsize?

RobinHan24 commented 5 years ago

How did you set about the cropsize?

I just use the default number, 512,512

RobinHan24 commented 5 years ago

How did you set about the cropsize?

Can you help me? Thank you.

ryohachiuma commented 5 years ago

Did you check the image is loaded properly?

developpeur3d commented 5 years ago

what is your input image size?

burhr2 commented 5 years ago

You can also try to check your color dict in your dataset because i had the same problem and i rechecked it was the wrong rgb numbers in my color dict (class_dict.csv) file

YyChen818 commented 5 years ago

I train the model on my own dataset, the image is binary segmentation, similar to yours, but I got the val image in checkpoints is all black or all red, do you have this problem? how many images do you have in dataset. could you please help me? thank you.

burhr2 commented 5 years ago
  1. You can use the following to check your color code in your labels and put them in class_dict.csv from PIL import Image img = Image.open('Labelledimage.png') colors = img.convert('RGB').getcolors() print(colors)

  2. Ensure all your image together with the labeled images have the same name and extension (remove _L which was specified on the labels in the dataset used). example image1.png and the label should be image1.png

Aside question

  1. Which tool did you use to create your labels?
YyChen818 commented 5 years ago

I put the color code in class_dict, images and labels have the same name and size. I use labelme to create labels. But I still got this problem,and I don't know how to solve it.

eliesl commented 5 years ago

Fiixing the values of class_dict.csv file solved this problem for me. You can manually check the color code for one of your image masks (labels) through reading the channels' values of that image.

myagmur01 commented 4 years ago

same was here. I forgot to add 'background' class into class_dict.csv, after adding 'background,255,255,255' loss turned into normal values.