GithubHelp home page GithubHelp logo

cloud-cv / object-proposals Goto Github PK

View Code? Open in Web Editor NEW
173.0 34.0 94.0 357.25 MB

Repository containing wrapper to obtain various object proposals easily

MATLAB 49.35% C++ 43.60% Perl 0.01% M 0.02% C 4.04% Makefile 0.02% CMake 0.81% Shell 0.14% Objective-C 0.36% Python 1.63% Limbo 0.01%

object-proposals's Introduction

Object Proposals

This is a library/API which can be used to generate bounding box/region proposals using a large number of the existing object proposal approaches. If you use use our library, please cite our paper:

@misc{1505.05836,
    Author = {Neelima Chavali and Harsh Agrawal and Aroma Mahendru and Dhruv Batra},
    Title = {Object-Proposal Evaluation Protocol is 'Gameable'},
    Year = {2015},
    Eprint = {arXiv:1505.05836},
}
  • It is fully supported on Linux and partially supported on Mac OS.
  • Rigor, Randomized Prim are NOT supported on Mac OS.
  • Rigor requires installation of boost, tbb libraries.
  • Geodesic Object Proposals require c++11 compiler (C++ 4.7 or higher) and eigen (3.2 or higher).

Compiling

  1. Run compile.m

Generating Proposals

  1. Copy over config.json.example to config.json and set imageLocation and outputLocation.

  2. Initialize path variables.

initialize;
  1. Generate proposals, using either of the following commands.
proposals = runObjectProposals('<proposalname>', 'path\to\image.jpg');

OR 

im = imread('path\to\image.jpg');
proposals = runObjectProposals('<proposal name>', im);
  1. For long-running jobs, use the following command.
runObjectProposals('<proposalname>');

This will generate proposals for all the images in imageLocation and save the proposals in outputLocation.

<proposalname> is the object proposal to be run. List of possible object proposal names:

  • edgeBoxes [1]
  • endres [2]
  • mcg [3]
  • objectness [4]
  • rahtu [5]
  • randomPrim [6]
  • rantalankila [7]
  • selective_search [8]
  • rigor [9]
  • gop [10]
  • lpo [11]

Note

RIGOR requires boost and tbb libraries. Please follow the instructions given here to setup these libraries.

Evaluating Proposals

A ground truth file needs to be generated for the dataset. We have provided the file for PASCAL 2007 test set. The following code assumes you have generated proposals for all images in the dataset for which you want to evaluate for each proposal in your config.json file.

Evaluation using recall curves & area under recall curves

  1. Load ground truth.
testset=load('evaluation-metrics/data/pascal_gt_data.mat');
  1. Generate best recall candidates.
compute_best_recall_candidates(testset,configjson,'<proposalame>'); 

'proposalname' is an optional argument. If not provided, the function works for all the object proposals listed above.

  1. Plot RECALL/AUC curves.
evaluateMetricForProposal('RECALL','<proposalname>');
evaluateMetricForProposal('AUC','<proposalname');

OR

evaluateMetricForProposal('RECALL');   
evaluateMetricForProposal('AUC');

Evaluation using ABO curves

  1. Load ground truth.
testset=load('evaluation-metrics/data/pascal_gt_data.mat');
  1. Generate best recall candidates.
compute_abo_candidates(testset,configjson);
  1. Plot ABO curve.
evaluateMetricForProposal('ABO', '<proposalname');

OR

evaluateMetricForProposal('ABO');

Possible Issues

Linux

  • While running runObjectProposals('mcg'), you may get an error like
    Invalid MEX-file 'path/to/ucm_mean_pb.mexa64': /matlab/path/to/libstdc++.so.6: version GLIBCXX_3.4.15' not found. This issue is explained here. Possible workaround is to start MATLAB with "LD_PRELOAD=/path/to/libstdc++.so.6 matlab". Replace /path/to/libstdc++.so.6 with the system install location for libstdc++, usually something like /usr/lib/x86_64-linux-gnu/libstdc++.so.6.

License

The original license for each object proposal has been retained in their respective folders. Please refer to individual license before using the specific object proposal.

Citations

This package contains various object proposal implementations of the algorithms presented in the following papers. If you are using object proposals presented in these papers, we request you to cite appropriate papers:

[1] EdgeBoxes:

@inproceedings{ZitnickECCV14,
    Author = {C. Lawrence Zitnick and Piotr Dollar},
    Title = {Edge Boxes: Locating Object Proposals from Edges},
    Booktitle = {ECCV},
    Year = {2014},
}

License: edgeBoxes/releaseV3/license.txt (MICROSOFT RESEARCH LICENSE TERMS)

[2] Endres - Category Independent Object Proposals:

@article{EndresPAMI14,
    Author = {Ian Endres and Derek Hoiem},
    Title = {Category-Independent Object Proposals with Diverse Ranking},
    Journal ={IEEE Transactions on Pattern Analysis and Machine Intelligence},
    volume = {36},
    number = {2},
    issn = {0162-8828},
    year = {2014},
    pages = {222-234},
}

License: endres/proposals/README (GNU General Public License)

[3] MCG - Multiscale Combinatorial Grouping:

@inproceedings{Arbelaez_CVPR14,
    Author = {Arbel\'{a}ez, P. and Pont-Tuset, J. and Barron, J. and Marques,F. and Malik, J.},
    Title = {Multiscale Combinatorial Grouping},
    Booktitle = {CVPR},
    year = {2014}
}

License: mcg/MCG-Full/license.txt (BSD)

[4] Objectness:

@article{AlexePAMI12,
    Author = {Alexe, Bogdan and Deselaers, Thomas and Ferrari, Vittorio},
    Title = {Measuring the objectness of image windows },
    Journal ={IEEE Transactions on Pattern Analysis and Machine Intelligence},
    year = {2012},
}

License: objectness-release-v2.2/LICENSE.txt (rights to use, copy, modify, merge and distribute)

[5] Rahtu:

@inproceedings{RahtuICCV11,
    author    = {Esa Rahtu and Juho Kannala and Matthew B. Blaschko},
    title     = {Learning a category independent object detection cascade},
    booktitle = {ICCV},
    year      = {2011},
}

License: rahtu/rahtuObjectness/Licence.txt (MIT license)

[6] Randomized Prims:

@inproceedings{ManenICCV13,
     author = {Manen, Santiago and Guillaumin, Matthieu and Gool, Luc Van},
     title = {Prime Object Proposals with Randomized Prim's Algorithm},
     booktitle = {ICCV},
    year = {2013},
}

License: randomizedPrims/rp-master/LICENSE.txt (rights to use, copy, modify, merge and distribute)

[7] Rantalankila:

@inproceedings{RantalankilaCVPR14,
    author = {Rantalankila, Pekka and Kannala, Juho and Rahtu, Esa},
    title = {Generating Object Segmentation Proposals using Global and Local Search},
    booktitle = {CVPR},
    year = {2014}
}

License: rantalankilaSegments/Readme.txt (GNU General Public License)

[8] Selective Search:

@article{UijlingsIJCV13,
    author = {J.R.R. Uijlings and K.E.A. van de Sande and T. Gevers and A.W.M. Smeulders},
    title = {Selective Search for Object Recognition},
    journal = {International Journal of Computer Vision},
    year = {2013},
    url = {http://www.huppelen.nl/publications/selectiveSearchDraft.pdf}
}

License: selective_search/License.txt (Copyright University of Amsterdam)

[9] rigor:

@inproceedings{HumayunCVPR14,
     author    = {Ahmad Humayun and Fuxin Li and James M. Rehg},
     title = {RIGOR- Recycling Inference in Graph Cuts for generating Object Regions},
     booktitle = {CVPR},
     year = {2014}
    }

License: rigor/rigor_src/LICENSE (GNU General Public License)

[10] Geodesic Object Proposals:

@inproceedings{DBLP:conf/eccv/KrahenbuhlK14,
  author    = {Philipp Kr{\"{a}}henb{\"{u}}hl and
               Vladlen Koltun},
  title     = {Geodesic Object Proposals},
  booktitle = {Computer Vision - {ECCV} 2014 - 13th European Conference, Zurich,
               Switzerland, September 6-12, 2014, Proceedings, Part {V}},
  pages     = {725--739},
  year      = {2014}
}

License: BSD

[11] Learning to Propose Objects:

@inproceedings{kk-lpo-15,
  author    = {Philipp Kr{\"{a}}henb{\"{u}}hl and
               Vladlen Koltun},
  title     = {Learning to Propose Objects},
  booktitle = {CVPR},
  year      = {2015},
}

License: BSD

[12] Evaluation Metrics:

@inproceedings{HosangBMVC14,
    author = {J. Hosang and R. Benenson and B. Schiele},
    title = {How good are detection proposals, really?},
    booktitle = {BMVC},
    year = {2014}
}

License: evaluation-metrics/LICENSE (GNU General Public License)

object-proposals's People

Contributors

abhshkdz avatar akashdeepgoel avatar aroma123 avatar ashwinkalyan avatar dbatra1 avatar dexter1691 avatar dushyantadhyani avatar jponttuset avatar nchavali avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

object-proposals's Issues

Index exceeds matrix dimensions.

While executing C:...\Objectness Code\object-proposals-master\endres\proposals\generate_proposals.m, I'm getting the following error:

Index exceeds matrix dimensions.

Error in MR8fast (line 44)
n2 = MR8filterNorm(n);

Error in MRS4fast (line 3)
[featvec] = MR8fast(im);

Error in getTextonImage (line 6)
feat = single(MRS4fast(imfilter(im, fspecial('gaussian', 3, 1))));

Error in processIm2ColorTexture (line 10)
textonim = uint16(getTextonImage(im, textonNodes));

Error in generate_proposals (line 63)
[image_data.textonim, image_data.colorim] = processIm2ColorTexture(im, col, tex);

config changes

mcg config is missing root_dir. we need it mcg.params.

Failed at initialize: Field assignment to a non-structure array object

I got the following error at step 2 "initialize path variables" on Matlab R2016b 64-bit and Ubuntu 16.04 64-bit.

Added json encoder/decoder to the path
-- Successful installation of MCG. Enjoy! --
Field assignment to a non-structure array object.

Error in spagglom_options (line 7)
opts.seg_method = 'slic'; % 'felz', 'slic' or 'qshift'. Two first recommended


Error in initialize (line 50)
spagglom_options;

I tried to check the variable opts, and got the following error:

readonly
The P-code file .../object-proposal-master/randomizedPrims/rp-master/evaluation/xml_toolbox/strsplit.p was generated prior to MATLAB version 7.5 (R2007b) and is no longer supported. Use <a href="matlab:doc pcode">pcode</a> to regenerate the file using MATLAB R2007b or later. 
workspacefunc
350

Not quite sure what's going on, can somebody help and explain a little bit? Thanks.

vlfeat issues

There seems to be something wrong with the vlfeat setup needed for rantalankila segments. If I use a sared VLfeat version , it works, if I use the version shipping with this library it doesnt work.

Segmentation Proposals

The segmentation-based proposal methods (MCG, ratalankila) don't have an option to get the segmentation proposals directly instead of bounding boxes.

Error when running rigor

I tried running rigor on a single image. I get this error: Latha will look into it..
... _Error running calcrigorForIm_*****
Undefined function 'bk_dynamicgraphs_mex' for input arguments of type 'double'.

Error in GraphProcessor/multiseed_param_min_st_cut (line 70)
[all_cuts, meta_info] = bk_dynamicgraphs_mex(nonlambda_s, ...

Error in GraphProcessor/generate_mincut_segments (line 35)
[partitions, lambdas, seed_mapping, mincut_vals, t_pmc_all, ...

Error in Segmenter/compute_segments (line 46)
[curr_segments] = generate_mincut_segments(gp_obj);

Error in rigor_obj_segments (line 203)
compute_segments(seg_obj);

Error in calcrigorForIm (line 10)
[masks]=rigor_obj_segments(im,'force_recompute',true);

Error in runObjectProposals (line 25)
varargout{1} = fh( imageInput, configjson.(char(proposalName)));
Error in runObjectProposals (line 4)
global configjson;

Output argument "varargout" (and maybe others) not assigned during call to
"/home/gneelima/work/code/test2/object-proposals/runObjectProposals.m>runObjectProposals".

Issues related to downloading

Hi Thanks for your effort on projects. But there are issues related to downloading. The downloading stops when it try to download aux file.. please check it. It tried it many times..

Running object proposal for a single image

Currently, the runObjectProposals accepts the proposalName and runs the specific object proposal for all the images in a given imageLocation.

We want to be able to run the object proposal for a single image.
Here is my suggestion:

  • Inside each object proposal, we create a function like
    function calc<ObjectProposalName>ForIm(config, im)

  • Inside this function, we write the same stuff as in the calc<ObjectProposalName> function starting with saving the specific object proposal config, checking if im is a string or an image, handle both the cases, and doing stuff written inside the for loop in calc<ObjectProposalName>.
  • Change the calc<ObjectProposalName> file so that the for loop basically calls the calc<ObjectProposalName>ForIm function instead of repeating code

About the fully and densely annotated dataset for evalution

Hi, all
The paper of this project has metioned that there is a fully and densely annotated dataset for evalution. I find under the /evaluation-metrics/data/ there are two groundtruth files of pascal_voc. However, the two one is the same. I wonder how I can get the new annoationed groundtruth of the pascal voc dataset.
Thanks !

Reference to non-existent fields/Undefined functions

I'm trying to test a few of these methods using Ubuntu 16.04 and Matlab R2016a, but most of the methods are throwing errors.

The 'edgeBoxes' method runs to completion and gives reasonable-looking results. Everything else fails:

randomPrim gives: Reference to non-existent field 'rSeedForRun'
mcg gives: Undefined function 'imResampleMex' for input arguments of type 'uint8'
endres gives: Error running calcendresforIm: Attempt to execute SCRIPT anigauss as a function:

etc etc. The errors seem so varied that I have a hard time believing they all share a single root cause, but the fact that one of the methods works makes me think that I've installed the package correctly.

Any idea what's going on here?

I had to manually install gcc-4.7 and g++-4.7 to get compile.m to run without errors, by the way.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.