Create training samples from one [closed]

asked 2013-11-23 06:59:23 -0600

ioanna gravatar image

I executed the follow command opencv_createsamples -img positive/rawdata/im5_67.bmp -num 100 -bg negative/infofile.txt -vec data/samples1.vec -bgcolor 0 -bgthresh 0 -w 25 -h 15, in Centos, to create more samples and it returned:

Info file name: (NULL)
Img file name: positive/rawdata/im5_67.bmp
Vec file name: data/samples1.vec
BG  file name: negative/infofile.txt
Num: 100
BG color: 0
BG threshold: 0
Invert: FALSE
Max intensity deviation: 40
Max x angle: 1.1
Max y angle: 1.1
Max z angle: 0.5
Show samples: FALSE
Width: 25
Height: 15
Create training samples from single image applying distortions...
*** glibc detected *** opencv_createsamples: corrupted double-linked list: 0x0000000000657f80 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x760e6)[0x7f9feb6c10e6]
/lib64/libc.so.6(+0x78f01)[0x7f9feb6c3f01]
/lib64/libc.so.6(fclose+0x14d)[0x7f9feb6b174d]
opencv_createsamples[0x405098]
opencv_createsamples[0x40897a]
opencv_createsamples(_Z23cvCreateTrainingSamplesPKcS0_iiS0_iiidddiii+0xe2)[0x40dcc2]
opencv_createsamples(main+0x61a)[0x4046aa]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x7f9feb669cdd]
opencv_createsamples[0x403fc9]
======= Memory map: ========
00400000-0042d000 r-xp 00000000 fd:03 26791                              /usr/local/bin/opencv_createsamples
0062d000-0062e000 rw-p 0002d000 fd:03 26791                              /usr/local/bin/opencv_createsamples
00653000-00674000 rw-p 00000000 00:00 0                                  [heap]
7f9feb367000-7f9feb425000 rw-p 00000000 00:00 0
7f9feb425000-7f9feb44a000 r-xp 00000000 fd:05 10719                      /usr/lib64/libpng12.so.0.49.0
7f9feb44a000-7f9feb64a000 ---p 00025000 fd:05 10719                      /usr/lib64/libpng12.so.0.49.0
7f9feb64a000-7f9feb64b000 rw-p 00025000 fd:05 10719                      /usr/lib64/libpng12.so.0.49.0
7f9feb64b000-7f9feb7d5000 r-xp 00000000 fd:01 313                        /lib64/libc-2.12.so
7f9feb7d5000-7f9feb9d4000 ---p 0018a000 fd:01 313                        /lib64/libc-2.12.so
7f9feb9d4000-7f9feb9d8000 r--p 00189000 fd:01 313                        /lib64/libc-2.12.so
7f9feb9d8000-7f9feb9d9000 rw-p 0018d000 fd:01 313                        /lib64/libc-2.12.so
7f9feb9d9000-7f9feb9de000 rw-p 00000000 00:00 0
7f9feb9de000-7f9feb9f4000 r-xp 00000000 fd:01 2302                       /lib64/libgcc_s-4.4.7-20120601.so.1
7f9feb9f4000-7f9febbf3000 ---p 00016000 fd:01 2302                       /lib64/libgcc_s-4.4.7-20120601.so.1
7f9febbf3000-7f9febbf4000 rw-p 00015000 fd:01 2302                       /lib64/libgcc_s-4.4.7-20120601.so.1
7f9febbf4000-7f9febc77000 r-xp 00000000 fd:01 2196                       /lib64/libm-2.12.so
7f9febc77000-7f9febe76000 ---p 00083000 fd:01 2196                       /lib64/libm-2.12.so
7f9febe76000-7f9febe77000 r--p 00082000 fd:01 2196                       /lib64/libm-2.12.so
7f9febe77000-7f9febe78000 rw-p 00083000 fd:01 2196                       /lib64/libm-2.12.so
7f9febe78000-7f9febf60000 r-xp 00000000 fd:05 1821                       /usr/lib64/libstdc++.so.6.0.13
7f9febf60000-7f9fec160000 ---p 000e8000 fd:05 1821                       /usr/lib64/libstdc++.so.6.0.13
7f9fec160000-7f9fec167000 r--p 000e8000 fd:05 1821                       /usr/lib64/libstdc++.so.6.0.13
7f9fec167000-7f9fec169000 rw-p 000ef000 fd:05 1821                       /usr/lib64/libstdc++.so.6.0.13
7f9fec169000-7f9fec17e000 rw-p 00000000 00:00 0
7f9fec17e000-7f9fec185000 r-xp 00000000 fd:01 2216                       /lib64/librt-2.12.so
7f9fec185000-7f9fec384000 ---p 00007000 fd:01 2216                       /lib64/librt-2.12.so
7f9fec384000-7f9fec385000 r--p 00006000 fd:01 2216                       /lib64/librt-2.12.so
7f9fec385000-7f9fec386000 rw-p 00007000 fd:01 2216                       /lib64/librt-2.12.so
7f9fec386000-7f9fec39d000 r-xp 00000000 fd:01 337                        /lib64/libpthread-2.12.so
7f9fec39d000-7f9fec59d000 ---p 00017000 fd:01 337                        /lib64/libpthread-2.12.so
7f9fec59d000-7f9fec59e000 r--p 00017000 fd:01 337                        /lib64/libpthread-2.12.so
7f9fec59e000-7f9fec59f000 rw-p 00018000 fd:01 337                        /lib64/libpthread-2.12.so
7f9fec59f000-7f9fec5a3000 rw-p 00000000 00:00 0
7f9fec5a3000-7f9fec5a5000 r-xp 00000000 fd:01 2194                       /lib64 ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by StevenPuttemans
close date 2013-11-23 13:48:02.949372

Comments

Actually the worst approach possible for model training is using 1 sample and generating those artificial positive samples. Just take your object and place it in 150 true positive situations, this will give you a way better result! Don't know what is going wrong here, I am not using the tool in this way :P

StevenPuttemans gravatar imageStevenPuttemans ( 2013-11-23 10:27:08 -0600 )edit
1

The problem was the path of infofile.txt

ioanna gravatar imageioanna ( 2013-11-23 12:08:05 -0600 )edit