mirror of
https://github.com/ultralytics/ultralytics.git
synced 2025-09-15 15:48:41 +08:00
Install NCNN with '--no-deps' (#21648)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
03f83bf949
commit
5b55b3cea3
@ -47,6 +47,7 @@ Inference:
|
||||
yolo11n.mnn # MNN
|
||||
yolo11n_ncnn_model # NCNN
|
||||
yolo11n_imx_model # IMX
|
||||
yolo11n_rknn_model # RKNN
|
||||
|
||||
TensorFlow.js:
|
||||
$ cd .. && git clone https://github.com/zldrobit/tfjs-yolov5-example.git && cd tfjs-yolov5-example
|
||||
@ -764,7 +765,7 @@ class Exporter:
|
||||
@try_export
|
||||
def export_ncnn(self, prefix=colorstr("NCNN:")):
|
||||
"""Export YOLO model to NCNN format using PNNX https://github.com/pnnx/pnnx."""
|
||||
check_requirements("ncnn")
|
||||
check_requirements("ncnn", cmds="--no-deps") # no deps to avoid installing opencv-python
|
||||
import ncnn # noqa
|
||||
|
||||
LOGGER.info(f"\n{prefix} starting export with NCNN {ncnn.__version__}...")
|
||||
|
||||
@ -534,7 +534,7 @@ class AutoBackend(nn.Module):
|
||||
# NCNN
|
||||
elif ncnn:
|
||||
LOGGER.info(f"Loading {w} for NCNN inference...")
|
||||
check_requirements("git+https://github.com/Tencent/ncnn.git" if ARM64 else "ncnn") # requires NCNN
|
||||
check_requirements("git+https://github.com/Tencent/ncnn.git" if ARM64 else "ncnn", cmds="--no-deps")
|
||||
import ncnn as pyncnn
|
||||
|
||||
net = pyncnn.Net()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user