how to get started with training image labeler?

6 次查看(过去 30 天)
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);

采纳的回答

Dima Lisin
Dima Lisin 2015-10-29
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.
  8 个评论
Dima Lisin
Dima Lisin 2016-4-9
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
raed bou aram 2016-12-2
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Computer Vision Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by