File size: 545 Bytes
0bdfe9d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import json


def parse_raw_config_json(raw_config_json):
    return _parse_config_json(json.loads(raw_config_json))


def parse_config_from_file(config_file_path):
    with open(config_file_path) as config_file:
        return _parse_config_json(json.load(config_file))


def _parse_config_json(config):
    return (
        config["model"],
        config["min_detection_confidence"],
        config["min_score_for_tracker_match"],
        config["min_object_appearance_frames"],
        config["max_object_missing_consecutive_frames"],
    )