ultralytics / ultralytics

NEW - YOLOv8 🚀 in PyTorch > ONNX > OpenVINO > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
29.06k stars 5.74k forks source link

Regarding the object detection model of yolov8, the problem that occurs when deploying in C++ with openvino #15862

Open a867e opened 1 month ago

a867e commented 1 month ago

Search before asking

Question

When my code reaches the inference stage, it automatically exits. inferencerequest.infer(); I've tried multiple versions of openvino, and all of them have the same problem, and the terminal doesn't show a specific error. The model I passed in was able to read the types and shapes of the inputs and outputs normally. image

Additional

No response

Y-T-G commented 1 month ago

You can put it in a try...catch block

a867e commented 1 month ago

You can put it in a try...catch block I've tried before, but the terminal still doesn't return a specific error message image

Y-T-G commented 1 month ago

You can run it in Visual Studio with breakpoint on exceptions enabled.

a867e commented 1 month ago

You can run it in Visual Studio with breakpoint on exceptions enabled. image

glenn-jocher commented 1 month ago

@a867e thank you for trying that. Please ensure you are using the latest version of the Ultralytics package and OpenVINO. If the issue persists, consider running your code in Visual Studio with breakpoints on exceptions enabled to capture more detailed error information.

a867e commented 1 month ago

I downloaded the latest code, and I tried the latest version of openvino and the previous version, and the problem was the same as before

glenn-jocher commented 1 month ago

@a867e thank you for updating us. Please ensure that your environment variables and dependencies are correctly set up for OpenVINO. If the issue persists, consider running your code with detailed logging enabled to capture more specific error information.

Y-T-G commented 1 month ago

You can try moving inference_request_ from private to public

https://github.com/ultralytics/ultralytics/blob/a222b94897fe15b121615fe4b626e46c98c66588/examples/YOLOv8-OpenVINO-CPP-Inference/inference.h#L38

a867e commented 1 month ago

You can try moving inference_request_ from private to public

https://github.com/ultralytics/ultralytics/blob/a222b94897fe15b121615fe4b626e46c98c66588/examples/YOLOv8-OpenVINO-CPP-Inference/inference.h#L38 Unfortunately, the program still exits automatically when it reaches the inference section

Y-T-G commented 1 month ago

Maybe move everything to public.

a867e commented 1 month ago

Maybe move everything to public.

It's still not okay to move all to public

glenn-jocher commented 1 month ago

@a867e thank you for the update. Please ensure that all dependencies and environment variables are correctly configured for OpenVINO. If the issue persists, consider enabling detailed logging to capture more specific error information.