2025-01-14 03:16 AM - last edited on 2025-01-14 03:17 AM by Andrew Neil
Hello everyone,
I am encountering issues while using the X-Cube-AI tool to analyze two models that I recently resized and reduced. Despite thorough testing and troubleshooting, I cannot resolve the errors, and I hope someone here might provide insight.
Model Behavior in Python:
Troubleshooting Steps Taken:
anchornet.onnx:
pointnet.onnx:
While the second error provides slightly more detail, it remains unclear where or how this mismatch occurs in the model.
I feel like I’ve tried everything I can think of. Is there a chance someone could help me identify what’s going wrong or suggest next steps to debug this further?
Thanks in advance for any help or guidance!
2025-01-15 08:21 AM
Hello @casperbroch,
I have opened internal ticket to the team in charge of this. I wait for guidance.
They are probably bugs on our side. I will keep you updated.
For the pointnet.onnx, X-cube-AI does not like undefined channel size, which may cause the error. In your onnx, your input size is [nb_value_grasp,35,512]. Even when fixing the nb_value_grasps to 1, there are still layer with unknown size:
The code used to obtain the onnx in the screenshot:
import onnx
import onnxruntime
from onnxruntime.tools.onnx_model_utils import fix_output_shapes, make_dim_param_fixed
from onnx.tools import update_model_dims
import onnx
import onnxruntime
from onnxruntime.tools.onnx_model_utils import fix_output_shapes, make_dim_param_fixed
from onnx.tools import update_model_dims
model = onnx.load("pointnet.onnx")
make_dim_param_fixed(model.graph, param_name="n_valid_grasps", value=1)
fix_output_shapes(model)
# update_model_dims.update_inputs_outputs_dims(model, {"pointcloud": [1, 35, 512]}, {"pointnet_features": [1, "Reshapepointnet_features_dim_1"]})
model = onnx.shape_inference.infer_shapes(model)
onnx.save(model, "fixed_pointnet.onnx")
it seems that it is the constantOfShape that is introducing the unknown shape. If you manage to solve it, it may work with cubeAI. Another solution is to modify the model to create the mask (if I a not mistaken, it is what the middle branch of the graph is doing) in the init instead of the foward (if your are using pytorch).
In anyways, I also asked for this model, so I will tell you if we have a solution.
Have a good day.