Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage discontinuities when classifying #11

Closed
ymoisan opened this issue Sep 27, 2018 · 1 comment
Closed

Manage discontinuities when classifying #11

ymoisan opened this issue Sep 27, 2018 · 1 comment
Assignees
Labels
P3 Low priority

Comments

@ymoisan
Copy link
Contributor

ymoisan commented Sep 27, 2018

When classifying images, we can see linear artifacts in the final output due to the moving window used to assign classes being smaller than the image to be classified. An example:

image

The solution would be to manage the moving window overlap and get the mean value of the prediction for overlapping regions. See Audebert et al., (2016)

@ymoisan ymoisan added the P3 Low priority label Sep 27, 2018
@mpelchat04 mpelchat04 self-assigned this Oct 10, 2018
@mpelchat04
Copy link
Collaborator

Problem

The reason for these artifacts is that we need to tile the image, in order to fit it into memory and classify it. For a good pixel classification, the model rely on the context of the pixel. At the border of the tile, the model doesn't have any context to classify the pixel, giving results as shown above.

Solution

The idea is to find the number of pixel needed for context and write only the pixels with enough context, in the tile. To ensure that each pixel i correctly classified, each tile will overlap it's neighbors by the number of pixel required for context.
The number of pixel required for context is depending on the depth of the model. Every time there is a resampling in the model, we add more context to the classification. Given that resampling are kernel of size 2x2, the number of pixels used for context can be obtained by 2**n where n is the depth of the model (number of times resample is done).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Low priority
Projects
None yet
Development

No branches or pull requests

2 participants