Giter VIP home page Giter VIP logo

torrvision / objectness Goto Github PK

View Code? Open in Web Editor NEW
189.0 18.0 88.0 640 KB

BING Objectness proposal estimator linux/mac/windows version implementation, runs at 1000 FPS. More in http://mmcheng.net/bing/ and also http://www.robots.ox.ac.uk/~szheng/DepthProposals.html

Home Page: http://kylezheng.org/objectproposal/

License: BSD 3-Clause "New" or "Revised" License

C++ 77.20% C 21.19% Makefile 0.17% MATLAB 0.84% CMake 0.61%

objectness's Introduction

Objectness Proposal Generator with BING

License (3-Clause BSD)

BING Objectness proposal estimator Linux Ubuntu 14.04/Mac OSX Yosemite/iOS 8.1 version implementation, runs at 1000 FPS at a Dell 7600 workstation with Linux Ubuntu 14.04. sample

sample

INSTALL

To make this program running fast, you need to enable release mode:

cmake -DCMAKE_BUILD_TYPE=Release ../

DEMO

If you run this in Ubuntu 14.04 or other similar Linux system, feel free to change the path in main.cpp

DataSetVOC voc2007("YOUR_PATH_TO_THE_VOC2007DATA");

Notice that WinRecall.m is generated by this code, you do not need them. If you want to make this code working with other datasets, one simple solution is to make the folders similar to the VOC 2007 one.

Introduction

This is the 1000 FPS BING objectness linux version library for efficient objectness proposal estimator,We would appreciate if you could cite and refer to the papers below.

@inproceedings{BingObj2014,
  title={{BING}: Binarized Normed Gradients for Objectness Estimation at 300fps},
  author={Ming-Ming Cheng and Ziming Zhang and Wen-Yan Lin and Philip H. S. Torr},
  booktitle={IEEE CVPR},
  year={2014},
}
@inproceedings{depthobjectproposals_GCPR2015, 
author = {Shuai Zheng and Victor Adrian Prisacariu and Melinos Averkiou and Ming-Ming Cheng and Niloy J. Mitra and Jamie Shotton and Philip H. S. Torr and Carsten Rother}, 
title = {Object Proposal Estimation in Depth Images using Compact 3D Shape Manifolds}, 
booktitle = {German Conference on Pattern Recognition (GCPR)},
year = {2015} 
}

The original author Ming-Ming Cheng has already released the source code for windows 64-bit platform. In this library, we intend to release the code for the linux/mac/iOS users. You can maintain the code with Qt Creator IDE.

Please find the original windows code / FAQ / Paper from this link: http://mmcheng.net/bing/

FAQ

In order to make the code running as the original version in windows, you need to download the images/annotations PASCAL VOC 2007 data from the website. (http://host.robots.ox.ac.uk/pascal/VOC/voc2007/index.html#testdata)

We have tested the code, it produces the same accuracy results as the original windows version, while it runs at 1111 FPS(frame per second) at Ubuntu 12.04 with a Dell T7600 workstation computer, which has two Intel Xeon E5-2687W (3.1GHz, 1600MHz) and 64 GB 1600MHz DDR3 Memory.

Author Info

Author: Ming-Ming Cheng [email protected] Linux Author: Shuai Zheng (Kyle) [email protected] Please find more information from http://kylezheng.org/objectproposal/ Date: 19, February

objectness's People

Contributors

bittnt avatar dereyly avatar initialneil avatar mingmingcheng avatar usuyama 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

objectness's Issues

Content in the dataset catalog

Hi,I have a question about the VOC 2007 dataset.Can you tell me whether the training set and test set should be included separately under the VOC 2007 folder, or Annotations and ImageSets and etc. these folder are directly under VOC 2007 dataset?

Linking Problems During Building

Hi,

I have problems compiling the source codes. When I run cmake I have no errors. But when I do "make" I got this error:

/usr/bin/ld: CMakeFiles/BING_linux.dir/CmShow.cpp.o: undefined reference to symbol '_ZN2cv7imwriteERKNS_6StringERKNS_11_InputArrayERKSt6vectorIiSaIiEE'
/usr/local/lib/libopencv_imgcodecs.so.3.0: error adding symbols: DSO missing from command line

I found several post with other problems related to DSO missing, but none was helpful for me. Do you know how manage with this?

/Objectness.cpp:304 not enough training sample for r[0] = 2. P = 0, N = 6760

Hi bittnt,
Thanks a lot for this code.
I ran this algorithm on my dataset and I got the error which has troubled me for a long time.
The error report is :
Warning /home/bnnt/software/Objectness-master/Src/Objectness.cpp:304 not enough training sample for r[0] = 2. P = 0, N = 6760
xp.size = 0 xN.size = 6760
OpenCV Error: Assertion failed (!fixedSize() || ((Mat*)obj)->size.operator()() == Size(_cols, _rows)) in create, file /home/bnnt/opencv-3.1.0/modules/core/src/matrix.cpp, line 2232
terminate called after throwing an instance of 'cv::Exception'
what(): /home/bnnt/opencv-3.1.0/modules/core/src/matrix.cpp:2232: error: (-215) !fixedSize() || ((Mat*)obj)->size.operator()() == Size(_cols, _rows) in function create

I find there no positive samples in "xP".
Do you know how to fix it?
Thanks a lot.

Aborted (core dumped)

How to correctly set all the paths and run the code?

I have successfully make the project, but I can't find how to run the code. I tried to run BING_linux, but I got this error:

OpenCV Error: Assertion failed (matRead(_modelName + ".xP", xP1f) && matRead(_modelName + ".xN", xN1f)) in trainStageI, file /home/lixueting/Downloads/Objectness-master/Src/Objectness.cpp, line 555
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/lixueting/Downloads/Objectness-master/Src/Objectness.cpp:555: error: (-215) matRead(_modelName + ".xP", xP1f) && matRead(_modelName + ".xN", xN1f) in function trainStageI

I looked into yml.m, there are voc path and imagenet path, do I have to download imagenet too in order to run the code?
Thanks!

Problem with installing on Mac

Hi bittnt,

Thanks so much for providing this code. I am trying to install this on Mac and I've been facing a number of issues.

  1. I installed opencv by >> brew install opencv

  2. I also have installed OPENMP from http://clang-omp.github.io/ and I am able to successfully run test applications (using gcc compiler).

  3. Then I create a build directory and first run

    cmake -D CMAKE_C_COMPILER=gcc-5 -D CMAKE_CXX_COMPILER=g++-5 ../Src/

  4. Step 3 generates a make file which when run, gives me the following error:

[ 34%] Building CXX object CMakeFiles/BING_linux.dir/LibLinear/linear.cpp.o
[ 39%] Building CXX object CMakeFiles/BING_linux.dir/LibLinear/tron.cpp.o
[ 43%] Building C object CMakeFiles/BING_linux.dir/LibLinear/blas/daxpy.c.o
[ 47%] Building C object CMakeFiles/BING_linux.dir/LibLinear/blas/ddot.c.o
[ 52%] Building C object CMakeFiles/BING_linux.dir/LibLinear/blas/dnrm2.c.o
[ 56%] Building C object CMakeFiles/BING_linux.dir/LibLinear/blas/dscal.c.o
[ 60%] Linking CXX executable BING_linux
Undefined symbols for architecture x86_64:
"cv::FileStorage::FileStorage(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)", referenced from:
DataSetVOC::loadBBoxes(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::vector<cv::Vec<int, 4>, std::allocator<cv::Vec<int, 4> > >&, std::vector<int, std::allocator >&) in DataSetVOC.cpp.o
DataSetVOC::cvt2OpenCVYml(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) in DataSetVOC.cpp.o
"cv::format[abi:cxx11](char const*, ...)", referenced from:
illutrateLoG() in main.cpp.o
DataSetVOC::loadBox(cv::FileNode const&, std::vector<cv::Vec<int, 4>, std::allocator<cv::Vec<int, 4> > >&, std::vector<int, std::allocator >&) in DataSetVOC.cpp.o
DataSetVOC::loadBBoxes(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::vector<cv::Vec<int, 4>, std::allocator<cv::Vec<int, 4> > >&, std::vector<int, std::allocator >&) in DataSetVOC.cpp.o
Objectness::setColorSpace(int) in Objectness.cpp.o
Objectness::getObjBndBoxes(cv::Mat const&, ValStructVec<float, cv::Vec<int, 4> >&, int) in Objectness.cpp.o
Objectness::illuTestReults(std::vector<std::vector<cv::Vec<int, 4>, std::allocator<cv::Vec<int, 4> > >, std::allocator<std::vector<cv::Vec<int, 4>, std::allocator<cv::Vec<int, 4> > > > > const&) in Objectness.cpp.o
Objectness::evaluatePerClassRecall(std::vector<std::vector<cv::Vec<int, 4>, std::allocator<cv::Vec<int, 4> > >, std::allocator<std::vector<cv::Vec<int, 4>, std::allocator<cv::Vec<int, 4> > > > >&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int) in Objectness.cpp.o
...
"cv::imread(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)", referenced from:
Objectness::illuTestReults(std::vector<std::vector<cv::Vec<int, 4>, std::allocator<cv::Vec<int, 4> > >, std::allocator<std::vector<cv::Vec<int, 4>, std::allocator<cv::Vec<int, 4> > > > > const&) in Objectness.cpp.o
Objectness::generateTrianData() [clone ._omp_fn.0] in Objectness.cpp.o
Objectness::trainStateII(int) [clone ._omp_fn.1] in Objectness.cpp.o
Objectness::getObjBndBoxesForTests(std::vector<std::vector<cv::Vec<int, 4>, std::allocator<cv::Vec<int, 4> > >, std::allocator<std::vector<cv::Vec<int, 4>, std::allocator<cv::Vec<int, 4> > > > >&, int) [clone ._omp_fn.2] in Objectness.cpp.o
Objectness::getObjBndBoxesForTestsFast(std::vector<std::vector<cv::Vec<int, 4>, std::allocator<cv::Vec<int, 4> > >, std::allocator<std::vector<cv::Vec<int, 4>, std::allocator<cv::Vec<int, 4> > > > >&, int) [clone ._omp_fn.6] in Objectness.cpp.o
Objectness::getRandomBoxes(std::vector<std::vector<cv::Vec<int, 4>, std::allocator<cv::Vec<int, 4> > >, std::allocator<std::vector<cv::Vec<int, 4>, std::allocator<cv::Vec<int, 4> > > > >&, int) [clone ._omp_fn.9] in Objectness.cpp.o
"cv::imshow(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, cv::_InputArray const&)", referenced from:
CmShow::HistBins(cv::Mat const&, cv::Mat const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool, cv::Mat const&) in CmShow.cpp.o
CmShow::SaveShow(cv::Mat const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) in CmShow.cpp.o
"cv::imwrite(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, cv::_InputArray const&, std::vector<int, std::allocator > const&)", referenced from:
CmShow::SaveShow(cv::Mat const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) in CmShow.cpp.o
Objectness::illuTestReults(std::vector<std::vector<cv::Vec<int, 4>, std::allocator<cv::Vec<int, 4> > >, std::allocator<std::vector<cv::Vec<int, 4>, std::allocator<cv::Vec<int, 4> > > > > const&) in Objectness.cpp.o
"cv::Exception::Exception(int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, int)", referenced from:
CmShow::HistBins(cv::Mat const&, cv::Mat const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool, cv::Mat const&) in CmShow.cpp.o
FilterTIG::update(cv::Mat const&) in FilterTIG.cpp.o
DataSetVOC::loadBox(cv::FileNode const&, std::vector<cv::Vec<int, 4>, std::allocator<cv::Vec<int, 4> > >&, std::vector<int, std::allocator >&) in DataSetVOC.cpp.o
Objectness::loadTrainedModel(std::__cxx11::basic_string<char, std::char_traits, std::allocator >) in Objectness.cpp.o
Objectness::getObjBndBoxes(cv::Mat const&, ValStructVec<float, cv::Vec<int, 4> >&, int) in Objectness.cpp.o
Objectness::generateTrianData() in Objectness.cpp.o
Objectness::trainStateII(int) in Objectness.cpp.o
...
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[2]: *** [BING_linux] Error 1
make[1]: *** [CMakeFiles/BING_linux.dir/all] Error 2
make: *** [all] Error 2

I know that this is an issue due to OpenCV and I've exhausted all possibilities trying to fix this error. Do you have any idea about how to resolve this?

Will greatly appreciate your help!

About dataset

Hi, bittnx
I wondered how to merge the training data and testing data. I download the data from the official website, while the training and testing data is seperated. While in your code, I saw them was processed in a folder.
trainSet = CmFile::loadStrList(wkDir + "ImageSets/Main/train.txt");
testSet = CmFile::loadStrList(wkDir + "ImageSets/Main/test.txt");
classNames = CmFile::loadStrList(wkDir + "ImageSets/Main/class.txt")
I even could not find class.txt in all the folders.
So when I do ./BING_linux , I met errors:
Dataset:`/home/june/projects/VOC2007' with 0 training and 0 testing
WinRecall.m Base = 2, W = 8, NSS = 2, perSz = 130
Invalidate CvMat data file /home/june/projects/VOC2007Results/ObjNessB2W8MAXBGR.xP
What should I do next? Thank you very much.

precision recall

Hi bittnt,
Thanks a lot for this code. I receive bing paper for an exam, i have to do the roc curve could you explain me where are true positive and false positive values?
Thank you very much.

Installing on Mac

I am running OS X Yosemite and I have some issues getting this code to work. Anyone figured this out?

First I got this error:

Could NOT find OpenMP (missing: OpenMP_CXX_FLAGS)

Which I fixed using the following steps:

  • installing a macports version of gcc
  • calling cmake with
cmake -DCMAKE_C_COMPILER=gcc-mp-4.7 -DCMAKE_CXX_COMPILER=gcc-mp-4.7 .

Then calling make gives the following error:

[ 65%] Building C object CMakeFiles/BING_linux.dir/LibLinear/blas/dscal.c.o
Linking CXX executable BING_linux
Undefined symbols for architecture x86_64:

run ./BING_linux Invalidate class name

when I run the ./BING_linux, I encounter the error:
jeremy@jeremy:~/jWork/Bing/BINGObjectness/Objectness/Src$ ./BING_linux
Invalidate class name
in /home/jeremy/jWork/Bing/BINGObjectness/Objectness/Src/DataSetVOC.cpp:123
OpenCV Error: Assertion failed (Invalidate class name
) in loadBox, file /home/jeremy/jWork/Bing/BINGObjectness/Objectness/Src/DataSetVOC.cpp, line 123
terminate called after throwing an instance of 'cv::Exception'
what(): /home/jeremy/jWork/Bing/BINGObjectness/Objectness/Src/DataSetVOC.cpp:123: error: (-215) Invalidate class name
in function loadBox

已放弃 (核心已转储)

YAML files generated from xml2yml.m

Hello,I am a student who want make my own data set like VOC2007, but the Annotations of VOC2007 is
xml, I need transform xml to yml, like the follow form ,
%YAML:1.0

annotation:
folder: VOC2007
filename: "000001.jpg"
source: {database: The VOC2007 Database, annotation: PASCAL VOC2007, image: flickr,
flickrid: '341012865'}
owner: {flickrid: Fried Camels, name: Jinky the Fruit Bat}
size: {width: '353', height: '500', depth: '3'}
segmented: '0'
object:

  • bndbox: {xmin: '48', ymin: '240', xmax: '195', ymax: '371'}
    name: dog
    pose: Left
    truncated: '1'
    difficult: '0'
  • bndbox: {xmin: '8', ymin: '12', xmax: '352', ymax: '498'}
    name: person
    pose: Left
    truncated: '1'
    difficult: '0'

Can you tell me how to transform,Thank you very much

Compilation error: error: ‘CV_INTER_NN’ was not declared in this scope.

Cmake executes successfully.
After that I run make and get the following error (tail of logs, before that there's only warnings):

/home/algernone/git_projects/Objectness/Src/CmShow.cpp:65:39: error: ‘CV_INTER_NN’ was not declared in this scope
  resize(m, img, Size(), scale, scale, CV_INTER_NN);
                                       ^~~~~~~~~~~
/home/algernone/git_projects/Objectness/Src/CmShow.cpp:67:22: error: ‘CV_RGB2BGR’ was not declared in this scope
   cvtColor(img, img, CV_RGB2BGR);
                      ^~~~~~~~~~
CMakeFiles/BING.dir/build.make:86: recipe for target 'CMakeFiles/BING.dir/CmShow.cpp.o' failed
make[2]: *** [CMakeFiles/BING.dir/CmShow.cpp.o] Error 1
CMakeFiles/Makefile2:142: recipe for target 'CMakeFiles/BING.dir/all' failed
make[1]: *** [CMakeFiles/BING.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

And immediately additional question.
Is that possible to compile the project for python?

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.