SCNN
SCNN copied to clipboard
I want to implement a version of tensorflow of SCNN
I want to implement a version of tensorflow of SCNN, any tips i should note
- Remember to use weight sharing for each direction.
- When initializing SCNN, you may use a variance smaller than normal for numerical stability. For example, I use a variance sqrt(5) times smaller than MSRA initialization.
@FrancisGee How's your progress now?
@XingangPan Hi Xinggang, from your paper, you said the model is based on DeepLab-LargeFOV VGG version. But from your github main page, you said your code is modified from ResNet, so I have some confusions. Therefore, is your code based on ResNet instead of what you mentioned in the paper VGG, right?
@ytzhao The SCNN model is based on DeepLab-LargeFOV VGG version, not ResNet. My code is modified from fb.resnet.torch because that code is well organized. But the model is based on VGG. I have provided the pretrained model. You can see the full model architecture when you print it.
@XingangPan ok, thank you for your reply. I figured out it's based on VGG. I saw the printout of the VGG pretrained model from your link here. It's modified with last several layers. I'm also trying to convert your SCNN model to tensorflow recently.
@ytzhao Hi, have you implemented the tf version of SCNN? Can you share the code?
I have provided a script for generating SCNN caffe prototxt file: https://github.com/XingangPan/SCNN-prototxt-generator. You can use http://ethereon.github.io/netscope/#/editor to visualize the architecture. Hope it would be helpful.
Thanks for your help. This is very helpful. If I have more questions, I will consult you again.
我写了一下SCNN_D,不知道是否正确?网络能work,现在还没有对比结果。必须实现4个方向效果才好吗?我只用了垂直方向。 with tf.name_scope("SCNN_D") as scope: with slim.arg_scope( [slim.conv2d], weights_regularizer=slim.l2_regularizer(weight_decay), weights_initializer=tf.truncated_normal_initializer(stddev=0.01), reuse=reuse): if is_training is True: batch_size = features.shape.as_list()[0] else: batch_size = 1 slice_d = [] for i in range(features.shape.as_list()[1]): #SCNN_D j = i + 1 slice_d.append(tf.strided_slice(features, [0,i,0,0], [batch_size,j,features.shape.as_list()[2],features.shape.as_list()[3]], strides=[1,1,1,1])) slice_sum = slice_d[0] slice_concat = [slice_d[0]] for i in range(features.shape.as_list()[1]-1): slice_sum = slim.conv2d( slice_sum, features.shape.as_list()[3], kernel_size=[1,9], reuse = tf.AUTO_REUSE, rate=1, activation_fn=tf.nn.relu, normalizer_fn=None, scope='spatial_conv')+slice_d[i+1] slice_concat.append(slice_sum)
features = tf.concat(slice_concat, 1)
@ycszen sorry, nope, I switch to Caffe now.
@FrancisGee 你用tensorflow实现这个scnn了吗?
@ytzhao , @ding-hai-tao , I will implement a tensorflow version of SCNN after 11.16. If you are interested in this, you can refer to Codes-for-Lane-Detection where I will put my code.
@cardwing That's great, thanks!
@ycszen , tensorflow version of SCNN is available at this repo.