Download MATLAB Toolbox for the LabelMe Image Database
Download the image library using the MATLAB Toolbox Toolkit
First, download the MATLAB Toolbox Toolkit 1. Github Repository
We maintain the latest version of the Toolbox on GitHub. To pulling the latest version, make sure this "git" is installed on your machine and then run "Git clone Https://github.com/C Sailvision/labelmetoolbox.git "on the command line. You can refresh your copy to the latest version by running "Git pull" from inside the project directory. 2. Zip file
The zip file is a snapshot of the latest source code on GitHub.
Second, download the image Library Download the Dataset
There is ways to work with the dataset: (1) downloading all the images via the LabelMe Matlab Toolbox. The toolbox would allow your to customize the portion of the database so want to download, (2) Using the images online via the LabelMe Matlab Toolbox. This option was less preferred as it would be slower, but it would allow you to explore the dataset before downloading it. Once you are installed the database, you can use the LabelMe Matlab Toolbox to read the annotation files and query the IM Ages to extract specific objects. Option 1:customizable Download using the LabelMe Matlab Toolbox
Before downloading the dataset, we only ask you to label some images using the annotation tool online. Any new labels that's you'll add, would be inmediately ready for download.
Step 1: Download the LabelMe Matlab Toolbox and add the Toolbox to the MATLAB path.
Step 2: The function Lminstall'll download the database. There is three ways to use this function:to download the entire dataset, type the following into Matlab:
homeimages = '/desired/path/to/images ';
homeannotations = '/desired/path/to/annotations ';
Lminstall (Homeimages, homeannotations);
where "/desired/path/to/" is the desired location where the annotations and images would be stored.
This process would create the following directory structure under "/desired/path/to/":
./annotations
. Annotations/folder1 ...
. /annotations/foldern
./images.
/images/folder1 ...
. /images/foldern
where Folder1 through Foldern is directories containing the Images and annotations.
If you are want to download a list of specific folders and then run:
homeimages = '/desired/path/to/images ';
homeannotations = '/desired/path/to/annotations ';
Folderlist = {' 05june05_static_street_porter '};
Lminstall (Folderlist, Homeimages, homeannotations);
This would download only one folder from the collection. You can see the complete list of folders here. If you already has the dataset but want to update the annotations, then use Lminstall with four arguments:
Lminstall (folders, images, homeimages, homeannotations);
Option 2:access The online database directly with the LabelMe Matlab Toolbox
Before downloading the dataset, we only ask you to label some images using the annotation tool online. Any new labels that's you'll add, would be inmediately ready for download. If you use the LabelMe Matlab Toolbox, it isn't necesary to download the database. You can use the online images and annotations in the same, as if they were on your local hard drive. This might is slow, but it'll let you explore the database before downloading it. If you plan to use the database extensively, it's better to download a local copy for yourself. Here is a few Matlab commands that show how to use the online database:
homeimages = ' http://people.csail.mit.edu/brussell/research/LabelMe/Images ';
homeannotations = ' http://people.csail.mit.edu/brussell/research/LabelMe/Annotations ';
D = Lmdatabase (homeannotations); % this would build an index, which would take few minutes.
% now you can visualize the images
lmplot (D, 1, homeimages);
% Or read an image
[annotation, img] = Lmread (D, 1, homeimages);
You can query the database to select the images-want and install only those ones. For instance, if you is interested only with images containing cars, you can run the following:
% first create the list of images that want:
[q,j] = Lmquery (D, ' object.name ', ' car ');
Clear Folderlist filelist for
i = 1:length (Q);
Folderlist{i} = Q (i). Annotation.folder;
Filelist{i} = Q (i). Annotation.filename;
End
% Install The selected images:
homeimages = '/desired/path/to/images ';
homeannotations = '/desired/path/to/annotations ';
Lminstall (Folderlist, FileList, Homeimages, homeannotations);
Reference:
[1] http://labelme.csail.mit.edu/Release3.0/browserTools/php/matlab_toolbox.php
[2] http://labelme.csail.mit.edu/Release3.0/browserTools/php/dataset.php