Keras-SegNet-Basic icon indicating copy to clipboard operation
Keras-SegNet-Basic copied to clipboard

Class weight does not work. Accuracy and loss remain same

Open vzhencheng97 opened this issue 6 years ago • 1 comments

i use the code and train on dataset from https://github.com/yhlleo/DeepCrack. The images changed to binary images. For the code I just changed the path and the label from 12 to 2 which are crack and background for all the py file. But it seems the class weight is not working.The changes i made are all the value 12 to 2 and the path to my dataset. Full code and dataset can be found at https://drive.google.com/open?id=1wK-non5bMkpApMshtCHXIqLXZOJ9jUxU. I have been working on this problem for a long time and didn't found any workable solution online. I am desperate for help. So can you help me find the problem or at least give some possible causes that cause the problem of the class weighting not working on the fit generator. I changed the value for the class weight but still the accuracy the same. Changing the optimizer or learning rate also gives the same accuracy. The accuracy is the same for the first epoch which is 95.67%, changing the class weight did not affect it

vzhencheng97 avatar May 29 '19 14:05 vzhencheng97

Hello, I have the same problem when dealing with the category imbalance problem in DeepCrack dataset. Is your problem solved now? How do you deal with this problem?

cantaible avatar May 25 '20 13:05 cantaible