Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
b67ac442
Unverified
Commit
b67ac442
authored
Dec 01, 2022
by
fatih
Committed by
GitHub
Dec 01, 2022
Browse files
update post_process_image_guided_detection (#20521)
parent
d51e7c7e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/owlvit/image_processing_owlvit.py
src/transformers/models/owlvit/image_processing_owlvit.py
+1
-1
No files found.
src/transformers/models/owlvit/image_processing_owlvit.py
View file @
b67ac442
...
...
@@ -416,7 +416,7 @@ class OwlViTImageProcessor(BaseImageProcessor):
# Convert from relative [0, 1] to absolute [0, height] coordinates
img_h
,
img_w
=
target_sizes
.
unbind
(
1
)
scale_fct
=
torch
.
stack
([
img_w
,
img_h
,
img_w
,
img_h
],
dim
=
1
)
scale_fct
=
torch
.
stack
([
img_w
,
img_h
,
img_w
,
img_h
],
dim
=
1
)
.
to
(
target_boxes
.
device
)
target_boxes
=
target_boxes
*
scale_fct
[:,
None
,
:]
# Compute box display alphas based on prediction scores
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment