Skip to content

Commit

Permalink
update with ultralytics yolov5
Browse files Browse the repository at this point in the history
  • Loading branch information
positive666 committed Sep 10, 2021
1 parent d97b9b4 commit 6c09812
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ def get_latest_run(search_dir='.'):
# Return path to most recent 'last.pt' in /runs (i.e. to --resume from)
last_list = glob.glob(f'{search_dir}/**/last*.pt', recursive=True)
return max(last_list, key=os.path.getctime) if last_list else ''

def is_writeable(path):
# Return True if path has write permissions (Warning: known issue on Windows)
return os.access(path, os.R_OK)


def is_docker():
Expand Down

0 comments on commit 6c09812

Please sign in to comment.