xtudbxk / DSRG-tensorflow

a tensorflow version for DSRG (Weakly-Supervised Semantic Segmentation Network with Deep Seeded Region Growing)
75 stars 20 forks source link

DSRG_ResNet101 #14

Closed lianxxx closed 5 years ago

lianxxx commented 5 years ago

Hi, thank you so much for your efforts to release such a beneficial repo.

DSRG-deeplab-aspp-vgg16 is workable. I tried to replace the vgg16 in your code with ResNet101 following https://github.com/zhengyang-wang/Deeplab-v2--ResNet-101--Tensorflow/blob/master/model.py, but I failed. The total loss seemed to be unchanged and the constrain loss was near 0 from the beginning. I couldn't figure out the problem. I wonder if you have a plan to release a DSRG-deeplab-aspp-resnet101 tf-version? Or maybe could you please kindly give me some tips how to adapt deeplab-aspp-resnet101 to your current framework? I'm looking forward to your reply. Many thanks!!!

training log: (I have edited: unary = -np.log(feat + 1e-5)) Restored model parameters from C:/Tensorflow/DSRG-tensorflow/resnet_v1_101.ckpt start_time: 1565056349.789119 config -- lr:0.001000 weight_decay:0.000500 momentum:0.900000 batch_size:4.000000 epoches:32.000000 epoch:0.000000, iteration:0.000000, total_loss:27.615696 seed_loss:17.612474,constrain_loss:0.002580 epoch:0.003781, iteration:10.000000, total_loss:27.492531 seed_loss:18.424877,constrain_loss:0.000213 epoch:0.007561, iteration:20.000000, total_loss:27.569458 seed_loss:18.424877,constrain_loss:0.000341 epoch:0.011342, iteration:30.000000, total_loss:27.570873 seed_loss:18.424877,constrain_loss:-0.000000 epoch:0.015123, iteration:40.000000, total_loss:27.570740 seed_loss:18.424877,constrain_loss:0.000137 epoch:0.018904, iteration:50.000000, total_loss:22.964874 seed_loss:18.424877,constrain_loss:0.000025 epoch:0.022684, iteration:60.000000, total_loss:27.569254 seed_loss:18.424877,constrain_loss:-0.000000 epoch:0.026465, iteration:70.000000, total_loss:25.265747 seed_loss:16.122267,constrain_loss:-0.000000 epoch:0.030246, iteration:80.000000, total_loss:25.264816 seed_loss:18.424877,constrain_loss:-0.000000 epoch:0.034026, iteration:90.000000, total_loss:27.566475 seed_loss:18.424877,constrain_loss:-0.000000 epoch:0.037807, iteration:100.000000, total_loss:25.635326 seed_loss:18.424877,constrain_loss:-0.000000 epoch:0.041588, iteration:110.000000, total_loss:27.564554 seed_loss:18.424877,constrain_loss:-0.000000 epoch:0.045369, iteration:120.000000, total_loss:27.563591 seed_loss:18.424877,constrain_loss:-0.000000 epoch:0.049149, iteration:130.000000, total_loss:27.562630 seed_loss:13.819657,constrain_loss:-0.000000 epoch:0.052930, iteration:140.000000, total_loss:26.324894 seed_loss:18.424877,constrain_loss:-0.000000 epoch:0.056711, iteration:150.000000, total_loss:27.560703 seed_loss:18.424877,constrain_loss:-0.000000 epoch:0.060491, iteration:160.000000, total_loss:27.559740 seed_loss:18.424877,constrain_loss:-0.000000 epoch:0.064272, iteration:170.000000, total_loss:27.558777 seed_loss:18.424877,constrain_loss:-0.000000 epoch:0.068053, iteration:180.000000, total_loss:25.255207 seed_loss:18.424877,constrain_loss:-0.000000

xtudbxk commented 5 years ago

From the values of constrain_loss, it seems the network stucked in points where all images are predicted to background. In my experience, a bigger or smaller lr could solve this problem. If this didn't help, maybe you need go to check the initial values for weights. And I just focus on another project, a "resenet-network" for semantic segmentation may be released in a few months.

lianxxx commented 4 years ago

Hi, I'm looking forward to your tf-version ResNet-based DSRG to be released. Thank you.

xtudbxk commented 4 years ago

It seems I have no time to add code to support the ResNet architecture. And I now start to use tensorflow 2.0 which changed a lot from 1.0. If you still want to transfer it to ResNet archiecture, you can fix the code inner the function "create_network" of DSRG.py.