Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customized yolov8-pose model, and the number of key points mask data is not equal to 56 #833

Open
ccl-private opened this issue Oct 24, 2024 · 0 comments

Comments

@ccl-private
Copy link

I have trained a custom key-points model, which causes 'mask' data to be not 56. so I modified two places. First assert classes_masks_out == custom_num; Second, post_processing_steps Split(num_outputs=3, axis=1, splits=[4, 1, custom_num]).
But when running it, it reported an error. Here is the output log:
Updating model with jpg/png image bytes as input.
Adding pre/post processing to the model...
Updating model ...
Pre/post proceessing added.
Updated model saved.
Running the model to validate output using /slow_disk/ccl/data/goji_pose/data/2024-10-14 095626.jpg.
Traceback (most recent call last):
File "/slow_disk/ccl/codes/yolo_custom/onnx_core_goji.py", line 373, in
_run_inference(updated_model_path, args.input, args.output_image is not None, args.test_image, rgb_layout)
File "/slow_disk/ccl/codes/yolo_custom/onnx_core_goji.py", line 240, in _run_inference
session = ort.InferenceSession(str(onnx_model_path), providers=providers, sess_options=session_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/slow_disk/ccl/codes/yolo_custom/.venv/lib/python3.11/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 419, in init
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "/slow_disk/ccl/codes/yolo_custom/.venv/lib/python3.11/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 491, in _create_inference_session
sess.initialize_session(providers, provider_options, disabled_optimizers)
onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Node (post_process_57) Op (Reshape) [ShapeInferenceError] Invalid position of 0.

@ccl-private ccl-private changed the title Customized yolov8-pose model, and the number of key points is not equal to 56 Customized yolov8-pose model, and the number of key points mask data is not equal to 56 Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant