Closed fricc33 closed 2 years ago
The URL for the ZIP reference is broken.
weight midas_v21-f6b98070.pt
command
python3 run.py --model_type midas_v21
input
output
Before exporting to ONNX, PyTorch cannot infer correctly.
Works for me here, maybe the script is not set for your image size. There is an image provided in the input folder, the result is in output, I run it like this:
python run.py -t midas_v21
also in the tf folder there is a script called run_tflite.py, which also works with the same image.
python run_tflite.py
I'm using Tensorflow 1.6.0
Let me know is you have any luck this way, thanks,
1. macOS
2. intel
3. openvino_2021.4.689
4. 1.6.0
5. NA
6. NA
7. NA
8. 1.10.1
9. Generated with make_onnx_model.py from the MiDaS GitHub distribution
10. python ~/intel/openvino_2021/deployment_tools/model_optimizer/mo.py --input_model midas_v21-f6b98070.onnx --output_dir openvino-onnx --data_type FP32
11. https://github.com/isl-org/MiDaS
12. See attached zip file
13. Issue Details
openvino2tensorflow crashes with a tensor size mismatch to the input of layer Add 24.
I could trace the issue to the convolution and group convolution pad management logic (lines 626 and 1687) Somehow the padding in the group convolution causes the output tensor to shrink by 2 pixels in both dimensions.
I don't have a fix, except that commenting out the code that introduces the padding allows the model to be generated, although the model will produce erroneous results.
I attach a zip file with the MiDaS distribution with all the ingredients to reproduce the issue: Run the openvino2tensorflow_crash.sh script in the unzipped directory. You will have to populate the weights directory with midas_v21-f6b98070.pt, and modify the script with the path to your OpenVINO distribution. Thank you very much for your great code and for your help :)