mct-2.1.1
Francesco Mattioli 4 months ago
parent 729a5653bc
commit ed918d9491
  1. 8
      tests/test_exports.py
  2. 2
      ultralytics/engine/exporter.py
  3. 2
      ultralytics/nn/autobackend.py

@ -197,3 +197,11 @@ def test_export_ncnn():
"""Test YOLO exports to NCNN format."""
file = YOLO(MODEL).export(format="ncnn", imgsz=32)
YOLO(file)(SOURCE, imgsz=32) # exported model inference
@pytest.mark.skipif(True, reason="Test disabled")
def test_export_mct():
"""Test YOLOv8n exports to MCT format."""
model = YOLO("yolov8n.pt")
file = model.export(format="mct", imgsz=32)
YOLO(file)(SOURCE, imgsz=32)

@ -1075,7 +1075,7 @@ class Exporter:
@try_export
def export_mct(self, prefix=colorstr("Sony MCT:")):
check_requirements(["model-compression-toolkit==2.2.1", "sony-custom-layers[torch]"])
check_requirements(["model-compression-toolkit==2.1.1", "sony-custom-layers[torch]"])
import subprocess
import model_compression_toolkit as mct

@ -179,7 +179,7 @@ class AutoBackend(nn.Module):
providers = ["CUDAExecutionProvider", "CPUExecutionProvider"] if cuda else ["CPUExecutionProvider"]
if mct:
check_requirements(
["model-compression-toolkit==2.2.1", "sony-custom-layers[torch]", "onnxruntime-extensions"]
["model-compression-toolkit==2.1.1", "sony-custom-layers[torch]", "onnxruntime-extensions"]
)
LOGGER.info(f"Loading {w} for ONNX MCT quantization inference...")
import mct_quantizers as mctq

Loading…
Cancel
Save