Feature/fix export on url (#4823)
* added callbacks * added back callback to main * added save_dir to callback output * merged in upstream * removed ghost code * added url check * Add url2file() * Update file-only Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
1 parent
0dc725e3dc
commit
43b2817f6e
2 files changed
+9
-2
No files matched your search
@@ -41,7 +41,7 @@ from models.experimental import attempt_load
|
||||
from models.yolo import Detect
|
||||
from utils.activations import SiLU
|
||||
from utils.datasets import LoadImages
|
||||
from utils.general import colorstr, check_dataset, check_img_size, check_requirements, file_size, set_logging
|
||||
from utils.general import colorstr, check_dataset, check_img_size, check_requirements, file_size, set_logging, url2file
|
||||
from utils.torch_utils import select_device
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@ def run(data=ROOT / 'data/coco128.yaml', # 'dataset.yaml path'
|
||||
include = [x.lower() for x in include]
|
||||
tf_exports = list(x in include for x in ('saved_model', 'pb', 'tflite', 'tfjs')) # TensorFlow exports
|
||||
imgsz *= 2 if len(imgsz) == 1 else 1 # expand
|
||||
file = Path(weights)
|
||||
file = Path(url2file(weights) if str(weights).startswith(('http:/', 'https:/')) else weights)
|
||||
|
||||
# Load PyTorch model
|
||||
device = select_device(device)
|
||||
|
||||
Reference in new issue
Block a user