Giter VIP home page Giter VIP logo

scnet's People

Contributors

backseason avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

scnet's Issues

is there a better way to add SCCONV in resnet18

I try to add scconv in resnet18.
As show in th pic, conv4 and conv7 can be seen as the two split blobs.
Compare to resnet50, it seems lacking F1 conv as shown in your paper.
And this architecture hasn't got better performance, maybe it seems I don't get a better pretrained model.
Is there any better way to add this trick please?

SC-Conv Implementation on Keras

Hello to you all, thank you for the implementation. I dont have much experience on the deep learning area. I tried to implement the self calibrated conv layer on Keras 2, but i dont know if it is correct or not. Also, i added relu activation after the concatenation, i wonder if it is good practice or should i add relu activation after every conv2d layers. Any feedback is appreciated, thanks.

def build_selfcalibrated_conv_graph(depth,layer_name,split_ratio=0.5,filters=64):
    
    input_layer = KL.Input(shape=[None,None,depth])
    
    split_idx = int(depth * split_ratio)
    
    x1 = KL.Lambda(lambda x: x[:,:,:,:split_idx])(input_layer)
    x2 = KL.Lambda(lambda x: x[:,:,:,split_idx:])(input_layer)

    # x1 path
    identity = x1 

    output_x1_a = KL.Conv2D(filters,(3,3),padding="same",name=f"{layer_name}_k3_conv")(x1)
    output_x1_a = KL.BatchNormalization(name=f"{layer_name}_k3_bn")(output_x1_a)
    
    output_x1_b = KL.AveragePooling2D(pool_size=(4, 4), strides=4,name=f"{layer_name}_k2_avg")(x1)
    output_x1_b = KL.Conv2D(filters,(3,3),padding="same",name=f"{layer_name}_k2_conv")(output_x1_b)
    output_x1_b = KL.BatchNormalization(name=f"{layer_name}_k2_bn")(output_x1_b)
    output_x1_b = KL.UpSampling2D(size=(4,4))(output_x1_b)
    output_x1_b = KL.Activation('sigmoid')(KL.add([output_x1_b,identity]))
    
    output_x1_ab = KL.Multiply()([output_x1_a,output_x1_b])

    output_x1_ab = KL.Conv2D(filters,(3,3),padding="same",name=f"{layer_name}_k4_conv")(output_x1_ab)
    y1 = KL.BatchNormalization(name=f"{layer_name}_k4_bn")(output_x1_ab)

    # x2 path
    y2 = KL.Conv2D(filters,(3,3),padding="same",name=f"{layer_name}_k1_conv")(x2)
    y2 = KL.BatchNormalization(name=f"{layer_name}_k1_bn")(y2)

    # concatenate y1 and y2
    output = KL.Concatenate(axis=-1)([y1,y2])
    output = KL.Activation('relu')(output)

    return KM.Model(inputs=input_layer, outputs=output, name=layer_name) ```     

the code for depth completion.

Thanks for sharing the code!

I'm wondering whether any outfit could be obtained if the proposed SCNet is introduced into depth completion.

将SCBottleneck应用到depth completion

如题,我将SCConv卷积加到了ENET上(一个深度补全的网络),想用2个GPU训练,提示有错
RuntimeError: Caught KeyError in replica 0 on device 0.
经过搜索可能是SCConv不能并行运算,请问是是这个原因吗,并且怎么修改呢

Errors in SCNet.py

Hello, there is a small bug in SCNet.py.
In Downloading URLs, the 'scnet50' link is provided as 'scnet101'. It's a small mistake, since I can't access the AliYunCS due to the Permission Deny, I hope you can fix this.
And by the way, would 'scnet154' pretrained model be available in up-coming days?

Question about out_a and out_b

In Figure2 in the paper, it seems you directly get two new feature('X1','X2') by split the 'InputX' in two portions without extra params. But in the code, you get them by two convolutions.

SCNet/scnet.py

Line 103 in c0b5bd6

out_a= self.conv1_a(x)

Are there any differences between the two approaches?

Could you help me?

First of all, thank you very much for your open source work!But,I noticed in (scnet.py, SCBottleneck ) :

residual = x
self.conv3 = nn.Conv2d(group_width * 2, planes * 4, kernel_size=1, bias=False)
out = self.conv3(torch.cat([out_a, out_b], dim=1))
out = self.bn3(out)
out += residual
it seems makes out expand 4 scales.However,it(out) directly add to residual(make the tensor is mismatch in dimension 1).Could you tell me how to solve it?

about adding SCConv into resnet20

Hi, thank you for your work.
My network structure is resnet20, and its "BasicBlock" structure is as follows:
image
Now I want to add SCConv, how do I build the network structure?
Looking forward to your answer, thank you.

How to solve the problems when inplanes != planes

Hi,
If I want to use scconv which inplanes = 64, planes = 3, there is an error in code:
out = torch.sigmoid(torch.add(identity, F.interpolate(self.k2(x), identity.size()[2:]))) # sigmoid(identity + k2)

数据集版本

您好,请问您使用的是ILSVRC数据集吗?具体是哪一年的呢?
Hello, are you using the ILSVRC dataset? What year is it exactly?

替换Resnet

感谢您的杰出工作。
我想使用scnet50替换我的网络中的resnet。但是我发现貌似不能直接替换,这让我手足无措了好久。请问您有什么好的建议吗,或者注意事项?
十分期待您的回复!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.