ultralytics 8.0.50 AMP check and YOLOv5u YAMLs (#1263)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Troy <wudashuo@vip.qq.com> Co-authored-by: Yonghye Kwon <developer.0hye@gmail.com> Co-authored-by: Ayush Chaurasia <ayush.chaurarsia@gmail.com> Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com> Co-authored-by: Huijae Lee <46982469+ZeroAct@users.noreply.github.com>
This commit is contained in:
parent
3861e6c82a
commit
f0d8e4718b
29 changed files with 440 additions and 83 deletions
|
|
@ -574,7 +574,7 @@ class Exporter:
|
|||
LOGGER.info(f'\n{prefix} starting export with tensorflow {tf.__version__}...')
|
||||
saved_model = Path(str(self.file).replace(self.file.suffix, '_saved_model'))
|
||||
if self.args.int8:
|
||||
f = saved_model / (self.file.stem + 'yolov8n_integer_quant.tflite') # fp32 in/out
|
||||
f = saved_model / (self.file.stem + '_integer_quant.tflite') # fp32 in/out
|
||||
elif self.args.half:
|
||||
f = saved_model / (self.file.stem + '_float16.tflite')
|
||||
else:
|
||||
|
|
@ -863,18 +863,6 @@ def export(cfg=DEFAULT_CFG):
|
|||
cfg.model = cfg.model or 'yolov8n.yaml'
|
||||
cfg.format = cfg.format or 'torchscript'
|
||||
|
||||
# exporter = Exporter(cfg)
|
||||
#
|
||||
# model = None
|
||||
# if isinstance(cfg.model, (str, Path)):
|
||||
# if Path(cfg.model).suffix == '.yaml':
|
||||
# model = DetectionModel(cfg.model)
|
||||
# elif Path(cfg.model).suffix == '.pt':
|
||||
# model = attempt_load_weights(cfg.model, fuse=True)
|
||||
# else:
|
||||
# TypeError(f'Unsupported model type {cfg.model}')
|
||||
# exporter(model=model)
|
||||
|
||||
from ultralytics import YOLO
|
||||
model = YOLO(cfg.model)
|
||||
model.export(**vars(cfg))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue