HugoLaurencon
commited on
Commit
·
7eb9e61
1
Parent(s):
0d17e60
fix imports
Browse files- convert_siglip_to_hf.py +2 -1
- image_processing_siglip.py +4 -4
convert_siglip_to_hf.py
CHANGED
@@ -29,7 +29,8 @@ from huggingface_hub import hf_hub_download
|
|
29 |
from numpy import load
|
30 |
from PIL import Image
|
31 |
|
32 |
-
from
|
|
|
33 |
from transformers.utils import logging
|
34 |
|
35 |
|
|
|
29 |
from numpy import load
|
30 |
from PIL import Image
|
31 |
|
32 |
+
from configuration_siglip import SiglipConfig
|
33 |
+
from modeling_siglip import SiglipModel
|
34 |
from transformers.utils import logging
|
35 |
|
36 |
|
image_processing_siglip.py
CHANGED
@@ -18,13 +18,13 @@ from typing import Dict, Optional, Union
|
|
18 |
|
19 |
import numpy as np
|
20 |
|
21 |
-
from
|
22 |
-
from
|
23 |
rescale,
|
24 |
resize,
|
25 |
to_channel_dimension_format,
|
26 |
)
|
27 |
-
from
|
28 |
ChannelDimension,
|
29 |
ImageInput,
|
30 |
PILImageResampling,
|
@@ -34,7 +34,7 @@ from ...image_utils import (
|
|
34 |
to_numpy_array,
|
35 |
valid_images,
|
36 |
)
|
37 |
-
from
|
38 |
|
39 |
|
40 |
logger = logging.get_logger(__name__)
|
|
|
18 |
|
19 |
import numpy as np
|
20 |
|
21 |
+
from transformers.image_processing_utils import BaseImageProcessor, BatchFeature, get_size_dict
|
22 |
+
from transformers.image_transforms import (
|
23 |
rescale,
|
24 |
resize,
|
25 |
to_channel_dimension_format,
|
26 |
)
|
27 |
+
from transformers.image_utils import (
|
28 |
ChannelDimension,
|
29 |
ImageInput,
|
30 |
PILImageResampling,
|
|
|
34 |
to_numpy_array,
|
35 |
valid_images,
|
36 |
)
|
37 |
+
from transformers.utils import TensorType, is_vision_available, logging
|
38 |
|
39 |
|
40 |
logger = logging.get_logger(__name__)
|