zhengyang-wang / Deeplab-v2--ResNet-101--Tensorflow

An (re-)implementation of DeepLab v2 (ResNet-101) in TensorFlow for semantic image segmentation on the PASCAL VOC 2012 dataset.
GNU General Public License v3.0
174 stars 90 forks source link

what should be changed if there is only two classes #25

Closed YesDargo closed 6 years ago

YesDargo commented 6 years ago

Hi, I am new to the ML/CV, now I am doing image segmentation for skin lesion. I only need to separate lesion area from background (two classes)

When I configure the main.py and run train, the loss remains in 1.231 after a few steps. Then I run test, the pixel accuracy keeps 1.00 and mean IoU keeps 0.5. Did you encounter the same problem?

I found in Dr.Sleep's note that when load checkpoint for different class number (not 21), the --not-restore-last should be passed. Have you also implement this?

John1231983 commented 6 years ago

In my opinion, just change the class number to 2. Increase weight to 1e-3 and sure that you have enough training data. Otherwise, you can retrain from resnet101

YesDargo commented 6 years ago

Thanks for reminding! The initial setting was to load the checkpoint from deeplab_resnet_init.cpkt. Now I change to deeplab_resnet.cpkt, and the loss starts to drop to 1.189 from 1.231.