SCNN icon indicating copy to clipboard operation
SCNN copied to clipboard

I want to implement a version of tensorflow of SCNN

Open FrancisGee opened this issue 7 years ago • 15 comments

I want to implement a version of tensorflow of SCNN, any tips i should note

FrancisGee avatar May 06 '18 06:05 FrancisGee

  1. Remember to use weight sharing for each direction.
  2. 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.

XingangPan avatar May 07 '18 03:05 XingangPan

@FrancisGee How's your progress now?

ytzhao avatar May 11 '18 11:05 ytzhao

@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 avatar May 14 '18 04:05 ytzhao

@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 avatar May 14 '18 05:05 XingangPan

@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 avatar May 16 '18 02:05 ytzhao

@ytzhao Hi, have you implemented the tf version of SCNN? Can you share the code?

yu-changqian avatar Jun 09 '18 08:06 yu-changqian

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.

XingangPan avatar Jun 12 '18 07:06 XingangPan

Thanks for your help. This is very helpful. If I have more questions, I will consult you again.

yu-changqian avatar Jun 12 '18 18:06 yu-changqian

我写了一下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)

hewumars avatar Jun 22 '18 10:06 hewumars

@ycszen sorry, nope, I switch to Caffe now.

ytzhao avatar Jun 28 '18 08:06 ytzhao

@FrancisGee 你用tensorflow实现这个scnn了吗?

stubbornstubborn avatar Aug 08 '18 13:08 stubbornstubborn

@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 avatar Oct 12 '18 07:10 cardwing

@cardwing That's great, thanks!

ytzhao avatar Oct 19 '18 07:10 ytzhao

@ycszen , tensorflow version of SCNN is available at this repo.

cardwing avatar Dec 01 '18 04:12 cardwing