-
-
Notifications
You must be signed in to change notification settings - Fork 55.6k
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
Improved classification sample #25519
base: 5.x
Are you sure you want to change the base?
Improved classification sample #25519
Conversation
sync 5.x
samples/dnn/classification.cpp
Outdated
"{ backend | default | Choose one of computation backends: " | ||
"default: automatically (by default), " | ||
"inference_engine: Intel's Deep Learning Inference Engine (https://software.intel.com/openvino-toolkit), " | ||
"openvino: OpenCV implementation, " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's wrong line.
if (parser.has("input")) { | ||
string input = parser.get<String>("input"); | ||
|
||
if (input.find('.')==string::npos) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be network stream. I propose always use VideoCapture. It supports sequence of images too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asmorkalov
VideoCapture does support sequences of images, but it expects them to be in a numerically ordered format (e.g., image1.jpg, image2.jpg). It cannot handle images with unordered prefixes (e.g., ab.jpg, bc.jpg, xyz.jpg). For cases where images are not named in a numerical sequence, this was implemented to read and process these images from a directory.
samples/dnn/common.hpp
Outdated
{"default", 0}, | ||
{"inference_engine", 1}, | ||
{"openvino", 2}, | ||
{"vkcom", 3}, | ||
{"cuda", 4}, | ||
{"webnn", 5} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not OpenCV constants?
#25006 #25314
This pull requests replaces the caffe model for classification with onnx versions. It also adds resnet in model.yml.
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.