Regulus RA에서 MXQ 정확도 저하 및 YOLO raw output 변동 문의

Product & Environment

  • Board: Regulus RA
  • OS: Mobilint Yocto Distro v3.4.0
  • qbcompiler: 1.2.0
  • qbruntime: v1.2.0
  • Architecture: aarch64
  • Device/Core/Bundle: device 0 / Cluster0-Core0 / bundle 0
  • CPU offload: disabled
  • 실행 API: synchronous `Model.infer()`

문의

Regulus RA에서 qbcompiler로 생성한 MXQ를 qbruntime NPU-only로 실행하고 있습니다. 동일한 ONNX의 CPU 결과와 비교할 때 정확도가 크게 낮아 문의드립니다.

측정 결과:

  1. ResNet50

    • CPU ONNX Top-1: 77.03%

    • CPU ONNX Top-5: 92.90%

    • Regulus MXQ Top-1: 55.37%

    • Regulus MXQ Top-5: 78.77%

  2. YOLOv5m

    • CPU ONNX COCO128 mAP@0.5: 0.9154

    • Regulus MXQ mAP@0.5: 0.0000

    • Regulus 결과는 true positive 없이 후보가 max_det까지 생성됨

  3. YOLOv8s-pose

    • CPU ONNX OKS mAP: 0.6567

    • Regulus MXQ OKS mAP: 0.0000

  4. YOLOv9m 튜토리얼 재현

공식 튜토리얼의 compilation/object_detection/model_compile.py
수정하지 않고 다음 조건으로 실행했습니다.

  • model: YOLOv9m ONNX

  • target: regulus-ra

  • calibration: COCO 500장

  • method=1, output=1, percentile=0.9999, topk_ratio=0.01

컴파일은 성공했고 출력 shape도 정상입니다.

(80,80,64), (80,80,80)
(40,40,64), (40,40,80)
(20,20,64), (20,20,80)

하지만 공식 Python runtime 실행 결과:

No detections found.

동일 이미지의 CPU ONNX는 3개 검출, 최대 confidence 0.9164입니다.
Regulus MXQ class head는 sigmoid 후 최대값이 약 0.03 수준입니다.

또한 동일 입력을 반복 Model.infer()했을 때 YOLO raw head 간 최대 절대 차이가 약 4.8~13.6으로 측정된 경우도 있습니다.

질문:

  1. Regulus RA에서 정확도가 검증된 공식 YOLO/ResNet MXQ 또는 권장 compiler recipe가 있나요?

  2. 동일 입력에 대한 qbruntime v1.2.0 synchronous Model.infer() raw output 변동이 알려진 현상인가요?

  3. Regulus RA용 calibration, input quantization, preprocessing 추가 설정이 필요한가요?

  4. ONNX → MBLT → MXQ numerical equivalence를 확인할 수 있는 Mobilint 권장 도구나 절차가 있나요?

  5. 현재 현상이 calibration, compiler backend, NPU quantization, runtime 중 어느 단계에서 발생하는지 확인할 방법이 있을까요?

Logs & Attachments

[Compilation]

The original tutorial file was used without modification:

compilation/object_detection/model_compile.py

Command:

python model_compile.py \
  --onnx-path yolov9m.onnx \
  --calib-data-path coco-selected \
  --save-path yolov9m.mxq \
  --mblt-path yolov9m.mblt \
  --target-device regulus-ra

Calibration:
- 500 COCO images
- method=1
- output=1
- mode=1
- percentile=0.9999
- topk_ratio=0.01
- letterbox: 640x640, padValue=114
- Uint8InputConfig(apply=True)

Compiler log:

strip_yolo_decode_transform | Applying YOLO decode removal rules.

Input Shape:
(1, 640, 640, 3)

Output Shapes:
(1, 80, 80, 64)
(1, 80, 80, 80)
(1, 40, 40, 64)
(1, 40, 40, 80)
(1, 20, 20, 64)
(1, 20, 20, 80)

[2026-08-05 12:39:56.283] Compilation was successful.
[Regulus tutorial runtime]

I0805 12:40:39.107 model_impl.cc:1025] Model constructed.
I0805 12:40:39.255 model_impl.cc:1357] Model launched.
I0805 12:40:39.463 model_impl.cc:1376] Model disposed.

No detections found. Saved the original image.
[Raw output diagnostic]

0 (80, 80, 64) float32
min=-4.4738 max=14.8038 mean=0.9950

1 (80, 80, 80) float32
min=-25.7085 max=-3.4774 mean=-14.0829
sigmoid_max=0.02996

2 (40, 40, 64) float32
min=-8.4007 max=12.9718 mean=0.9811

3 (40, 40, 80) float32
min=-22.5100 max=-3.5294 mean=-10.8660
sigmoid_max=0.02849

4 (20, 20, 64) float32
min=-1.7253 max=4.3897 mean=0.9982

5 (20, 20, 80) float32
min=-13.3648 max=-5.1569 mean=-10.4256
sigmoid_max=0.00573

Postprocess result:
detections: (0, 7)
[CPU ONNX reference]

Ultralytics YOLOv9m ONNX inference:
onnx_detections 3
conf_max 0.9164232015609741
classes [29.0, 16.0, 2.0]
[Model comparison summary]

ResNet50:
CPU ONNX Top-1: 77.03%
CPU ONNX Top-5: 92.90%
Regulus MXQ Top-1: 55.37%
Regulus MXQ Top-5: 78.77%

YOLOv5m:
CPU ONNX mAP@0.5: 0.9154
Regulus MXQ mAP@0.5: 0.0000

YOLOv8s-pose:
CPU ONNX OKS mAP: 0.6567
Regulus MXQ OKS mAP: 0.0000

YOLOv9m:
CPU ONNX detections: 3
Regulus MXQ detections: 0
1 Like

안녕하세요.

문의주신 내용 확인 중입니다.
먼저 저희 쪽에서도 동일하게 재현되는지 확인하고 있습니다.

확인 후 상세히 안내드리겠습니다.
감사합니다.

1 Like

안녕하세요.

추가로 실행 결과를 정리하면 다음과 같습니다.

사용한 코드는 Mobilint mblt-sdk-tutorial의 컴파일 및 runtime 예제를 그대로 사용했습니다. 별도의 후처리 수정이나 모델 구조 변경은 하지 않았고, target-device=regulus-ra, qbruntime v1.2.0, NPU device 0, Cluster0/Core0 조건으로 실행했습니다.

모든 모델은 MXQ 로드와 NPU 실행 자체는 정상적으로 완료되었습니다. 다만 YOLO 계열에서 score/class head 값이 지나치게 낮게 출력되어 최종 검출이 모두 제거되었습니다.

YOLOv9m:

  • CPU ONNX: 3개 검출, 최대 confidence 0.9164
  • Regulus MXQ: 검출 0개
  • Regulus score head 최대값:
    • raw logit: -3.4774
    • sigmoid 후: 약 0.0300
  • confidence threshold 0.25보다 낮아 모든 후보가 제거됨

YOLOv8m-pose:

  • CPU ONNX: 6명 검출, 최대 confidence 0.9366
  • Regulus MXQ: 검출 0개
  • Regulus objectness score 최대 sigmoid:
    • 약 0.1785
  • bbox 및 keypoint 출력은 존재하지만 score threshold를 통과하지 못함

YOLOv8m-seg:

  • CPU ONNX: 8개 객체 검출, 최대 confidence 0.9520
  • Regulus MXQ: 검출 0개
  • Regulus class score 최대 sigmoid:
    • 약 0.0056
  • bbox와 mask coefficient 출력은 존재하지만 class score가 매우 낮음

예를 들어 YOLOv9m의 Regulus raw 출력은 다음과 같습니다.

bbox head:  min=-4.47, max=14.80
score head: min=-25.70, max=-3.47
sigmoid(score_max)=0.02996

따라서 단순히 runtime이 실행되지 않는 문제는 아니며, MXQ의 bbox/mask/keypoint 출력은 생성되지만 score/class head의 값 범위가 CPU ONNX와 크게 다르게 출력되는 현상으로 보입니다.

YOLOv5m 결과도 아래 내용을 추가하면 됩니다.

YOLOv5m 결과도 동일한 조건으로 확인했습니다.

  • CPU ONNX COCO128 10장:
  • mAP@0.5: 0.9154

- Regulus MXQ:

  • mAP@0.5: 0.0000
  • 이미지당 평균 detection: 300개
  • 평가 조건의 max_det=300에 계속 도달하지만 true positive는 없음.
    Regulus raw output shape은 정상적으로 생성되었습니다.

P3: shape=(80,80,255), min=-22.0820, max=1.6972
P4: shape=(40,40,255), min=-14.2620, max=1.8890
P5: shape=(20,20,255), min=-11.5466, max=1.0993

YOLOv5m의 255채널 출력은 bbox, objectness, class score가 합쳐진 형태입니다. 따라서 전체 tensor의 min/max만으로 특정 score 값이 사라졌다고 단정할 수는 없지만, Regulus에서는 후처리 결과가 대부분 잘못된 후보로 채워지고 true positive가 하나도 나오지 않았습니다.

즉 YOLOv5m도 모델 로드와 raw inference는 정상이나, objectness/class score의 수치 또는 출력 channel 해석이 CPU ONNX와 일치하지 않는 것으로 보입니다.

현재로서는 다음 단계 중 어느 부분을 확인해야 하는지 조언을 부탁드립니다.

  • Regulus RA용 score/class head 양자화 설정

  • ONNX → MBLT graph transformation

  • output head 순서 또는 tensor mapping

  • sigmoid/activation 처리

  • Regulus RA backend의 YOLO score head 지원 여부

1 Like

안녕하세요, Youngjin님.

상세한 리포트 덕분에 문제를 명확히 파악할 수 있었습니다.

문의하신 이슈는 qbcompiler 1.2.0에서 Regulus-ra를 사용할 때 한정적으로 발생하는 문제로 확인되었으며, 해당 부분은 개선된 버전으로 조치하여 배포할 예정입니다. 배포 전까지는 qbcompiler 1.1.2 사용을 권장드리며, 내부 테스트 결과 1.1.2에서는 문의하신 항목들에서 성능 저하가 발생하지 않는 것을 확인했습니다. 원인 파악과 수정이 완료되는 대로 다시 안내드리겠습니다.

qbcompiler 1.1.2 버전 사용 시에는 저희 git에서 제공드리는 mblt-sdk-tutorial의 해당 version tag를 확인하시어 맞는(v1.1.2 sdk) 코드를 참고해 주시면 됩니다.

추가로 문의주신 내용에 대해 아래와 같이 답변드립니다.

1. Regulus RA에서 정확도가 검증된 공식 YOLO/ResNet MXQ 또는 권장 compiler recipe가 있나요?
튜토리얼 config가 권장 recipe이며, 해당 config 기준으로 95% 이상의 성능 보존이 확인되어야 합니다.

2. 동일 입력에 대한 qbruntime v1.2.0 synchronous Model.infer() raw output 변동이 알려진 현상인가요?
qbcompiler 1.2.0에서 발생한 버그로 확인되었습니다.

3. Regulus RA용 calibration, input quantization, preprocessing 추가 설정이 필요한가요?
별도 설정은 필요하지 않으며, 사용하신 커맨드 기준으로 성능이 보존되어야 합니다.

4. ONNX → MBLT → MXQ numerical equivalence를 확인할 수 있는 Mobilint 권장 도구나 절차가 있나요?
별도로 제공드리는 도구는 없으며, 저희도 모델별 비교 코드를 직접 사용해 디버깅하고 있습니다.

5. 현재 현상이 calibration, compiler backend, NPU quantization, runtime 중 어느 단계에서 발생하는지 확인할 방법이 있을까요?
현재 현상은 원인 파악 후 개선하여 다음 버전에 반영될 예정입니다.

1 Like