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

[Bug]: Large crops using a U-Net aren't cropped correctly #1029

Closed
7 tasks done
MaxGamill-Sheffield opened this issue Dec 1, 2024 · 0 comments · Fixed by #1030
Closed
7 tasks done

[Bug]: Large crops using a U-Net aren't cropped correctly #1029

MaxGamill-Sheffield opened this issue Dec 1, 2024 · 0 comments · Fixed by #1030
Labels
bug Something isn't working v2.3.0
Milestone

Comments

@MaxGamill-Sheffield
Copy link
Collaborator

Checklist

  • Re-run analysis with topostats process --core 1.
  • Describe the bug.
  • Include the configuration file.
  • Copy of the output.
  • The exact command that failed. This is what you typed at the command line, including any options.
  • TopoStats version, this is reported by topostats --version
  • Operating System and Python Version

Describe the bug

When the crop size is large there may be a chance that the squared bbox clips the edge. This is fine as we can then expand in one direction, unless the crop is too large that the expansion is then also beyond the array limits.

Similarly, it seems that PIL loads images with inverted array axes, and as such, if the resized array is not square for whatever reason, it cannot be mapped back into the image.

Copy of the output

e.g using the current square bbox func with:
bbox = (117, 20, 521, 603)
image_shape = (608, 608)

Include the configuration file

N/A

To Reproduce

use square bbox func with:
bbox = (117, 20, 521, 603)
image_shape = (608, 608)

TopoStats Version

2.1.2

Python Version

3.9

Operating System

MacOS M1/M2 (post-2021)

Python Packages

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v2.3.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants