MarvinTeichmann / tensorflow-fcn

An Implementation of Fully Convolutional Networks in Tensorflow.
MIT License
1.1k stars 433 forks source link

Error when run test_fcn32_vgg.py #25

Closed Monsterhoho closed 7 years ago

Monsterhoho commented 7 years ago

Hello Marvin,

I have some trouble when I run your codes.

1) When I run the test_fcn32_vgg.py, it reminds me that there is no enough memory to allocate the tensor. (with gpu) However, I can run the test_fcn16_vgg.py(with gpu), it works well. And then I tried running with only cpu, both test_fcn32_vgg.py and test_fcn16_vgg.py works well.

I read the codes and it seems that test_fcn16_vgg.py may need more memory?

Is it just for that my memory of GPu is not enough (it is about 2GB) or something else?

2) I run the test code, but the result is not so good. fcn32_upsampled

And you can see the part of the dog is missing, which is not like your result on github.

Thanks for your time.

Sincerely, Shuhong

MarvinTeichmann commented 7 years ago

Hi Shuhong,

The network is not trained on Segmentation data. So do not expect the results to be good. For trained Networks check out my KittiSeg repository. If you want to do semantic segmentation, 2GB is not enough. With 6 and more GB the model is running fine.

MarvinTeichmann commented 7 years ago

and the fcn32 memory needs more memory then fcn16, as it a larger upsampling filter.

Monsterhoho commented 7 years ago

I do not really understand it. The upsampling fileter is not very big. For fcn32, the filter from the get_decov is [64,64,20,20] For fcn16, the upsampling filter is [4,4,20,20] and [32,32,20,20]. All of them seem not much large and will not take much memory.

MarvinTeichmann commented 7 years ago

Computing the inference takes much more memory then just the weight size. Try other deep learning code. If you work with high resolution images, you will not get far with 2GB.