Skip to content

Incorrect normalization of W and H in inference for non-square input images #12

@TakuyaNarihira

Description

@TakuyaNarihira

I found a bug in the GenWarp code when I tried inference on a non-square input image.

https://github.com/sony/genwarp/blob/main/genwarp/GenWarp.py#L396

        coords = torch.stack((grid[..., 0]/H, grid[..., 1]/W), dim=-1)

The normalization of H and W is flipped, and should be corrected. I’ll probably make a PR sometime soon.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions