Skip to content

Commit

Permalink
fix classify datasets dir (#222)
Browse files Browse the repository at this point in the history
* fix classify dataaets dir

* Update train.py
  • Loading branch information
fcakyon committed Feb 12, 2023
1 parent db4d3e1 commit 5b70737
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion yolov5/classify/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -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...')
Expand Down
2 changes: 1 addition & 1 deletion yolov5/utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5b70737

Please sign in to comment.