Convex Learning from Partial Labels Toolbox (matlab/C++)

Main author: Timothee Cour, NEC Labs. Contributors: Ben Sapp, Ben Taskar, University of Pennsylvania.

License
This software is made publicly for research use only. It may be modified and redistributed under the terms of the GNU General Public License; this notice must be included. This software packages liblinear whose copyright is included in the code.

Please cite the following source code and paper if you use it in your work:
[Learning from Ambiguously Labeled Images. Timothee Cour, Ben Sapp, Chris Jordan, Ben Taskar. IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), 2009]
[Convex Learning from Partial Labels Toolbox. Timothee Cour, Ben Sapp, Ben Taskar.]

Description
This code demonstrates the convex learning formulation from partial label presented in the above paper. It can use the Annotated Faces on TV dataset or your own data. Please cite the dataset  if you use it in your work:
[Annotated faces in TV dataset. Timothee Cour, Ben Sapp, Ben Taskar.]


Super simple matlab script to download/unpack/compile&run code and data
The matlab script below (it contains unix/mac specific code at the beginning) will download code and data under the directory: ~/temp/ambiguous/.
Simply paste the following into matlab command prompt. That's it !
Alternatively (for example on windows), you can do this manually by downloading the code here: partial_label_learning_toolbox.tar.gz.


        dir_data='~/temp/ambiguous/tv_data';
        dir_base='~/temp/ambiguous/';
        url='http://www.seas.upenn.edu/~timothee/tv_data/partial_label_learning_toolbox.tar.gz';
        fun_curl_and_unzip=@(url,dir_base)(dos(['cd ',dir_base,'; curl ',url,' | tar -zx']));
        fun_curl_and_unzip(url,dir_base);
       
        %% download data
        url='http://www.seas.upenn.edu/~timothee/tv_data/tv_data.tar.gz';
        fun_curl_and_unzip(url,dir_base);
       
        %% rename path
        filepath_code=fullfile(dir_base,'partial_label_learning_toolbox','demo_partial_label_learning.m');
        cd(fullfile(dir_base,'partial_label_learning_toolbox'));
        util_funs.change_path_in_file(filepath_code,'/Users/timothee/research/data/hand_labels/annotated_movie_faces/tv_data',dir_data);
       
        %% do the following only once to compile mex files, including liblinear:
        compileDir();
        compile_mex_liblinear();
       
        %% run the demos
        % run demo for ambiguous faces in the wild with random ambiguity sets
        demo_partial_label_learning.test_fiw();
        % run demo for ambiguous faces in TV with random ambiguity sets
        demo_partial_label_learning.test_faces_tv();
        % run demo for ambiguous faces in TV with ambiguity sets computed from screenplay
        demo_partial_label_learning.test_faces_tv_with_screenplay();