Is a image neural network limited to an exact size?

Can I make the neural network work on images that are different in size?
Example: I have two images that have text on them, one of the images are 1020x1400 and the other one is 1080x1520, could I make the neural network work on such samples? Though I would probably want it to auto crop and only preserve the text. I’m not sure how I could put one neural network in and give the result of that neural network to another neural network?

Hi @Remliv

Just another user here offering some thoughts… internally TensorFlow uses fixed size tensors to store data, so without additional work, images of different sizes can’t be handled directly.

If you know the maximum dimensions of your images you could pre-process to pad them all up to a common size, then you could use a network to extract fixed size regions containing text that you could pass to another network.

I don’t know whether padding is something you can do in Perceptilabs, but I don’t think it’s an existing capability. When code is editable, you could try creating something custom, but my suggestion would be to do it externally in Python, for example.

Is that the sort of thing you were thinking of?

Thank you, I don’t have a lot of experience with python so I will most likely not code anything myself. It wasn’t what I wanted, but It was what I expected.

Hi @Remliv,

Just to add some more here, all images automatically have resizing turned on as a pre-processing option in PerceptiLabs, so you should be able to feed images of different sizes without issue. You can find it in the pre-processing menu next to the column name in the Data Wizard if you want to see all the options. :slight_smile:

1 Like