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
c0b5ad94
Unverified
Commit
c0b5ad94
authored
Oct 23, 2023
by
Rafael Padilla
Committed by
GitHub
Oct 23, 2023
Browse files
small typos found (#26988)
just very small typos found
parent
f9f27b0f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/image_transforms.py
src/transformers/image_transforms.py
+2
-2
No files found.
src/transformers/image_transforms.py
View file @
c0b5ad94
...
@@ -189,7 +189,7 @@ def to_pil_image(
...
@@ -189,7 +189,7 @@ def to_pil_image(
elif
not
isinstance
(
image
,
np
.
ndarray
):
elif
not
isinstance
(
image
,
np
.
ndarray
):
raise
ValueError
(
"Input image type not supported: {}"
.
format
(
type
(
image
)))
raise
ValueError
(
"Input image type not supported: {}"
.
format
(
type
(
image
)))
# If the channel as been moved to first dim, we put it back at the end.
# If the channel
h
as been moved to first dim, we put it back at the end.
image
=
to_channel_dimension_format
(
image
,
ChannelDimension
.
LAST
,
input_data_format
)
image
=
to_channel_dimension_format
(
image
,
ChannelDimension
.
LAST
,
input_data_format
)
# If there is a single channel, we squeeze it, as otherwise PIL can't handle it.
# If there is a single channel, we squeeze it, as otherwise PIL can't handle it.
...
@@ -593,7 +593,7 @@ def corners_to_center_format(bboxes_corners: TensorType) -> TensorType:
...
@@ -593,7 +593,7 @@ def corners_to_center_format(bboxes_corners: TensorType) -> TensorType:
"""
"""
Converts bounding boxes from corners format to center format.
Converts bounding boxes from corners format to center format.
corners format: contains the coodinates for the top-left and bottom-right corners of the box
corners format: contains the coo
r
dinates for the top-left and bottom-right corners of the box
(top_left_x, top_left_y, bottom_right_x, bottom_right_y)
(top_left_x, top_left_y, bottom_right_x, bottom_right_y)
center format: contains the coordinate for the center of the box and its the width, height dimensions
center format: contains the coordinate for the center of the box and its the width, height dimensions
(center_x, center_y, width, height)
(center_x, center_y, width, height)
...
...
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