janivanecky/Depth-Estimation

Creating training dataset

Closed this issue · 3 comments

Hi @janivanecky,
I'm getting an error while running train.py from global_context_network folder. Error is
Check failed: registry.count(type) == 1 (0 vs. 1) Unknown layer type: data (known types: AbsVal, Accuracy,...

I've created .lmdb with a python script where original images are rgb and gt is grayscale. I'm not sure if these correct at all.

Can you guide me on these initial points,

  1. How to create dataset (images dimensions, rbg or grayscall)? If you can share some sample images for original and gt that would be great.
    2 How to generate .lmdb file?

Thank you.

Hi @janivanecky,
Solved last error. Now there is this new error I1128 15:22:55.563629 12657 layer_factory.hpp:74] Creating layer reshape I1128 15:22:55.563748 12657 net.cpp:90] Creating Layer reshape I1128 15:22:55.563792 12657 net.cpp:410] reshape <- fc-depth I1128 15:22:55.563825 12657 net.cpp:368] reshape -> depth I1128 15:22:55.563872 12657 net.cpp:120] Setting up reshape I1128 15:22:55.563920 12657 net.cpp:127] Top shape: 1 1 27 37 (999) I1128 15:22:55.563961 12657 layer_factory.hpp:74] Creating layer mvnDepth I1128 15:22:55.563987 12657 net.cpp:90] Creating Layer mvnDepth I1128 15:22:55.564026 12657 net.cpp:410] mvnDepth <- depth I1128 15:22:55.564060 12657 net.cpp:368] mvnDepth -> depthMVN I1128 15:22:55.569376 12657 net.cpp:120] Setting up mvnDepth I1128 15:22:55.569406 12657 net.cpp:127] Top shape: 1 1 27 37 (999) I1128 15:22:55.569414 12657 layer_factory.hpp:74] Creating layer mvnGT I1128 15:22:55.569424 12657 net.cpp:90] Creating Layer mvnGT I1128 15:22:55.569430 12657 net.cpp:410] mvnGT <- gt I1128 15:22:55.569439 12657 net.cpp:368] mvnGT -> gtMVN I1128 15:22:55.569447 12657 net.cpp:120] Setting up mvnGT I1128 15:22:55.569466 12657 net.cpp:127] Top shape: 1 3 27 37 (2997) I1128 15:22:55.569473 12657 layer_factory.hpp:74] Creating layer lossMVNDepth I1128 15:22:55.569481 12657 net.cpp:90] Creating Layer lossMVNDepth I1128 15:22:55.569488 12657 net.cpp:410] lossMVNDepth <- depthMVN I1128 15:22:55.569494 12657 net.cpp:410] lossMVNDepth <- gtMVN I1128 15:22:55.569500 12657 net.cpp:368] lossMVNDepth -> lossMVNDepth I1128 15:22:55.569512 12657 net.cpp:120] Setting up lossMVNDepth F1128 15:22:55.569521 12657 euclidean_loss_layer.cpp:14] Check failed: bottom[0]->count(1) == bottom[1]->count(1) (999 vs. 2997) Inputs must have the same dimension. regarding gt I believe.

My original images are of 298x218x3 and gts are 37x27 grayscale.
Not sure what went wrong now and still not clear about these topics
1.How to create dataset (images dimensions, rbg or grayscale)? If you can share some sample images for original and gt that would be great.
2 How to generate .lmdb file?

Thanks

Hi, sorry I wasn't able to reply earlier. It seems to me that the new error is caused by actually not using grayscale gts. Last line of the error specifies, that there's conflict between size 999 and 2997. 999 is a correct size - 37x27, and 2997 is 3x37x27. I'm affraid I can't point more specificaly to the problem, but I hope I can at least poke you in the right direction.

As for your other questions, I've pushed a dataset folder that contains necessary scripts and also a README file you should read. I hope it clears up things for you. If not, don't hesitate to ask.

Hi @janivanecky,

Thank for your reply. I was creating gt with create_dataset.sh file from caffe/examples/imagenet, which was writing images to lmdb as 3 channel even though my images were grayscale. I've added a parameter(--gray) to that .sh file to write images as gray and Issue was solved.

Thank you for your detailed documentation on dataset and providing scripts along with it. This will defiantly help others going forward.

(Closing this as you already given solution)

Thank you.