目前,我正在使用Alexnet來完成分類任務。爲什麼數據增強不能提高CNN紋理分類的準確性?
每一輸入樣本的大小是480×680像這樣:
使用正常的網絡,通過尺寸的裁切後的輸入進料256 * 256(在預處理步驟中生成)與批料尺寸8,給我92%的準確率。
但是,當我嘗試使用以下作物層以產生5種作物每個(480 * 680)的樣品(角部加上一個中心作物)的:
# 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%的準確率,其很奇怪。
任何想法?
您可以發佈樣品(480x640)圖像(在預處理之前)嗎?裁剪圖像中的重疊最小,所以您確定它們都能正確表示所需的分類嗎?通常,這種數據增強涉及生成多個重疊的裁剪圖像,這些圖像通常會重疊,因此您希望分類的實際對象僅在每幅裁剪後的圖像中進行少量轉換。如果每個角落圖像只是您希望分類的對象的一小部分,那麼您可能會無意中將分類任務變得更加困難。 – Aenimated1
@ Aenimated1感謝您的重播。實際上,它們是紋理圖像。我個人認爲,在這種情況下,生成這種裁剪版本不會有多大幫助,但是我在某處讀到它可以提高準確性。 – Ali