Open Aruen24 opened 2 years ago
训练的时候没遇到这个问题,你最后解决了吗?
x = torch.cat((box[i], x[i, j + 13, None], x[:, 5:13] ,j[:, None].float()), 1)
改成 x = torch.cat((box[i], x[i, j + 13, None], x[i, 5:13] ,j[:, None].float()), 1)
x = torch.cat((box[i], x[i, j + 13, None], x[:, 5:13] ,j[:, None].float()), 1)
改成 x = torch.cat((box[i], x[i, j + 13, None], x[i, 5:13] ,j[:, None].float()), 1) 你好 请问你标签格式是什么样的?是cls cx cy w h x1 y1 x2 y2 x3 y3 x4 y4吗 谢谢。
@neverstoplearn 是的
@neverstoplearn 好的 谢谢
x = torch.cat((box[i], x[i, j + 13, None], x[:, 5:13] ,j[:, None].float()), 1)
改成 x = torch.cat((box[i], x[i, j + 13, None], x[i, 5:13] ,j[:, None].float()), 1)
你好换成你说的这个之后所有的mAP AP都是0
Starting training for 300 epochs...
Epoch gpu_mem box obj cls landmark total targets img_size 0/299 3.91G 0.059 0.01828 0.02349 0.12 0.2208 6 640: 100%|█████████████████████████████████████████████████████████████████████| 95/95 [00:52<00:00, 1.82it/s] Epoch gpu_mem box obj cls landmark total targets img_size 1/299 3.92G 0.05078 0.01312 0.01976 0.09381 0.1775 2 640: 100%|█████████████████████████████████████████████████████████████████████| 95/95 [00:50<00:00, 1.89it/s] Epoch gpu_mem box obj cls landmark total targets img_size 2/299 3.92G 0.05082 0.01197 0.01861 0.09338 0.1748 2 640: 100%|█████████████████████████████████████████████████████████████████████| 95/95 [00:48<00:00, 1.96it/s] Class Images Targets P R mAP@.5 mAP@.5:.95: 0%| | 0/10 [00:00<?, ?it/s]
Traceback (most recent call last): File "train.py", line 516, in train(hyp, opt, device, tb_writer, wandb) File "train.py", line 349, in train log_imgs=opt.log_imgs if wandb else 0) File "/home/wyw/License-Plate-Detector/test.py", line 121, in test output = non_max_suppression_plate(inf_out, conf_thres=conf_thres, iou_thres=iou_thres, labels=lb) File "/home/wyw/License-Plate-Detector/utils/general.py", line 424, in non_max_suppression_plate x = torch.cat((box[i], x[i, j + 13, None], x[:, 5:13] ,j[:, None].float()), 1) RuntimeError: Sizes of tensors must match except in dimension 0. Got 2016 and 3248 (The offending index is 2)
你好请问解决了吗
Starting training for 300 epochs...
Traceback (most recent call last): File "train.py", line 516, in
train(hyp, opt, device, tb_writer, wandb)
File "train.py", line 349, in train
log_imgs=opt.log_imgs if wandb else 0)
File "/home/wyw/License-Plate-Detector/test.py", line 121, in test
output = non_max_suppression_plate(inf_out, conf_thres=conf_thres, iou_thres=iou_thres, labels=lb)
File "/home/wyw/License-Plate-Detector/utils/general.py", line 424, in non_max_suppression_plate
x = torch.cat((box[i], x[i, j + 13, None], x[:, 5:13] ,j[:, None].float()), 1)
RuntimeError: Sizes of tensors must match except in dimension 0. Got 2016 and 3248 (The offending index is 2)