RangiLyu / nanodet

NanoDet-Plus⚡Super fast and lightweight anchor-free object detection model. 🔥Only 980 KB(int8) / 1.8MB (fp16) and run 97FPS on cellphone🔥
Apache License 2.0
5.77k stars 1.04k forks source link

ValueError: num_samples should be a positive integer value, but got num_samples=0 #440

Open Elias9898 opened 2 years ago

Elias9898 commented 2 years ago

hi! 我在用voc数据集训练模型时得到以下报错, 当前路径是: img_path: \D:\dataset\train\images ann_path: \D:\dataset\train\annotations

[NanoDet][05-29 05:04:59]INFO:Setting up data... creating index... index created! creating index... index created! Traceback (most recent call last): File "tools/train.py", line 136, in main(args) File "tools/train.py", line 75, in main train_dataloader = torch.utils.data.DataLoader( File "C:\Users\33184\anaconda3\envs\nanodet\lib\site-packages\torch\utils\data\dataloader.py", line 277, in init sampler = RandomSampler(dataset, generator=generator) # type: ignore[arg-type] File "C:\Users\33184\anaconda3\envs\nanodet\lib\site-packages\torch\utils\data\sampler.py", line 97, in init raise ValueError("num_samples should be a positive integer " ValueError: num_samples should be a positive integer value, but got num_samples=0

感谢

Juanting-Xu commented 2 years ago

同样遇到这个问题,请问解决了吗

Elias9898 commented 2 years ago

还没有

paartheee commented 2 years ago

You set the wrong path and the model cannot find the training data to start training ( 您设置了错误的路径,模型找不到训练数据开始训练)

onlybjf commented 2 years ago

shuffle=False can solve this problem

Trumpetertimes commented 1 year ago

请问解决了吗,我卡到了这一步。

zhuleia commented 4 months ago

请问解决了吗?