code: def get_dpt_config(checkpoint_url):
      config = DPTConfig()
  
      if "large" in checkpoint_url:
          config.hidden_size = 1024
          config.intermediate_size = 4096
          config.num_hidden_layers = 24
          config.num_attention_heads = 16
          config.backbone_out_indices = [5, 11, 17, 23]
          config.neck_hidden_sizes = [256, 512, 1024, 1024]
          expected_shape = (1, 384, 384)
  
      if "ade" in checkpoint_url:
          config.use_batch_norm_in_fusion_residual = True
  
          config.num_labels = 150
          repo_id = "huggingface/label-files"
          filename = "ade20k-id2label.json"
          id2label = json.load(
              open(
                  cached_download(
                      hf_hub_url(repo_id, filename, repo_type="dataset")
                  ),
                  "r",
              )
          )
          id2label = {int(k): v for k, v in id2label.items()}
          config.id2label = id2label
          config.label2id = {v: k for k, v in id2label.items()}
          expected_shape = [1, 150, 480, 480]
  
      return config, expected_shape
  
file_path: transformers/src/transformers/models/dpt/convert_dpt_to_pytorch.py
imports: import argparse
  import json
  from pathlib import Path
  import requests
  import torch
  from huggingface_hub import cached_download, hf_hub_url
  from PIL import Image
  from transformers import DPTConfig, DPTForDepthEstimation, DPTForSemanticSegmentation, DPTImageProcessor
  from transformers.utils import logging
label_desc: Use image node_id 1 for calling a global function with example usage: get_dpt_config(checkpoint_url) and returns: config,  expected_shape