offlinemot.config.configs

class offlinemot.config.configs(file_name=None)[source]

A class used to set parameters for offline traffic objects detection and tracking from drone bird-eye videos.

…

Variables
  • ~configs.draw (boolean) – Whether to show tracking results as it’s calculated

  • ~configs.detect_every_N (int) – The frequency of the detection with Yolov4 network in the video.

  • ~configs.missing_thresh (float) – Maximum percentage of correct tracking and detection for any object to continue tracking it

  • ~configs.use_cuda (boolean) – Whether to perform detection on GPU or CPU

  • ~configs.resize_scale (float) – The resizing scale of the image to show while processing. 1 means the same as the true size

  • ~configs.color_map (list) – list of RGB colors to represent each detected class while drawing (red and white are reserved). It depends on number of output classes in yolo config

  • ~configs.bgs_history (int) – The number of frames needed for background substractor before esitimating the background

  • ~configs.bgs_threshold (int) – The distance from which two objects are considered one in background substraction result

  • ~configs.bgs_shadows (boolean) – Detect the shadows in a different color grade in background substraction

  • ~configs.bgs_learning (float) – The rate which the background is learned in background substraction

  • ~configs.bgs_erosion_size (int) – The kernel size to do erosion with on the background substraction result

  • ~configs.bgs_min_area (int) – The minimum area in pixel for the objects in the result of background substraction

  • ~configs.bgs_broder_margin (float) – The margin around the objects already detected from which overlapping with other objects from background substraction is ok. This is represented as percentage of the width and height of the object.

  • ~configs.do_fix (boolean) – Whether to perform fixing the view or not

  • ~configs.fixing_dilation (int) – The kernel size to do dilation to a mask from which matching with a reference image will be done for esitimating the transformation

  • ~configs.min_matches (int) – The minimum number of matches to transform the image according to a reference image postion

  • ~configs.model_name (str) – The filename of the trained Yolo model

  • ~configs.model_config (str) – The filename of the configuration file of the trained model

  • ~configs.classes_file_name (str) – The filename where the list of output classes are list. normaly, there are three types (cyclists, pedestrians and vehicles)

  • ~configs.detect_thresh (float) – The minimum probability to consider a detection result from Yolo model ok.

  • ~configs.dist_thresh (int) – The maximum distance between tracked object position and a detected position to consider a correction for its position

  • ~configs.detect_scale (float) – How much focus on the image for detection, higher values would take the whole image, while 0 value would focus on the previously detected objects.

  • ~configs.min_history (int) – The smallest time steps length that could be saved as a traffic object in the result

  • ~configs.overlap_thresh (float) – The minimum percentage of objects area overlapping with another to choose one of them as duplicate and delete it

  • ~configs.do_smooth (boolean) – Whether to smooth the tracking trajectories points according to Savitzky-Golay algorithm.

  • ~configs.window_size (int) – The window size for the smoothing algorithm

  • ~configs.polydegree (int) – The polydegree for the smoothin algorithm, it must be smaller than window_size

  • ~configs.save_out_video (bool) – Whether to save the output video in mp4 format with the tracking data overlaid