ImageDataGeneratorの使い方 #3

Closed
aidiary opened this Issue Nov 25, 2016 · 2 comments

Comments

Projects
None yet
1 participant

@aidiary aidiary changed the title from ImageDataGenerator to ImageDataGeneratorの使い方 Nov 25, 2016

@aidiary

This comment has been minimized.

Show comment
Hide comment
@aidiary

aidiary Dec 8, 2016

Owner

最初の5エポックの推移
白色化を使った方が精度が高そう

データ拡張なし

Not using data augmentation
Train on 50000 samples, validate on 10000 samples
Epoch 1/5
50000/50000 [==============================] - 64s - loss: 1.8405 - acc: 0.3208 - val_loss: 1.4956 - val_acc: 0.4607
Epoch 2/5
50000/50000 [==============================] - 64s - loss: 1.4562 - acc: 0.4725 - val_loss: 1.2890 - val_acc: 0.5366
Epoch 3/5
50000/50000 [==============================] - 64s - loss: 1.3010 - acc: 0.5347 - val_loss: 1.2058 - val_acc: 0.5673
Epoch 4/5
50000/50000 [==============================] - 64s - loss: 1.2004 - acc: 0.5711 - val_loss: 1.0831 - val_acc: 0.6194
Epoch 5/5
50000/50000 [==============================] - 64s - loss: 1.1331 - acc: 0.5984 - val_loss: 1.0408 - val_acc: 0.6307
Test loss: 1.04080826759
Test acc: 0.6307

データ拡張あり(ZCA白色化、ランダムシフト)

Using real-time data augmentation
Epoch 1/5
50000/50000 [==============================] - 157s - loss: 1.8219 - acc: 0.3180 - val_loss: 1.4303 - val_acc: 0.4827
Epoch 2/5
50000/50000 [==============================] - 132s - loss: 1.3938 - acc: 0.4957 - val_loss: 1.2336 - val_acc: 0.5683
Epoch 3/5
50000/50000 [==============================] - 131s - loss: 1.1954 - acc: 0.5700 - val_loss: 1.0365 - val_acc: 0.6282
Epoch 4/5
50000/50000 [==============================] - 132s - loss: 1.0827 - acc: 0.6164 - val_loss: 0.9085 - val_acc: 0.6847
Epoch 5/5
50000/50000 [==============================] - 135s - loss: 1.0104 - acc: 0.6456 - val_loss: 0.8492 - val_acc: 0.6999
Test loss: 0.850078792953
Test acc: 0.6987
Owner

aidiary commented Dec 8, 2016

最初の5エポックの推移
白色化を使った方が精度が高そう

データ拡張なし

Not using data augmentation
Train on 50000 samples, validate on 10000 samples
Epoch 1/5
50000/50000 [==============================] - 64s - loss: 1.8405 - acc: 0.3208 - val_loss: 1.4956 - val_acc: 0.4607
Epoch 2/5
50000/50000 [==============================] - 64s - loss: 1.4562 - acc: 0.4725 - val_loss: 1.2890 - val_acc: 0.5366
Epoch 3/5
50000/50000 [==============================] - 64s - loss: 1.3010 - acc: 0.5347 - val_loss: 1.2058 - val_acc: 0.5673
Epoch 4/5
50000/50000 [==============================] - 64s - loss: 1.2004 - acc: 0.5711 - val_loss: 1.0831 - val_acc: 0.6194
Epoch 5/5
50000/50000 [==============================] - 64s - loss: 1.1331 - acc: 0.5984 - val_loss: 1.0408 - val_acc: 0.6307
Test loss: 1.04080826759
Test acc: 0.6307

データ拡張あり(ZCA白色化、ランダムシフト)

Using real-time data augmentation
Epoch 1/5
50000/50000 [==============================] - 157s - loss: 1.8219 - acc: 0.3180 - val_loss: 1.4303 - val_acc: 0.4827
Epoch 2/5
50000/50000 [==============================] - 132s - loss: 1.3938 - acc: 0.4957 - val_loss: 1.2336 - val_acc: 0.5683
Epoch 3/5
50000/50000 [==============================] - 131s - loss: 1.1954 - acc: 0.5700 - val_loss: 1.0365 - val_acc: 0.6282
Epoch 4/5
50000/50000 [==============================] - 132s - loss: 1.0827 - acc: 0.6164 - val_loss: 0.9085 - val_acc: 0.6847
Epoch 5/5
50000/50000 [==============================] - 135s - loss: 1.0104 - acc: 0.6456 - val_loss: 0.8492 - val_acc: 0.6999
Test loss: 0.850078792953
Test acc: 0.6987
@aidiary

This comment has been minimized.

Show comment
Hide comment
@aidiary

aidiary Dec 8, 2016

Owner

学習データにだけZCA白色化を施して、テストデータにZCA白色化を施さないと・・・下のように惨憺たる結果なのでテストデータにも前処理を施す必要がある。

Using real-time data augmentation
Epoch 1/5
50000/50000 [==============================] - 129s - loss: 1.8708 - acc: 0.2949 - val_loss: 3.6063 - val_acc: 0.1137
Epoch 2/5
50000/50000 [==============================] - 117s - loss: 1.4497 - acc: 0.4676 - val_loss: 8.5710 - val_acc: 0.1006
Epoch 3/5
50000/50000 [==============================] - 117s - loss: 1.2306 - acc: 0.5574 - val_loss: 8.4422 - val_acc: 0.1005
Epoch 4/5
50000/50000 [==============================] - 117s - loss: 1.1020 - acc: 0.6108 - val_loss: 4.4276 - val_acc: 0.0992
Epoch 5/5
50000/50000 [==============================] - 117s - loss: 1.0336 - acc: 0.6393 - val_loss: 6.4242 - val_acc: 0.0934
Owner

aidiary commented Dec 8, 2016

学習データにだけZCA白色化を施して、テストデータにZCA白色化を施さないと・・・下のように惨憺たる結果なのでテストデータにも前処理を施す必要がある。

Using real-time data augmentation
Epoch 1/5
50000/50000 [==============================] - 129s - loss: 1.8708 - acc: 0.2949 - val_loss: 3.6063 - val_acc: 0.1137
Epoch 2/5
50000/50000 [==============================] - 117s - loss: 1.4497 - acc: 0.4676 - val_loss: 8.5710 - val_acc: 0.1006
Epoch 3/5
50000/50000 [==============================] - 117s - loss: 1.2306 - acc: 0.5574 - val_loss: 8.4422 - val_acc: 0.1005
Epoch 4/5
50000/50000 [==============================] - 117s - loss: 1.1020 - acc: 0.6108 - val_loss: 4.4276 - val_acc: 0.0992
Epoch 5/5
50000/50000 [==============================] - 117s - loss: 1.0336 - acc: 0.6393 - val_loss: 6.4242 - val_acc: 0.0934

@aidiary aidiary closed this Feb 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment