问题描述
我正在尝试在Keras(tf后端)中实现SegNet进行语义分割.
I'm trying to implement SegNet in Keras (tf backend) to do semantic segmentation.
SgeNet最令人印象深刻的技巧是将最大池索引传递到上采样层.但是,在Keras中有许多SegNet的实现(例如)我在github上发现的只是使用简单的UpSampling(称为SegNet-Basic).
The most impressived trick of SgeNet is to pass max-pooling indices to the upsampling layers. However, there are many implementations of SegNet in Keras(e.g.) I find on github just using simple UpSampling (called SegNet-Basic).
我注意到,可以在Tensorflow中使用"tf.nn.max_pool_with_argmax"来实现.因此,我想知道是否有任何类似的方法来获取最大池索引,并将其放回Keras的升采样中.
I notice that it can be achieved in Tensorflow with " tf.nn.max_pool_with_argmax ". So I want to know is there any similar method to get the max-pooling indices and put them back in upsampling in Keras.
谢谢.
推荐答案
好吧,我想我已经找到了答案.
Well, I think I've found the answer.
这篇关于如何在Keras中通过保留max-indexs实现SegNet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!