code: def __init__(
      self,
      model_path: Optional[str] = None,
      model: Optional[Any] = None,
      processor: Optional[Any] = None,
      config_path: Optional[str] = None,
      device: Optional[str] = None,
      mask_threshold: float = 0.5,
      confidence_threshold: float = 0.3,
      category_mapping: Optional[Dict] = None,
      category_remapping: Optional[Dict] = None,
      load_at_init: bool = True,
      image_size: int = None,
  ):
      self._processor = processor
      self._image_shapes = []
      super().__init__(
          model_path,
          model,
          config_path,
          device,
          mask_threshold,
          confidence_threshold,
          category_mapping,
          category_remapping,
          load_at_init,
          image_size,
      )
  
imports: import logging
  from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  import pybboxes.functional
  from sahi.models.base import DetectionModel
  from sahi.prediction import ObjectPrediction
  from sahi.utils.compatibility import fix_full_shape_list, fix_shift_amount_list
  from sahi.utils.import_utils import check_requirements, ensure_package_minimum_version
label_desc: Use image node_id 1 to create a new HuggingfaceDetectionModel object from inherited base classes: DetectionModel with example: obj = HuggingfaceDetectionModel(model_path, model, processor, config_path, device, mask_threshold, confidence_threshold, category_mapping, category_remapping, load_at_init, image_size)