Fix undefined ‘im_array’ bug in predict.md (#8565)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: fang_chenfang <1217690899@qq.com>
This commit is contained in:
Glenn Jocher 2024-03-01 00:53:17 +01:00 committed by GitHub
parent aa592efda5
commit 6bdf8dfaa2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 23 additions and 23 deletions

View file

@ -16,7 +16,7 @@ TensorFlow Lite | `tflite` | yolov8n.tflite
TensorFlow Edge TPU | `edgetpu` | yolov8n_edgetpu.tflite
TensorFlow.js | `tfjs` | yolov8n_web_model/
PaddlePaddle | `paddle` | yolov8n_paddle_model/
ncnn | `ncnn` | yolov8n_ncnn_model/
NCNN | `ncnn` | yolov8n_ncnn_model/
Requirements:
$ pip install "ultralytics[export]"
@ -293,7 +293,7 @@ class Exporter:
f[9], _ = self.export_tfjs()
if paddle: # PaddlePaddle
f[10], _ = self.export_paddle()
if ncnn: # ncnn
if ncnn: # NCNN
f[11], _ = self.export_ncnn()
# Finish
@ -496,14 +496,14 @@ class Exporter:
return f, None
@try_export
def export_ncnn(self, prefix=colorstr("ncnn:")):
def export_ncnn(self, prefix=colorstr("NCNN:")):
"""
YOLOv8 ncnn export using PNNX https://github.com/pnnx/pnnx.
YOLOv8 NCNN export using PNNX https://github.com/pnnx/pnnx.
"""
check_requirements("ncnn")
import ncnn # noqa
LOGGER.info(f"\n{prefix} starting export with ncnn {ncnn.__version__}...")
LOGGER.info(f"\n{prefix} starting export with NCNN {ncnn.__version__}...")
f = Path(str(self.file).replace(self.file.suffix, f"_ncnn_model{os.sep}"))
f_ts = self.file.with_suffix(".torchscript")