Opencv 3.1 people detection by CascadeClassifier

Follow

My favourite

  • Opencv tutorial people detection
  • Head people cascade download
  • Opencv tutorial optical flow
  • Opencv Video stabilization
  • Opencv car dataset download
  • Opencv tutorial Transparent mask
  • Opencv videowriter
  • Opencv FFMPEG
  • Opencv Canny edge and hough lines
  • People detection by Cascade Classifier Opencv

    The comparison of Opencv Cascade for people detections. Default opencv cascades are good one. You can simply achive better result but you need to collect the training data. On my blog you can find the datasets for car detection. There is more than 2000 positives car samples available for you and test to learn your own detector.. 
    Here in this article, I just want to show my cascade compare to cascade which are default in opencv. 

    LBP cascade for people detection

    Also I recently publish LBP cascade for people detection. You can download 12 stage LBP cascade LBP cascade for download. There is couple or maybe more than 3 tutorials how to use detect multiscale in opencv. Just download the LBP cascade and enjoy coding in Opencv..

    Cascade Classifier opencv


    Haar Cascade Classifier for People detection

    In this short tutorial, I would like to test some standard haar cascade in opencv 3.1. 
    My first note is where you can find this cascades.
    When you download opencv for windows this cascades are located in opencv/sources/data/haarcascades

    In the picture i use these types of cascades. 

    haarcascade_fullbody.xml

    haarcascade_upperbody.xml

    haarcascade_lowerbody.xml

    Visually, i can rate the cascade as rly great for fullbody an lowerbody. The upperbody cascade has trouble with my source video. Which is not its fault.

    Own haar like cascade

    Also, I am testing some of mine own haar cascade, which are learned by different methods like gentle boost, adaboost, etc.

    Red and blue are the cascades for people detection. White is haar cascade for head detection. Check the video for results.


    Video of mine haar cascade.


    UPDATE

    Code is HERE and cascade is LBP cascade for download



    10 comments:

    1. sample code and haar templates would be very useful, if you can disclose them and release them as open source. I would undoubtedly cite you as the author of the templates.

      ReplyDelete
      Replies
      1. Code is rly simple. I will release code later today or tomorrow . Give me a time to add some recommendation, info and code description.

        Delete
    2. yes,but i want to konw,can the code be used to opencv 2.4?

      ReplyDelete
    3. yes,but i want to konw,can the code be used to opencv 2.4?

      ReplyDelete
      Replies
      1. I hope, that the Opencv 2.4.9-2.4.11 is not problem. In some windows version of opencv 2.4.9-3.1 there is some problems.The first is 2.4.8-9 have wrong size of cascades in xml file. Also on windows, You can use debug and release. In debug mode the detect multiscale return wrong output as to many rectangles out of image boundary. In release mode there is no problem. I dont know why. On linux this is fixed.

        Delete
    4. Code is rly simple. I will release code later today or tomorrow . Give me a time to add some recommendation, info and code description. I hope, that the Opencv 2.4.9-2.4.11 is not problem . I am start with opencv 2.4.9 and 3.0.0 and now I am working only with 3.1. I would like to write another article how to train your own cascade. There are some tutorials but this is rly tricky part. You need a little bit experience with training.

      ReplyDelete
    5. Would love to work with the code please. thank you.

      ReplyDelete
    6. This comment has been removed by the author.

      ReplyDelete
    7. Would like to try out your Code by myself.

      ReplyDelete

    ad