Matlab detect() Function with alexnet

조회 수: 7 (최근 30일)
Jack Zimmerman
Jack Zimmerman 2019년 1월 1일
댓글: Walter Roberson 2019년 1월 2일
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