1

This example allows the classification of images with scikit-learn: http://scikit-learn.org/stable/auto_examples/classification/plot_digits_classification.html However, it is important that all the images have the same size (width and height, as written in the comments). How can I modify this code to allow classification of images with different sizes?

1 Answer 1

0

You will need to define your own Feature Extraction.

In example from above, every pixel is represent a feature. If your images of different sizes, most trivial (but certainly not the best) thing that you can do is pad all images to the size of largest image with, for example, white pixels.

Here an example how to add boarders to image.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your answer. you can link to me an example?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.