Still trying to figure out how to get YOLOv7 running on FFC-6P (RVC3). From https://discuss.luxonis.com/d/1565-compiling-model-for-rvc3-interpolate-node-has-unsupported-number-of-inputs-3/3, I need to use OpenVINO 2021.4 to get it to use the correct node for Resize, but now hitting a new issue when I run compile_tool:

root@keembay:~# /opt/openvino/tools/compile_tool/compile_tool -d VPUX.3400 -m ~/Downloads/yolov7-tiny.xml -ip U8            
OpenVINO Runtime version ......... 2022.1.0
Build ........... 2022.1.0-7080-6582ec65d78-releases/2022/1
Network inputs:
    images : u8 / [...]
Network outputs:
    output/sink_port_0 : f32 / [...]

Callback signal handler installed

Opening XLink Device File
error: ConvertShapeTo4D Pass failed : Tensors with rank > 4 are not supported
Compilation failed

The rank 5 tensors are at the end of the model:

I'm tempted to just drop those sigmoids but they look fairly important.

Any ideas on how to fix this? Is rank 5 supported in later version of OpenVINO?

    abroekhof

    Currently no clean and easy way, but we are working on exposing it.

    Currently the best approach is to use tools.luxonis.com -- this will generate a blob for RVC2, but in the ZIP it will also output the modified ONNX file. The ONNX file will contain additional sigmoid and layer names which we use for on-device decoding (parsing + NMS). So, after you get the ONNX file from tools, you can use the model optimizer in the same way as in our repository here:

    mo --input_model model.onnx \
            --output_dir output_dir \
            --model_name yolov7tiny \
            --data_type FP16 \
            --reverse_input_channels \
            --scale 255 \
            --output output1_yolov7,output2_yolov7,output3_yolov7

    Compiling the produced XML and bin with the blobconverter should give you a working blob that is compatible with the YoloDetectionNetwork node. We will expose a direct export for RVC3 through the tools repository in the future.