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?
댓글 수: 0
채택된 답변
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
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 Center 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!