Question

I'm studying the Caltech101 computer vision dataset using Matlab..

I wanted to classify and train the images of caltech-101 using phow_caltech.m file

but there was a problem, I don't know how to change the categories...

these are what I did.

  1. setup lv_setup
  2. test version : vl_version verbose OK
  3. vl_demo OK
  4. make m_file phow_caltech101.m (copy)
  5. I downloaded caltech101 images at [here][2] by myself and copied to data/caltech-101
  6. >>phow_caltech101 (in command widnow)
    • I saw fixed example categories (BACKGROUND_Goole, Faces, Faces_easy, Leopards, Motobikes)

I've tried to change the example categories(BACKGROUND_Goole, Faces, Faces_easy, Leopards, Motobikes)

I want to use categories ( accordion, airplanes, anchor, ant in caltech-101)

I changed some codes of phow_caltech101.m but it didn't work...

plz give me some advice ... help me

I look forward to replying your mail or answer thank you~!

this is phow_caltech101 code

C:\VLFEAT\data\caltech-101 ( there are many image folders )

conf.calDir = 'data/caltech-101' ; ( I changed like this in phow_caltech101.m file)

Was it helpful?

Solution

From the help header to phow_caltech101:

The program can also be used to train a model on custom data by pointing CONF.CALDIR to it. Just create a subdirectory for each class and put the training images there. Make sure to adjust CONF.NUMTRAIN accordingly.

Create a folder (say 'data/myclasses') containing the new classes (image collections) and have conf.caldir point to it, in phow_caltech101.m. That should be the first thing you change. There should be no need to change conf.prefiX if you are still putting the classes under data/.... but you need to adjust conf.numtrain to be the number of training sets you want to use.

caveat: my answer is based entirely on the documentation, I have not run the software.

Edit

Rather than attempt to run the script directly, start by trying to run the following lines at the matlab prompt, to check that you set up your folders correctly:

% the following line should contain the path to your data...
conf.calDir = 'data/caltech-101'; % <-- change this line if necessary

% make sure matlab finds the folder with your data
exist(conf.calDir, 'dir') % should return a "1"

% check the contents of the calibration data folder
classes = dir(conf.calDir)  

If the folder does not exist or the contents being listed as classes are incorrect you need to adjust conf.calDir or the location of your data.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top