Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

opencv_traincascade.Unspecified error (No element name has been given)

I'm trying to train my own cascade, but get the following error:

Unspecified error (No element name has been given) in cv::operator
 <<, file C:\builds\2_4_PackSlave-win64-vc11-shared\opencv\modules\core\include\
opencv2/core/operations.hpp, line 2910

I made ​​these steps:

  1. I cut 20 photos of the object so that they remained only the desired object
  2. Resize to 30x18
  3. Make objectSamples.dat file like this :

object(1).jpg 1 0 0 30 16

object(10).jpg 1 0 0 30 16

object(11).jpg 1 0 0 30 16

And negatives.dat like :

negatives\1.jpeg
negatives\10.jpg
negatives\11.jpg
size of pic ~ 500x500

4.Make vec file: opencv_createsamples -info objectSamples.dat -vec objectSamples.vec -w 30 -h 16 -num 20

5.Show samples ( my pictures are shown entirely) : opencv_createsamples -vec objectSamples.vec -w 30 -h 16

6.Try to train : opencv_traincascade -data Cascade -vec objectSamples.vec -bg negatives.dat -numPos 10 -numNeg 10 -numStages 2 -featureType HAAR -w 30 -h 16

But get an error:

image description

What am I doing wrong?

I read these articles and the answer, but I didn't understand, in what a problem:

  1. trouble-when-use-opencv_traincascadeexe

  2. haartraining tutorial

  3. docs.opencv traincascade

opencv_traincascade.Unspecified error (No element name has been given)

I'm trying to train my own cascade, but get the following error:

Unspecified error (No element name has been given) in cv::operator
 <<, file C:\builds\2_4_PackSlave-win64-vc11-shared\opencv\modules\core\include\
opencv2/core/operations.hpp, line 2910

I made ​​these steps:

  1. I cut 20 photos of the object so that they remained only the desired object
  2. Resize to 30x18
  3. Make objectSamples.dat file like this :

object(1).jpg 1 0 0 30 1618

object(10).jpg 1 0 0 30 1618

object(11).jpg 1 0 0 30 1618

And negatives.dat like :

negatives\1.jpeg
negatives\10.jpg
negatives\11.jpg
size of pic ~ 500x500

4.Make vec file: opencv_createsamples -info objectSamples.dat -vec objectSamples.vec -w 30 -h 16 18 -num 20

5.Show samples ( my pictures are shown entirely) : opencv_createsamples -vec objectSamples.vec -w 30 -h 1618

6.Try to train : opencv_traincascade -data Cascade -vec objectSamples.vec -bg negatives.dat -numPos 10 -numNeg 10 -numStages 2 -featureType HAAR -w 30 -h 1618

But get an error:

image description

What am I doing wrong?

I read these articles and the answer, but I didn't understand, in what a problem:

  1. trouble-when-use-opencv_traincascadeexe

  2. haartraining tutorial

  3. docs.opencv traincascade

click to hide/show revision 3
retagged

updated 2014-06-14 06:50:25 -0600

berak gravatar image

opencv_traincascade.Unspecified error (No element name has been given)

I'm trying to train my own cascade, but get the following error:

Unspecified error (No element name has been given) in cv::operator
 <<, file C:\builds\2_4_PackSlave-win64-vc11-shared\opencv\modules\core\include\
opencv2/core/operations.hpp, line 2910

I made ​​these steps:

  1. I cut 20 photos of the object so that they remained only the desired object
  2. Resize to 30x18
  3. Make objectSamples.dat file like this :

object(1).jpg 1 0 0 30 18

object(10).jpg 1 0 0 30 18

object(11).jpg 1 0 0 30 18

And negatives.dat like :

negatives\1.jpeg
negatives\10.jpg
negatives\11.jpg
size of pic ~ 500x500

4.Make vec file: opencv_createsamples -info objectSamples.dat -vec objectSamples.vec -w 30 -h 18 -num 20

5.Show samples ( my pictures are shown entirely) : opencv_createsamples -vec objectSamples.vec -w 30 -h 18

6.Try to train : opencv_traincascade -data Cascade -vec objectSamples.vec -bg negatives.dat -numPos 10 -numNeg 10 -numStages 2 -featureType HAAR -w 30 -h 18

But get an error:

image description

What am I doing wrong?

I read these articles and the answer, but I didn't understand, in what a problem:

  1. trouble-when-use-opencv_traincascadeexe

  2. haartraining tutorial

  3. docs.opencv traincascade

opencv_traincascade.Unspecified error (No element name has been given)

I'm trying to train my own cascade, but get the following error:

Unspecified error (No element name has been given) in cv::operator
 <<, file C:\builds\2_4_PackSlave-win64-vc11-shared\opencv\modules\core\include\
opencv2/core/operations.hpp, line 2910

I made ​​these steps:

  1. I cut 20 photos of the object so that they remained only the desired object
  2. Resize to 30x18
  3. Make objectSamples.dat file like this :

object(1).jpg 1 0 0 30 18

object(10).jpg 1 0 0 30 18

object(11).jpg 1 0 0 30 18

And negatives.dat like :

negatives\1.jpeg
negatives\10.jpg
negatives\11.jpg
size of pic ~ 500x500

4.Make vec file: opencv_createsamples -info objectSamples.dat -vec objectSamples.vec -w 30 -h 18 -num 20

5.Show samples ( my pictures are shown entirely) : opencv_createsamples -vec objectSamples.vec -w 30 -h 18

6.Try to train : opencv_traincascade -data Cascade -vec objectSamples.vec -bg negatives.dat -numPos 10 -numNeg 10 -numStages 2 -featureType HAAR -w 30 -h 18

But get an error:

image description

What am I doing wrong?

I read these articles and the answer, but I didn't understand, in what a problem:

  1. trouble-when-use-opencv_traincascadeexe

  2. haartraining tutorial

  3. docs.opencv traincascade


Increased the number of images to 1000 positive and 2000 negatives

opencv_traincascade -data Cascade -vec boobsSamples.vec -bg negativesBig/negatives.txt -numPos 400 -numNeg 1000 -numStages 2 -featureType HAAR -w 30 -h 18 -mode ALL

Geting the same error.