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

訓練MTWI_2018數據集發生錯誤 #68

Open
f771216203 opened this issue Apr 8, 2020 · 9 comments
Open

訓練MTWI_2018數據集發生錯誤 #68

f771216203 opened this issue Apr 8, 2020 · 9 comments

Comments

@f771216203
Copy link

Traceback (most recent call last):
File "train.py", line 263, in
main()
File "train.py", line 177, in main
num_workers=int(config.workers))
File "/home/yian/anaconda3/envs/psenet_pytorch/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 176, in init
sampler = RandomSampler(dataset)
File "/home/yian/anaconda3/envs/psenet_pytorch/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 66, in init
"value, but got num_samples={}".format(self.num_samples))
ValueError: num_samples should be a positive integer value, but got num_samples=0

我將訓練資料替換成MTWI_2018結果就報了以上錯誤,看起來label格式都是4個座標加注釋如下:
350.01,46.02,350.01,110.96,710.5,110.96,710.5,46.02,船用温度计
546.36,410.09,546.36,426.45,648.12,426.45,648.12,410.09,DaoGuan
491.65,327.25,491.65,356.91,502.38,356.91,502.38,327.25,###
178.71,324.7,178.71,356.4,490.11,356.4,490.11,324.7,13816752538
41.67,506.73,41.67,564.51,715.61,564.51,715.61,506.73,上海道冠五金有限公司
想請問除了config.py的trainroot以及train.py的img_path及gt_path更改以外我有哪裡漏改的嗎?還是座標需要是整數?

@f771216203
Copy link
Author

找到dataset/data_utils.py裡的label_path好像也要做更改,另外想請問img與label檔案格式不是gt開頭的話該如何做更改才能成功訓練

@WenmuZhou
Copy link
Owner

更改datautil里dataset的代码

@f771216203
Copy link
Author

image

前面訓練都沒有報錯,直到第12個epoch出現了這個錯誤,想請問這樣是資料集哪裡出了問題?

@f771216203 f771216203 reopened this Apr 10, 2020
@f771216203
Copy link
Author

另外想請問為何要設計成框里的文本不能是### 或者*?目的不是文本檢測嗎後面的標籤應該不影響吧

@WenmuZhou
Copy link
Owner

图片你的错误是有一个文本的长度被计算为0了,检查下标注
###是因为有些公开数据集的模糊样本被标注为这样的

@zqnnn
Copy link

zqnnn commented Jun 1, 2020

image

前面訓練都沒有報錯,直到第12個epoch出現了這個錯誤,想請問這樣是資料集哪裡出了問題?

请问你解决这个问题了吗,我也遇到了

@NextGuido
Copy link

image
前面訓練都沒有報錯,直到第12個epoch出現了這個錯誤,想請問這樣是資料集哪裡出了問題?

请问你解决这个问题了吗,我也遇到了

@zqnnn 说一下我的解决方法,将下方的代码注释掉重新运行即可。不知道对不对,但是我的数据重新运行不会出现这个问题了:

poly = poly.astype(np.int)

@zqnnn
Copy link

zqnnn commented Jun 16, 2020

@NextGuido
请问你是按照icdar15的数据格式重新调整了MTWI数据嘛?我是指文本框方向还有整数

@NextGuido
Copy link

@NextGuido
请问你是按照icdar15的数据格式重新调整了MTWI数据嘛?我是指文本框方向还有整数

对的

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

4 participants