Conversation
NicolasHug
left a comment
There was a problem hiding this comment.
Thanks @pmeier , LGTM when green
| elif input_type is PIL.Image.Image: | ||
| input = F.to_image_pil(input) | ||
| elif input_type is datapoints.BoundingBox: | ||
| kwargs.setdefault("format", datapoints.BoundingBoxFormat.XYXY) |
There was a problem hiding this comment.
Shouldn't this logic be part of make_bounding_box's contract? (same for the dtype logic)
This is the kind of changes that makes me think we should already be moving away from the utils in common_utils for input generation, as suggested earlier #7562 (comment).
We can delay it but we'll have to do it eventually anyway, and IMO the earlier we do it, the more control we'll have.
There was a problem hiding this comment.
Will have a go at it after this PR before I port anything more.
|
Hey @pmeier! You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py |
Reviewed By: matteobettini Differential Revision: D48642318 fbshipit-source-id: dfcb7ca6a837104bc0acfe3ba2f66bb9ecef267b
This PR also acts on #7703 (comment).
cc @vfdev-5