Enable default cfg for similar args in solutions. (#17112)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
be40a45ec3
commit
a76f5293b4
4 changed files with 19 additions and 17 deletions
|
|
@ -38,6 +38,7 @@ FILE = Path(__file__).resolve()
|
|||
ROOT = FILE.parents[1] # YOLO
|
||||
ASSETS = ROOT / "assets" # default images
|
||||
DEFAULT_CFG_PATH = ROOT / "cfg/default.yaml"
|
||||
DEFAULT_SOL_CFG_PATH = ROOT / "cfg/solutions/default.yaml" # Ultralytics solutions yaml path
|
||||
NUM_THREADS = min(8, max(1, os.cpu_count() - 1)) # number of YOLO multiprocessing threads
|
||||
AUTOINSTALL = str(os.getenv("YOLO_AUTOINSTALL", True)).lower() == "true" # global auto-install mode
|
||||
VERBOSE = str(os.getenv("YOLO_VERBOSE", True)).lower() == "true" # global verbose mode
|
||||
|
|
@ -508,6 +509,7 @@ def yaml_print(yaml_file: Union[str, Path, dict]) -> None:
|
|||
|
||||
# Default configuration
|
||||
DEFAULT_CFG_DICT = yaml_load(DEFAULT_CFG_PATH)
|
||||
DEFAULT_SOL_DICT = yaml_load(DEFAULT_SOL_CFG_PATH) # Ultralytics solutions configuration
|
||||
for k, v in DEFAULT_CFG_DICT.items():
|
||||
if isinstance(v, str) and v.lower() == "none":
|
||||
DEFAULT_CFG_DICT[k] = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue