目前,我正在使用Alexnet完成分类任务。
每个输入样本的大小为480*680,如下所示:

使用一个正常的网络,由大小为256*256 (在预处理步骤中生成)的裁剪输入(批量大小为8 )提供的输入,给出了92%的准确率。
但是,当我尝试使用以下作物层生成每个样本(480*680)中的5种作物(角和中心作物)时:
# this is the reference blob of the cropping process which determines cropping size
layer {
name: "reference-blob"
type: "Input"
top: "reference"
input_param { shape: { dim: 8 dim: 3 dim: 227 dim: 227 } }
}
# upper-left crop
layer{
name: "crop-1"
type: "Crop"
bottom: "data"
bottom: "reference"
top: "crop-1"
crop_param {
axis: 2
offset: 1
offset: 1
}
}
# upper-right crop
layer{
name: "crop-2"
type: "Crop"
bottom: "data"
bottom: "reference"
top: "crop-2"
crop_param {
axis: 2
offset: 1
offset: 412
}
}
# lower-left crop
layer{
name: "crop-3"
type: "Crop"
bottom: "data"
bottom: "reference"
top: "crop-3"
crop_param {
axis: 2
offset: 252
offset: 1
}
}
# lower-right crop
layer{
name: "crop-4"
type: "Crop"
bottom: "data"
bottom: "reference"
top: "crop-4"
crop_param {
axis: 2
offset: 252
offset: 412
}
}
# center crop
layer{
name: "crop-5"
type: "Crop"
bottom: "data"
bottom: "reference"
top: "crop-5"
crop_param {
axis: 2
offset: 127
offset: 207
}
}
# concat all the crop results to feed the next layer
layer{
name: "crop_concat"
type: "Concat"
bottom: "crop-1"
bottom: "crop-2"
bottom: "crop-3"
bottom: "crop-4"
bottom: "crop-5"
top: "all_crops"
concat_param {
axis: 0
}
}
# generating enough labels for all the crop results
layer{
name: "label_concat"
type: "Concat"
bottom: "label"
bottom: "label"
bottom: "label"
bottom: "label"
bottom: "label"
top: "all-labels"
concat_param {
axis: 0
}
}这使得准确率达到90.6%,这是很奇怪的。
知道吗?
发布于 2016-05-31 17:55:08
裁剪版本的典型用法是在识别滤波器的标准位置得到一个关键的特征。例如,典型的5种作物方法通常会发现“靠近图像中部的动物脸”通常足以使其从末尾显示为2-4层的学习图标。
因为纹理倾向于重复某些特性,所以裁剪照片没有这样的优势:您呈现了5个纹理较小的实例,纹理相对较大,而不是完整图像。
https://stackoverflow.com/questions/37549045
复制相似问题