Allow YOLOv5 execution from arbitrary cwd (#4954)
* Allow YOLOv5 execution from arbitrary `cwd` * Fix str bugs
This commit is contained in:
1 parent
a820b43aca
commit
4e04cb0dc8
4 files changed
+23
-17
No files matched your search
@@ -34,6 +34,7 @@ FILE = Path(__file__).resolve()
|
||||
ROOT = FILE.parents[0] # 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
|
||||
|
||||
from models.common import Conv
|
||||
from models.experimental import attempt_load
|
||||
|
||||
Reference in new issue
Block a user