Closed Ghezzo98 closed 5 months ago
@Ghezzo98
Hi, yes, that error appear if you dont have './graph/dump/' folder. Fixed now.
You can git pull
new version of that repo and run quantize.py
If you still face problems feel free to ask ❤️
Thank you! just did it. Now i have a different error :')
2024-05-13 15:06:50.860867: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-05-13 15:06:50.860919: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-05-13 15:06:50.981703: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
Traceback (most recent call last):
.
.
.
.
.
.
.
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/training/py_checkpoint_reader.py", line 19, in
Could it be the numpy version inside the requirements is not updated?
If you need the entire traceback, or some other info, just ask me. Thank you.
@Ghezzo98 Yes, probably its numpy version error Try numpy==1.26.4
If you still get error give entire traceback
@Ghezzo98 Is it works fine now?
PS
saw your comment about ton of layers saved to .dot file
Usually we wanna add in ignored scope
heads (in yolo8 = 3 DetectionHeads) of detection model. (For yolo8 it is 22's layers - as in example)
yeah my last question was kind dumb, i was thinking about another thing... Btw, now i have a problem running those lines of code " from ultralytics.utils import DEFAULT_CFG args = get_cfg(cfg=DEFAULT_CFG) " and i get this error: NameError: name 'get_cfg' is not defined to solve this, i run "from ultralytics.cfg import get_cfg"
another error was the "compare_accuracy" function, i can't find it. so insted i did: " from utils import * get_accuracy(...) " now it's running, I'll tell you if it is gonna work out.
last question, so to run properly the quantization in Yolo8 (medium size) i have to leave unchanged your ignored_scope(?) Thank you.
Yeah, it worked out. Thank you! Is it possible to do inference with the quantized model?
@Ghezzo98 Yes, why not? that's the whole point of quantisation - to faster your inference pipeline
close this topic since no more issue
yeah but i'm trying and i haven't managed to do it yet.
i tried with the classic approach: " from ultralytics import YOLO model=YOLO('/content/drive/MyDrive/quant_prova1/YOLO8_quantization/quantization_OpenVino/quantized_res/best_noAC_openvino_int8_model/best_noAC.bin')
model.predict('/content/drive/MyDrive/quant_prova1/YOLO8_quantization/quantization_OpenVino/foto_prova' , save = True , save_txt = True) "
And i get: " TypeError: unsupported operand type(s) for &=: 'bool' and 'str' "
@Ghezzo98 First of all read docs - https://docs.ultralytics.com/integrations/openvino/ You need to pass path not to .bin but to folder that contain .bin
If you still face problems - open another issue
I did everything written in the Read.me, I run quantize.py and i got this error. FileNotFoundError: [Errno 2] No such file or directory: './graph/dump/graph_model.dot'
what should i do?