Files
004_comission/vinniesniper-54816/task1/_lab/007-train-beach-test2/step1.py
louiscklaw b3cc8e8323 update,
2025-01-31 22:57:47 +08:00

10 lines
447 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import os
# 处理前要将pos.txt里面每行按"*.jpg 1 0 0 20 20"的格式修改neg.txt不需要改格式
# neg.txt和pos.txt里面末尾的空行要删去
# neg.txt里面图片大小和数量可以不用特别指定也不需要生成vec文件
# os.system("opencv_createsamples.exe -vec pos.vec -info pos.txt -num 100 -w 20 -h 20")
os.system("opencv_createsamples -info pos.txt -vec pos.vec -num 100 -w 20 -h 20")
# os.system("pause")