converting yolo to .blob
- Edited
Oh, the version of blob when we are using 2022.1. it is not working. But if i changed the file name to bestopenvino_2021.4_6shave.blob (openvino version 2021.4 not 2022.1). Then it is working. I think that the openvino version is hardcoded in \depthai-experiments\gen2-yolo\device-decoding codes.
And even though i checked "Use OpenVINo 2021.4" in your convertining tool, it is only output as the version 2022.1.
Thought??
Best regards,
Ryan.
Thank you for your quick response.
And where do i need to put this in \depthai-experiments\gen2-yolo\device-decoding\mainapi.py file?? I tried it to add in the mainapi.py file. but it is not working. So i need you some more help.
<the code i would like to put>
pipeline.setOpenVINOVersion(dai.OpenVINO.Version.VERSION_2022_1)
Best regards,
Ryan.
Hi jakaskerl
Then i did that. but it is not working.
PS C:\Users\ryan\depthai-experiments\gen2-yolo\device-decoding> python main_api.py -m bestopenvino_2022.1_6shave.blob -c best.json
{'classes': 2, 'coordinates': 4, 'anchors': [10.0, 13.0, 16.0, 30.0, 33.0, 23.0, 30.0, 61.0, 62.0, 45.0, 59.0, 119.0, 116.0, 90.0, 156.0, 198.0, 373.0, 326.0], 'anchor_masks': {'side52': [0, 1, 2], 'side26': [3, 4, 5], 'side13': [6, 7, 8]}, 'iou_threshold': 0.5, 'confidence_threshold': 0.5}
No blob found at best__openvino_2022.1_6shave.blob. Looking into DepthAI model zoo.
Downloading C:\Users\ryan\.cache\blobconverter\best__openvino_2022.1_6shave.blob_openvino_2021.4_6shave.blob...
Model best__openvino_2022.1_6shave.blob not found in model zoo
Conversion failed due to 400 Client Error: BAD REQUEST for url: https://blobconverter.luxonis.com/compile?version=2021.4&no_cache=False
Trying to find backup... (model="best__openvino_2022.1_6shave.blob", shaves="6", version="2021.4")
Unable to fetch model from backup server due to: 404 Client Error: Not Found for url: https://artifacts.luxonis.com/artifactory/blobconverter-backup/blobs/best__openvino_2022.1_6shave.blob_openvino_2021.4_6shave.blob
Traceback (most recent call last):
File "C:\Users\ryan\AppData\Local\Programs\Python\Python39\lib\site-packages\blobconverter\init.py", line 341, in from_zoo
return compile_blob(name, req_data=body, \*\*kwargs)
File "C:\Users\ryan\AppData\Local\Programs\Python\Python39\lib\site-packages\blobconverter\init.py", line 322, in compile_blob
response.raise_for_status()
File "C:\Users\ryan\AppData\Roaming\Python\Python39\site-packages\requests\models.py", line 953, 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
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\ryan\depthai-experiments\gen2-yolo\device-decoding\main_api.py", line 57, in <module>
nnPath = str(blobconverter.from_zoo(args.model, shaves = 6, zoo_type = "depthai", use_cache=True))
File "C:\Users\ryan\AppData\Local\Programs\Python\Python39\lib\site-packages\blobconverter\init.py", line 354, in from_zoo
response.raise_for_status()
File "C:\Users\ryan\AppData\Roaming\Python\Python39\site-packages\requests\models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://artifacts.luxonis.com/artifactory/blobconverter-backup/blobs/best__openvino_2022.1_6shave.blob_openvino_2021.4_6shave.blob
PS C:\Users\ryan\depthai-experiments\gen2-yolo\device-decoding>
Best regards,
Ryan.
I think that in your code, there is some hardcoded with 2021.4 now.
Look at below.
And i did one more test. i changed the version of .blob from 2022.1 to 2021.4. And then run like below. Then it is working. I just changed the version name of .blob file and run with the version of 2021.4.
PS C:\Users\ryan\depthai-experiments\gen2-yolo\device-decoding> python main_api.py -m bestopenvino_2021.4_6shave.blob -c best.json
It seems the file name of 2022.1 is not working because in your code there is some hardcoded with 2021.4.
How do you think?
Best regards,
Ryan.
- Best Answerset by erik
RyanLee works for me. Please read docs first: https://github.com/luxonis/depthai-experiments/tree/master/gen2-yolo/device-decoding