0

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)

  • "but it didn't work" is not very informative. If you want advice given that little info? Try harder. –  Aug 12 '13 at 03:19
  • "it didn't work" meaning is not thing has changed, actually I changed conf.numClasses numbers and conf.prfix but it still appears the example categories(BACKGROUND_Goole, Faces, Faces_easy, Leopards, Motobikes), I want to change the categories... – Jang_Hyunwoong Aug 12 '13 at 03:49

1 Answers1

1

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.

Buck Thorn
  • 5,024
  • 2
  • 17
  • 27
  • C:\VLFEAT\data\caltech-101 ( there are many image folders ), conf.calDir = 'data/caltech-101' ; ( I changed like this in phow_caltech101.m file) and I want to use categories ( accordion, airplanes, anchor, ant in caltech-101) – Jang_Hyunwoong Aug 13 '13 at 02:49
  • @Jang_Hyunwoong I added a comment to my answer that might help... – Buck Thorn Aug 13 '13 at 15:38
  • really appreciate your answer~! but there are problems... as you said I changed my folder name 'C:\VLFEAT\data\Caltech' and I've being changed line by line... could you send your e-mail address? I want to show my situation with pictures...thank you – Jang_Hyunwoong Aug 14 '13 at 00:53