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

Some images in the SeCo dataset are not square #658

Merged
merged 1 commit into from
Jul 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions torchgeo/datasets/seco.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ def _load_patch(self, scene_name: str, patch_name: str) -> Tensor:
with rasterio.open(fn) as f:
band_data = f.read(1)
height, width = band_data.shape
assert height == width
size = height
size = min(height, width)
if size < 264:
# TODO: PIL resize is much slower than cv2, we should check to see
# what could be sped up throughout later. There is also a potential
Expand Down