File size: 714 Bytes
fcaaeaa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""Camera Depth Model processor: ``CameraDepthModelImageProcessor`` (infer.py load_images + image2tensor) as its only part."""

from transformers.processing_utils import ProcessorMixin


class CameraDepthModelProcessor(ProcessorMixin):
    attributes = ["image_processor"]

    def __init__(self, image_processor=None, **kwargs):
        super().__init__(image_processor, **kwargs)

    def __call__(self, images=None, depth=None, **kwargs):
        return self.image_processor(images, depth=depth, **kwargs)

    def post_process_depth_estimation(self, outputs, target_sizes=None):
        return self.image_processor.post_process_depth_estimation(outputs, target_sizes)


__all__ = ["CameraDepthModelProcessor"]