nncf icon indicating copy to clipboard operation
nncf copied to clipboard

Object Detection Quantization fails with OpenVINO 2024.3

Open fmishra747 opened this issue 1 year ago • 2 comments

🐛 Describe the bug

The yolov8 object detection quantization fails at File /lib/python3.10/site-packages/ultralytics/models/yolo/detect/val.py", line 183, in get_stats

**self.nt_per_image = np.bincount(stats["target_img"].astype(int), minlength=self.nc)

KeyError: 'target_img'** Complete log:

ov2024 (2).3_aa_obj_det.md

Environment

Yolov8 model with coco128 dataset Object Detection Quantization fails with OpenVINO 2024.3, "python_version": "3.10", nncf 2.13.0.dev0+eb91af2d ultralytics 8.2.74 ultralytics-thop 2.0.0 torch 2.4.0+cpu torchvision 0.19.0+cpu

The same application works fine with OpenVINO 2024.1 "python_version": "3.10", ultralytics 8.2.18 nncf 2.11.0.dev0+24f0ee70 torch 2.2.2+cpu torchvision 0.17.2+cpu

Minimal Reproducible Example

Execute object detection quantization python script after changing the extension from .md file quantize_accuracy_aware_object_detection_fullyworking.py.md with yolov8 and coco128 dataset

Are you going to submit a PR?

  • [ ] Yes I'd like to help by submitting a PR!

fmishra747 avatar Aug 14 '24 02:08 fmishra747

@fmishra747, your error log and the reproducer code does not match, please remove all unused сode and attach the reproducer as a text comment

daniil-lyakhov avatar Aug 14 '24 08:08 daniil-lyakhov

@fmishra747 , can you please provide the input requested above? Is still valid?

MaximProshin avatar Oct 21 '24 07:10 MaximProshin

I close the issue as there was no feedback from the originator for a while. Feel free to re-open it if the issue is still valid.

MaximProshin avatar Dec 18 '24 12:12 MaximProshin