Giter VIP home page Giter VIP logo

Comments (4)

munibkhanali avatar munibkhanali commented on September 26, 2024

Hi @MangekyoSasuke
Description of eASSP in paper is not specific enough, but i have implemented it as far as i understood it form paper.
I will call it LightEfficientASPP, Author of the Modnet(@ZHKKKe ) claim eASSP has 1% of the ASSP parameters and 1% computational cost. but LightEfficientASPP has 1.8 % parameters and computational cost.

it will be so kind of @ZHKKKe if he comments on LightEfficientASPP

class LightEfficientASPP(nn.Module):
    def __init__(self, in_channels, dilation_rates=[6, 12, 18], channel_reduction=4):
        super(LightEfficientASPP, self).__init__()

        out_channels=in_channels // channel_reduction
        # Channel reduction
        self.channel_reduction_conv = Conv2dIBNormRelu(in_channels, in_channels // channel_reduction, kernel_size=1)
        c1_out=out_channels
        c2_out=c1_out//channel_reduction
        c2_out=c2_out//channel_reduction
        # Depth-wise atrous convolutions with point-wise convolutions
        self.conv3x3_1 = nn.Sequential(
            Conv2dIBNormRelu(c1_out, c1_out, kernel_size=3, padding=dilation_rates[0], dilation=dilation_rates[0], groups=c1_out),
            Conv2dIBNormRelu(c1_out, c1_out, kernel_size=1)
        )
        self.conv3x3_2 = nn.Sequential(
            Conv2dIBNormRelu(out_channels, c2_out, kernel_size=3, padding=dilation_rates[1], dilation=dilation_rates[1], groups=c2_out),
            Conv2dIBNormRelu(c2_out, c2_out, kernel_size=1)
        )
        self.conv3x3_3 = nn.Sequential(
            Conv2dIBNormRelu(out_channels, c2_out, kernel_size=3, padding=dilation_rates[2], dilation=dilation_rates[2], groups=c2_out),
            Conv2dIBNormRelu(c2_out, c2_out, kernel_size=1)
        )

        # Recover the number of channels
        self.recover_channels = Conv2dIBNormRelu(c1_out+c2_out+c2_out, in_channels, kernel_size=1)

    def forward(self, x):
        reduced_features = self.channel_reduction_conv(x)
        conv3x3_1 = self.conv3x3_1(reduced_features)
        conv3x3_2 = self.conv3x3_2(reduced_features)
        conv3x3_3 = self.conv3x3_3(reduced_features)
        combined_features = torch.cat([conv3x3_1, conv3x3_2,conv3x3_3], dim=1)
        output = self.recover_channels(combined_features)

        return output

Thank you

from modnet.

MangekyoSasuke avatar MangekyoSasuke commented on September 26, 2024

from modnet.

vodatvan01 avatar vodatvan01 commented on September 26, 2024

How is the performance?

from modnet.

munibkhanali avatar munibkhanali commented on September 26, 2024

Hi @vodatvan01 ,
The Performance is pretty comparable.

from modnet.

Related Issues (20)

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.