alexgkendall / SegNet-Tutorial

Files for a tutorial to train SegNet for road scenes using the CamVid dataset
http://mi.eng.cam.ac.uk/projects/segnet/tutorial.html
847 stars 517 forks source link

Unable to initialize network in test_segmentation.cpp #152

Open rawnam opened 5 years ago

rawnam commented 5 years ago

Hi,

I am trying to run the segnet example using test_segmentation.cpp. The test_segmentation_camvid.py runs perfectly after training but in trying to run the same test in cpp gives the following error. Please suggest what could be going wrong here.

F0220 15:27:45.372921 11359 testsegmentation.cpp:86] Check failed: net->num_in puts() == 1 (0 vs. 1) Network should have exactly one input. Check failure stack trace: @ 0x7fd253e285cd google::LogMessage::Fail() @ 0x7fd253e2a433 google::LogMessage::SendToLog() @ 0x7fd253e2815b google::LogMessage::Flush() @ 0x7fd253e2ae1e google::LogMessageFatal::~LogMessageFatal() @ 0x40688c Classifier::Classifier() @ 0x403813 main @ 0x7fd2532d7830 __libc_start_main @ 0x403d79 _start @ (nil) (unknown) ./test_segnet.sh: line 2: 11359 Aborted (core dumped) ./SegNet/caffe-segnet-cudnn5/build/examples/SegNet_with_C++/test_segmentation.bin ./SegNet/Models/segnet_inference.prototxt ./SegNet/Models/Inference/test_weightssegnet camvid.caffemodel ./SegNet/CamVid/0001TP_008550.jpg ./SegNet/Scripts/camvid11.png

Please note: I tried to change the input denseimagedata layer with simple caffe input layer and it worked but the output doesn't match with the camvid.py output. Probably a weight file mismatch, I think.