Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
d3c05666
Unverified
Commit
d3c05666
authored
Nov 11, 2022
by
Nicolas Patry
Committed by
GitHub
Nov 11, 2022
Browse files
Fix object-detection bug (height, width inversion). (#20167)
parent
61a51f5f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/pipelines/object_detection.py
src/transformers/pipelines/object_detection.py
+1
-1
No files found.
src/transformers/pipelines/object_detection.py
View file @
d3c05666
...
...
@@ -102,7 +102,7 @@ class ObjectDetectionPipeline(Pipeline):
if
self
.
tokenizer
is
not
None
:
# This is a LayoutLMForTokenClassification variant.
# The OCR got the boxes and the model classified the words.
width
,
height
=
target_size
[
0
].
tolist
()
height
,
width
=
target_size
[
0
].
tolist
()
def
unnormalize
(
bbox
):
return
self
.
_get_bounding_box
(
...
...
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