Unverified 提交 a5748e4b authored 作者: Glenn Jocher's avatar Glenn Jocher 提交者: GitHub

Updated Segmentation and Classification usage (#9607)

* Updated Segmentation and Classification usage Signed-off-by: 's avatarGlenn Jocher <glenn.jocher@ultralytics.com> * Update export.py Signed-off-by: 's avatarGlenn Jocher <glenn.jocher@ultralytics.com> * Update export.py Signed-off-by: 's avatarGlenn Jocher <glenn.jocher@ultralytics.com> * Update export.py Signed-off-by: 's avatarGlenn Jocher <glenn.jocher@ultralytics.com> Signed-off-by: 's avatarGlenn Jocher <glenn.jocher@ultralytics.com>
上级 c4c0ee8f
......@@ -560,13 +560,20 @@ def run(
# Finish
f = [str(x) for x in f if x] # filter out '' and None
if any(f):
tp = type(model)
dir = Path('segment' if tp is SegmentationModel else 'classify' if tp is ClassificationModel else '')
predict = 'detect.py' if tp is DetectionModel else 'predict.py'
h = '--half' if half else '' # --half FP16 inference arg
LOGGER.info(f'\nExport complete ({time.time() - t:.1f}s)'
f"\nResults saved to {colorstr('bold', file.parent.resolve())}"
f"\nDetect: python detect.py --weights {f[-1]} {h}"
f"\nValidate: python val.py --weights {f[-1]} {h}"
f"\nDetect: python {dir / predict} --weights {f[-1]} {h}"
f"\nValidate: python {dir / 'val.py'} --weights {f[-1]} {h}"
f"\nPyTorch Hub: model = torch.hub.load('ultralytics/yolov5', 'custom', '{f[-1]}')"
f"\nVisualize: https://netron.app")
if tp is ClassificationModel:
LOGGER.warning("WARNING ⚠️ ClassificationModel not yet supported for PyTorch Hub AutoShape inference")
if tp is SegmentationModel:
LOGGER.warning("WARNING ⚠️ SegmentationModel not yet supported for PyTorch Hub AutoShape inference")
return f # return list of exported files/dirs
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论