0

I have allmy files ready to train my model but when i try to merge sample files I get this error:

Traceback (most recent call last):
  File "./tools/mergevec.py", line 170, in <module>
    merge_vec_files(vec_directory, output_filename)
  File "./tools/mergevec.py", line 120, in merge_vec_files
    val = struct.unpack('<iihh', content[:12])
TypeError: a bytes-like object is required, not 'str'

i have my positive nad negative images ready and with

python ./tools/mergevec.py -v samples/ -o samples.vec

I try to merge my files but than i got above error.

And the answer that comes up on stackoverflow regarding this mistake did not work in my case

hallo joe
  • 15
  • 1
  • 7
  • 1
    Does this answer your question? [OpenCV Haar Cascade Creation](https://stackoverflow.com/questions/59033016/opencv-haar-cascade-creation) – alkasm Dec 29 '20 at 20:05
  • you are using outdated code that was written for python 2, while you run it with python 3. that is the mistake. – Christoph Rackwitz Dec 30 '20 at 04:43

0 Answers0