• DepthAI-v2
  • yolov8 pre-trained model converted, via tools.luxonis.com does not work

In the last few days I have been systematically trying to run some customized model, like yolo with its own classes, on an OAK-D-Lite camera. I followed several tutorials provided by Luxonis, but none of them were successful. I can run the pre-trained models made available by the company, the camera is working OK. However, when trying my own model I can't. In all cases I fail in the last step. When executing the command: "python3 main.py --config yolov8strained.json", as described by the tutorial luxonis/depthai-ml-trainingblob/master/colab-notebooks/YoloV8_training.ipynb. I get the following message: config: yolov8strained.json

Downloading C:\Users\sandro.vilela\.cache\blobconverter\yolov8strained_openvino_2021.4_6shave.blob...

{

 "exit_code": 1,

 "message": "Command failed with exit code 1, command: /opt/intel/openvino2021_4/deployment_tools/inference_engine/lib/intel64/myriad_compile -m /tmp/blobconverter/49050601ac2d4968a2261f97af1294fa/yolov8strained/FP16/yolov8strained. xml -o /tmp /blobconverter/49050601ac2d4968a2261f97af1294fa/yolov8strained/FP16/yolov8strained.blob -c /tmp/blobconverter/49050601ac2d4968a2261f97af1294fa/myriad_compile_config.txt -ip U8",

 "stderr": "Unknown model format! Cannot find reader for model format: xml and read the model: /tmp/blobconverter/49050601ac2d4968a2261f97af1294fa/yolov8strained/FP16/yolov8strained.xml. Please check that reader library exists in your PATH.\\n" ,

 "stdout": "Inference Engine: \\n\\tIE version ......... 2021.4.2\\n\\tBuild ........... 2021.4.2-3974-e2a469a3450-releases/ 2021/4\\n"

}

Closing OAK camera

File "C:\Users\sandro.vilela\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\requests\models.py", line 1021, in raise_for_status

 raise HTTPError(http_error_msg, response=self)

requests.exceptions.HTTPError: 400 Client Error: BAD REQUEST for url: https://blobconverter.luxonis.com/compile?version=2021.4&no_cache=False

2 months later

Had this problem for the past 2 days and found a solution that worked for me:

  1. Use the https://tools.luxonis.com/ to convert your .pt file to the .zip containing the .blob file.
  2. Make a copy of the extracted .blob file and rename it to the target file indicated in your terminal error, in @sandrovilelaSandroPVilela 's case the file name would be "yolov8strained_openvino_2021.4_6shave.blob".
  3. Copy this file to the location indicated by the error message, in @safeabortionpharma 's case that location is "C:\Users\sandro.vilela\.cache\blobconverter\".
  4. Then execute "python3 main.py --config yolov8strained.json" again and hope for the best.

BUT… I haven't tested this solution on Windows since I'm running on Linux and it worked for me there.