0
$\begingroup$

I want to create a music sheet scanner using CNN Model and the images I am using are not squared and, if I make them squared, important data will be lost and it might confuse the model.

Is it ok to use longer pictures? If yes, what sizes should I use for a picture like the one below?

For the CNN model I will have to use different scales for the layers, I will not be able to use the 3x3 layer anymore, right?

I am still a beginner, so I am learning these things now without having previous experience in this field.

enter image description here

$\endgroup$

2 Answers 2

1
$\begingroup$

I disagree with SickerDude43, and I think the linked SO post isn't relevant in this case. Well you haven't told us what does your network's model look like, but I assume it should understand the notation and output the notes, the key and maybe even tempo (sorry my musical education is rusty).

Your inputs are naturally wider than tall, and it doesn't make sense to for example pad them with white pixels or scale to a square aspect ratio. But if you use rectangular kernels, you cannot stack that many of them before your image's height becomes just one pixel while the width is still in the hundreds. That is why I suggest you to specify non-rectangular kernel shapes, so that the network's output dimension resembles more of a rectangle.

On the face value, your problem seems non-trivial if the notation on the left edge of the image impacts the correct interpretation of the rest of the notes. Then again, maybe a few fully connected (dense) layers can solve without problems.

$\endgroup$
0
$\begingroup$

I'd like to post this as a comment, but I don't have enough repo for that.

But your question already exists. You'll find your answer there. https://stats.stackexchange.com/questions/240690/non-square-images-for-image-classification

Quick summary: CNN can take non-Squared images for your model. However it's better to just stick with Squared Images. There are workarounds to ensure that property. If there's no other way, you can just try it out and evaluate your results.

$\endgroup$

You must log in to answer this question.