Hi,

We are converting our yolov5 model with your tool (http://tools.luxonis.com/).

There is option to convert it with openvino 2021.4. But the openvino of using 2021.4 is not working. it is no matter setting or not. only converted with 2022.1. So there is some issue

\depthai-experiments\gen2-yolo\device-decoding > python main_api.py -m bestopenvino_2022.1_6shave.blob -c best.json

Below is the error message. And i changed the name of .blob file from 2022.1 to 2021.4 then. it is working now.


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>

    Hi RyanLee
    It looks to me the blob path was incorrectly specified when using the 2021.4 blob.

    Thoughts?
    Jaka

      jakaskerl

      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.

        Hi RyanLee
        You can set the desired openVINO version using: pipeline.setOpenVINOVersion(dai.OpenVINO.Version.VERSION_2021_3)if you think that's causing the issue you are experiencing.

        Thanks,
        Jaka

          jakaskerl

          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 RyanLee
            Main_api.py file right after the pipeline is instantiated. This would be line 63.
            Let me know if it works. If it doesn't, what errors are you getting?

            Thanks,
            Jaka

              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.

                Hi RyanLee
                I still think you are incorrectly specifying the blob path.

                Note this:

                RyanLee No blob found at best__openvino_2022.1_6shave.blob. Looking into DepthAI model zoo.

                Can you check please?

                Thanks,
                Jaka

                  jakaskerl

                  I think that in your code, there is some hardcoded with 2021.4 now.

                  Look at below.

                  https://artifacts.luxonis.com/artifactory/blobconverter-backup/blobs/best__openvino_2022.1_6shave.blob_openvino_2021.4_6shave.blob

                  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.

                  • erik replied to this.

                    Hi RyanLee ,
                    It can't find the given path name, so it tries to download the blob from the backup. Could you share the .zip downloaded from the tools.luxonis.com (should contain json, bin & xml, blob)?
                    Thanks, Erik

                      erik

                      Hi Erik,

                      Here is the output from tools.luxonis.com.

                      Best regards,

                      Ryan.

                      • erik replied to this.

                        erik

                        Thanks, Erik, it is working now. I just checkout sourse again and it is work. it seems my source was too old for it. Thoutht?? anyway it is working fine now. Thanks.