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
a639ea9e
Unverified
Commit
a639ea9e
authored
Nov 03, 2022
by
amyeroberts
Committed by
GitHub
Nov 03, 2022
Browse files
Add **kwargs (#20037)
parent
ec6878f6
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
18 additions
and
1 deletion
+18
-1
src/transformers/models/beit/image_processing_beit.py
src/transformers/models/beit/image_processing_beit.py
+1
-0
src/transformers/models/clip/image_processing_clip.py
src/transformers/models/clip/image_processing_clip.py
+1
-0
src/transformers/models/convnext/image_processing_convnext.py
...transformers/models/convnext/image_processing_convnext.py
+1
-0
src/transformers/models/deit/image_processing_deit.py
src/transformers/models/deit/image_processing_deit.py
+1
-0
src/transformers/models/dpt/image_processing_dpt.py
src/transformers/models/dpt/image_processing_dpt.py
+1
-0
src/transformers/models/flava/image_processing_flava.py
src/transformers/models/flava/image_processing_flava.py
+1
-0
src/transformers/models/glpn/image_processing_glpn.py
src/transformers/models/glpn/image_processing_glpn.py
+1
-1
src/transformers/models/imagegpt/image_processing_imagegpt.py
...transformers/models/imagegpt/image_processing_imagegpt.py
+1
-0
src/transformers/models/layoutlmv2/image_processing_layoutlmv2.py
...sformers/models/layoutlmv2/image_processing_layoutlmv2.py
+1
-0
src/transformers/models/layoutlmv3/image_processing_layoutlmv3.py
...sformers/models/layoutlmv3/image_processing_layoutlmv3.py
+1
-0
src/transformers/models/levit/image_processing_levit.py
src/transformers/models/levit/image_processing_levit.py
+1
-0
src/transformers/models/mobilevit/image_processing_mobilevit.py
...ansformers/models/mobilevit/image_processing_mobilevit.py
+1
-0
src/transformers/models/perceiver/image_processing_perceiver.py
...ansformers/models/perceiver/image_processing_perceiver.py
+1
-0
src/transformers/models/poolformer/image_processing_poolformer.py
...sformers/models/poolformer/image_processing_poolformer.py
+1
-0
src/transformers/models/segformer/image_processing_segformer.py
...ansformers/models/segformer/image_processing_segformer.py
+1
-0
src/transformers/models/videomae/image_processing_videomae.py
...transformers/models/videomae/image_processing_videomae.py
+1
-0
src/transformers/models/vilt/image_processing_vilt.py
src/transformers/models/vilt/image_processing_vilt.py
+1
-0
src/transformers/models/vit/image_processing_vit.py
src/transformers/models/vit/image_processing_vit.py
+1
-0
No files found.
src/transformers/models/beit/image_processing_beit.py
View file @
a639ea9e
...
...
@@ -358,6 +358,7 @@ class BeitImageProcessor(BaseImageProcessor):
do_reduce_labels
:
Optional
[
bool
]
=
None
,
return_tensors
:
Optional
[
Union
[
str
,
TensorType
]]
=
None
,
data_format
:
ChannelDimension
=
ChannelDimension
.
FIRST
,
**
kwargs
,
)
->
PIL
.
Image
.
Image
:
"""
Preprocess an image or batch of images.
...
...
src/transformers/models/clip/image_processing_clip.py
View file @
a639ea9e
...
...
@@ -237,6 +237,7 @@ class CLIPImageProcessor(BaseImageProcessor):
do_convert_rgb
:
bool
=
None
,
return_tensors
:
Optional
[
Union
[
str
,
TensorType
]]
=
None
,
data_format
:
Optional
[
ChannelDimension
]
=
ChannelDimension
.
FIRST
,
**
kwargs
)
->
PIL
.
Image
.
Image
:
"""
Preprocess an image or batch of images.
...
...
src/transformers/models/convnext/image_processing_convnext.py
View file @
a639ea9e
...
...
@@ -218,6 +218,7 @@ class ConvNextImageProcessor(BaseImageProcessor):
image_std
:
Optional
[
Union
[
float
,
List
[
float
]]]
=
None
,
return_tensors
:
Optional
[
Union
[
str
,
TensorType
]]
=
None
,
data_format
:
ChannelDimension
=
ChannelDimension
.
FIRST
,
**
kwargs
,
)
->
PIL
.
Image
.
Image
:
"""
Preprocess an image or batch of images.
...
...
src/transformers/models/deit/image_processing_deit.py
View file @
a639ea9e
...
...
@@ -218,6 +218,7 @@ class DeiTImageProcessor(BaseImageProcessor):
image_std
:
Optional
[
Union
[
float
,
List
[
float
]]]
=
None
,
return_tensors
:
Optional
[
Union
[
str
,
TensorType
]]
=
None
,
data_format
:
ChannelDimension
=
ChannelDimension
.
FIRST
,
**
kwargs
,
)
->
PIL
.
Image
.
Image
:
"""
Preprocess an image or batch of images.
...
...
src/transformers/models/dpt/image_processing_dpt.py
View file @
a639ea9e
...
...
@@ -252,6 +252,7 @@ class DPTImageProcessor(BaseImageProcessor):
image_std
:
Optional
[
Union
[
float
,
List
[
float
]]]
=
None
,
return_tensors
:
Optional
[
Union
[
str
,
TensorType
]]
=
None
,
data_format
:
ChannelDimension
=
ChannelDimension
.
FIRST
,
**
kwargs
,
)
->
PIL
.
Image
.
Image
:
"""
Preprocess an image or batch of images.
...
...
src/transformers/models/flava/image_processing_flava.py
View file @
a639ea9e
...
...
@@ -492,6 +492,7 @@ class FlavaImageProcessor(BaseImageProcessor):
codebook_image_std
:
Optional
[
Iterable
[
float
]]
=
None
,
return_tensors
:
Optional
[
Union
[
str
,
TensorType
]]
=
None
,
data_format
:
ChannelDimension
=
ChannelDimension
.
FIRST
,
**
kwargs
,
)
->
PIL
.
Image
.
Image
:
"""
Preprocess an image or batch of images.
...
...
src/transformers/models/glpn/image_processing_glpn.py
View file @
a639ea9e
...
...
@@ -128,7 +128,7 @@ class GLPNImageProcessor(BaseImageProcessor):
do_rescale
:
Optional
[
bool
]
=
None
,
return_tensors
:
Optional
[
Union
[
TensorType
,
str
]]
=
None
,
data_format
:
ChannelDimension
=
ChannelDimension
.
FIRST
,
**
kwargs
**
kwargs
,
)
->
BatchFeature
:
"""
Preprocess the given images.
...
...
src/transformers/models/imagegpt/image_processing_imagegpt.py
View file @
a639ea9e
...
...
@@ -153,6 +153,7 @@ class ImageGPTImageProcessor(BaseImageProcessor):
clusters
:
Optional
[
Union
[
int
,
List
[
int
]]]
=
None
,
return_tensors
:
Optional
[
Union
[
str
,
TensorType
]]
=
None
,
data_format
:
Optional
[
Union
[
str
,
ChannelDimension
]]
=
ChannelDimension
.
FIRST
,
**
kwargs
,
)
->
PIL
.
Image
.
Image
:
"""
Preprocess an image or batch of images.
...
...
src/transformers/models/layoutlmv2/image_processing_layoutlmv2.py
View file @
a639ea9e
...
...
@@ -187,6 +187,7 @@ class LayoutLMv2ImageProcessor(BaseImageProcessor):
tesseract_config
:
Optional
[
str
]
=
None
,
return_tensors
:
Optional
[
Union
[
str
,
TensorType
]]
=
None
,
data_format
:
ChannelDimension
=
ChannelDimension
.
FIRST
,
**
kwargs
,
)
->
PIL
.
Image
.
Image
:
"""
Preprocess an image or batch of images.
...
...
src/transformers/models/layoutlmv3/image_processing_layoutlmv3.py
View file @
a639ea9e
...
...
@@ -261,6 +261,7 @@ class LayoutLMv3ImageProcessor(BaseImageProcessor):
tesseract_config
:
Optional
[
str
]
=
None
,
return_tensors
:
Optional
[
Union
[
str
,
TensorType
]]
=
None
,
data_format
:
ChannelDimension
=
ChannelDimension
.
FIRST
,
**
kwargs
,
)
->
PIL
.
Image
.
Image
:
"""
Preprocess an image or batch of images.
...
...
src/transformers/models/levit/image_processing_levit.py
View file @
a639ea9e
...
...
@@ -242,6 +242,7 @@ class LevitImageProcessor(BaseImageProcessor):
image_std
:
Optional
[
Union
[
float
,
Iterable
[
float
]]]
=
None
,
return_tensors
:
Optional
[
TensorType
]
=
None
,
data_format
:
ChannelDimension
=
ChannelDimension
.
FIRST
,
**
kwargs
,
)
->
BatchFeature
:
"""
Preprocess an image or batch of images to be used as input to a LeViT model.
...
...
src/transformers/models/mobilevit/image_processing_mobilevit.py
View file @
a639ea9e
...
...
@@ -231,6 +231,7 @@ class MobileViTImageProcessor(BaseImageProcessor):
do_flip_channel_order
:
bool
=
None
,
return_tensors
:
Optional
[
Union
[
str
,
TensorType
]]
=
None
,
data_format
:
ChannelDimension
=
ChannelDimension
.
FIRST
,
**
kwargs
,
)
->
PIL
.
Image
.
Image
:
"""
Preprocess an image or batch of images.
...
...
src/transformers/models/perceiver/image_processing_perceiver.py
View file @
a639ea9e
...
...
@@ -235,6 +235,7 @@ class PerceiverImageProcessor(BaseImageProcessor):
image_std
:
Optional
[
Union
[
float
,
List
[
float
]]]
=
None
,
return_tensors
:
Optional
[
Union
[
str
,
TensorType
]]
=
None
,
data_format
:
ChannelDimension
=
ChannelDimension
.
FIRST
,
**
kwargs
,
)
->
PIL
.
Image
.
Image
:
"""
Preprocess an image or batch of images.
...
...
src/transformers/models/poolformer/image_processing_poolformer.py
View file @
a639ea9e
...
...
@@ -283,6 +283,7 @@ class PoolFormerImageProcessor(BaseImageProcessor):
image_std
:
Optional
[
Union
[
float
,
List
[
float
]]]
=
None
,
return_tensors
:
Optional
[
Union
[
str
,
TensorType
]]
=
None
,
data_format
:
ChannelDimension
=
ChannelDimension
.
FIRST
,
**
kwargs
,
)
->
PIL
.
Image
.
Image
:
"""
Preprocess an image or batch of images.
...
...
src/transformers/models/segformer/image_processing_segformer.py
View file @
a639ea9e
...
...
@@ -334,6 +334,7 @@ class SegformerImageProcessor(BaseImageProcessor):
do_reduce_labels
:
Optional
[
bool
]
=
None
,
return_tensors
:
Optional
[
Union
[
str
,
TensorType
]]
=
None
,
data_format
:
ChannelDimension
=
ChannelDimension
.
FIRST
,
**
kwargs
,
)
->
PIL
.
Image
.
Image
:
"""
Preprocess an image or batch of images.
...
...
src/transformers/models/videomae/image_processing_videomae.py
View file @
a639ea9e
...
...
@@ -292,6 +292,7 @@ class VideoMAEImageProcessor(BaseImageProcessor):
image_std
:
Optional
[
Union
[
float
,
List
[
float
]]]
=
None
,
return_tensors
:
Optional
[
Union
[
str
,
TensorType
]]
=
None
,
data_format
:
ChannelDimension
=
ChannelDimension
.
FIRST
,
**
kwargs
,
)
->
PIL
.
Image
.
Image
:
"""
Preprocess an image or batch of images.
...
...
src/transformers/models/vilt/image_processing_vilt.py
View file @
a639ea9e
...
...
@@ -389,6 +389,7 @@ class ViltImageProcessor(BaseImageProcessor):
do_pad
:
Optional
[
bool
]
=
None
,
return_tensors
:
Optional
[
Union
[
str
,
TensorType
]]
=
None
,
data_format
:
ChannelDimension
=
ChannelDimension
.
FIRST
,
**
kwargs
,
)
->
PIL
.
Image
.
Image
:
"""
Preprocess an image or batch of images.
...
...
src/transformers/models/vit/image_processing_vit.py
View file @
a639ea9e
...
...
@@ -193,6 +193,7 @@ class ViTImageProcessor(BaseImageProcessor):
image_std
:
Optional
[
Union
[
float
,
List
[
float
]]]
=
None
,
return_tensors
:
Optional
[
Union
[
str
,
TensorType
]]
=
None
,
data_format
:
Union
[
str
,
ChannelDimension
]
=
ChannelDimension
.
FIRST
,
**
kwargs
,
):
"""
Preprocess an image or batch of images.
...
...
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