Jivan
Jivan

Reputation: 23068

Use trained neural network with images showing broader surrounding context

Model has been trained, it reliably recognises dogs from cats in tiny pictures like the following:

enter image description here

All these pictures are pretty much always centered on the cat/dog, and the cat/dog occupies almost all the image frame. There is little to none additional surrounding context, which allows the network to train very efficiently.

The next step is, how to make sure that the same model will effectively tell that in the picture below, there happens to be a cat, similar to the ones used to train the model, but surrounded by a broader environment?

enter image description here

Are there some specific steps to take when the model is supposed to be used in production with images showing a broader context than in training? Or is the model able to detect it automagically?

Upvotes: 0

Views: 104

Answers (1)

Susmit Agrawal
Susmit Agrawal

Reputation: 3764

It decreasing order of effectiveness, the steps you can take are:

  1. Use more training data, with images having larger borders.

  2. Augment existing training images with borders, maybe through random or mirrored padding.

  3. Try cropping out the borders during inference, creating multiple images with different borders. Pick the run with the best result.

Upvotes: 1

Related Questions