offlinemot.core

Description

Perform the main loop of reading the video and tracking the traffic objects in it.

This script reads the video file frame by frame and tries to detect all the objects in it and track them. Additionally, a check with background subtraction is done.

This contains the following functions:

  • main - the main function of the script

  • track_objs - Perfrom tracking on every object in the frame

  • bgObjs_to_objs - transform background subtraction objects to traffic objects

  • FirstFrame - initilize the detector and return the objects in the first frame if they fall within the image borders

  • detections_to_objects - Transfrom a group of detection results in one frame to traffic objects instances

  • set_params - Open the configuration file in a text editor to set parameters

Functions

FirstFrame(frame, config)

initilize the detector and return the objects in the first frame if they fall within the image borders

bgObjs_to_objs(bgObjs, frame, frame_id[, config])

Transform background subtraction objects to traffic objects

detections_to_objects(detections, frame, config)

Convert a list of detections out of Yolo network to traffic object class instances.

extract_paths([vid_name, config])

The main loop to detect and track traffic objects in the video and save the result after post processing to a text file.

set_params()

Open the configuration file in a text editor to set parameters

track_objs(frame, frame_id, objects)

Perfrom tracking on every object in the frame