Giter Site home page Giter Site logo

lironui / abcnet Goto Github PK

View Code? Open in Web Editor NEW
27.0 4.0 3.0 5.42 MB

The semantic segmentation of remote sensing images

Home Page: https://lironui.github.io/

License: GNU General Public License v3.0

Python 100.00%
segmentation semantic-segmentation uavid isprs potsdam vaihingen real-time efficient-model remote-sensing uav

abcnet's Introduction

ABCNet: Attentive Bilateral Contextual Network for Efficient Semantic Segmentation of Fine-Resolution Remote Sensing Images

Welcome to my HomePage

In this repository, we implement the Attentive Bilateral Contextual Network which contains a spatial path and a contextual path to fully capture the long-range relationships and fine-grained details in fine-resolution remote sensing images.

The detailed results can be seen in the ABCNet: Attentive Bilateral Contextual Network for Efficient Semantic Segmentation of Fine-Resolution Remote Sensing Images.

The training and testing code can refer to GeoSeg.

The related repositories include:

If our code is helpful to you, please cite:

R. Li, S. Zheng, C. Zhang, C. Duan, L. Wang, and P. M. Atkinson, "ABCNet: Attentive bilateral contextual network for efficient semantic segmentation of Fine-Resolution remotely sensed imagery," ISPRS Journal of Photogrammetry and Remote Sensing, vol. 181, pp. 84-98, 2021/11/01/ 2021, doi: https://doi.org/10.1016/j.isprsjprs.2021.09.005.

Network:

network
Fig. 1. The overall architecture of ABCNet.

Result:

The result on the UAVid dataset can seen from here, where the user name is lironui or here and can be downloaded by this link:

Method building tree clutter road vegetation static car moving car human mIoU
MSD 79.8 74.5 57.0 74.0 55.9 32.1 62.9 19.7 57.0
Fast-SCNN 75.7 71.5 44.2 61.6 43.4 19.5 51.6 0.0 45.9
BiSeNet 85.7 78.3 64.7 61.1 77.3 63.4 48.6 17.5 61.5
SwiftNet 85.3 78.2 64.1 61.5 76.4 62.1 51.1 15.7 61.1
ShelfNet 76.9 73.2 44.1 61.4 43.4 21.0 52.6 3.6 47.0
ABCNet 86.4 79.9 67.4 81.2 63.1 48.4 69.8 13.9 63.8

Result
Fig. 2. The experimental results on the UAVid test set. The first column illustrates the input RGB images, the second column depicts the outputs of MSD and the third column shows the predictions of our ABCNet.

abcnet's People

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

Watchers

 avatar  avatar  avatar  avatar

abcnet's Issues

大佬,全部代码合适开源吗?

代码训练有点小问题

您好,您提供的链接没有关于ABCNet的训练代码,所以我自己写了一个,但是感觉这个模型定义是不是有点问题

class ABCNet(nn.Module):
    def __init__(self, band, n_classes):
        super(ABCNet, self).__init__()
        self.name = 'ABCNet'
        self.cp = ContextPath()
        self.sp = SpatialPath()
        self.fam = FeatureAggregationModule(256, 256)
        self.conv_out = Output(256, 256, n_classes, up_factor=8)
        if self.training:
            self.conv_out16 = Output(128, 64, n_classes, up_factor=8)
            self.conv_out32 = Output(128, 64, n_classes, up_factor=16)
        self.init_weight()

    def forward(self, x):
        H, W = x.size()[2:]
        feat_cp8, feat_cp16, feat_cp32 = self.cp(x)
        feat_sp = self.sp(x)
        feat_fuse = self.fam(feat_sp, feat_cp8)

        feat_out = self.conv_out(feat_fuse)
        if self.training:
            feat_out16 = self.conv_out16(feat_cp16)
            feat_out32 = self.conv_out32(feat_cp32)
            return feat_out, feat_out16, feat_out32
        # feat_out = feat_out.argmax(dim=1)
        return feat_out

这个网络训练的时候,进self.training的判断的时候,feat_cp16的大小是[4, 256, 32, 32],有256个通道。但是self.conv_out16定义的时候输出通道是128。feat_cp32的大小是[4, 512, 16, 16],有512个通道。但是self.conv_out16定义的时候输出通道还是128.(我网络进去的图的大小是[4, 3, 512, 512],是我哪操作不对吗?

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.