Ask Your Question

akumar6's profile - activity

2016-08-02 00:18:21 -0600 commented question when i run opencv_createsamples command on ubuntu server it says "invalid background file". Please help

yes. I've been using the following commands opencv_createsamples -img original.jpg -bg bg.txt -info info/info.lst -pngoutput info -maxxangle 0.5 -maxyangle 0.5 -maxzangle 0.5 -num 2000. This command generates positive images and info.lst file which has content like this 0001_0014_0045_0028_0028.jpg 1 14 45 28 28. Then opencv_createsamples -info info/info.lst -num 2000 -w 20 -h 20 -vec positives.vec creates positive vector file. Finally opencv_traincascade -data data -vec positives.vec -bg bg.txt -numPos 1900 -numNeg 950 -numStages 10 -w 20 -h 20 is for training. The whole process ends up in few minutes. I have negative images of 100 by100 and original image is of 50 by50. Combined both to form positive images. I am running on 2gb memory of unix server.

2016-08-01 07:01:31 -0600 commented question when i run opencv_createsamples command on ubuntu server it says "invalid background file". Please help

@StevenPuttemans when I train the cascade with opencv_traincascade command, it starts and ends up quickly even though i use 10 stages. It finishes up in 7-10 minutes and when i run the python script using the developed cascade.xml file, it shows video frame full of boxes and it is not detecting the required object. My question is why is training ending up so quickly even though there are 2000+ positive samples and 10 stages ?

2016-07-29 06:20:33 -0600 commented question when i run opencv_createsamples command on ubuntu server it says "invalid background file". Please help

command worked. I used python script to create the bg.txt file and it was, I'm guessing, inserting some character which is normally not visible after every new line statement and hence opencv was failing to read it. I manually created the bg.txt with VI editer on server itself by putting in location of 10 images and it worked. That way i automated the process for all images and it is working fine.

thanks a lot for your time and support, @StevenPuttemans

2016-07-28 04:40:54 -0600 commented question when i run opencv_createsamples command on ubuntu server it says "invalid background file". Please help

that info is the directory where i want to send my positive images created by merging original.jpg and negative images. Also, I tried same thing on CentOS. Command worked fine there and it created samples. Can it be because of the platform ??? @StevenPuttemans

2016-07-28 01:51:07 -0600 commented question when i run opencv_createsamples command on ubuntu server it says "invalid background file". Please help

@StevenPuttemans i tried using absolute paths everywhere necessary, still it's of no use :(

2016-07-27 03:44:41 -0600 commented question when i run opencv_createsamples command on ubuntu server it says "invalid background file". Please help

@berak and @StevenPuttemans command i'm using is "opencv_createsamples -img original.jpg -bg bg.txt -info info/info.lst -pngoutput info -maxxangle 0.5 -maxyangle 0.5 -maxzangle 0.5 -num 2000"

and i tried using absolute paths in bg.txt file such as /home/ubuntu/opencv_dir/neg/1.jpg

still facing the same issue.

2016-07-27 02:53:25 -0600 asked a question when i run opencv_createsamples command on ubuntu server it says "invalid background file". Please help

my bg.txt file contains paths like :-

neg/1.jpg neg/2.jpg

etc