I'm creating a simple neural network for image classification,I had some doubts about the input images.

Let's suppose i'm trying to classify (for example) a bear and i have an input image like this: enter image description here

or this: enter image description here

should i crop the envirorment in order to obtain an image which contains only the bear? Does this improve the performance of my learning process? Is it a good practice to do?


1 Answer 1


That's a question you must answer yourself. Are you interested in recognizing bear from a distance? If so, you must include such records in your data set. On the other head, zooming is one of the techniquest used extensively in image data augmentation. It's implemented in keras ImageDataGenerator, where you can control zoom-in and zoom-out ranges.

  • $\begingroup$ So randomic zooming could be enough to train my model in order to recognize both bears in an envirorment and close up? $\endgroup$ Commented Nov 27, 2019 at 12:47
  • 1
    $\begingroup$ Random zoom will help you detect objects of different scales. Environment is different case. If you have data of bears only in wilderness, it might have problems detecting bears in restaurant. Just be aware, you have to cover your application's domain. $\endgroup$ Commented Nov 27, 2019 at 12:56
  • $\begingroup$ If i have to be capable of detecting both, which is the best solution? Basically if i'm not wrong, isolating the "object" (in my case the bear) doesn't imply a better performance in the classification, right? $\endgroup$ Commented Nov 30, 2019 at 12:24

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.