Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question : Creating cascaded for HAAR Cascades object detector #35

Open
pksorensen opened this issue Sep 14, 2014 · 3 comments
Open

Question : Creating cascaded for HAAR Cascades object detector #35

pksorensen opened this issue Sep 14, 2014 · 3 comments

Comments

@pksorensen
Copy link

I am amazed by this library. My background is in computer vision and i would like to contribute to this library.

My first project would be something like creating tutorials for creating a cascade with opencv and then detect with it in web with this library.

Any ideas or pointers of anything that could be interesting to look at? (i am skilled in opencv and just need to get my head around the data structure in this library).

Maybe its something you already looked at.

@inspirit
Copy link
Owner

hi thanx for your interest.
jsfeat impl of HAAR cascades is based on an old version of trainer from OpenCV and it is compatible to stump based classifiers. Classifiers for face, hand and eye detection are already included.

@aferriss
Copy link

Hi Eugene,

I'm also curious about how to convert an opencv haar cascade xml file into the jsfeat format. Do you have a conversion tool? I'd prefer not to retrain if possible since it takes so long. For instance my cascade looks like this

<?xml version="1.0"?>
<opencv_storage>
<cascade>
  <stageType>BOOST</stageType>
  <featureType>HAAR</featureType>
  <height>40</height>
  <width>80</width>
  <stageParams>
    <boostType>GAB</boostType>
    <minHitRate>9.9900001287460327e-01</minHitRate>
    <maxFalseAlarm>5.0000000000000000e-01</maxFalseAlarm>
    <weightTrimRate>9.4999999999999996e-01</weightTrimRate>
    <maxDepth>1</maxDepth>
    <maxWeakCount>100</maxWeakCount></stageParams>
  <featureParams>
    <maxCatCount>0</maxCatCount>
    <featSize>1</featSize>
    <mode>ALL</mode></featureParams>
  <stageNum>20</stageNum>
  <stages>
    <!-- stage 0 -->
    <_>
      <maxWeakCount>13</maxWeakCount>
      <stageThreshold>-1.0350964069366455e+00</stageThreshold>
      <weakClassifiers>
        <_>
          <internalNodes>
            0 -1 85 -1.3720529153943062e-02</internalNodes>
          <leafValues>
            5.0184500217437744e-01 -3.8205981254577637e-01</leafValues></_>
        <_>
          <internalNodes>
            0 -1 145 -1.1965321376919746e-02</internalNodes>
          <leafValues>
            -8.7071585655212402e-01 1.8524530529975891e-01</leafValues></_>
        <_>

and so on down to the features

  <features>
    <_>
      <rects>
        <_>
          0 0 78 40 -1.</_>
        <_>
          39 0 39 40 2.</_></rects>
      <tilted>0</tilted></_>

Any ideas? The cascade I have was created by following this guide:
http://coding-robin.de/2013/07/22/train-your-own-opencv-haar-classifier.html

@yuccai
Copy link

yuccai commented Jun 29, 2016

Hi,
In the same idea as the previous post, is it possible to convert haar cascade files from js-detect library for jsfeat ? If yes, could you please explain it to me ? I would like to detect nose thanks your library but the classifier doesn't exist yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants