Black border around image

조회 수: 3 (최근 30일)
Mellysa Susilo
Mellysa Susilo 2017년 5월 4일
댓글: Mellysa Susilo 2017년 5월 24일
Hello, i'm working in Convolutional Neural Network project right now. The training data i prepared is slightly different when i input it on Matlab. It has black border around it, but it shouldn't be there because it can affect the accuracy of my network.
This is the original image
And this is after being input
is this affect my network's accuracy? and if it is how can i get rid of it?

채택된 답변

Javier Pinzón
Javier Pinzón 2017년 5월 18일
Hello Mellysa
Sometimes, when an img is in PNG format, it have some properties that matlab change, such as transparencies. I recommend you to change it to .JPG format, and perhaps re-colour your backgound to avoid problems when reading the image.
About accuracy, if black-borders are touching your kanjis, as is happening in the first image, the CNN may contemplate it as part of your symbol. but, as i can see, every single image have exact the same black-border, so, i think the network may "erase" this border when using ReLU layer. Also, you can train your network to test if borders affect, and perhaps check the activations.
  댓글 수: 1
Mellysa Susilo
Mellysa Susilo 2017년 5월 24일
I see, so image format is also important. The network show very low accuracy when i use those images. So i decide to change the images format to JPG.
Thank you for your answer :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by