Semantic-Segmentation-Suite icon indicating copy to clipboard operation
Semantic-Segmentation-Suite copied to clipboard

current losss is always 0.00000

Open RobinHan24 opened this issue 6 years ago • 11 comments

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 .

RobinHan24 avatar Jan 12 '19 12:01 RobinHan24

How did you set about the cropsize?

ryohachiuma avatar Jan 14 '19 17:01 ryohachiuma

How did you set about the cropsize?

I just use the default number, 512,512

RobinHan24 avatar Jan 15 '19 00:01 RobinHan24

How did you set about the cropsize?

Can you help me? Thank you.

RobinHan24 avatar Jan 15 '19 00:01 RobinHan24

Did you check the image is loaded properly?

ryohachiuma avatar Jan 15 '19 07:01 ryohachiuma

what is your input image size?

developpeur3d avatar Mar 09 '19 11:03 developpeur3d

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

burhr2 avatar Apr 14 '19 06:04 burhr2

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.

YyChen818 avatar May 13 '19 13:05 YyChen818

  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 3. Which tool did you use to create your labels?

burhr2 avatar May 13 '19 14:05 burhr2

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.

YyChen818 avatar May 14 '19 05:05 YyChen818

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.

eliesl avatar Jul 17 '19 16:07 eliesl

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

myagmur01 avatar Aug 26 '19 11:08 myagmur01