-
-
Notifications
You must be signed in to change notification settings - Fork 39
Problems converting midasnet continued #75
Comments
This tool has been upgraded to v1.22.2. cd tf
wget -O ../weights/midas_v21-f6b98070.pt \
https://github.com/AlexeyAB/MiDaS/releases/download/midas_dpt/midas_v21-f6b98070.pt
python make_onnx_model.py
python3 -m onnxsim midas_v21-f6b98070.onnx midas_v21-f6b98070.onnx
docker pull pinto0309/openvino2tensorflow:latest
docker run -it --rm \
-v `pwd`:/home/user/workdir \
pinto0309/openvino2tensorflow:latest
cd workdir
$INTEL_OPENVINO_DIR/deployment_tools/model_optimizer/mo.py \
--input_model midas_v21-f6b98070.onnx \
--data_type FP32 \
--output_dir openvino/FP32
openvino2tensorflow \
--model_path openvino/FP32/midas_v21-f6b98070.xml \
--model_output_path openvino-tflite \
--output_no_quant_float32_tflite
MiDaS uses a lot of |
Awesome! Thank you so much for your help and for your great tool. I had actually figured out myself as well what the issue was with the padding not being consumed. There is one more issue with MaxPool, which also allows for padding, see attached patch for a fix. Thanks again, cheers,
|
LGTM.
This tool has been upgraded to v1.22.3. The problem of degraded accuracy of MiDaS, which had been a problem for a long time, may have been resolved. Thank you. I would like to know what you can tell me in order to share your knowledge with other engineers. Can you tell me the inference time for the model generated by onnx-tensorflow and the approximate inference time for the model generated by openvino2tensorflow? |
Great, thanks!
|
1. OS you are using: macOS
2. OS Architecture: Intel
3. Version of OpenVINO: openvino_2021.4.689
4. Version of TensorFlow: 2.6.0
5. Version of TensorRT: NA
6. Version of TFJS: NA
7. Version of coremltools NA
8. Version of ONNX: 1.10.1
9. Download URL for ONNX model: generated
10. Download URL for OpenVINO IR: generated
11. URL of the repository from which the transformed model was taken: https://github.com/isl-org/MiDaS
12. URL or source code for simple inference testing code: see attached zip file
13. Issue Details
I'd like to try this again as a follow up to #74, I apologize for my lack of clarity in my previous submission. My original message is at the bottom.
I tried processing your image in my environment and it worked just fine:
Maybe the issue is with the model weights file? I downloaded mine (MiDaS v2.1 large) from:
https://github.com/AlexeyAB/MiDaS/releases/download/midas_dpt/midas_v21-f6b98070.pt
Following the link on https://github.com/isl-org/MiDaS
Please let me know how we can work together on this.
Thank you very much for your patience and help,
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.
Midas-vino-crash.zip
The text was updated successfully, but these errors were encountered: