From daf9100788f98a431d5c482e4c3e5a752ad72679 Mon Sep 17 00:00:00 2001 From: fatih <34196005+fcakyon@users.noreply.github.com> Date: Sun, 12 Feb 2023 22:21:17 +0300 Subject: [PATCH 1/2] fix classify dataaets dir --- yolov5/utils/general.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yolov5/utils/general.py b/yolov5/utils/general.py index a29e893..c64a014 100644 --- a/yolov5/utils/general.py +++ b/yolov5/utils/general.py @@ -46,7 +46,7 @@ # Settings NUM_THREADS = min(8, max(1, os.cpu_count() - 1)) # number of YOLOv5 multiprocessing threads -DATASETS_DIR = Path(os.getenv('YOLOv5_DATASETS_DIR', ROOT.parent / 'datasets')) # global datasets directory +DATASETS_DIR = Path(os.getenv('YOLOv5_DATASETS_DIR', 'datasets')) # global datasets directory AUTOINSTALL = str(os.getenv('YOLOv5_AUTOINSTALL', True)).lower() == 'true' # global auto-install mode VERBOSE = str(os.getenv('YOLOv5_VERBOSE', True)).lower() == 'true' # global verbose mode TQDM_BAR_FORMAT = '{l_bar}{bar:10}{r_bar}' # tqdm bar format From aa7c4cbb23510db87173ef7d88424d98d73c5e83 Mon Sep 17 00:00:00 2001 From: fatih <34196005+fcakyon@users.noreply.github.com> Date: Sun, 12 Feb 2023 22:22:00 +0300 Subject: [PATCH 2/2] Update train.py --- yolov5/classify/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yolov5/classify/train.py b/yolov5/classify/train.py index c011c1c..4d32b0c 100644 --- a/yolov5/classify/train.py +++ b/yolov5/classify/train.py @@ -75,7 +75,7 @@ def train(opt, device): logger = GenericLogger(opt=opt, console_logger=LOGGER) if RANK in {-1, 0} else None # Download Dataset - with torch_distributed_zero_first(LOCAL_RANK), WorkingDirectory(ROOT): + with torch_distributed_zero_first(LOCAL_RANK): data_dir = data if data.is_dir() else (DATASETS_DIR / data) if not data_dir.is_dir(): LOGGER.info(f'\nDataset not found ⚠️, missing path {data_dir}, attempting download...')