CoolFace
Apppublic

Aluode/PerceptionLabPortable

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
image_processing_siglip_fast.py39 linesDownload Raw Back to siglip
1# coding=utf-82# Copyright 2024 The HuggingFace Inc. team. All rights reserved.3#4# Licensed under the Apache License, Version 2.0 (the "License");5# you may not use this file except in compliance with the License.6# You may obtain a copy of the License at7#8#     http://www.apache.org/licenses/LICENSE-2.09#10# Unless required by applicable law or agreed to in writing, software11# distributed under the License is distributed on an "AS IS" BASIS,12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13# See the License for the specific language governing permissions and14# limitations under the License.15"""Fast Image processor class for SigLIP."""16 17from ...image_processing_utils_fast import BaseImageProcessorFast18from ...image_utils import (19    IMAGENET_STANDARD_MEAN,20    IMAGENET_STANDARD_STD,21    PILImageResampling,22)23from ...utils import auto_docstring24 25 26@auto_docstring27class SiglipImageProcessorFast(BaseImageProcessorFast):28    resample = PILImageResampling.BICUBIC29    image_mean = IMAGENET_STANDARD_MEAN30    image_std = IMAGENET_STANDARD_STD31    size = {"height": 224, "width": 224}32    default_to_square = False33    do_resize = True34    do_rescale = True35    do_normalize = True36 37 38__all__ = ["SiglipImageProcessorFast"]39 
Aluode/PerceptionLabPortable · CoolFace