how to get started with training image labeler?
3 views (last 30 days)
Show older comments
Hi everyone,
I'm a newbie to Matlab and I need to use "computer vision" for "trainCascadeObjectDetector". I have two options, either to use Cascade trainer or training image labeler app, which one is better? I tried to use training image labeler and I got .mat file exported after but I don't know what is the next step. any help will be appreciated!
When I clicked generate Matlab code I got the following code:
function importfile(fileToRead1)
%IMPORTFILE(FILETOREAD1)
% Imports data from the specified file
% FILETOREAD1: file to read
% Auto-generated by MATLAB on 29-Oct-2015 19:09:24
% Import the file
newData1 = load('appleSession-mat', fileToRead1);
% Create new variables in the base workspace from those fields.
vars = fieldnames(newData1);
for i = 1:length(vars)
assignin('base', vars{i}, newData1.(vars{i}));
end
When I run it I got the following error:
>> importfile
Not enough input arguments.
Error in importfile (line 9)
newData1 = load('appleSession-mat', fileToRead1);
0 Comments
Accepted Answer
Dima Lisin
on 29 Oct 2015
Hi Shahad,
If you use the Training Image Labeler app, once you are done labeling the objects, you have to click the "Export ROIs" button. The one with the "checkmark" icon. This will create a variable in your workspace called positiveInstances, which contains the image file names and the bounding boxes that you have labeled. This is one of the inputs into trainCascadeObjectDetector function.
Please see Label Images for Classification Model Training and Train a Cascade Object Detector tutorials for more information.
8 Comments
Dima Lisin
on 9 Apr 2016
data in the example comes from the .mat file, which the example loads. It must be a struct array containing image file names and bounding boxes. You can create it using Training Image Labeler app.
raed bou aram
on 2 Dec 2016
Hi Dima, I am also trying to do trainCascadeObjectDetector to detect blood capillaries ( 15 capillaries) , and use image processing to compare one by one with the same capilar (example: capilar one with capilar 1 centrifuged). Is this viable? any advice? thanks for helping and for this and future advice.
More Answers (0)
See Also
Categories
Find more on Computer Vision Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!