Skip to content

fix: rgb crops batch dimension instead of H/W - #102

Open
andrewwhitecdw wants to merge 1 commit into
NVlabs:mainfrom
andrewwhitecdw:bugfix/image-rgb-crops-batch-dimension-instead-of-h-w
Open

fix: rgb crops batch dimension instead of H/W#102
andrewwhitecdw wants to merge 1 commit into
NVlabs:mainfrom
andrewwhitecdw:bugfix/image-rgb-crops-batch-dimension-instead-of-h-w

Conversation

@andrewwhitecdw

Copy link
Copy Markdown

Problem

fix: rgb crops batch dimension instead of H/W

Fix

Replace:

    if true_shape is not None:
        H, W = true_shape
        ftensor = ftensor[:H, :W]

with:

    if true_shape is not None:
        H, W = true_shape[-2:]
        if ftensor.ndim == 4:
            ftensor = ftensor[:, :H, :W]
        else:
            ftensor = ftensor[:H, :W]

Files changed

  • dust3r/utils/image.py

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

Successfully merging this pull request may close these issues.

1 participant