-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[InferenceSlicer] - it is hard to set specific tile dimensions #1415
Comments
@SkalskiP I've created a generate_grid_offset function that takes a grid shape argument (i.e. (2,2) in your case) and returns the required offsets. I can throw together a colab if you're interested. |
I'd love to see it! I already started to work on somehow related topics in this PR: #1434 |
@SkalskiP Here's the colab: It's a rough draft, but you can get the idea. Just set the frame size and grid argument to whatever you want and it slices and dices into even sized tiles. |
Colab is private :) |
Sorry, not any more.
https://colab.research.google.com/drive/1syvRehgUFfu4jt7M8C7KcbSITakI8olt?usp=sharing
…On Wed, Aug 7, 2024 at 6:26 AM Piotr Skalski ***@***.***> wrote:
Colab is private :)
—
Reply to this email directly, view it on GitHub
<#1415 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC5VRE547CLJ3ADRTV6WVFTZQH757AVCNFSM6AAAAABLVBBD4GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZTGI2DKNJUHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@SkalskiP I have circled back to the grid slicer. I recalculated, refactored and brought it into Numpy land. I also added a plotting script for proof of concept. Please check it out and let me know if this is something you think might be nice to add to the InferenceSlicer repo. It solves your issue nicely. |
So I am pretty sure the correct stride calculation for equisized tiles is: |
Closing after implementation in #1434 |
Description
I tried to use
InferenceSlicer
to divide the frame in four equally sized tiles and it turned out to be hard to do.I was expecting the code above to produce 4 tiles with 10% overlap, but it created 9. This ended up being very wasteful as
InferenceSlicer
is expensive to run.Additional
The text was updated successfully, but these errors were encountered: