Giter Club home page Giter Club logo

fdcnn's Introduction

FDCNN

This repository contains code, network definitions and pre-trained models for change detection on remote sensing images using deep learning.

The implementation uses the Caffe framework.

Motivation

In this work, we use scene-level samples (from the AID data set) of remote sensing scene classification, which are easier to obtain than pixel-level samples, for learning deep features from different remote sensing scenes at different scales. These features learned from specific scenes (cultivated land, lakes, vegetation, etc.) are more affected. The changes in these scenes are usually more important. Based on this idea, A new CNN structure and training strategies are proposed for remote sensing image change detection, which is supervised but requires very few pixel-level training samples. Advantageously, it has good generalization ability and multi-scale change detection capabilities.

Content

Networks

We provide a deep neural network based on the VGG16 architecture. It was trained on the AID dataset to learn the multi-scale deep features from remote sensing images. The pre-trained weights can be download from the link.

We proposed a novel FDCNN to produce change detection maps from high-resolution RS images. It is suitable for multi-scale remote sensing image change detection tasks.

Datasets

The available datasets can be downloaded from the table below:

Tabel 1. Experiment datasets.
Datasets Description Download
AID 10,000 RS images (R, G and B), including 30 different scene types (i.e. labeled 30 types at scene-level), each containing more than 220 images with a size of 600×600 pixels and a spatial resolution of 8 meters to 0.5 meters, collected in different countries (China, USA, UK, France, etc.), at different times and in different imaging conditions [official]
Worldview 2 including 2 pilot sites, and each site consists of a ground truth map (labeled changed and unchanged at pixel-level) and two-period Worldview 2 satellite images (Worldview 3 and WV3 were incorrectly written in our paper), located in Shenzhen, China, with a size of 1431×1431 pixels and a spatial resolution of 2 meters, acquired in 2010 and 2015 respectively. Site 1 (RGB) [drive]
Site 1 (4 bands) [drive]
Site 2 (RGB) [drive]
Site 2 (4 bands) [drive]
Zi-Yuan 3 including a ground truth map (labeled changed and unchanged at pixel-level) and two-period Zi-Yuan 3 satellite images, located in Wuhan, Hubei, China, with a size of 458×559 pixels, three bands (R, G and B), and a spatial resolution of 5.8 meters, acquired in 2014 and 2016 respectively. [drive]
Quickbird including a ground truth map (labeled changed and unchanged at pixel-level) and two-period Quickbird satellite images, located in Wuhan, Hubei, China, with a size of 1154×740 pixels, three bands (R, G and B), and a spatial resolution of 2.4 meters, acquired in 2009 and 2014 respectively. [drive]
OSCD 10 test pairs RS images with a spatial resolution of 10 meters, taken from the Sentinel-2 satellites between 2015 and 2018 with pixel-level change ground truth. Their ground truth remains undisclosed and the results need be uploaded to the IEEE GRSS DASE website for evaluation [drive] [official]
SZADA/1 a pair of optical aerial images, labeled changed and unchanged at pixel-level, taken with several years of time differences, with a spatial resolution 1.5 meters. [drive] [official]

How to start

  1. Install Caffe with Python 2.7

    1. Follow the instructions in Installation, note the version of Python. Or using our pre-build runtime (with CUDA 8.0 and for Windows only).
    2. Please add the absolute path of folder "caffe_layers" to the PYTHONPATH so that PyCaffe can search for the layer implementation file.
  2. Training VGG16 & FDCNN

    1. Training VGG16 using the AID dataset.

    2. Training FDCNN using the WV2 site 1 dataset.

  3. Testing FDCNN

    1. Download the test data sets and unzip them to the "datasets" subfolder.

    2. Use your own trained FDCNN model, or download our pre-trained FDCNN model.

    3. Evaluation

      • To test the accuracy of FDCNN on the test datasets, run the following commands:

        python exp_test_custom.py \
            --sensor=ZY3 \
            --alpha=2.0
        
      • To test the accuracy of FDCNN on the SZTAKI datasets, run the following commands:

        python exp_test_SZTAKI.py \
            --alpha=2.66
        
      • To test the accuracy of FDCNN on the OSCD datasets, run the following commands:

        python exp_test_OSCD.py \
            --threshold=0.98
        

        The ground truth of OSCD remains undisclosed and the results need be uploaded to the IEEE GRSS DASE website for evaluation, see figure 1.

        Figure 1. FDCNN accuracy evaluation on the OSCD dataset.

    Change magnitude map (CMM.tif) and binary image (BM.tif) will be generated under the "output" subfolder.

References

If you use this work for your projects, please take the time to cite our paper.

@Article{9052762,
AUTHOR = {Zhang, Min and Shi, Wenzhong},
TITLE = {A Feature Difference Convolutional Neural Network-Based Change Detection Method},
JOURNAL = {IEEE Transactions on Geoscience and Remote Sensing},
VOLUME = {},
YEAR = {2020},
NUMBER = {},
URL = {https://ieeexplore.ieee.org/document/9052762},
DOI = {10.1109/TGRS.2020.2981051}
}

License

Code and datasets are released under the GPLv3 license for non-commercial and research purposes only. For commercial purposes, please contact the authors.

fdcnn's People

Contributors

minzhang-whu 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

Watchers

 avatar  avatar  avatar  avatar

fdcnn's Issues

Dataset

Hello, the link to worldview 2 cannot be opened

Can u share the paper

Hi. Could u please share the paper. I can't download from IEEE Xplore or SCI-HUB.

FF-Net中为何选择使用1*1的卷积核呢?

张博,
您好!
刚拜读了您的文章,有个小小的疑问还望您指教。对于文中提到的FF-Net,我的理解是以特征差异图为输入数据进行像素分类,这里为何选择使用11的卷积核呢?为何不使用考虑了空间上下文关系的卷积核呢(比如33,空洞卷积...)?

Training of the FDCNN model

Hello, thank you for sharing the code for the project. It is very informative. However, there are no steps to train the FDCNN model by ourselves. Would appreciate it if you could provide steps to do so and also how to use the pre-built caffe runtime on windows.

Segmentation fault (core dumped)

Hi @MinZHANG-WHU ,

When executing python exp_test_custom.py --sensor=ZY3 --alpha=2.0 , it raised Segmentation fault (core dumped) after printing some info as the following:

I0620 08:41:32.123780   670 net.cpp:116] Using FLOAT as default forward math type
I0620 08:41:32.123786   670 net.cpp:122] Using FLOAT as default backward math type
I0620 08:41:32.123790   670 layer_factory.hpp:172] Creating layer 'data' of type 'Input'
I0620 08:41:32.123797   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:32.123808   670 net.cpp:205] Created Layer data (0)
I0620 08:41:32.123813   670 net.cpp:547] data -> data
I0620 08:41:32.124506   670 net.cpp:265] Setting up data
I0620 08:41:32.124521   670 net.cpp:272] TEST Top shape for layer 0 'data' 1 3 224 224 (150528)
I0620 08:41:32.124527   670 layer_factory.hpp:172] Creating layer 'data_p' of type 'Input'
I0620 08:41:32.124533   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:32.124541   670 net.cpp:205] Created Layer data_p (1)
I0620 08:41:32.124545   670 net.cpp:547] data_p -> data_p
I0620 08:41:32.124563   670 net.cpp:265] Setting up data_p
I0620 08:41:32.124568   670 net.cpp:272] TEST Top shape for layer 1 'data_p' 1 3 224 224 (150528)
I0620 08:41:32.124572   670 layer_factory.hpp:172] Creating layer 'data_t12' of type 'Input'
I0620 08:41:32.124578   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:32.124584   670 net.cpp:205] Created Layer data_t12 (2)
I0620 08:41:32.124598   670 net.cpp:547] data_t12 -> data_t12
I0620 08:41:32.124614   670 net.cpp:265] Setting up data_t12
I0620 08:41:32.124619   670 net.cpp:272] TEST Top shape for layer 2 'data_t12' 1 3 224 224 (150528)
I0620 08:41:32.124622   670 layer_factory.hpp:172] Creating layer 'conv1_1' of type 'Convolution'
I0620 08:41:32.124629   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:32.124647   670 net.cpp:205] Created Layer conv1_1 (3)
I0620 08:41:32.124655   670 net.cpp:577] conv1_1 <- data
I0620 08:41:32.124660   670 net.cpp:547] conv1_1 -> conv1_1
I0620 08:41:33.153308   670 net.cpp:265] Setting up conv1_1
I0620 08:41:33.153347   670 net.cpp:272] TEST Top shape for layer 3 'conv1_1' 1 64 224 224 (3211264)
I0620 08:41:33.153380   670 layer_factory.hpp:172] Creating layer 'relu1_1' of type 'ReLU'
I0620 08:41:33.153386   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.153396   670 net.cpp:205] Created Layer relu1_1 (4)
I0620 08:41:33.153403   670 net.cpp:577] relu1_1 <- conv1_1
I0620 08:41:33.153407   670 net.cpp:532] relu1_1 -> conv1_1 (in-place)
I0620 08:41:33.153419   670 net.cpp:265] Setting up relu1_1
I0620 08:41:33.153424   670 net.cpp:272] TEST Top shape for layer 4 'relu1_1' 1 64 224 224 (3211264)
I0620 08:41:33.153429   670 layer_factory.hpp:172] Creating layer 'conv1_2' of type 'Convolution'
I0620 08:41:33.153434   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.153448   670 net.cpp:205] Created Layer conv1_2 (5)
I0620 08:41:33.153452   670 net.cpp:577] conv1_2 <- conv1_1
I0620 08:41:33.153456   670 net.cpp:547] conv1_2 -> conv1_2
I0620 08:41:33.154027   670 net.cpp:265] Setting up conv1_2
I0620 08:41:33.154039   670 net.cpp:272] TEST Top shape for layer 5 'conv1_2' 1 64 224 224 (3211264)
I0620 08:41:33.154047   670 layer_factory.hpp:172] Creating layer 'relu1_2' of type 'ReLU'
I0620 08:41:33.154052   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.154057   670 net.cpp:205] Created Layer relu1_2 (6)
I0620 08:41:33.154062   670 net.cpp:577] relu1_2 <- conv1_2
I0620 08:41:33.154067   670 net.cpp:532] relu1_2 -> conv1_2 (in-place)
I0620 08:41:33.154072   670 net.cpp:265] Setting up relu1_2
I0620 08:41:33.154076   670 net.cpp:272] TEST Top shape for layer 6 'relu1_2' 1 64 224 224 (3211264)
I0620 08:41:33.154083   670 layer_factory.hpp:172] Creating layer 'conv1_2_relu1_2_0_split' of type 'Split'
I0620 08:41:33.154089   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.154095   670 net.cpp:205] Created Layer conv1_2_relu1_2_0_split (7)
I0620 08:41:33.154103   670 net.cpp:577] conv1_2_relu1_2_0_split <- conv1_2
I0620 08:41:33.154106   670 net.cpp:547] conv1_2_relu1_2_0_split -> conv1_2_relu1_2_0_split_0
I0620 08:41:33.154110   670 net.cpp:547] conv1_2_relu1_2_0_split -> conv1_2_relu1_2_0_split_1
I0620 08:41:33.154132   670 net.cpp:265] Setting up conv1_2_relu1_2_0_split
I0620 08:41:33.154137   670 net.cpp:272] TEST Top shape for layer 7 'conv1_2_relu1_2_0_split' 1 64 224 224 (3211264)
I0620 08:41:33.154142   670 net.cpp:272] TEST Top shape for layer 7 'conv1_2_relu1_2_0_split' 1 64 224 224 (3211264)
I0620 08:41:33.154146   670 layer_factory.hpp:172] Creating layer 'pool1' of type 'Pooling'
I0620 08:41:33.154151   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.154166   670 net.cpp:205] Created Layer pool1 (8)
I0620 08:41:33.154170   670 net.cpp:577] pool1 <- conv1_2_relu1_2_0_split_0
I0620 08:41:33.154176   670 net.cpp:547] pool1 -> pool1
I0620 08:41:33.154208   670 net.cpp:265] Setting up pool1
I0620 08:41:33.154213   670 net.cpp:272] TEST Top shape for layer 8 'pool1' 1 64 112 112 (802816)
I0620 08:41:33.154217   670 layer_factory.hpp:172] Creating layer 'conv2_1' of type 'Convolution'
I0620 08:41:33.154223   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.154253   670 net.cpp:205] Created Layer conv2_1 (9)
I0620 08:41:33.154258   670 net.cpp:577] conv2_1 <- pool1
I0620 08:41:33.154263   670 net.cpp:547] conv2_1 -> conv2_1
I0620 08:41:33.155139   670 net.cpp:265] Setting up conv2_1
I0620 08:41:33.155148   670 net.cpp:272] TEST Top shape for layer 9 'conv2_1' 1 128 112 112 (1605632)
I0620 08:41:33.155156   670 layer_factory.hpp:172] Creating layer 'relu2_1' of type 'ReLU'
I0620 08:41:33.155161   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.155166   670 net.cpp:205] Created Layer relu2_1 (10)
I0620 08:41:33.155170   670 net.cpp:577] relu2_1 <- conv2_1
I0620 08:41:33.155176   670 net.cpp:532] relu2_1 -> conv2_1 (in-place)
I0620 08:41:33.155181   670 net.cpp:265] Setting up relu2_1
I0620 08:41:33.155186   670 net.cpp:272] TEST Top shape for layer 10 'relu2_1' 1 128 112 112 (1605632)
I0620 08:41:33.155190   670 layer_factory.hpp:172] Creating layer 'conv2_2' of type 'Convolution'
I0620 08:41:33.155195   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.155205   670 net.cpp:205] Created Layer conv2_2 (11)
I0620 08:41:33.155210   670 net.cpp:577] conv2_2 <- conv2_1
I0620 08:41:33.155213   670 net.cpp:547] conv2_2 -> conv2_2
I0620 08:41:33.156890   670 net.cpp:265] Setting up conv2_2
I0620 08:41:33.156901   670 net.cpp:272] TEST Top shape for layer 11 'conv2_2' 1 128 112 112 (1605632)
I0620 08:41:33.156908   670 layer_factory.hpp:172] Creating layer 'relu2_2' of type 'ReLU'
I0620 08:41:33.156913   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.156919   670 net.cpp:205] Created Layer relu2_2 (12)
I0620 08:41:33.156924   670 net.cpp:577] relu2_2 <- conv2_2
I0620 08:41:33.156929   670 net.cpp:532] relu2_2 -> conv2_2 (in-place)
I0620 08:41:33.156934   670 net.cpp:265] Setting up relu2_2
I0620 08:41:33.156937   670 net.cpp:272] TEST Top shape for layer 12 'relu2_2' 1 128 112 112 (1605632)
I0620 08:41:33.156941   670 layer_factory.hpp:172] Creating layer 'conv2_2_relu2_2_0_split' of type 'Split'
I0620 08:41:33.156946   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.156950   670 net.cpp:205] Created Layer conv2_2_relu2_2_0_split (13)
I0620 08:41:33.156955   670 net.cpp:577] conv2_2_relu2_2_0_split <- conv2_2
I0620 08:41:33.156958   670 net.cpp:547] conv2_2_relu2_2_0_split -> conv2_2_relu2_2_0_split_0
I0620 08:41:33.156962   670 net.cpp:547] conv2_2_relu2_2_0_split -> conv2_2_relu2_2_0_split_1
I0620 08:41:33.156980   670 net.cpp:265] Setting up conv2_2_relu2_2_0_split
I0620 08:41:33.156986   670 net.cpp:272] TEST Top shape for layer 13 'conv2_2_relu2_2_0_split' 1 128 112 112 (1605632)
I0620 08:41:33.156989   670 net.cpp:272] TEST Top shape for layer 13 'conv2_2_relu2_2_0_split' 1 128 112 112 (1605632)
I0620 08:41:33.156993   670 layer_factory.hpp:172] Creating layer 'pool2' of type 'Pooling'
I0620 08:41:33.156996   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.157004   670 net.cpp:205] Created Layer pool2 (14)
I0620 08:41:33.157008   670 net.cpp:577] pool2 <- conv2_2_relu2_2_0_split_0
I0620 08:41:33.157013   670 net.cpp:547] pool2 -> pool2
I0620 08:41:33.157040   670 net.cpp:265] Setting up pool2
I0620 08:41:33.157047   670 net.cpp:272] TEST Top shape for layer 14 'pool2' 1 128 56 56 (401408)
I0620 08:41:33.157050   670 layer_factory.hpp:172] Creating layer 'conv3_1' of type 'Convolution'
I0620 08:41:33.157055   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.157063   670 net.cpp:205] Created Layer conv3_1 (15)
I0620 08:41:33.157068   670 net.cpp:577] conv3_1 <- pool2
I0620 08:41:33.157073   670 net.cpp:547] conv3_1 -> conv3_1
I0620 08:41:33.160825   670 net.cpp:265] Setting up conv3_1
I0620 08:41:33.160841   670 net.cpp:272] TEST Top shape for layer 15 'conv3_1' 1 256 56 56 (802816)
I0620 08:41:33.160862   670 layer_factory.hpp:172] Creating layer 'relu3_1' of type 'ReLU'
I0620 08:41:33.160866   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.160873   670 net.cpp:205] Created Layer relu3_1 (16)
I0620 08:41:33.160876   670 net.cpp:577] relu3_1 <- conv3_1
I0620 08:41:33.160881   670 net.cpp:532] relu3_1 -> conv3_1 (in-place)
I0620 08:41:33.160887   670 net.cpp:265] Setting up relu3_1
I0620 08:41:33.160892   670 net.cpp:272] TEST Top shape for layer 16 'relu3_1' 1 256 56 56 (802816)
I0620 08:41:33.160895   670 layer_factory.hpp:172] Creating layer 'conv3_2' of type 'Convolution'
I0620 08:41:33.160902   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.160909   670 net.cpp:205] Created Layer conv3_2 (17)
I0620 08:41:33.160913   670 net.cpp:577] conv3_2 <- conv3_1
I0620 08:41:33.160917   670 net.cpp:547] conv3_2 -> conv3_2
I0620 08:41:33.167507   670 net.cpp:265] Setting up conv3_2
I0620 08:41:33.167522   670 net.cpp:272] TEST Top shape for layer 17 'conv3_2' 1 256 56 56 (802816)
I0620 08:41:33.167528   670 net.cpp:636] Sharing parameters 'conv3_2_b' owned by layer 'conv3_1', param index 1
I0620 08:41:33.167532   670 layer_factory.hpp:172] Creating layer 'relu3_2' of type 'ReLU'
I0620 08:41:33.167538   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.167543   670 net.cpp:205] Created Layer relu3_2 (18)
I0620 08:41:33.167546   670 net.cpp:577] relu3_2 <- conv3_2
I0620 08:41:33.167552   670 net.cpp:532] relu3_2 -> conv3_2 (in-place)
I0620 08:41:33.167558   670 net.cpp:265] Setting up relu3_2
I0620 08:41:33.167563   670 net.cpp:272] TEST Top shape for layer 18 'relu3_2' 1 256 56 56 (802816)
I0620 08:41:33.167567   670 layer_factory.hpp:172] Creating layer 'conv3_3' of type 'Convolution'
I0620 08:41:33.167573   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.167582   670 net.cpp:205] Created Layer conv3_3 (19)
I0620 08:41:33.167587   670 net.cpp:577] conv3_3 <- conv3_2
I0620 08:41:33.167590   670 net.cpp:547] conv3_3 -> conv3_3
I0620 08:41:33.174453   670 net.cpp:265] Setting up conv3_3
I0620 08:41:33.174468   670 net.cpp:272] TEST Top shape for layer 19 'conv3_3' 1 256 56 56 (802816)
I0620 08:41:33.174474   670 layer_factory.hpp:172] Creating layer 'relu3_3' of type 'ReLU'
I0620 08:41:33.174479   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.174484   670 net.cpp:205] Created Layer relu3_3 (20)
I0620 08:41:33.174487   670 net.cpp:577] relu3_3 <- conv3_3
I0620 08:41:33.174491   670 net.cpp:532] relu3_3 -> conv3_3 (in-place)
I0620 08:41:33.174497   670 net.cpp:265] Setting up relu3_3
I0620 08:41:33.174500   670 net.cpp:272] TEST Top shape for layer 20 'relu3_3' 1 256 56 56 (802816)
I0620 08:41:33.174504   670 layer_factory.hpp:172] Creating layer 'conv1_1_p' of type 'Convolution'
I0620 08:41:33.174508   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.174516   670 net.cpp:205] Created Layer conv1_1_p (21)
I0620 08:41:33.174520   670 net.cpp:577] conv1_1_p <- data_p
I0620 08:41:33.174530   670 net.cpp:547] conv1_1_p -> conv1_1_p
I0620 08:41:33.174700   670 net.cpp:265] Setting up conv1_1_p
I0620 08:41:33.174707   670 net.cpp:272] TEST Top shape for layer 21 'conv1_1_p' 1 64 224 224 (3211264)
I0620 08:41:33.174712   670 net.cpp:636] Sharing parameters 'conv1_1_w' owned by layer 'conv1_1', param index 0
I0620 08:41:33.174718   670 net.cpp:636] Sharing parameters 'conv1_1_b' owned by layer 'conv1_1', param index 1
I0620 08:41:33.174722   670 layer_factory.hpp:172] Creating layer 'relu1_1_p' of type 'ReLU'
I0620 08:41:33.174726   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.174731   670 net.cpp:205] Created Layer relu1_1_p (22)
I0620 08:41:33.174737   670 net.cpp:577] relu1_1_p <- conv1_1_p
I0620 08:41:33.174754   670 net.cpp:532] relu1_1_p -> conv1_1_p (in-place)
I0620 08:41:33.174760   670 net.cpp:265] Setting up relu1_1_p
I0620 08:41:33.174765   670 net.cpp:272] TEST Top shape for layer 22 'relu1_1_p' 1 64 224 224 (3211264)
I0620 08:41:33.174770   670 layer_factory.hpp:172] Creating layer 'conv1_2_p' of type 'Convolution'
I0620 08:41:33.174774   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.174784   670 net.cpp:205] Created Layer conv1_2_p (23)
I0620 08:41:33.174788   670 net.cpp:577] conv1_2_p <- conv1_1_p
I0620 08:41:33.174794   670 net.cpp:547] conv1_2_p -> conv1_2_p
I0620 08:41:33.175318   670 net.cpp:265] Setting up conv1_2_p
I0620 08:41:33.175324   670 net.cpp:272] TEST Top shape for layer 23 'conv1_2_p' 1 64 224 224 (3211264)
I0620 08:41:33.175330   670 net.cpp:636] Sharing parameters 'conv1_2_w' owned by layer 'conv1_2', param index 0
I0620 08:41:33.175336   670 net.cpp:636] Sharing parameters 'conv1_2_b' owned by layer 'conv1_2', param index 1
I0620 08:41:33.175340   670 layer_factory.hpp:172] Creating layer 'relu1_2_p' of type 'ReLU'
I0620 08:41:33.175344   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.175350   670 net.cpp:205] Created Layer relu1_2_p (24)
I0620 08:41:33.175355   670 net.cpp:577] relu1_2_p <- conv1_2_p
I0620 08:41:33.175359   670 net.cpp:532] relu1_2_p -> conv1_2_p (in-place)
I0620 08:41:33.175364   670 net.cpp:265] Setting up relu1_2_p
I0620 08:41:33.175369   670 net.cpp:272] TEST Top shape for layer 24 'relu1_2_p' 1 64 224 224 (3211264)
I0620 08:41:33.175374   670 layer_factory.hpp:172] Creating layer 'conv1_2_p_relu1_2_p_0_split' of type 'Split'
I0620 08:41:33.175380   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.175387   670 net.cpp:205] Created Layer conv1_2_p_relu1_2_p_0_split (25)
I0620 08:41:33.175391   670 net.cpp:577] conv1_2_p_relu1_2_p_0_split <- conv1_2_p
I0620 08:41:33.175396   670 net.cpp:547] conv1_2_p_relu1_2_p_0_split -> conv1_2_p_relu1_2_p_0_split_0
I0620 08:41:33.175402   670 net.cpp:547] conv1_2_p_relu1_2_p_0_split -> conv1_2_p_relu1_2_p_0_split_1
I0620 08:41:33.175424   670 net.cpp:265] Setting up conv1_2_p_relu1_2_p_0_split
I0620 08:41:33.175434   670 net.cpp:272] TEST Top shape for layer 25 'conv1_2_p_relu1_2_p_0_split' 1 64 224 224 (3211264)
I0620 08:41:33.175439   670 net.cpp:272] TEST Top shape for layer 25 'conv1_2_p_relu1_2_p_0_split' 1 64 224 224 (3211264)
I0620 08:41:33.175444   670 layer_factory.hpp:172] Creating layer 'pool1_p' of type 'Pooling'
I0620 08:41:33.175448   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.175456   670 net.cpp:205] Created Layer pool1_p (26)
I0620 08:41:33.175460   670 net.cpp:577] pool1_p <- conv1_2_p_relu1_2_p_0_split_0
I0620 08:41:33.175465   670 net.cpp:547] pool1_p -> pool1_p
I0620 08:41:33.175491   670 net.cpp:265] Setting up pool1_p
I0620 08:41:33.175498   670 net.cpp:272] TEST Top shape for layer 26 'pool1_p' 1 64 112 112 (802816)
I0620 08:41:33.175501   670 layer_factory.hpp:172] Creating layer 'conv2_1_p' of type 'Convolution'
I0620 08:41:33.175508   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.175516   670 net.cpp:205] Created Layer conv2_1_p (27)
I0620 08:41:33.175520   670 net.cpp:577] conv2_1_p <- pool1_p
I0620 08:41:33.175525   670 net.cpp:547] conv2_1_p -> conv2_1_p
I0620 08:41:33.176424   670 net.cpp:265] Setting up conv2_1_p
I0620 08:41:33.176431   670 net.cpp:272] TEST Top shape for layer 27 'conv2_1_p' 1 128 112 112 (1605632)
I0620 08:41:33.176436   670 net.cpp:636] Sharing parameters 'conv2_1_w' owned by layer 'conv2_1', param index 0
I0620 08:41:33.176442   670 net.cpp:636] Sharing parameters 'conv2_1_b' owned by layer 'conv2_1', param index 1
I0620 08:41:33.176446   670 layer_factory.hpp:172] Creating layer 'relu2_1_p' of type 'ReLU'
I0620 08:41:33.176451   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.176465   670 net.cpp:205] Created Layer relu2_1_p (28)
I0620 08:41:33.176470   670 net.cpp:577] relu2_1_p <- conv2_1_p
I0620 08:41:33.176476   670 net.cpp:532] relu2_1_p -> conv2_1_p (in-place)
I0620 08:41:33.176481   670 net.cpp:265] Setting up relu2_1_p
I0620 08:41:33.176486   670 net.cpp:272] TEST Top shape for layer 28 'relu2_1_p' 1 128 112 112 (1605632)
I0620 08:41:33.176491   670 layer_factory.hpp:172] Creating layer 'conv2_2_p' of type 'Convolution'
I0620 08:41:33.176494   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.176503   670 net.cpp:205] Created Layer conv2_2_p (29)
I0620 08:41:33.176508   670 net.cpp:577] conv2_2_p <- conv2_1_p
I0620 08:41:33.176513   670 net.cpp:547] conv2_2_p -> conv2_2_p
I0620 08:41:33.178751   670 net.cpp:265] Setting up conv2_2_p
I0620 08:41:33.178767   670 net.cpp:272] TEST Top shape for layer 29 'conv2_2_p' 1 128 112 112 (1605632)
I0620 08:41:33.178773   670 net.cpp:636] Sharing parameters 'conv2_2_w' owned by layer 'conv2_2', param index 0
I0620 08:41:33.178778   670 net.cpp:636] Sharing parameters 'conv2_2_b' owned by layer 'conv2_2', param index 1
I0620 08:41:33.178783   670 layer_factory.hpp:172] Creating layer 'relu2_2_p' of type 'ReLU'
I0620 08:41:33.178788   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.178794   670 net.cpp:205] Created Layer relu2_2_p (30)
I0620 08:41:33.178800   670 net.cpp:577] relu2_2_p <- conv2_2_p
I0620 08:41:33.178807   670 net.cpp:532] relu2_2_p -> conv2_2_p (in-place)
I0620 08:41:33.178812   670 net.cpp:265] Setting up relu2_2_p
I0620 08:41:33.178817   670 net.cpp:272] TEST Top shape for layer 30 'relu2_2_p' 1 128 112 112 (1605632)
I0620 08:41:33.178822   670 layer_factory.hpp:172] Creating layer 'conv2_2_p_relu2_2_p_0_split' of type 'Split'
I0620 08:41:33.178828   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.178833   670 net.cpp:205] Created Layer conv2_2_p_relu2_2_p_0_split (31)
I0620 08:41:33.178836   670 net.cpp:577] conv2_2_p_relu2_2_p_0_split <- conv2_2_p
I0620 08:41:33.178841   670 net.cpp:547] conv2_2_p_relu2_2_p_0_split -> conv2_2_p_relu2_2_p_0_split_0
I0620 08:41:33.178848   670 net.cpp:547] conv2_2_p_relu2_2_p_0_split -> conv2_2_p_relu2_2_p_0_split_1
I0620 08:41:33.178869   670 net.cpp:265] Setting up conv2_2_p_relu2_2_p_0_split
I0620 08:41:33.178874   670 net.cpp:272] TEST Top shape for layer 31 'conv2_2_p_relu2_2_p_0_split' 1 128 112 112 (1605632)
I0620 08:41:33.178880   670 net.cpp:272] TEST Top shape for layer 31 'conv2_2_p_relu2_2_p_0_split' 1 128 112 112 (1605632)
I0620 08:41:33.178884   670 layer_factory.hpp:172] Creating layer 'pool2_p' of type 'Pooling'
I0620 08:41:33.178889   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.178896   670 net.cpp:205] Created Layer pool2_p (32)
I0620 08:41:33.178901   670 net.cpp:577] pool2_p <- conv2_2_p_relu2_2_p_0_split_0
I0620 08:41:33.178907   670 net.cpp:547] pool2_p -> pool2_p
I0620 08:41:33.178936   670 net.cpp:265] Setting up pool2_p
I0620 08:41:33.178941   670 net.cpp:272] TEST Top shape for layer 32 'pool2_p' 1 128 56 56 (401408)
I0620 08:41:33.178946   670 layer_factory.hpp:172] Creating layer 'conv3_1_p' of type 'Convolution'
I0620 08:41:33.178951   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.178959   670 net.cpp:205] Created Layer conv3_1_p (33)
I0620 08:41:33.178963   670 net.cpp:577] conv3_1_p <- pool2_p
I0620 08:41:33.178968   670 net.cpp:547] conv3_1_p -> conv3_1_p
I0620 08:41:33.182078   670 net.cpp:265] Setting up conv3_1_p
I0620 08:41:33.182090   670 net.cpp:272] TEST Top shape for layer 33 'conv3_1_p' 1 256 56 56 (802816)
I0620 08:41:33.182096   670 net.cpp:636] Sharing parameters 'conv3_1_w' owned by layer 'conv3_1', param index 0
I0620 08:41:33.182101   670 net.cpp:636] Sharing parameters 'conv3_2_b' owned by layer 'conv3_1', param index 1
I0620 08:41:33.182116   670 layer_factory.hpp:172] Creating layer 'relu3_1_p' of type 'ReLU'
I0620 08:41:33.182122   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.182128   670 net.cpp:205] Created Layer relu3_1_p (34)
I0620 08:41:33.182133   670 net.cpp:577] relu3_1_p <- conv3_1_p
I0620 08:41:33.182139   670 net.cpp:532] relu3_1_p -> conv3_1_p (in-place)
I0620 08:41:33.182145   670 net.cpp:265] Setting up relu3_1_p
I0620 08:41:33.182149   670 net.cpp:272] TEST Top shape for layer 34 'relu3_1_p' 1 256 56 56 (802816)
I0620 08:41:33.182154   670 layer_factory.hpp:172] Creating layer 'conv3_2_p' of type 'Convolution'
I0620 08:41:33.182159   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.182168   670 net.cpp:205] Created Layer conv3_2_p (35)
I0620 08:41:33.182171   670 net.cpp:577] conv3_2_p <- conv3_1_p
I0620 08:41:33.182178   670 net.cpp:547] conv3_2_p -> conv3_2_p
I0620 08:41:33.188963   670 net.cpp:265] Setting up conv3_2_p
I0620 08:41:33.188977   670 net.cpp:272] TEST Top shape for layer 35 'conv3_2_p' 1 256 56 56 (802816)
I0620 08:41:33.188982   670 net.cpp:636] Sharing parameters 'conv3_2_w' owned by layer 'conv3_2', param index 0
I0620 08:41:33.188987   670 net.cpp:636] Sharing parameters 'conv3_2_b' owned by layer 'conv3_1', param index 1
I0620 08:41:33.188989   670 layer_factory.hpp:172] Creating layer 'relu3_2_p' of type 'ReLU'
I0620 08:41:33.188993   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.188998   670 net.cpp:205] Created Layer relu3_2_p (36)
I0620 08:41:33.189002   670 net.cpp:577] relu3_2_p <- conv3_2_p
I0620 08:41:33.189007   670 net.cpp:532] relu3_2_p -> conv3_2_p (in-place)
I0620 08:41:33.189010   670 net.cpp:265] Setting up relu3_2_p
I0620 08:41:33.189014   670 net.cpp:272] TEST Top shape for layer 36 'relu3_2_p' 1 256 56 56 (802816)
I0620 08:41:33.189018   670 layer_factory.hpp:172] Creating layer 'conv3_3_p' of type 'Convolution'
I0620 08:41:33.189021   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.189029   670 net.cpp:205] Created Layer conv3_3_p (37)
I0620 08:41:33.189033   670 net.cpp:577] conv3_3_p <- conv3_2_p
I0620 08:41:33.189036   670 net.cpp:547] conv3_3_p -> conv3_3_p
I0620 08:41:33.195686   670 net.cpp:265] Setting up conv3_3_p
I0620 08:41:33.195701   670 net.cpp:272] TEST Top shape for layer 37 'conv3_3_p' 1 256 56 56 (802816)
I0620 08:41:33.195706   670 net.cpp:636] Sharing parameters 'conv3_3_w' owned by layer 'conv3_3', param index 0
I0620 08:41:33.195711   670 net.cpp:636] Sharing parameters 'conv3_3_b' owned by layer 'conv3_3', param index 1
I0620 08:41:33.195717   670 layer_factory.hpp:172] Creating layer 'relu3_3_p' of type 'ReLU'
I0620 08:41:33.195721   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.195727   670 net.cpp:205] Created Layer relu3_3_p (38)
I0620 08:41:33.195732   670 net.cpp:577] relu3_3_p <- conv3_3_p
I0620 08:41:33.195737   670 net.cpp:532] relu3_3_p -> conv3_3_p (in-place)
I0620 08:41:33.195744   670 net.cpp:265] Setting up relu3_3_p
I0620 08:41:33.195749   670 net.cpp:272] TEST Top shape for layer 38 'relu3_3_p' 1 256 56 56 (802816)
I0620 08:41:33.195752   670 layer_factory.hpp:172] Creating layer 'fd_1' of type 'Python'
I0620 08:41:33.195756   670 layer_factory.hpp:184] Layer's types are Ftype:FLOAT Btype:FLOAT Fmath:FLOAT Bmath:FLOAT
I0620 08:41:33.195818   670 layer_factory.cpp:339] Importing Python module 'feature_difference_layer'

FF-Net implementation is inconsistent to the description in TABLE 1.

Hi, @MinZHANG-WHU
As for the conv_f layer of FF-Net, it is composed of Conv+ReLU in TABLE 1 in the paper.
However, FF-Net implementation didn't include the ReLU operation. Does it matter?

        n.concat_1 = self.concat(n.data_t12, n.fd_1, n.up_2, n.up_3)
        n.conv_t = self.conv(n.concat_1, 3, self.ff_channel, stride=1, pad=1,
                             name_w="conv_t_w", name_b="conv_t_b",
                             lr_mult_w=1, lr_mult_b=1,
                             decay_mult=1, bias_term=True)
        n.conv_prob = self.conv(n.conv_t, 1, 1, stride=1, pad=0,
                                name_w="conv_prob_w", name_b="conv_prob_b",
                                lr_mult_w=1, lr_mult_b=1,
                                decay_mult=1, bias_term=True)

        n.sig = L.Sigmoid(n.conv_prob, in_place=False)

请教改进loss中计算正负样本比例问题

张博,
您好!
拜读了您的文章,有个疑问想向您指教。对于文中提到的改进loss,在计算正负样本比例的时候是给一个固定值所有样本中正负样本的比例还是根据训练的batch中传到loss函数中的样本计算正负样本比例?

Thank you!

Great work, thank you for making this repo available to the research community. Also thanks for uploading the al the datasets used in the paper.
Best,
Chaminda.

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.