Tianxiaomo / pytorch-YOLOv4

PyTorch ,ONNX and TensorRT implementation of YOLOv4
Apache License 2.0
4.48k stars 1.49k forks source link

label 路径在哪里啊? #294

Open Jackerho opened 4 years ago

Jackerho commented 4 years ago
train_dataset = Yolo_dataset(config.train_label, config, train=True)
val_dataset = Yolo_dataset(config.val_label, config, train=False)

运行train.py

log file path:log\log_2020-10-13_20-38-09.txt 2020-10-13 20:38:10,358 train.py[line:611] INFO: Using device cpu convalution havn't activate linear convalution havn't activate linear convalution havn't activate linear Traceback (most recent call last): File "D:/Project/python/pytorch-YOLOv4-master/train.py", line 626, in device=device, ) File "D:/Project/python/pytorch-YOLOv4-master/train.py", line 292, in train train_dataset = Yolo_dataset(config.train_label, config, train=True) File "D:\Project\python\pytorch-YOLOv4-master\dataset.py", line 255, in init f = open(label_path, 'r', encoding='utf-8') FileNotFoundError: [Errno 2] No such file or directory: 'train.txt'

Jackerho commented 4 years ago

Cfg.train_label = os.path.join(_BASE_DIR, 'data', 'train.txt') Cfg.val_label = os.path.join(_BASE_DIR, 'data', 'val_label.txt') 路径没问题,但还是找不到train.txt

ws1414153477 commented 4 years ago

train.txt放到主路径就可以了

Jackerho commented 4 years ago

train.txt放到主路径就可以了

谢谢,可以运行,不过还是保守点好

THEBEST-cloud commented 4 years ago

请问是放在data目录下吗,为什么我放在data目录下也没有用呢

Whynot-me commented 4 years ago

标签中的坐标值需要归一化吗

THEBEST-cloud commented 4 years ago

需要的 ---原始邮件--- 发件人:"Whynot-me"<notifications@github.com> 发送时间:2020年11月5日 星期四 下午7:5 收件人:"Tianxiaomo/pytorch-YOLOv4"<pytorch-YOLOv4@noreply.github.com> 抄送:"THEBEST-cloud"<1543012632@qq.com>;"Comment"<comment@noreply.github.com> 主题:Re: [Tianxiaomo/pytorch-YOLOv4] label 路径在哪里啊? (#294)

标签中的坐标值需要归一化吗

— You are receiving this because you commented. Reply to this email directly,view it on GitHub, orunsubscribe.

ghost commented 3 years ago

修改train.py第544行默认路径或者在训练命令中指定路径 parser.add_argument('-train_label_path', dest='train_label', type=str, default='train.txt', help="train label path")