asousa / DepthPrediction

A tool to predict the depth field of a 2-dimensional image
82 stars 38 forks source link

Can't get code to work #2

Open thomaspreece opened 8 years ago

thomaspreece commented 8 years ago

Hi, I'm trying to get the code to run but it appears that there are missing files. I cannot find any of the caffe model files needed and I don't understand the training code you have used. Could I get the model files and do you possibly have some slightly more detailed information on how to use the code? Thanks

dfreese commented 8 years ago

The caffe files referenced in setup.sh are from the places database. Check out the places database webpage here to download the relevant models. They are too large to store on this repository.

Unfortunately we do not have additional documentation of the training code, as this project was done on a short timeframe, and isn't actively maintained.

asousa commented 8 years ago

Hi Thomas,

I wish I understood it either! That project was very rushed, and we struggled a lot with getting Caffe to cooperate. By the time we turned it in we were almost getting decent results.

I’m pretty sure we were using the Places205 CNN pre-trained model (http://places.csail.mit.edu/downloadCNN.html).

It’s a little obnoxious, but the gist is that we called the caffe train methods from the command line and not from Python.

Training parameters are specified in whichever solver file you’re using (models/solver_softmax_dir.prototxt).

So to train, you run something like: caffe train -solver -weights -gpu 0 Then to classify, you do something like the following in Python: DP = DepthPredictor() DP.load(model_file, pretrained_file, mean file) predicted_depth = DP.predict( input image )

The actual model you’re using is in models/udr_.prototxt… I did a few versions - euclidean or softmax loss, and with a few different inputs (either from an LMDB file or a directory of images). To run, there’s a different model file with the input block swapped out (_deploy.prototxt).

Honestly, when we did this Caffe was a lot rougher than it is now - we wasted a lot of time when the syntax for the model files changed halfway through.

On a conceptual note, we never did come to terms with using the neural net to do regression on a continuous variable (depth) vs a classification of quantized values (is it in bin 1 or not, is it in bin 2 or not…).

If you haven’t read it already, check out the paper we were working from - http://arxiv.org/abs/1411.6387 - they got solid results but were using matconvnet. Our whole plan was to duplicate with caffe, and then tweak / train the last few layers.

Good luck, hope this helps! Austin

On Jun 7, 2016, at 4:54 AM, Thomas Preece notifications@github.com<mailto:notifications@github.com> wrote:

Hi, I'm trying to get the code to run but it appears that there are missing files. I cannot find any of the caffe model files needed and I don't understand the training code you have used. Could I get the model files and do you possibly have some slightly more detailed information on how to use the code? Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/asousa/DepthPrediction/issues/2, or mute the threadhttps://github.com/notifications/unsubscribe/ADaabMl4Isbv-loKOpLx3XqF91TnvyFYks5qJVvhgaJpZM4Iv1xj.

luohongcheng commented 7 years ago

Hi, Asousa. I am running your codes this days, and in this codes I hava not find the loss function of this paper. The output of this networks is label only. so I guess if it exists any difference from the paper's method ?

chihhsuanwu commented 6 years ago

HI Asousa The download website for Places205 CNN pre-trained model can not connect please fix it Thanks