Git Product home page Git Product logo

ceecnet's Introduction

** UPDATE **

We added a pure semantic segmentation model that uses CEECNetV1, CEECNetV2 or FracTAL ResNet micro-topologies, based on a single encoder/decoder macro-topology (unet-like). These can be found in location: models/semanticsegmentation/x_unet.

Looking for change? Roll the Dice and demand Attention

mantis

Official mxnet implementation of the paper: "Looking for change? Roll the Dice and demand Attention" (arxiv version), Diakogiannis et al. (2020 - journal version). This repository contains source code for implementing and training the mantis ceecnet/FracTAL ResNet as described in our manuscript. All models are built with the mxnet DL framework (version < 2.0), under the gluon api. We do not provide pre-trained weights.

Inference examples for the task of Building change detection for the model mantis ceecnetV1 (fractal Tanimoto loss tdepth, ftdepth=5). From left to right, input image date 1, input image date 2, ground truth, inference, confidence heat map for the segmentation task. mantis mantis

Inference examples for the task of Building change detection for the model mantis ceecnetV2 (ftdepth=5). Order of figures as above. These are for the difficult tiles 21, 71, 72, 77, 80, 101 from the test set. mantis mantis mantis mantis mantis mantis

Directory structure:

.
├── chopchop
├── demo
├── doc
├── images
├── models
│   ├── changedetection
│   │   └── mantis
│   ├── heads
│   └── semanticsegmentation
│       └── x_unet
├── nn
│   ├── activations
│   ├── layers
│   ├── loss
│   ├── pooling
│   └── units
├── src
└── utils

In directory chopchop exists code for splitting triplets of raster files (date1, date2, ground truth) into small training patches. It is tailored on the LEVIR CD dataset. In demo exists a notebooks that shows how to initiate a mantis ceecnet model, and perform forward and multitasking backward operations. In models/changedetection/mantis exists a generic definition for arbitrary depth and number of filters, that are described in our manuscript. In nn exist all the necessary building blocks to construct the models we present, as well as loss function definitions. In particular, in nn/loss we provide the average fractal Tanimoto with dual (file nn/loss/ftnmt_loss.py), as well as a class that can be used for multitasking loss training. Users of this method may want to write their own custom implementation for multitasking training, based on the ftnmt_loss.py file. See demo for example usage with a specific ground truth labels configuration. In src we provide a mxnet Dataset class, as well as a normalization class. Finally, in utils, there exist a function for selecting BatchNormalization, or GroupNorm, as a paremeter.

Datasets

Users can find the datasets used in this publication in the following locations:
LEVIR CD Dataset: https://justchenhao.github.io/LEVIR/
WHU Dataset: http://gpcv.whu.edu.cn/data/building_dataset.html

License

CSIRO BSTD/MIT LICENSE

As a condition of this licence, you agree that where you make any adaptations, modifications, further developments, or additional features available to CSIRO or the public in connection with your access to the Software, you do so on the terms of the BSD 3-Clause Licence template, a copy available at: http://opensource.org/licenses/BSD-3-Clause.

CITATION

If you find the contents of this repository useful for your research, please cite:

@Article{rs13183707,
AUTHOR = {Diakogiannis, Foivos I. and Waldner, François and Caccetta, Peter},
TITLE = {Looking for Change? Roll the Dice and Demand Attention},
JOURNAL = {Remote Sensing},
VOLUME = {13},
YEAR = {2021},
NUMBER = {18},
ARTICLE-NUMBER = {3707},
URL = {https://www.mdpi.com/2072-4292/13/18/3707},
ISSN = {2072-4292},
ABSTRACT = {Change detection, i.e., the identification per pixel of changes for some classes of interest from a set of bi-temporal co-registered images, is a fundamental task in the field of remote sensing. It remains challenging due to unrelated forms of change that appear at different times in input images. Here, we propose a deep learning framework for the task of semantic change detection in very high-resolution aerial images. Our framework consists of a new loss function, a new attention module, new feature extraction building blocks, and a new backbone architecture that is tailored for the task of semantic change detection. Specifically, we define a new form of set similarity that is based on an iterative evaluation of a variant of the Dice coefficient. We use this similarity metric to define a new loss function as well as a new, memory efficient, spatial and channel convolution Attention layer: the FracTAL. We introduce two new efficient self-contained feature extraction convolution units: the CEECNet and FracTALResNet units. Further, we propose a new encoder/decoder scheme, a network macro-topology, that is tailored for the task of change detection. The key insight in our approach is to facilitate the use of relative attention between two convolution layers in order to fuse them. We validate our approach by showing excellent performance and achieving state-of-the-art scores (F1 and Intersection over Union-hereafter IoU) on two building change detection datasets, namely, the LEVIRCD (F1: 0.918, IoU: 0.848) and the WHU (F1: 0.938, IoU: 0.882) datasets.},
DOI = {10.3390/rs13183707}
}

ceecnet's People

Contributors

feevos 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

Watchers

 avatar  avatar  avatar

ceecnet's Issues

Crazy reviewer 3

Haha, I have seen the review report of your paper on Remote Sensing, and I think reviewer 3 is crazy and irrational.

Fortunately, your work has been published. Congratulations!

CeecnetV1 Performance

I have been training CeecnetV1 on LEVIRCD Dataset, even after 120 epochs I am getting an average f1-score between 0.35-0.45 for segments while average loss is 0.22. Around how many epochs should I see f1 score going up?

about distance loss

Hi feevos, should dists multiply 100 to calculate the loss? in chopchop2rec.py, the dists multiplied 100.

about iou

hi feevos, the result in your paper has IOU metric in table. Is the IOU metric for change only ? Or the IOU euqal mIOU for 2 classes

about training

hi, boss, i trained on levircd datasets, when i just overfit one image, all losses could decline quickly and got a pretty results. but when i training on all after 60 epoches, the boundary loss and distance loss do not decline, and the segmentation loss is fluctuation,
the segmentation prediction tends to be all zeros. i have 8 gpus, 2 batch sizes per gpu, i changed lr from 1e-3 to 1e-7,but all got bad results. is there any suggestions to avoid the segmentation prediction tends to be all zeros?

about environment

I use these environment:

  1. docker pull bitnami/mxnet:1.8.0-debian-10-r188
  2. docker pull bitnami/mxnet:1.6.0
  3. pip install mxnet
  4. pip install mxnet-cu100
    ...

to run these code:

import sys
sys.path.append('/mount/home/bluemoon/nas_194/repos-read/')
from mxnet import nd 
from ceecnet.models.changedetection.mantis.mantis_dn import *

# D6nf32 example 
depth=6
norm_type='GroupNorm'
norm_groups=4
ftdepth=5
NClasses=2
nfilters_init=32
psp_depth=4
nheads_start=4

net = mantis_dn_cmtsk(nfilters_init=nfilters_init, NClasses=NClasses,depth=depth, ftdepth=ftdepth, model='CEECNetV1',psp_depth=psp_depth,norm_type=norm_type,norm_groups=norm_groups,nheads_start=nheads_start)
net.initialize()

BatchSize = 4
img_size=256
NChannels = 3

input_img_1 = nd.random.uniform(shape=[BatchSize, NChannels, img_size, img_size])
input_img_2 = nd.random.uniform(shape=[BatchSize, NChannels, img_size, img_size])

outs = net(input_img_1, input_img_2)

, but all these environment will report error at this step “outs = net(input_img_1, input_img_2)”, the report error info is "Illegal instruction (core dumped)"

Trained Model

Can I get a trained model for this work? I need to perform some inferences to understand if I can use this for my own work.

自述文件

Hello, boss, can you write a little more detailed readme file? Thank you.

Object Boundary in image

hi feevos, the segmentation head in this paper, the distance is between feature1 and feature2 ? and it likes to Euclidean distance ? and the Boundary is how to produce? I haven't used mxnet , so It's difficult to read your code for me. But want to learn your ideas in segmentation head. Can you explain your ideas briefly ? thanks

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.