OpenCV haartraining: Mergevec error: Input file does not exist or not readable

后端 未结 2 1989
迷失自我
迷失自我 2021-01-26 09:14

Following this tutorial, I\'ve created my positive samples but need to merge them now, using mergevec. I downloaded the mergevec.exe binary file provided and got the two require

相关标签:
2条回答
  • 2021-01-26 09:37

    I was in the same situation as you few days ago so i'll try to help you out =P.

    First of all i am interested to know where you found the mergevec.exe, because it isn't available to download anymore if i recall. I ask because i think that you might have downloaded an exe compiled on Linux. I had the same error when i tried to execute the mergevec, i had compiled on Ubuntu, on my Windows computer. Even with the 2 dlls.

    As i explained it here , The mergevec from Naotoshi was originally made for Unix distribution, so under windows you will encounter a lot of problems. I first tried to do it on windows but i abandonned because it was too complicated and even with a full Cygwin installation i could not compile the mergevec.cpp.

    What i advise you to do is to create yourself an Ubuntu virtual machine and to compile your own mergevec.exe. Once done you can copy your vec files in your virtual machine and merge them under Ubuntu. After this you can bring back the merged vec file to Windows if you want (It is better to not run the training under a VM: less computation power).

    Here is what i did:

    • Installed VMware player with Ubuntu 14.0.4 (although i don't recommend it, still some bugs)
    • Installed OpenCV from the sources with TBB. There are a lot of tutorials, but the only one that worked for me is the OPenCV website, they are the more accurate on the libraries you mandatorily need.
    • I downloaded the GitHub classifier training and then I followed the commands given and it worked well.

    If you encounter any library problem or OpenCV Installation issue don't hesitate i went through them too.

    0 讨论(0)
  • 2021-01-26 09:42

    I ran into this issue as well and made a python utility that combines .vec files to avoid installing openCV again: https://github.com/wulfebw/mergevec

    Hope it helps.

    0 讨论(0)
提交回复
热议问题