From b0946fab2d2fc630dbe029ee64d6eb28560ce4a7 Mon Sep 17 00:00:00 2001 From: lichen Date: Sat, 21 Jun 2025 13:41:13 +0800 Subject: [PATCH] update --- datasets_preprocess/split_train_val_.py | 2 +- datasets_preprocess/voc_label_.py | 6 +++--- error_img.txt | 0 train.py | 2 +- ultralytics/cfg/default.yaml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 error_img.txt diff --git a/datasets_preprocess/split_train_val_.py b/datasets_preprocess/split_train_val_.py index 4d38e21..2a1ad99 100644 --- a/datasets_preprocess/split_train_val_.py +++ b/datasets_preprocess/split_train_val_.py @@ -4,7 +4,7 @@ import random import argparse 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') # 图片存放地址 # 数据集的划分,地址选择自己数据下的ImageSets/Main parser.add_argument('--txt_path', default='/home/lc/data_center/gift/yolov10_data/Main', type=str, diff --git a/datasets_preprocess/voc_label_.py b/datasets_preprocess/voc_label_.py index 65a149d..8b8e95a 100644 --- a/datasets_preprocess/voc_label_.py +++ b/datasets_preprocess/voc_label_.py @@ -76,9 +76,9 @@ def convert_annotation(image_id, imgname_list, label_path, Annotation_path, imag # abs_path = os.getcwd() -image_path = '/home/lc/data_center/gift/ori_image/images/' # img实际存放地址 -Annotation_path = '/home/lc/data_center/gift/ori_image/xmls/' # xml实际存放地址 -label_path = '/home/lc/data_center/gift/ori_image/labels/' # 保存路径 +image_path = '/home/lc/data_center/gift/v2/images/' # img实际存放地址 +Annotation_path = '/home/lc/data_center/gift/v2/xmls/' # xml实际存放地址 +label_path = '/home/lc/data_center/gift/v2/labels/' # 保存路径 # wd = getcwd() imgname_list = [] diff --git a/error_img.txt b/error_img.txt new file mode 100644 index 0000000..e69de29 diff --git a/train.py b/train.py index 18ec1a0..9c5a7fb 100644 --- a/train.py +++ b/train.py @@ -17,5 +17,5 @@ model = YOLOv10('ckpts/weights/yolov10n.pt') #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_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) \ No newline at end of file diff --git a/ultralytics/cfg/default.yaml b/ultralytics/cfg/default.yaml index ce31732..d8a2ecb 100644 --- a/ultralytics/cfg/default.yaml +++ b/ultralytics/cfg/default.yaml @@ -17,7 +17,7 @@ save_period: -1 # (int) Save checkpoint every x epochs (disabled if < 1) val_period: 1 # (int) Validation every x epochs 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 -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 name: # (str, optional) experiment name, results saved to 'project/name' directory exist_ok: False # (bool) whether to overwrite existing experiment