code: def __init__(
      self,
      cfg,
      texture_atlases_dict,
      device="cuda",
      default_class=0,
      **kwargs,
  ):
      self.embedder = build_densepose_embedder(cfg)
  
      self.texture_image_dict = {}
      self.alpha_dict = {}
  
      for mesh_name in texture_atlases_dict.keys():
          if (
              texture_atlases_dict[mesh_name].shape[-1] == 4
          ):  # Image with alpha channel
              self.alpha_dict[mesh_name] = (
                  texture_atlases_dict[mesh_name][:, :, -1] / 255.0
              )
              self.texture_image_dict[mesh_name] = texture_atlases_dict[
                  mesh_name
              ][:, :, :3]
          else:
              self.alpha_dict[mesh_name] = (
                  texture_atlases_dict[mesh_name].sum(axis=-1) > 0
              )
              self.texture_image_dict[mesh_name] = texture_atlases_dict[
                  mesh_name
              ]
  
      self.device = torch.device(device)
      self.class_to_mesh_name = get_class_to_mesh_name_mapping(cfg)
      self.default_class = default_class
  
      self.mesh_vertex_embeddings = {
          mesh_name: self.embedder(mesh_name).to(self.device)
          for mesh_name in self.class_to_mesh_name.values()
      }
  
imports: import json
  import numpy
  from functools import lru_cache
  from typing import Dict, List, Optional, Tuple
  import cv2
  import torch
  from detectron2.utils.file_io import PathManager
  from densepose.modeling import build_densepose_embedder
  from densepose.modeling.cse.utils import get_closest_vertices_mask_from_ES
  from ..data.utils import get_class_to_mesh_name_mapping
  from ..structures import DensePoseEmbeddingPredictorOutput
  from ..structures.mesh import create_mesh
  from .base import Boxes, Image, MatrixVisualizer
  from .densepose_results_textures import get_texture_atlas
label_desc: Use image node_id 1 to create a new DensePoseOutputsTextureVisualizer object from inherited base classes: DensePoseOutputsVertexVisualizer with example: obj = DensePoseOutputsTextureVisualizer(cfg, texture_atlases_dict, device, default_class)