Clear Filters
Clear Filters

Does black region of the rotated image affect the CNN classification accuracy?

4 views (last 30 days)
I have a question on the imageDataAugmenter fuction provided on the matlab. i tried to rotate the original image for 45 degree and there are some black region that occur during the rotation. I have several confusion regarding the black region. Hope someone could help to clarify on the matter.
1. Does the black region affect the classification accuracy of CNN?
2. Would the CNN consider the black region of the rotated image as one the feature during the training?
3. Is there any way to prevent the black region?
Thank You.
Thank You.

Accepted Answer

Mahesh Taparia
Mahesh Taparia on 23 Apr 2021
Hi
Yeah it will affect slightly. This is an augmentation technique, mostly it will improve the network accuracy.
Yeah network will consider those black part in input images, but it will be having minimal effect in the features.
You can prevent this black portion if you are not considering the augmentation process as a preprocessing step. But it is recommended to do so as it may improves network performance.
Moreover, you can incorporate cut out augmentation in your workflow which radomly erase some portion of image with some random noise. You can refer this documentation of imerase function.
Hope it will help!
  2 Comments
Teo
Teo on 24 Apr 2021
Hi, it's great to hear that. Thank you very much for your clarification @Mahesh Taparia. Thanks for the suggestion on imerase, will definetely try it out. once again,Thank You very much.
Image Analyst
Image Analyst on 24 Apr 2021
Edited: Image Analyst on 24 Apr 2021
So I guess if the image is rotated, and black gets rotated into the corners, the algorithm will learn to deweight/ignore the corners. So if the thing you're looking for happens to be in the corners for some test images, then it may not find those every time because corners are ignored. Is that correct?
An (suggested) option would be to smear the edge back toward the corner but I don't know if that would help noticeably or just be a waste of time because there is still nothing that you want to find in those corners in your training set and so they will still be ignored even though they're black. Right?

Sign in to comment.

More Answers (0)

Products


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!