Option 1 – Same distortion for all positive samples

  • Create samples from each sample from a folder:
    • for imagefile in /*.jpg; do imagename=`basename $imagefile`; opencv_createsamples -img $imagefile -num  -bg  -vec /$imagename.vec -w  -h ; done
  • Merge the vec files:
    • Download `mergevec.py` from https://github.com/wulfebw/mergevec
    • Navigate to `mergevec.py` in your terminal and enter:
      python mergevec.py -v your_vec_directory -o your_output_filename.vec

Option 2 – Random distortion for each positive sample