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
856 stars 519 forks source link

WebDemo Model #41

Open eweill opened 8 years ago

eweill commented 8 years ago

Hi @alexgkendall,

I have trained a model using SegNet and Bayesian SegNet as well and I would like to try the WebDemo model as well. I have the segnet_model_driving_webdemo.prototxt that is provided with the SegNet-Tutorial and have downloaded segnet_weights_driving_webdemo.caffemodel from the Model Zoo.

However, I am unable to get it to work correctly. Can I use these two files directly with the test_segmentation_camvid.py script or should I used the compute_bn_statistics.py first to form a set of weights for the model. It is my understanding that the segnet_weights_driving_webdemo.caffemodel is the set of weights that I need to use, however, I am unable to produce results.

Any help would be greatly appreciated.

Thanks.

Primus-zhao commented 8 years ago

@eweill , Hi, met the same problem. Found that the .caffemodel file which supposed to be hex file filled with errors codes and chracters, don't know what's wrong.

Primus-zhao commented 8 years ago

@eweill just found the solution. Don't use firefox or terminal to download the .caffemodel file, try chrome or even IE, they are both ok.

alexgkendall commented 8 years ago

Strange! Any idea how I can prevent this from happening?

eweill commented 8 years ago

@alexgkendall @Primus-zhao I am not sure what the issue is with downloading the .caffemodel. I was able to simply use wget from the terminal to download it. My problem was simple size mismatch errors. I alleviated this by changing some of the width and height parameters inside the .prototxt.

Primus-zhao commented 8 years ago

@alexgkendall hi, i think it's related to firefox features. However, may i ask one question about your caffemodel data format? Are they hdf5 file? When i try to use h5py.File('XXX.caffemodel', 'r') to open the model, system gave me following trackback: hf = h5py.File('segnet_basic_camvid.caffemodel', 'r')

/usr/local/lib/python2.7/dist-packages/h5py/_hl/files.pyc in init(self, name, mode, driver, libver, userblock_size, swmr, _kwds) 270 271 fapl = make_fapl(driver, libver, _kwds) --> 272 fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr) 273 274 if swmr_support:

/usr/local/lib/python2.7/dist-packages/h5py/_hl/files.pyc in make_fid(name, mode, userblock_size, fapl, fcpl, swmr) 90 if swmr and swmr_support: 91 flags |= h5f.ACC_SWMR_READ ---> 92 fid = h5f.open(name, flags, fapl=fapl) 93 elif mode == 'r+': 94 fid = h5f.open(name, h5f.ACC_RDWR, fapl=fapl)

h5py/_objects.pyx in h5py._objects.with_phil.wrapper (/tmp/pip_build_root/h5py/h5py/_objects.c:2691)()

h5py/_objects.pyx in h5py._objects.with_phil.wrapper (/tmp/pip_build_root/h5py/h5py/_objects.c:2649)()

h5py/h5f.pyx in h5py.h5f.open (/tmp/pip_build_root/h5py/h5py/h5f.c:1937)()

IOError: Unable to open file (Unable to find a valid file signature)

any ideas on this? Thx!

AliRaza21918 commented 6 years ago

@Primus-zhao @eweill I had followed the tutorial but my input window becomes gray color and as soon as white colored Segnet window appears for a second both disappears. PLZ HELP ME