Skip to content

Mantee0810/BNDC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BNDCNet: Bilateral Nonlocal Decoupled Convergence Network for Semantic Segmentation

Module Introduction

BNDC is a end-to-end module that is able to adapt itself to different sized inputs.

The module structure is shown below:

The structure of the two mini-modules inter-channel and intra-channel is shown below:

    

Given an input feature map, the output feature map has the same shape and size.

This can be checked with the following code:

print(feature_map.shape)

Direct Use Methods

  1. Place file BNDCModule.py in the same folder as the model.py.

  2. In the model file, import the module as follows:

from BNDCModule.py import BNDC
  1. In the init function of the model, define it as follows:
self.bndc = BNDC(channel)

  where channel is the number of channels of the feature map

  1. In the forward function, do the forward propagation as follows:
map = self.bndc(map)

Full Usage

The models folder gives the complete structure:

  BiseNet.py is the structural implementation of BiseNet

  BNDCModule.py is the structural implementation of BNDC

  Insert the modules in the same way as the Direct Use Methods.

Treatment of special shape tensor

In the source code, we give the forward approach for three cases (line52 - line60)

  • Feature map with height:width=1:1
  • Feature map with height:width=2:1
  • Feature map with height:width=1:2

If your feature map has a more specialized shape, consider setting the step size of the Inter_channel module differently (refer to line52 - line60).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages