diff --git a/src/objectifier.py b/src/objectifier.py index b8741b4..67a796d 100644 --- a/src/objectifier.py +++ b/src/objectifier.py @@ -32,11 +32,15 @@ def to_int(input_int): yolo_config = get_envvar_or_fail('OBJECTIFIER_YOLOV3_CONFIG') yolo_weights = get_envvar_or_fail('OBJECTIFIER_YOLOV3_WEIGHTS') -yolo_labels = get_envvar_or_fail('OBJECTIFIER_YOLOV3_LABELS') +yolo_labels_file = get_envvar_or_fail('OBJECTIFIER_YOLOV3_LABELS') buffer_size = to_int(get_envvar('OBJECTIFIER_BUFFER_SIZE')) or 524288 max_file_age = to_int(get_envvar('OBJECTIFIER_CLEANUP_MAX_AGE')) file_cleanup_delay = to_int(get_envvar('OBJECTIFIER_CLEANUP_DELAY')) +yolo_labels = [] +with open(yolo_labels_file, "r") as f: + yolo_labels = f.readlines() + incoming_dir = Path(get_envvar_or_fail('CACHE_DIRECTORY')) outgoing_dir = Path(get_envvar_or_fail('STATE_DIRECTORY'))