AstarLight / Satellite-Segmentation

615 stars 233 forks source link

total size of new array must be unchanged #23

Open Hx96 opened 6 years ago

Hx96 commented 6 years ago

将所有的input_shape改成 input_shape=(img_w,img_h,3) keras有input_shape 通道参数在前,和通道参数在后之分

menghuadeng commented 5 years ago

你好,请问你模型预测结果出来了吗?我预测的结果是黑漆漆的一团。 @Hx96

Hx96 commented 5 years ago

出来了,结果 你可以用matlab imagesc 来显示

Yuyiba commented 5 years ago

出来了,结果 你可以用matlab imagesc 来显示

你好,我也遇到了同样的问题,请问具体是怎么转换的?谢谢啦等待回复

Hx96 commented 5 years ago

matlab imread()读入图像 imagesc()显示图像

Yuyiba commented 5 years ago

matlab imread()读入图像 imagesc()显示图像

可以 加个联系方式吗? imagesc函数里面的参数需要怎么设置,我现在读出来是一片青色……

Hx96 commented 5 years ago

qq 1014920159

lihao6666 commented 5 years ago

我结果也是黑的,怎样解决可以告知一下吗

Ophelia20444 commented 5 years ago

qq 1014920159

Traceback (most recent call last): File "segnet_train.py", line 258, in train(args)
File "segnet_train.py", line 214, in train model = SegNet()
File "segnet_train.py", line 138, in SegNet model.add(MaxPooling2D(pool_size=(2, 2))) ValueError: Negative dimension size caused by subtracting 2 from 1 for 'max_pooling2d_2/MaxPool' (op: 'MaxPool') with input shapes: [?,1,128,128]. 请问你知道这类问题该怎么解决吗?我并没有对代码进行修改,但是在pycharm上运行时会出现这样的错误。

lihao6666 commented 5 years ago

修改一下axis

lihao6666 commented 5 years ago

或者是keras的输入顺序有问题

Ophelia20444 commented 5 years ago

或者是keras的输入顺序有问题

谢谢谢谢,找到了。还是tf后端差异的问题,也是输入shape需要改成w_img,h_img,3