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
OpenDAS
detectron2
Commits
f3066378
Commit
f3066378
authored
Aug 29, 2024
by
limm
Browse files
fix AttributeError: module 'PIL.Image' has no attribute 'LINEAR'
parent
7ced6cfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
detectron2/data/transforms/transform.py
detectron2/data/transforms/transform.py
+3
-1
No files found.
detectron2/data/transforms/transform.py
View file @
f3066378
...
@@ -27,7 +27,9 @@ class ExtentTransform(Transform):
...
@@ -27,7 +27,9 @@ class ExtentTransform(Transform):
See: https://pillow.readthedocs.io/en/latest/PIL.html#PIL.ImageTransform.ExtentTransform
See: https://pillow.readthedocs.io/en/latest/PIL.html#PIL.ImageTransform.ExtentTransform
"""
"""
def
__init__
(
self
,
src_rect
,
output_size
,
interp
=
Image
.
LINEAR
,
fill
=
0
):
# fix AttributeError: module 'PIL.Image' has no attribute 'LINEAR'
#def __init__(self, src_rect, output_size, interp=Image.LINEAR, fill=0):
def
__init__
(
self
,
src_rect
,
output_size
,
interp
=
Image
.
BILINEAR
,
fill
=
0
):
"""
"""
Args:
Args:
src_rect (x0, y0, x1, y1): src coordinates
src_rect (x0, y0, x1, y1): src coordinates
...
...
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