@ -235,7 +235,7 @@ class BYTETracker:
reset_id ( ) : Resets the ID counter of STrack .
reset_id ( ) : Resets the ID counter of STrack .
joint_stracks ( tlista , tlistb ) : Combines two lists of stracks .
joint_stracks ( tlista , tlistb ) : Combines two lists of stracks .
sub_stracks ( tlista , tlistb ) : Filters out the stracks present in the second list from the first list .
sub_stracks ( tlista , tlistb ) : Filters out the stracks present in the second list from the first list .
remove_duplicate_stracks ( stracksa , stracksb ) : Removes duplicate stracks based on IO U .
remove_duplicate_stracks ( stracksa , stracksb ) : Removes duplicate stracks based on Io U .
"""
"""
def __init__ ( self , args , frame_rate = 30 ) :
def __init__ ( self , args , frame_rate = 30 ) :
@ -373,7 +373,7 @@ class BYTETracker:
return [ STrack ( xyxy , s , c ) for ( xyxy , s , c ) in zip ( dets , scores , cls ) ] if len ( dets ) else [ ] # detections
return [ STrack ( xyxy , s , c ) for ( xyxy , s , c ) in zip ( dets , scores , cls ) ] if len ( dets ) else [ ] # detections
def get_dists ( self , tracks , detections ) :
def get_dists ( self , tracks , detections ) :
""" Calculates the distance between tracks and detections using IO U and fuses scores. """
""" Calculates the distance between tracks and detections using Io U and fuses scores. """
dists = matching . iou_distance ( tracks , detections )
dists = matching . iou_distance ( tracks , detections )
# TODO: mot20
# TODO: mot20
# if not self.args.mot20:
# if not self.args.mot20:
@ -428,7 +428,7 @@ class BYTETracker:
@staticmethod
@staticmethod
def remove_duplicate_stracks ( stracksa , stracksb ) :
def remove_duplicate_stracks ( stracksa , stracksb ) :
""" Remove duplicate stracks with non-maximum IO U distance. """
""" Remove duplicate stracks with non-maximum Io U distance. """
pdist = matching . iou_distance ( stracksa , stracksb )
pdist = matching . iou_distance ( stracksa , stracksb )
pairs = np . where ( pdist < 0.15 )
pairs = np . where ( pdist < 0.15 )
dupa , dupb = [ ] , [ ]
dupa , dupb = [ ] , [ ]