Upload processor
Browse files
image_processing_spice_cnn.py
CHANGED
|
@@ -11,7 +11,6 @@ from transformers.image_transforms import (
|
|
| 11 |
normalize,
|
| 12 |
rescale,
|
| 13 |
resize,
|
| 14 |
-
pad,
|
| 15 |
to_channel_dimension_format,
|
| 16 |
)
|
| 17 |
from transformers.image_utils import (
|
|
@@ -68,7 +67,6 @@ class SpiceCNNImageProcessor(BaseImageProcessor):
|
|
| 68 |
do_normalize: bool = True,
|
| 69 |
image_mean: Optional[Union[float, List[float]]] = None,
|
| 70 |
image_std: Optional[Union[float, List[float]]] = None,
|
| 71 |
-
padding: bool = False,
|
| 72 |
**kwargs,
|
| 73 |
) -> None:
|
| 74 |
super().__init__(**kwargs)
|
|
@@ -84,7 +82,6 @@ class SpiceCNNImageProcessor(BaseImageProcessor):
|
|
| 84 |
image_mean if image_mean is not None else IMAGENET_STANDARD_MEAN
|
| 85 |
)
|
| 86 |
self.image_std = image_std if image_std is not None else IMAGENET_STANDARD_STD
|
| 87 |
-
self.padding = padding
|
| 88 |
|
| 89 |
def resize(
|
| 90 |
self,
|
|
|
|
| 11 |
normalize,
|
| 12 |
rescale,
|
| 13 |
resize,
|
|
|
|
| 14 |
to_channel_dimension_format,
|
| 15 |
)
|
| 16 |
from transformers.image_utils import (
|
|
|
|
| 67 |
do_normalize: bool = True,
|
| 68 |
image_mean: Optional[Union[float, List[float]]] = None,
|
| 69 |
image_std: Optional[Union[float, List[float]]] = None,
|
|
|
|
| 70 |
**kwargs,
|
| 71 |
) -> None:
|
| 72 |
super().__init__(**kwargs)
|
|
|
|
| 82 |
image_mean if image_mean is not None else IMAGENET_STANDARD_MEAN
|
| 83 |
)
|
| 84 |
self.image_std = image_std if image_std is not None else IMAGENET_STANDARD_STD
|
|
|
|
| 85 |
|
| 86 |
def resize(
|
| 87 |
self,
|
preprocessor_config.json
CHANGED
|
@@ -8,7 +8,6 @@
|
|
| 8 |
"image_mean": 0.5,
|
| 9 |
"image_processor_type": "SpiceCNNImageProcessor",
|
| 10 |
"image_std": 0.5,
|
| 11 |
-
"padding": false,
|
| 12 |
"resample": 2,
|
| 13 |
"rescale_factor": 0.00392156862745098,
|
| 14 |
"size": {
|
|
|
|
| 8 |
"image_mean": 0.5,
|
| 9 |
"image_processor_type": "SpiceCNNImageProcessor",
|
| 10 |
"image_std": 0.5,
|
|
|
|
| 11 |
"resample": 2,
|
| 12 |
"rescale_factor": 0.00392156862745098,
|
| 13 |
"size": {
|