This commit is contained in:
2025-06-21 13:41:13 +08:00
parent e474ab5f9f
commit b0946fab2d
5 changed files with 6 additions and 6 deletions

View File

@ -4,7 +4,7 @@ import random
import argparse import argparse
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('--img_path', default='/home/lc/data_center/gift/ori_image/images', type=str, parser.add_argument('--img_path', default='/home/lc/data_center/gift/v2/images', type=str,
help='input xml label path') # 图片存放地址 help='input xml label path') # 图片存放地址
# 数据集的划分地址选择自己数据下的ImageSets/Main # 数据集的划分地址选择自己数据下的ImageSets/Main
parser.add_argument('--txt_path', default='/home/lc/data_center/gift/yolov10_data/Main', type=str, parser.add_argument('--txt_path', default='/home/lc/data_center/gift/yolov10_data/Main', type=str,

View File

@ -76,9 +76,9 @@ def convert_annotation(image_id, imgname_list, label_path, Annotation_path, imag
# abs_path = os.getcwd() # abs_path = os.getcwd()
image_path = '/home/lc/data_center/gift/ori_image/images/' # img实际存放地址 image_path = '/home/lc/data_center/gift/v2/images/' # img实际存放地址
Annotation_path = '/home/lc/data_center/gift/ori_image/xmls/' # xml实际存放地址 Annotation_path = '/home/lc/data_center/gift/v2/xmls/' # xml实际存放地址
label_path = '/home/lc/data_center/gift/ori_image/labels/' # 保存路径 label_path = '/home/lc/data_center/gift/v2/labels/' # 保存路径
# wd = getcwd() # wd = getcwd()
imgname_list = [] imgname_list = []

0
error_img.txt Normal file
View File

View File

@ -17,5 +17,5 @@ model = YOLOv10('ckpts/weights/yolov10n.pt')
#model.train(data='coco.yaml', epochs=1, batch=64, imgsz=640) #model.train(data='coco.yaml', epochs=1, batch=64, imgsz=640)
#model.train(data='coco128_cls10_0924.yaml', epochs=300, batch=64, imgsz=640, resume=False) #model.train(data='coco128_cls10_0924.yaml', epochs=300, batch=64, imgsz=640, resume=False)
#model.train(data='coco128_cls10_1010.yaml', epochs=300, batch=128, imgsz=640, resume=False) #model.train(data='coco128_cls10_1010.yaml', epochs=300, batch=128, imgsz=640, resume=False)
model.train(data='gift.yaml', epochs=200, batch=16, imgsz=224, resume=False, save_dir='ckpts') model.train(data='gift.yaml', epochs=400, batch=32, imgsz=224, resume=False, save_dir='/ckpts')
#model.train(data='coco128_cls10_1010_1205.yaml', epochs=300, batch=32, imgsz=640, resume=True) #model.train(data='coco128_cls10_1010_1205.yaml', epochs=300, batch=32, imgsz=640, resume=True)

View File

@ -17,7 +17,7 @@ save_period: -1 # (int) Save checkpoint every x epochs (disabled if < 1)
val_period: 1 # (int) Validation every x epochs val_period: 1 # (int) Validation every x epochs
cache: False # (bool) True/ram, disk or False. Use cache for data loading cache: False # (bool) True/ram, disk or False. Use cache for data loading
device: # (int | str | list, optional) device to run on, i.e. cuda device=0 or device=0,1,2,3 or device=cpu device: # (int | str | list, optional) device to run on, i.e. cuda device=0 or device=0,1,2,3 or device=cpu
workers: 8 # (int) number of worker threads for data loading (per RANK if DDP) workers: 16 # (int) number of worker threads for data loading (per RANK if DDP)
project: # (str, optional) project name project: # (str, optional) project name
name: # (str, optional) experiment name, results saved to 'project/name' directory name: # (str, optional) experiment name, results saved to 'project/name' directory
exist_ok: False # (bool) whether to overwrite existing experiment exist_ok: False # (bool) whether to overwrite existing experiment