我有一个NN,尝试使用另一个图像输入来预测一个图像输出。 输入是具有3个通道(RGB)的图像,输出类似于同一张灰度图像[示例](输出是图像RGB的深度,更精确地说)。
[在此处输入图片说明] [输入和输出期望示例]
我尝试使用 U-Net [在此处输入图像描述] [U-Net图像],更改类似数量的神经元。 U-Net用于图像分割,但是我尝试使用其他图像进行预测。
https://lmb.informatik.uni-freiburg.de/people/ronneber/u-net/
inputs = Input((IMG_HEIGHT, IMG_WIDTH, RGB_CHANNELS))
s = Lambda(lambda x: x / 255) (inputs)
c1 = Conv2D(256, (3, 3), activation='elu', kernel_initializer='he_normal', padding='same') (s)
c1 = Dropout(0.25) (c1)
c1 = Conv2D(256, (3, 3), activation='elu', kernel_initializer='he_normal', padding='same') (c1)
p1 = MaxPooling2D((2, 2)) (c1)
c2 = Conv2D(256, (3, 3), activation='elu', kernel_initializer='he_normal', padding='same') (p1)
c2 = Dropout(0.25) (c2)
c2 = Conv2D(256, (3, 3), activation='elu', kernel_initializer='he_normal', padding='same') (c2)
p2 = MaxPooling2D((2, 2)) (c2)
c3 = Conv2D(512, (3, 3), activation='elu', kernel_initializer='he_normal', padding='same') (p2)
c3 = Dropout(0.5) (c3)
c3 = Conv2D(512, (3, 3), activation='elu', kernel_initializer='he_normal', padding='same') (c3)
p3 = MaxPooling2D((2, 2)) (c3)
c4 = Conv2D(512, (3, 3), activation='elu', kernel_initializer='he_normal', padding='same') (p3)
c4 = Dropout(0.5) (c4)
c4 = Conv2D(512, (3, 3), activation='elu', kernel_initializer='he_normal', padding='same') (c4)
p4 = MaxPooling2D(pool_size=(2, 2)) (c4)
c5 = Conv2D(1024, (3, 3), activation='elu', kernel_initializer='he_normal', padding='same') (p4)
c5 = Dropout(0.5) (c5)
c5 = Conv2D(1024, (3, 3), activation='elu', kernel_initializer='he_normal', padding='same') (c5)
u6 = Conv2DTranspose(512, (2, 2), strides=(2, 2), padding='same') (c5)
u6 = concatenate([u6, c4])
c6 = Conv2D(512, (3, 3), activation='elu', kernel_initializer='he_normal', padding='same') (u6)
c6 = Dropout(0.5) (c6)
c6 = Conv2D(512, (3, 3), activation='elu', kernel_initializer='he_normal', padding='same') (c6)
u7 = Conv2DTranspose(512, (2, 2), strides=(2, 2), padding='same') (c6)
u7 = concatenate([u7, c3])
c7 = Conv2D(512, (3, 3), activation='elu', kernel_initializer='he_normal', padding='same') (u7)
c7 = Dropout(0.5) (c7)
c7 = Conv2D(512, (3, 3), activation='elu', kernel_initializer='he_normal', padding='same') (c7)
u8 = Conv2DTranspose(256, (2, 2), strides=(2, 2), padding='same') (c7)
u8 = concatenate([u8, c2])
c8 = Conv2D(256, (3, 3), activation='elu', kernel_initializer='he_normal', padding='same') (u8)
c8 = Dropout(0.25) (c8)
c8 = Conv2D(256, (3, 3), activation='elu', kernel_initializer='he_normal', padding='same') (c8)
u9 = Conv2DTranspose(256, (2, 2), strides=(2, 2), padding='same') (c8)
u9 = concatenate([u9, c1], axis=3)
c9 = Conv2D(256, (3, 3), activation='elu', kernel_initializer='he_normal', padding='same') (u9)
c9 = Dropout(0.25) (c9)
c9 = Conv2D(256, (3, 3), activation='elu', kernel_initializer='he_normal', padding='same') (c9)
cls_depth = Conv2D(1, (1, 1), activation='sigmoid') (c9)
model.compile(optimizer='adam',
loss=['mse'],
metrics=['accuracy'])
准确度始终等于conv2d_19_acc: 0.0015 ..如何改善这一精度?