1
$\begingroup$

I'm trying to understand the role of data augmentation and how it can affect the performance/accuracy of a deep model. My target application is fire detection (on video frames), with almost 15K positive and negative samples, and I was using the following data augmentation techniques. Does using ALL the followings always increase the performance? Or we have to choose them somehow smartly given our target application?

rotation_range=20, width_shift_range=0.2, height_shift_range=0.2,zoom_range=0.2, horizontal_flip=True

When I think a bit more, fire is always straight up, so I think rotation or shift might in fact worsen the results, given that it makes the image sides stretch like this, which is irrelevant to fires in video frames. Same with rotation. So I think maybe I should only keep zoom_range=0.2, horizontal_flip=True and remove the first three. Because I see some false positives when we have a scene transition effect in videos.

Is my argument correct? Should I keep them or remove them?

enter image description here

enter image description here

$\endgroup$
1
$\begingroup$

In fact, choosing smartly the values of the image augmentation can help the performance of your system. Where I work we developed an object detector for cars. We had the following image augmentation parameters:

  • Apect ratio distorsion: it changed the cars dimensions
  • Additive noise: it blurred the image
  • Change colorspace: change the cars colors
  • Saturation change: brightness
  • Rotation: rotate image axis
  • Flipping (horizontally): mirror effect
  • Zooming: zoom in/out of image

At first we just combined all the effects (within a certain range of change per effect) randomly in each augmented image. But then we did an study for our use case and we found that our model performed better with: no aspect ratio deformation and no change in color space. After giving it a bit of a thought it really made sense for our use case because it is a detector for a very specific type of car.

However, although the improvements accomplished by optimizing the parameters of image augmentation boosted the performance of the model, the improvements were not huge, so in the end it did not really worth the effort. To give some numbers it improved $5\%$ in our custom test metrics, and we were expecting something around $10\%$ so from that moment on we left the specific image augmentation parameters but stopped thinking too much about it.

So, in conclussion, does it helps? yes, how much? well, that would depend on the use case. For us, it turned out it did not improve as much as we wanted.

Hope this helps :)

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks. Useful thoughts. So after each removal, your trained the model and tested it? What metric do you look to get the best model? Is that val_loss? $\endgroup$ – Tina J Feb 11 at 17:16
  • 1
    $\begingroup$ Yes, exactly that, we trained the model several times with different parameters. That's how we found the best ones. That is also why we lost so much time and we think it did not worth the effort. The custom metric was an aggregated metric of precission and accuracy for our use case. So after train the model we run some tests on top. $\endgroup$ – JVGD Feb 12 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.