OpenVINO metadata fix (#7952)

* Rename OpenVINO meta.yaml to model name

* Rename OpenVINO meta.yaml to model name

* Rename OpenVINO meta.yaml to model name

* fix
This commit is contained in:
Glenn Jocher authored and GitHub committed 2022-05-24 11:59:59 +02:00
1 parent a3a652c933
commit 0dd66e2dc7
2 files changed
+15 -14

No files matched your search

+1 -1
View File
@@ -180,7 +180,7 @@ def export_openvino(model, file, half, prefix=colorstr('OpenVINO:')):
cmd = f"mo --input_model {file.with_suffix('.onnx')} --output_dir {f} --data_type {'FP16' if half else 'FP32'}"
subprocess.check_output(cmd.split()) # export
with open(Path(f) / 'meta.yaml', 'w') as g:
with open(Path(f) / file.with_suffix('.yaml'), 'w') as g:
yaml.dump({'stride': int(max(model.stride)), 'names': model.names}, g) # add metadata.yaml
LOGGER.info(f'{prefix} export success, saved as {f} ({file_size(f):.1f} MB)')