Aluode/PerceptionLabPortable
0
1# coding=utf-82# Copyright 2022 Meta Platforms authors and The HuggingFace 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"""Feature extractor class for FLAVA."""16 17import warnings18 19from ...utils import logging20from ...utils.import_utils import requires21from .image_processing_flava import FlavaImageProcessor22 23 24logger = logging.get_logger(__name__)25 26 27@requires(backends=("vision",))28class FlavaFeatureExtractor(FlavaImageProcessor):29 def __init__(self, *args, **kwargs) -> None:30 warnings.warn(31 "The class FlavaFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please"32 " use FlavaImageProcessor instead.",33 FutureWarning,34 )35 super().__init__(*args, **kwargs)36 37 38__all__ = ["FlavaFeatureExtractor"]39 