- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have been trying to run the hello_classification example in my C++ project
I have managed to get it to compile and take in the model as well as network.
I am now receiving this error: "Batch size should be equal to the number of images."
It does not let me know what line in "hello_classification", main.cpp would provide this error, what does it mean?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Heads up, I am providing hello_classification the cv::Mat directly in `Blob::Ptr imgBlob = wrapMat2Blob(image);`
rather than using `cv::Mat image = imread_t(input_image_path);`
(Which means that I am calling `ClassificationResult_t classificationResult(output);` instead of
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Adammpolak,
Thank you for reaching out to us and thank you for using the OpenVINO™ toolkit!
Are you using the latest version of the OpenVINO™ toolkit to run the hello_classification example in your C++ project?
Based on the latest version of the OpenVINO™ toolkit, the error you encountered: “Batch size should be equal to the number of images” was caused by the “classification_results.h” file from line 129 to line 131.
For your information, a different version of the OpenVINO™ toolkit, the error will be caused by the same file as well. But the lines that cause the error will differ.
The “classification_results.h” file is located under the following directory:
<INSTALL_DIR>\inference_engine\samples\cpp\common\utils\include\samples\ classification_results.h
Hope it helps.
Regards,
Wan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Adammpolak,
Thank you for your question.
This thread will no longer be monitored since we have provided a solution.
If you need any additional information from Intel, please submit a new question.
Regards,
Wan
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page