```python:inference/models/depth_anything_v2/depth_anything_v2_inference_models.py
from typing import Tuple
from uuid import uuid4

import cv2
import numpy as np
import torch
from inference.core.env import (
    ALLOW_INFERENCE_MODELS_DIRECTLY_ACCESS_LOCAL_PACKAGES,
    ALLOW_INFERENCE_MODELS_UNTRUSTED_PACKAGES, API_KEY)
from inference.core.models.base import Model
from inference.core.models.inference_models_adapters import \
    get_extra_weights_provider_headers
from inference.core.workflows.execution_engine.entities.base import (
    ImageParentMetadata, WorkflowImageData)
from inference_models import AutoModel
from inference_models.models.depth_anything_v2.depth_anything_v2_hf import \
    DepthAnythingV2HF


class InferenceModelsDepthAnythingV2Adapter(Model):
    def __init__(self, model_id: str, api_key: str = None, **kwargs):
        super().__init__()

        self.metrics = {"num_inferences": 0, "avg_inference_time": 0.0}

        self.api_key = api_key if api_key else API_KEY

        self.task_type = "depth-estimation"

        extra_weights_provider_headers = get_extra_weights_provider_headers()

        self._model: DepthAnythingV2HF = AutoModel.from_pretrained(
            model_id_or_path=model_id,
            api_key=self.api_key,
            allow_untrusted_packages=ALLOW_INFERENCE_MODELS_UNTRUSTED_PACKAGES,
            allow_direct_local_storage_loading=ALLOW_INFERENCE_MODELS_DIRECTLY_ACCESS_LOCAL_PACKAGES,
            extra_weights_provider_headers=extra_weights_provider_headers,
            **kwargs,
        )

    def predict(self, inputs: np.ndarray, **kwargs) -> Tuple[dict]:
        predictions = self._model(inputs)[0]
        depth_map = predictions.to(torch.float32).cpu().numpy()
        # Normalize depth values
        depth_min = depth_map.min()
        depth_max = depth_map.max()
        if depth_max == depth_min:
            raise ValueError("Depth map has no variation (min equals max)")
        normalized_depth = (depth_map - depth_min) / (depth_max - depth_min)

        # Create visualization
        depth_for_viz = (normalized_depth * 255.0).astype(np.uint8)
        colored_depth = cv2.applyColorMap(depth_for_viz, cv2.COLORMAP_VIRIDIS)
        colored_depth = cv2.cvtColor(colored_depth, cv2.COLOR_BGR2RGB)

        # Convert numpy array to WorkflowImageData

        # Convert numpy array to WorkflowImageData
        parent_metadata = ImageParentMetadata(parent_id=f"{uuid4()}")
        colored_depth_image = WorkflowImageData(
            numpy_image=colored_depth, parent_metadata=parent_metadata
        )
        result = {
            "image": colored_depth_image,
            "normalized_depth": normalized_depth,
        }
        return (result,)
```