class_docstr: Appearance-Free Link method.
  
  This method is proposed in
  "StrongSORT: Make DeepSORT Great Again"
  `StrongSORT<https://arxiv.org/abs/2202.13514>`_.
  
  Args:
      checkpoint (str): Checkpoint path.
      temporal_threshold (tuple, optional): The temporal constraint
          for tracklets association. Defaults to (0, 30).
      spatial_threshold (int, optional): The spatial constraint for
          tracklets association. Defaults to 75.
      confidence_threshold (float, optional): The minimum confidence
          threshold for tracklets association. Defaults to 0.95.
class_docstr_tok: ["Appearance-Free","Link","method",".","This","method","is","proposed","in","''","StrongSORT",":","Make","DeepSORT","Great","Again","''","`","StrongSORT","<","https",":","\/\/arxiv.org\/abs\/2202.13514",">","`","_",".","Args",":","checkpoint","(","str",")",":","Checkpoint","path",".","temporal_threshold","(","tuple",",","optional",")",":","The","temporal","constraint","for","tracklets","association",".","Defaults","to","(","0",",","30",")",".","spatial_threshold","(","int",",","optional",")",":","The","spatial","constraint","for","tracklets","association",".","Defaults","to","75.","confidence_threshold","(","float",",","optional",")",":","The","minimum","confidence","threshold","for","tracklets","association",".","Defaults","to","0.95","."]
code: def __init__(
      self,
      checkpoint: str,
      temporal_threshold: tuple = (0, 30),
      spatial_threshold: int = 75,
      confidence_threshold: float = 0.95,
  ):
      super(AppearanceFreeLink, self).__init__()
      self.temporal_threshold = temporal_threshold
      self.spatial_threshold = spatial_threshold
      self.confidence_threshold = confidence_threshold
  
      self.model = AFLinkModel()
      if checkpoint:
          load_checkpoint(self.model, checkpoint)
      if torch.cuda.is_available():
          self.model.cuda()
      self.model.eval()
  
      self.device = next(self.model.parameters()).device
      self.fn_l2 = lambda x, y: np.sqrt(x**2 + y**2)
  
imports: from collections import defaultdict
  from typing import Tuple
  import numpy
  import torch
  from mmengine.model import BaseModule
  from mmengine.runner.checkpoint import load_checkpoint
  from scipy.optimize import linear_sum_assignment
  from torch import Tensor, nn
  from mmdet.registry import TASK_UTILS
label_desc: Use image node_id 1 to create a new AppearanceFreeLink object from inherited base classes: BaseModule with example: obj = AppearanceFreeLink(checkpoint, temporal_threshold, spatial_threshold, confidence_threshold)