Giter Site home page Giter Site logo

rodrigob / barinova_pedestrians_detection Goto Github PK

View Code? Open in Web Editor NEW
81.0 81.0 55.0 1.6 MB

Linux port of original Windows code from Olga Barinova

Home Page: http://graphics.cs.msu.ru/en/science/research/machinelearning/hough

C 37.09% C++ 62.91%

barinova_pedestrians_detection's People

Contributors

rodrigob 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

Watchers

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

barinova_pedestrians_detection's Issues

Forest file doesn't exist

I run the command the do the testing:

./object_detection ~/Develop/barinova_pedestrians_detection-master/example/campus-config

It gives me an error:

Loading config file
Done
Reading images from host_folder == '/home/zhuofu/Develop/barinova_pedestrians_detection-master/example/tud-campus-sequence/'
Created output folder /home/zhuofu/Develop/barinova_pedestrians_detection-master/example/results/
Reading forest from file ...
Forest file doesn't exist!

My campus_config file:

// folder with input images
/home/zhuofu/Develop/barinova_pedestrians_detection-master/example/tud-campus-sequence/
\\
// output folder
/home/zhuofu/Develop/barinova_pedestrians_detection-master/example/results/
\\
// width of a bounding box at each scale corresponding to detection
40
\\
// height of a bounding box at each scale corresponding to detection
84
\\
// number of scales for multi-scale detection
5
\\
// resize images before detection by this coefficient
0.55
\\
//forest name
/home/zhuofu/Develop/barinova_pedestrians_detection-master/example/barpedestrian.dat
\\
//size of patch in a forest
16
\\
// half of maximum width of object in the data used for training the forest
30
\\
// half of maximum height of object in the data used for training the forest
45
\\
// bias of background cost, parameter of detection algorithm
8.5
\\
// penalty for adding a hypothesis, parameter of detection algorithm
1500
\\
//only patches with probabilities to belong to background lower than this threshold can vote
0.7
\\
//minimal allowed probability of a patch to belong to object, if probability is lesser the vote is ignored
0.00005
\\
// radius of blur for hough images
5
\\
// size of images at subsequent scales differ by coefficient 
0.85
\\
// maximum number of objects in an image
8

Missing boost dependencies

Even tough I installed all the boost libraries by calling
apt-get install libboost-all-dev
Still I get following error at compilation

/usr/bin/ld: cannot find -lboost_filesystem-mt
/usr/bin/ld: cannot find -lboost_system-mt
collect2: error: ld returned 1 exit status
make[2]: *** [object_detection] Error 1
make[1]: *** [CMakeFiles/object_detection.dir/all] Error 2
make: *** [all] Error 2

Indicated host_folder does not exists

When testing, running the command

 ./object_detection '/home/rnt/pedestrian/untouched/barinova_pedestrians_detection-master/example/campus-config' <b>

gives me output

Loading config file
Done
'eading images from host_folder == '/home/rnt/pedestrian/tud-campus-sequence/
IMPORTANT: Is your configuration file in Unix line ending format ? (Windows style line ending not supported)
A std::exception was raised: Indicated host_folder does not exists
terminate called after throwing an instance of 'std::invalid_argument'
  what():  Indicated host_folder does not exists
Aborted (core dumped)

My campus-config file is

// folder with input images
/home/rnt/pedestrian/tud-campus-sequence/
\\
// output folder
/home/rnt/results/
\\
// width of a bounding box at each scale corresponding to detection
40
\\
// height of a bounding box at each scale corresponding to detection
84
\\
// number of scales for multi-scale detection
5
\\
// resize images before detection by this coefficient
0.55
\\
//forest name
/home/rnt/pedestrian/untouched/barinova_pedestrians_detection-master/example/pedestrian.dat
\\
//size of patch in a forest
16
\\
// half of maximum width of object in the data used for training the forest
30
\\
// half of maximum height of object in the data used for training the forest
45
\\
// bias of background cost, parameter of detection algorithm
8.5
\\
// penalty for adding a hypothesis, parameter of detection algorithm
1500
\\
//only patches with probabilities to belong to background lower than this threshold can vote
0.7
\\
//minimal allowed probability of a patch to belong to object, if probability is lesser the vote is ignored
0.00005
\\
// radius of blur for hough images
5
\\
// size of images at subsequent scales differ by coefficient 
0.85
\\
// maximum number of objects in an image
8

Build errors with recent version of CMake (2.8.7)

I tried building the library in Ubuntu 12.04, OpenCV 2.2 (also attempted other configurations), and kept getting an error like the following:

/usr/bin/c++    -Wall -DNDEBUG -O3 -fopenmp -funroll-loops -march=native -mtune=native --fast-math -mfpmath=sse -msse3     CMakeFiles
/object_detection.dir/home/kit/Downloads/barinova_pedestrians_detection/ObjectDetection/main_run_greedy_pedestrians.cpp.o CMakeFiles/
object_detection.dir/home/kit/Downloads/barinova_pedestrians_detection/ObjectDetection/DenseGreedyDetection/GreedyDetection.cpp.o CMa
keFiles/object_detection.dir/home/kit/Downloads/barinova_pedestrians_detection/ObjectDetection/Forests/HoughForest.cpp.o CMakeFiles/o
bject_detection.dir/home/kit/Downloads/barinova_pedestrians_detection/ObjectDetection/Forests/IHoughForest.cpp.o CMakeFiles/object_de
tection.dir/home/kit/Downloads/barinova_pedestrians_detection/ObjectDetection/Forests/IHoughTree.cpp.o CMakeFiles/object_detection.di
r/home/kit/Downloads/barinova_pedestrians_detection/ObjectDetection/Forests/HoughTree.cpp.o CMakeFiles/object_detection.dir/home/kit/
Downloads/barinova_pedestrians_detection/ObjectDetection/Forests/Vote.cpp.o CMakeFiles/object_detection.dir/home/kit/Downloads/barino
va_pedestrians_detection/ObjectDetection/ImageWrapper/HoG.cpp.o CMakeFiles/object_detection.dir/home/kit/Downloads/barinova_pedestria
ns_detection/ObjectDetection/ImageWrapper/MultiImageTools.cpp.o CMakeFiles/object_detection.dir/home/kit/Downloads/barinova_pedestria
ns_detection/ObjectDetection/ImageWrapper/CRPatch.cpp.o  -o object_detection -rdynamic -lboost_filesystem-mt -lboost_system-mt -lgomp
 -ltbb -lrt -lpthread -lm -ldl
CMakeFiles/object_detection.dir/home/kit/Downloads/barinova_pedestrians_detection/ObjectDetection/main_run_greedy_pedestrians.cpp.o:
In function `HoG::~HoG()':
main_run_greedy_pedestrians.cpp:(.text._ZN3HoGD2Ev[_ZN3HoGD5Ev]+0x9): undefined reference to `cvReleaseMat'
main_run_greedy_pedestrians.cpp:(.text._ZN3HoGD2Ev[_ZN3HoGD5Ev]+0x12): undefined reference to `cvReleaseMat'
main_run_greedy_pedestrians.cpp:(.text._ZN3HoGD2Ev[_ZN3HoGD5Ev]+0x1b): undefined reference to `cvReleaseMat'
main_run_greedy_pedestrians.cpp:(.text._ZN3HoGD2Ev[_ZN3HoGD5Ev]+0x24): undefined reference to `cvReleaseMat'
main_run_greedy_pedestrians.cpp:(.text._ZN3HoGD2Ev[_ZN3HoGD5Ev]+0x2d): undefined reference to `cvReleaseMat'

etc...

The issue was cmake not finding the opencv libraries properly.

I needed to change pkg_check_modules(opencv REQUIRED opencv>=2.1) to find_package( OpenCV 2.1 REQUIRED )

and target_link_libraries(... ${opencv_LIBRARIES} ) to target_link_libraries(... ${opencv_LIBS} )

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.