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

Robust evaluation #5

Open
wwarriner opened this issue Jul 22, 2020 · 0 comments
Open

Robust evaluation #5

wwarriner opened this issue Jul 22, 2020 · 0 comments

Comments

@wwarriner
Copy link
Owner

Currently evaluation occurs only on structured, non-overlapping patches. The "right" way to perform evaluation is by consensus of overlapping patches.

Based on the paper here: https://arxiv.org/abs/1504.07947 the maximum benefit/cost ratio is simple voting or max pooling over a range of patches that include a given pixel.

So the plan would be to pad the image, then evaluate the model on every possible patch centered on a pixel in the original image. We would probably not want to evaluate on every single pixel, that would mean for each N-pixel image we would need N evaluations on the GPU, which could be very expensive. We can mitigate this issue by adding a small-pixel stride so we only have N/K^2 patches to evaluate, where K is the stride length in pixels.

Storing the intermediate results is tricky, and there are a few options. The fastest may be a dict of dicts or ragged array of nested lists for each pixel subscript. Then in each we store the intermediate classifications/probabilities for the appropriate pixel.

Then to collapse the results we loop over a blank image copy. For each subscript, access the associated intermediate class/prob list and deal with it appropriately to produce a single class, and store that in the blank image copy.

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

No branches or pull requests

1 participant