Update relative ROOT logic (#4955)
* Update relative `ROOT` logic * python 3.9 Path().is_relative_to() removal
This commit is contained in:
1 parent
4e04cb0dc8
commit
5ed28603cf
2 files changed
+4
-1
No files matched your search
@@ -20,6 +20,7 @@ FILE = Path(__file__).resolve()
|
||||
ROOT = FILE.parents[1] # YOLOv5 root directory
|
||||
if str(ROOT) not in sys.path:
|
||||
sys.path.append(str(ROOT)) # add ROOT to PATH
|
||||
ROOT = ROOT.relative_to(Path.cwd()) # relative
|
||||
|
||||
import numpy as np
|
||||
import tensorflow as tf
|
||||
|
||||
Reference in new issue
Block a user