e-lab / LinkNet

168 stars 42 forks source link

memory consuming #7

Closed mingminzhen closed 7 years ago

mingminzhen commented 7 years ago

The model read all the dataset into the momory, this method is too memory consuming. Maybe it is better to read the dataset list and iterate the list when training .

codeAC29 commented 7 years ago

Yes it is right; loading whole dataset into memory is not efficient. One efficient way will be to load chunk of data one thread and start training on previously loaded chunk on another thread. Since, both the datasets used here are not that big and it was possible to load all of them into memory, I chose to avoid using multiple threads and keep the code simple. Btw will be glad if you could send a pull request with multiple threads if you want.

mingminzhen commented 7 years ago

I am trying to do that. In addition, could you provide instructions about how to evaluate the pretrained models? This will be helpful!

codeAC29 commented 7 years ago

For evaluation you just need to put the model in evaluate mode and run it on validation data. Look into test.lua.

mingminzhen commented 7 years ago

I write a test script to test the pretrained model model-cs-IoU.net for cityscape dataset. I get the mean IoU: 49.17% Then I find that in your confusionMatrix-cs-IoU.txt, the training IoU is 78.354101431997% and the test IoU is 58.601016119907% . Does it mean that the result is 58% when running on the val dataset (500 images) of cityscape and 78% when running on the training dataset.

codeAC29 commented 7 years ago

@mingminzhen 58.60% is iIoU value and 76.44 is IoU value.

mingminzhen commented 7 years ago

Now i understand you run the experiments on the val dataset. It may be better to run the experiments on the test dataset. So that it is clear how good the linkNet is.

codeAC29 commented 7 years ago

During training time you should use training set and cross-validate it on validation set. Only when you have your trained network you should use test data.