Fix Landsat performance issue by using nearest neighbor interpolation #101
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Both Landsat models are currently trained on a dataset that was materialized before allenai/rslearn#104. Because Landsat scenes are not pixel-aligned (x/y offset in CRS coordinates are not multiples of the m/pixel resolution), this means that:
There seems to be a performance drop due to the discrepancy.
Bilinear:
Original results:
We could retrain the model, but nearest neighbor interpolation produces sharper images for human visualization (which Skylight wants), and it is convenient to use the same images for inference and for visualization. It seems there's no need for retraining to use nearest neighbor interpolation:
I guess the performance discrepancy is pretty small but anyway this change will align the inference closer to the training and also restore the sharpness of the pan-sharpened images (we could create another layer for visualization but it seems worse to maintain long-term).
I also removed relative path action since it broke the
rslp.landsat_vessels.job_launcher
functionality (job_launcher passes--config "{JSON}
but the relative path action interprets the JSON as a path and prepends some absolute path to it). This action doesn't seem to be used anywhere and makes it confusing because the user can no longer cd to a directory outside ofrslearn_projects
and run their own config file they have put in that directory unless they use absolute path, instead it will assume by default that they want to run a config from inside the rslearn_projects directory (I think this is unintuitive).