Matlab detect() Function with alexnet

7 次查看(过去 30 天)
When I run the line:
[bbox, score, label] = detect(alex, img, 'MiniBatchSize', 32);
It says:
Undefined function 'detect' for input arguments of type 'SeriesNetwork'.
This is after loading the pre-trained network with:
alex = alexnet;
How can I use this pre-trained network for multiple object detection?

采纳的回答

Walter Roberson
Walter Roberson 2019-1-1
You are not using the correct sequence.
You need to create an RCNN Object Detector first. https://www.mathworks.com/help/vision/ref/trainrcnnobjectdetector.html . The first parameter to that needs to be ground truth information in the form of a table, and the second parameter can be 'alexnet'. Once you have created the RCNN Object Detector, you can detect() against it passing in an image; https://www.mathworks.com/help/vision/ref/rcnnobjectdetector.detect.html
  4 个评论
Jack Zimmerman
Jack Zimmerman 2019-1-2
I see, is there another method on matlab to learn object detection or if I decide to do object detection is using the ground truth object the only way?
Sorry for the many question but I have trouble navigating through the documentation well.
Walter Roberson
Walter Roberson 2019-1-2
In theory if you had a sequence of similar enough images, some of which had the object present and some of which had it absent, then by doing background subtraction you might be able to reduce the image elements enough to be able to deduce shape descriptors that could be used for object detection.
Hmmm....
Hypothetically, suppose you had several frames with a moving object in it and you know the object class. Now divide each frame into several windows and run classification on the window checking to see whether the window is classified as having that kind of object. As the object moves from one window to another, you can start doing background subtraction between object-is-present and object-is-not-present in particular windows, which could potentially permit you to isolate enough of the object shape to do future predictions in other windows.
If this hypothesis is correct then you would not need to know ahead of time what that kind of object looked like. You would not need to know the size, since you can try several different sizes of windows from larger to smaller until it stops being able to find the object through alexnet classification, at which point you know you have gone too small.
I do not know if anyone has ever investigated this... it might already be a known technique for all I know. Ah, looks like people have gone even further; see https://cv-tricks.com/object-detection/faster-r-cnn-yolo-ssd/

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by