[PYTHON] Cascade classifier creation with opencv

Introduction

This site (https://www.pro-s.co.jp/engineerblog/opencv/post_6202.html) The method is written in, but I stumbled on various things, so I will write it as a memo. The environment is win10.


  1. Obtain and install opencv 2.4.13. (Create samples and train cascade are not included after opencv3. I wonder if support has disappeared?)

  2. When preparing the correct image with createsamples, reduce it as much as possible. (Since the NG image is reduced to the size of the correct image in traincascade, learning efficiency is poor unless it is small.)

  3. Fill in the list of NG images used in traincascade with the full path. Otherwise you will get an error.

  4. The line feed code is LF in the list of NG images used in traincascade. Otherwise you will get an error.

Digression

The traincascade error message is super confusing. But even if it stops with an error in the middle, I think it's okay because the cascade file can be used for the time being.

Recommended Posts

Cascade classifier creation with opencv
Make a cascade classifier with google colaboratory
Image processing with Lambda + OpenCV (gray image creation)
Detect stoop with OpenCV
Rotate sprites with OpenCV
Data Augmentation with openCV
Easy TopView with OpenCV
Stumble with homebrew opencv3
Face recognition with Python's OpenCV
"Apple processing" with OpenCV3 + Python3
Try edge detection with OpenCV
Image editing with python OpenCV
Camera capture with Python + OpenCV
[Python] Using OpenCV with Python (Basic)
Binarize photo data with OpenCV
Real-time edge detection with OpenCV
Cascade classification machine [Note] [Opencv]
Face detection with Python + OpenCV
Get image features with OpenCV
Face recognition / cutting with OpenCV
Try OpenCV with Google Colaboratory
Using OpenCV with Python @Mac
Image recognition with Keras + OpenCV
Anime face detection with OpenCV
Real-time image processing basics with opencv
[Python] Using OpenCV with Python (Image Filtering)
Neural network with OpenCV 3 and Python 3
I tried trimming efficiently with OpenCV
[Python] Using OpenCV with Python (Image transformation)
[Python] Using OpenCV with Python (Edge Detection)
Introducing OpenCV on Mac with homebrew
Easy Python + OpenCV programming with Canopy
Finding the simplest mistakes with OpenCV
[OpenCV] Personal identification with face photo
GUI creation with Pyside2 <Kindergarten level>
Try face recognition with python + OpenCV
Rotate sprites with OpenCV # 2 ~ Mastering cv2.warpAffine () ~
Cut out face with Python + OpenCV
Face recognition with camera with opencv3 + python2.7
OpenCV feature detection with Google Colaboratory
Search for homeomorphic idioms with opencv
Load gif images with Python + OpenCV
Cat detection with OpenCV (model distribution)
Try blurring the image with opencv2
Use OpenCV with Python 3 in Window
Draw an illustration with Python + OpenCV
Face detection using a cascade classifier
Track baseball balls with Python + OpenCV
Post bulletin board creation with flask
Graph Based Segmentation with Python + OpenCV
Object recognition with openCV by traincascade
Draw shapes with OpenCV and PIL
I tried face recognition with OpenCV
Implemented inter-frame difference method with OpenCV
Draw arrows (vectors) with opencv / python
Basic study of OpenCV with Python