Closed YenchungChen closed 3 years ago
Thank you for posting a very clear issue.
The slice position is misaligned because it is difficult to mechanically identify the axis of a 3D slice. This is a specification of the tool.
There are two ways to solve this problem.
Depending on the complexity of the model structure, you can choose the simpler of the above two. Since this issue is likely to be simple, requiring only the deletion of a few layers at the end of the model, I will show the steps for 1.
The red frame in the figure below is almost a pointless process, so I manually processed the XML file and removed it. Please compare gaze-estimation-adas-0002.xml
and gaze-estimation-adas-0002_org.xml
to see how to edit them. You can easily optimize the structure by simply modifying the connection information between layers.
:
Structure of the XML file after editing (gaze-estimation-adas-0002.xml)
Structure of tflite after conversion (from gaze-estimation-adas-0002.xml)
I've exercised both ways and they work like magic. Really appreciate for the fast reply and clear explanation. Hope everyone enjoys this tool as much as I do.
1. OS you are using: Ubuntu 18.04
2. OS Architecture: x86_64
3. Version of OpenVINO: 2021.4
4. Version of TensorFlow: v2.3.0
5. Version of openvino2tensorflow: v1.17.3
5. Download URL for OpenVINO IR (.bin/.xml) model https://download.01.org/opencv/2021/openvinotoolkit/2021.2/open_model_zoo/models_bin/3/gaze-estimation-adas-0002/FP32/
6. Issue Details
I'm converting an identical model mentioned in this closed issue. The issue above is solved and the converted model from PINTO_model_zoo works fine.
Although the correct converted model is provided by author in the above link, I tried to convert it through openvion2tensorflow. Following are the visualization of the IR model (.xml) and the corresponding TFLite model (converted by openvino2tensorflow): IR model
TFLite model
The output shape of StridedSlice in TFLite model is (1, 1, 1).