While running Traincascade or Haartraining code , a error occurs

asked 2018-12-11 23:40:01 -0500

updated 2018-12-11 23:47:22 -0500

berak gravatar image

After creating a sample vec file , i like to train my haartraining using below code,

haartraining -data data -vec samples1.vec -bg negative.txt -numStages 10 -numPos 20 -numNeg 200 -w 50 -h 50 -mode ALL -precalcValBuffSize 1024 -precalcIdxBuffSize 1024

but error occurs as shown in image, can anyone help me to solve the issue...

image description

edit retag flag offensive close merge delete

Comments

can you please replace the screenshot with a TEXT version ? thank you.

berak gravatar imageberak ( 2018-12-11 23:44:19 -0500 )edit

please add the first few lines of your negative.txt to the question

berak gravatar imageberak ( 2018-12-11 23:49:24 -0500 )edit

my negative.text wil be like \negative_images\resized_hills_013.negative_images \negative_images\resized_hills_015.negative_images \negative_images\resized_hills_016.negative_images

Sudharsan_jgopi gravatar imageSudharsan_jgopi ( 2018-12-11 23:52:54 -0500 )edit
1

ERROR....

Unspecified error (Unable to read negative images) in function cvCreateTreeCascadeClassifier,..\src\cvhaartraining.cpp(2167)

Sudharsan_jgopi gravatar imageSudharsan_jgopi ( 2018-12-11 23:55:59 -0500 )edit

please use forward slashes (even on windows) and an absolute path for the filenames there

berak gravatar imageberak ( 2018-12-11 23:56:33 -0500 )edit

yeah , thanks , As you suggested I used forward slash and absolute path , eventhough i used to get same error.

C:/Users/Dass6/Desktop/temp/negative/negative_images/resized_hills_013.negative_images
C:/Users/Dass6/Desktop/temp/negative/negative_images/resized_hills_015.negative_images
C:/Users/Dass6/Desktop/temp/negative/negative_images/resized_hills_016.negative_images
Sudharsan_jgopi gravatar imageSudharsan_jgopi ( 2018-12-12 00:10:42 -0500 )edit

none of the above looks like a valid path to an image. what is "negative_images" ?

berak gravatar imageberak ( 2018-12-12 00:12:42 -0500 )edit

btw, "haartraining" is from outdated 2.4 ? and why the heck are you running this from an anaconda prompt ?

berak gravatar imageberak ( 2018-12-12 00:14:10 -0500 )edit

my image id of Bmp format , so at the end negative_images should be replaced with bmp

Sudharsan_jgopi gravatar imageSudharsan_jgopi ( 2018-12-12 00:15:43 -0500 )edit

so i want to run in cmd?? can you please suggest me train , I dont have opencv_traincasacde too

Sudharsan_jgopi gravatar imageSudharsan_jgopi ( 2018-12-12 00:17:39 -0500 )edit