Code Monkey home page Code Monkey logo

trainhog's People

Contributors

dahoc avatar mlilien avatar yati-sagade 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

trainhog's Issues

Not detecting humans clearly

I have been trying to use your code to train an hog from the images from INIRIA database as you have suggested. For the training set i resized the images to 64x128 as it was required and these images were used to train the svm. i have used about 500 positive images and 700 negative images to train. But it is not identifying humans clearly. The output can be seen in the attachments. I request you to help me figure out what the problem might be. The code is exactly the same as it is in your github folder
screenshot from 2015-02-25 16 36 21

Training SVM

I am struggling the last days trying to find way to train svm with my own data. My issue is how to change properly svm kernel. I found in your code svmlight.h with svm parameters. When I am trying to change
learn_parm->kernel_type from LInear to RBF I am getting errors (core dumped).

trainHOG add support for CvSVM

trainHOG add support for openCV internal "CvSVM" SVM, if it is possible to train CvSVM with the required training mode and options

Index of resulting single detector vector probably being incorrect

The first value (Index 0) of the vector being generated in function getSingleDetectingVector() being always 0 due to the way SVMlight handles indices, as well as the last value (Index 3780) being overwritten by -b. An indexshift does not fix this issue because the positions/indices of the detecting vector components do matter for HOG.

import "cvHOGClassifier.yaml" with python

Hello,
i really appreciate your training program. I want to use the generated classifier with my custom python detector. How can i import the file?
For example the import of the DefaultPeopleDetector looks as follows:
# initialize the HOG descriptor/person detector
hog = cv2.HOGDescriptor()
hog.setSVMDetector(cv2.HOGDescriptor_getDefaultPeopleDetector())
What do i have to change to import the custom file?
Best regards

MinGW under Windows

For those who is trying to compile under Windows using MinGW (I have Windows 10 64bit):
make compile.bat file in trainHOG folder and put next:
@echo off
set opencv_incdir=C:/OpenCV/OpenCV32/build/include
set svmlight_srcdir=C:/Projects/tests/svm_light
pkg-config opencv --cflags --libs >tmp.txt
set /p pkg-info= <tmp.txt
del tmp.txt
rem echo %pkg-info%
g++ main.cpp -c -g -MMD -MP -I %opencv_incdir% -I %svmlight_srcdir%
gcc %svmlight_srcdir%/svm_learn.c -c -g
gcc %svmlight_srcdir%/svm_hideo.c -c -g
gcc %svmlight_srcdir%/svm_common.c -c -g
g++ -o trainhog.exe main.o svm_learn.o svm_hideo.o svm_common.o -Wall %pkg-info%

Change opencv_incdir, svmlight_srcdir to your correct pathes

Window Size Change

What should I do when my images are 64x64 instead of 64x128? Is changing this line hog.winSize = Size(64, 128); to hog.winSize = Size(64, 64); enough?

Train your own SVM!

How can i use this (which focuses on person detection) to train SVM for objects of my own interest? Is it enough to populate the pos and neg directories with objects of my interest and change the window size (hog.winSize = Size(64, 128))?

"WORD" Ambiguous Symbol

Hi,

I am working on a project of car detection and my advisor and I chose the hog + svm method to do this task. In order to do that, I have downloaded your code from here
and tried to implement on VS12 but It is giving some errors at ambiguous symbols and others.

Here is a look at the errors that I am getting from it

image

โ€‹ โ€‹
I really appreciate if you could help at this task.

Sincerely,

Running the classifer

How do I test the classifier once it has been compiled as per the steps mentioned in the tutorial?

just trying to run it with my own dataset

SVMLight::SVMLightImpl::getInstance()->getSingleDetectingVector(descriptorVector, descriptorVectorIndices);

main.cpp:354: error: 'descriptorVector' declared as reference but not initialized

why descriptor vector is not initialized?

No visible detection, but the software seems to be working

I managed to compile this software with a nice set of positive and negative images, but when I run it, it opens the video file, runs it through at around x2 speed, which is fine, but there's no detection to speak of.

Does this code include some "Draw circles around the detected faces" code or do I have to implement that separately?

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.