补全内容

This commit is contained in:
2025-02-21 14:28:44 +08:00
parent 85d0a8fadc
commit e74cb852c4
10 changed files with 207 additions and 13 deletions

20
test.py Normal file
View File

@ -0,0 +1,20 @@
import subprocess
def main():
data = 'D:\\syg\\yolov5\\datasets\\hqjvaj\\v1\\hqjvaj.yaml'
project = 'D:\\syg\\yolov5\\runs\\hqjvaj\\train'
name = 'v1'
epochs = 10
yolo_path = 'yolov5/train.py'
subprocess.run(["python", yolo_path, "--data=" + data, "--project="
+ project, "--name=" + name, "--epochs=" + str(epochs)], check=True)
if __name__ == "__main__":
"""
如果此脚本被直接运行则调用main()函数。
如果此脚本被其他脚本导入则不会自动调用main()。
"""
main()