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

Check failed: ShapeEquals(proto) shape mismatch (reshape not set) #78

Closed baristahell closed 7 years ago

baristahell commented 7 years ago

Hello I'm trying to simply make predictions (not a real testing phase with labeled data) with the segnet_iter_30000_timo.caffemodel model in python. For that, i changed the net prototxt, removing the data and the loss layers to get a "deploy" version. I also added

input: "data" input_dim: 1 input_dim: 3 input_dim: 360 input_dim: 480

at the beggining of the prototxt to shape the data blob so i can resize the input images at this size.

But at the end of net = caffe.Net(args.model, args.weights, caffe.TEST) (after Network initialization done.Memory required for data: 1063756800) i get the error in the title. Does anyone know what's going on? Do i have to manually resize the input/blobs?

Thank you.

TimoSaemann commented 7 years ago

Hi, Have you tried it with the "segnet_inference.prototxt"? That file is for testing.

baristahell commented 7 years ago

Well i was trying to use pycaffe (should've mentionned it before sorry) with

out = net.forward_all(data=input_image)

so without using the txt file in the net definition, and i don't really know what i have to change to change my data source. I'd like to be able to load the net and then feed it with images on disk through my python script.

I did this with other nets but with segnet i don't get it, and i don't know why.

baristahell commented 7 years ago

I made it work like i wanted, closing issue.