computer vision - OpenCV createsamples - invalid background description file -
i'm in opencv_root
folder , running following command in win-x64:
opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 80 -h 40 -img absolute_path_to_positive_images_folder\car.jpg -bg absolute_path_to_project\negatives.txt -vec absolute_path_to_samples_folder\car.jpg.vec -num 125
my negatives.txt
looks this:
negative_images\city01_02.jpg negative_images\city01_04.jpg negative_images\city01_05.jpg negative_images\city01_06.jpg negative_images\city01_07.jpg
this output:
info file name: (null) img file name: absolute_path_to_positive_images_folder\car.jpg vec file name: absolute_path_to_samples_folder\car.jpg.vec bg file name: absolute_path_to_project\negatives.txt num: 125 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: 80 height: 40 create training samples single image applying distortions... invalid background description file.
what's invalid negatives collection file (negatives.txt
)? tried listing files within both absolute paths , relative paths. i'm following this tutorial.
problem solved! issue had written collection file names in notepad++, , seemed fine. when happened open same file in notepad, noticed there no newlines after each image filename! when added newlines, , ran command, samples got created without errors!
Comments
Post a Comment