Metric-Video-Depth-Anything-Base / processing_video_depth_anything.py
bigshanedogg's picture
Upload Metric-Video-Depth-Anything-Base (transformers port, original code)
f258387 verified
Raw History Blame Contribute Delete
694 Bytes
"""Video Depth Anything processor: ``VideoDepthAnythingImageProcessor`` (the official per-frame transform) as its only part."""
from transformers.processing_utils import ProcessorMixin
class VideoDepthAnythingProcessor(ProcessorMixin):
attributes = ["image_processor"]
def __init__(self, image_processor=None, **kwargs):
super().__init__(image_processor, **kwargs)
def __call__(self, videos=None, **kwargs):
return self.image_processor(videos, **kwargs)
def post_process_depth_estimation(self, outputs, target_sizes=None):
return self.image_processor.post_process_depth_estimation(outputs, target_sizes)
__all__ = ["VideoDepthAnythingProcessor"]