1 SAR图像变化检测步骤 :
(1)获取原始SAR图像的对数比值图像;
(2)将得到的数据按照一定的方式转化为Tensor格式的数据,以作为CNN的输入;
(3)构建CNN模型;
(4)训练;
(5)测试。
2 卷积神经网络
参考资料,可以参考zouxy09的博客,写得很详细:
http://blog.csdn.net/zouxy09/article/details/8781543
一位外国网友自己实现的CNN,重构LeCunn的实验:
http://www.codeproject.com/Articles/16650/Neural-Network-for-Recognition-of-Handwritten-Digi
还有这篇博客也不错:
http://www.cnblogs.com/nsnow/p/4562308.html
3、CNN模型
本实验使用两层的 CNNs 特征提起,一层的全连接用于非线性的映射,最后添加一层 softmax 用于分类。该实验在 Torch7 平台上实现,代码为 Lua 语言,模型部分的代码如下:
net = nn.Sequential()
net:add(nn.SpatialConvolution(1, 6, 5, 5))
-- 1 input image channels, 6 output channels, 5x5 convolution kernel
net:add(nn.ReLU())
net:add(nn.SpatialMaxPooling(2,2,2,2))
-- A max-pooling operation that looks at 2x2 windows and finds the max.
net:add(nn.SpatialConvolution(6, 16, 5, 5))
net:add(nn.ReLU())
net:add(nn.SpatialMaxPooling(2,2,2,2))
net:add(nn.View(16*2*2))
-- reshapes from a 3D tensor of 16x5x5 into 1D tensor of 16*2*2
net:add(nn.Dropout(0.5))
net:add(nn.Linear(16*2*2, 120))
-- fully connected layer(matrix multiplication between input and weights)
net:add(nn.ReLU())
net:add(nn.Linear(120, 84))
net:add(nn.ReLU())
net:add(nn.Linear(84, 2))
-- 2 is the number of outputs of the network (in this case, 2 digits)
net:add(nn.LogSoftMax())
4、数据
实验中对每个像素点取其周围 21x21 的 patch 代表该像素点。实验中选择
大约1/3 的样本训练,其余作为样本测试.
本试验所用的数据为Bern数据和Ottawa数据,对图像以像素点为中心,进行 21×21 的取块,其中每一个块代表一个点,对每个块运用 CNN 分类。边缘部分的点进行镜像拓展处理。
最终Bern数据的准确率达到99%,Ottawa数据的准确率达到97%.
5、总结
由于做的比较仓促,没有将最后的数据转化为图片,且正确率有待提高。