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
你好,我想在DOTA数据集上跑下您这个代码但是出现问题。 #13
Comments
这种调试问题尽量自己解决一下,比如你的类别数错了,dota1.5不是10 |
@wong1998 我也遇到这个问题,标签也是1.5的,请问您是怎么解决的? |
这个问题不是因为类别数设置错误,是因为有空标签,就是一个裁好的图没有目标,所以 roidb['boxes']是空的,怎么解决呀,跑了作者的两个代码都是这个问题 |
@wong1998 抱歉当时是说错了。在 @icey-zhang 的提醒下,这个代码好像存在如果输入label为空的时候会出现你报告的这个bug。解决方法很简单,在generate_imageset的时候加个label文件判断是否为空就行。 |
您好,这个我试了好久还是不行,自己的水平还是不够,能否具体说明一下改进措施,谢谢! |
你好,请问您解决了吗?能否指点一下 |
我是先用了DOTA_devkit进行DOTA数据集的train和val的切分,生成相应的images,labelTxt文件夹,用的标签是DOTA1.5 obb的。之后我也用generage_dataset生成相应的包含trainval所有图像的位置的txt文件,之后修改train.py的default参数如下,然后出现了一下错误。自己不是很明白,所以来这里问下。
if name == 'main':
/home/ff/anaconda3/envs/pytorch1.6/bin/python /home/ff/WangZF/remoteSense/DAL/train.py
fail to speed up training via apex
Namespace(augment=False, backbone='res50', dataset='DOTA', freeze_bn=False, hyp='hyp.py', load=False, multi_scale=False, resume=False, target_size=[800], test_path='/home/ff/WangZF/datasets/dota/val.txt', train_path='/home/ff/WangZF/datasets/dota/train.txt', training_size=800, weight='')
{'lr0': 0.0001, 'warmup_lr': 1e-05, 'warm_epoch': 5.0, 'num_classes': 10.0, 'epochs': 100.0, 'batch_size': 2.0, 'save_interval': 5.0, 'test_interval': 5.0}
Model Summary: 195 layers, 3.63368e+07 parameters, 3.63368e+07 gradients
0%| | 0/4043 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/home/ff/WangZF/remoteSense/DAL/train.py", line 278, in
train_model(arg, hyps)
File "/home/ff/WangZF/remoteSense/DAL/train.py", line 146, in train_model
for i, (ni, batch) in enumerate(pbar):
File "/home/ff/anaconda3/envs/pytorch1.6/lib/python3.6/site-packages/tqdm/std.py", line 1193, in iter
for obj in iterable:
File "/home/ff/anaconda3/envs/pytorch1.6/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 435, in next
data = self._next_data()
File "/home/ff/anaconda3/envs/pytorch1.6/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 1085, in _next_data
return self._process_data(data)
File "/home/ff/anaconda3/envs/pytorch1.6/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 1111, in _process_data
data.reraise()
File "/home/ff/anaconda3/envs/pytorch1.6/lib/python3.6/site-packages/torch/_utils.py", line 428, in reraise
raise self.exc_type(msg)
IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/ff/anaconda3/envs/pytorch1.6/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 198, in _worker_loop
data = fetcher.fetch(index)
File "/home/ff/anaconda3/envs/pytorch1.6/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/ff/anaconda3/envs/pytorch1.6/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/ff/WangZF/remoteSense/DAL/datasets/dota_dataset.py", line 40, in getitem
bboxes = roidb['boxes'][gt_inds, :]
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
The text was updated successfully, but these errors were encountered: