Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

训练问题 #18

Open
justcodew opened this issue Jul 28, 2022 · 7 comments
Open

训练问题 #18

justcodew opened this issue Jul 28, 2022 · 7 comments

Comments

@justcodew
Copy link

justcodew commented Jul 28, 2022

使用作者放在百度网盘的模型作为初始模型,数据使用CCPD
数据格式为: 类别、中心坐标、中心宽高、四个角点 (做了归一化)
训练效果比较奇怪,从55到56epoch精度和召回率直接下降到0

yolo_train

image

image

@justcodew
Copy link
Author

justcodew commented Jul 28, 2022

数据格式
3432-20_6-47&274_673&732-673&516_110&732_47&490_610&274-0_0_2_11_33_28_30-108-396
box : 47&274_673&732
points : 673&516_110&732_47&490

转换为
0 0.5 0.4336206896551724 0.8694444444444445 0.39482758620689656 0.9347222222222222 0.44482758620689655 0.1527777777777778 0.6310344827586207 0.06527777777777778 0.4224137931034483 0.8472222222222222 0.23620689655172414
从训练日志中可视化的图片看 数据标签应该是没有问题的

image

@ouxiand
Copy link

ouxiand commented Aug 20, 2022

请问你解决了吗? 我怎么训练都有bug 处理一个又一个

@ouxiand
Copy link

ouxiand commented Aug 20, 2022

数据格式和你是一样的

@ouxiand
Copy link

ouxiand commented Aug 20, 2022

Traceback (most recent call last):
File "/detect/yolov5-car-plate/./train.py", line 552, in
train(hyp, opt, device, tb_writer)
File "/detect/yolov5-car-plate/./train.py", line 285, in train
for i, (imgs, targets, paths, _) in pbar: # batch -------------------------------------------------------------
File "/root/anaconda3/lib/python3.9/site-packages/tqdm/std.py", line 1195, in iter
for obj in iterable:
File "/detect/yolov5-car-plate/utils/plate_datasets.py", line 104, in iter
yield next(self.iterator)
File "/root/anaconda3/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 521, in next
data = self._next_data()
File "/root/anaconda3/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1183, in _next_data
return self._process_data(data)
File "/root/anaconda3/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
data.reraise()
File "/root/anaconda3/lib/python3.9/site-packages/torch/_utils.py", line 434, in reraise
raise exception
TypeError: Caught TypeError in DataLoader worker process 1.
Original Traceback (most recent call last):
File "/root/anaconda3/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/root/anaconda3/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/root/anaconda3/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/detect/yolov5-car-plate/utils/plate_datasets.py", line 530, in getitem
img, labels = load_mosaic(self, index)
File "/detect/yolov5-car-plate/utils/plate_datasets.py", line 758, in load_mosaic
x,y = point
TypeError: cannot unpack non-iterable numpy.float32 object

@ouxiand
Copy link

ouxiand commented Aug 20, 2022

数据集
0 0.4346698113207547 0.5932914046121593 0.2761399371069182 0.2865129280223619 0.33885613207547166 0.6457023060796646 0.40469732704402517 0.6561844863731656 0.40469732704402517 0.6876310272536688 0.34180424528301884 0.6771488469601677

1 similar comment
@ouxiand
Copy link

ouxiand commented Aug 20, 2022

数据集
0 0.4346698113207547 0.5932914046121593 0.2761399371069182 0.2865129280223619 0.33885613207547166 0.6457023060796646 0.40469732704402517 0.6561844863731656 0.40469732704402517 0.6876310272536688 0.34180424528301884 0.6771488469601677

@justcodew
Copy link
Author

justcodew commented Aug 23, 2022

没解决 使用了其他旋转目标检测的方法
https://github.com/open-mmlab/mmrotate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants