sthalles/deeplab_v3

How to run your code?

John1231983 opened this issue · 20 comments

Thanks for your working in Deeplab. Could you tell me how to prepare dataset and run your code? Thanks

Hello @John1231983 , this repository is still under development. I will release a blog post with all relevant information when it is done. Thanks for your message.

Hi. I found one missing in your ASPP. The author used Batchnorm and train it in ASPP,but you did not. The main contribution of the deeplab version is that training BN in ASPP

Hi. Could you tell me what is mIoU in validation set that you achieved? I just achieved around 73%

Hello, if you take a look at the convolution arg_scope, you will see that batch_normalization is there for every convolution op. So I do not need to specify it. It is there.

mIoU stands for Mean Intersection Over Union, and it is an evaluation metric. I haven't trained it yet, through.

Great work. I am very happy to see your process. Could you also please add the script to generate tfrecord file and the link to download pretrain model from slim team? I am waiting for tfrecord generator

Thanks for you input @John1231983. I am finishing training right now, i the next hours I will be posting the rest of the code along side with the blog post.

Great. One more thing, if you use adam method, instead of original paper optimization. You should use a smaller learning rate. And let try with batch size of 8 because of memory limittation

And also please provide the mIoU in validation set if it is possible. I want to compare with my current performance. I only got 74% after 120k iterations

Please check the --batch_norm_decay. It is 0.9997 instead of 0.997. Btw, what performance mIoU did you achieve?

Thanks for update. It looks that you used resnet 50 for this validation. Could you use resnet101 and provide us the result. The resnet 50 does not investigate in the paper for ASPP, so we cannot guarantee that the reproduce is near the paper performance

Hello, yes I used ResNet50. I plan to use the ResNet101 to see the results. As the paper states in various comparisons, increasing the model capacity would result in slightly better results. I will run it and update the README.

Great. One more thing, the paper used momentum optimization with learning rate of 7e-3 , while you used adam optimization. As my experimentation, momentum is better for deeplab. Have you try with it before? I think learning rate schedule is also importance for performance, hence follows the paper rule may help achieve close performance with the report

I did not try with Momentum. However, Adam performs learning rate decay within its computation. It's a good thing to test with momentum though, if I have a chance I will do it. Thanks for the input.

Good job. I think for people who are not family tfrecord it is better to provide the script to make tfrecord file.

Hello. i got the error with test phase

Traceback (most recent call last):
  File "test.py", line 143, in <module>
    label_image = np.reshape(label_image, (heights[i], widths[i]))
  File "/home/john/.local/lib/python3.5/site-packages/numpy/core/fromnumeric.py", line 257, in reshape
    return _wrapfunc(a, 'reshape', newshape, order=order)
  File "/home/john/.local/lib/python3.5/site-packages/numpy/core/fromnumeric.py", line 52, in _wrapfunc
    return getattr(obj, method)(*args, **kwds)
ValueError: cannot reshape array of size 170165 into shape (362,500)

please, make sure you have the latest snapshot from the repo. I believe if you update the code, it will desapear.

I am using the last one. I just clone it 5 hours ago. Btw, the model looks overfiting when i train on resnet101 v2

So, regarding the error, your TfRecord must contain the information regarding the image, the annotation and the real height and width. What is happening is that you are trying to reshape an image to the wrong shape. Regarding resnet101, you gonna need to adjust the hyper-parameters, since the once there were used for resnet50.

Could you provide your script to generate tfrecord file? Thanks

It is there.