本人想实现一个练手小项目,实现识别人脸图像中数字水印的目标.输入是人脸数字水印图,输出是识别出的数字图.效果如下.
输入图: 输出图:
我自己实现的方法是用卷积神经网络实现相同尺寸的6层卷积,直接输出.
网络模型如下:
def net():
data = Input(shape=(28,28,3), name='data')
x = BatchNormalization()(data)
x = Conv2D(64, (3, 3), activation='relu', padding='same', name='conv1')(x)
x = BatchNormalization()(x)
x = Conv2D(64, (3, 3), activation='relu', padding='same', name='conv2')(x)
x = Conv2D(64, (3, 3), activation='relu', padding='same', name='conv3')(x)
x = Conv2D(64, (3, 3), activation='relu', padding='same', name='conv4')(x)
x = Conv2D(64, (3, 3), activation='relu', padding='same', name='conv5')(x)
x = Conv2D(64, (3, 3), activation='relu', padding='same', name='conv6')(x)
y = Conv2D(2, (3, 3), activation='relu', padding='same', name='output')(x)
model = Model(inputs=data, outputs=y)
model.compile(optimizer='sgd', loss='categorical_crossentropy', metrics=['categorical_accuracy'])
return model
可是这样做准确率一直不高,只能到80%左右.想请教大家,我这样实现有什么问题和提升的地方吗?
发表回答
你还没有登录,请先登录 或 注册!