SegNet-Tutorial
SegNet-Tutorial copied to clipboard
Demo - Change input size
Hello, I'm using the DEMO, and I'm trying to change my input size to 480x640. I have tryed it in two different ways, and I obtaind some errors that I don't know how to solve. Could somebody help me?
I have changed the input in Scripts/webcam_demo.py: input_shape = (1, 1, 480, 640)
And I obtain this error:
File "Scripts/webcam_demo.py", line 65, in
Another attemp that I have done is change the input_dim in Example_Models/segnet_model_driving_webdemo.prototxt: input_dim: 1 input_dim: 3 input_dim: 480 input_dim: 640
But I obtain: F0411 12:07:27.651252 29563 upsample_layer.cpp:63] Check failed: bottom[0]->height() == bottom[1]->height() (23 vs. 30) *** Check failure stack trace: ***
Thanks in advance!
You've done the correct thing so far - the last step is to change the padding parameters in the upsample layers. If a pooling layer receives an input dimension that is not divisible by 2 then the layer adds padding.
So you will also need to fiddle with the upsample_w and upsample_h (or remove them if no padding is required)
upsample_param {
scale: 2
upsample_w: 30
upsample_h: 23
}
It appears that upsampling widths and heights are simply a doubling of the image size from some arbitrarily small extent in upsample5 layer to upsample1 (almost full extent of original image?). Is this perhaps true?