MATLAB: Matlab detect() Function with alexnet

alexnet

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?

Best Answer

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
Related Question