Spaces:
Runtime error
Runtime error
| 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"], | |
| ) | |