bubbliiiing / yolo3-pytorch

这是一个yolo3-pytorch的源码,可以用于训练自己的模型。
MIT License
1.99k stars 584 forks source link

ValueError: invalid literal for int() with base 10: '72.0' #76

Open kingrt666666 opened 3 years ago

kingrt666666 commented 3 years ago

想问一下为什么训练过程会报出这样的错误呢? Traceback (most recent call last): File "D:/yolo3-pytorch-master/train.py", line 234, in fit_one_epoch(net, yolo_loss, epoch, epoch_size, epoch_size_val, gen, gen_val, Freeze_Epoch, Cuda) File "D:/yolo3-pytorch-master/train.py", line 33, in fit_one_epoch for iteration, batch in enumerate(gen): File "C:\Python36\Lib\site-packages\torch\utils\data\dataloader.py", line 517, in next data = self._next_data() File "C:\Python36\Lib\site-packages\torch\utils\data\dataloader.py", line 557, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "C:\Python36\Lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\Python36\Lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "D:\yolo3-pytorch-master\utils\dataloader.py", line 121, in getitem img, y = self.get_random_data(lines[index], self.image_size[0:2]) File "D:\yolo3-pytorch-master\utils\dataloader.py", line 28, in get_random_data box = np.array([np.array(list(map(int, box.split(',')))) for box in line[1:]]) File "D:\yolo3-pytorch-master\utils\dataloader.py", line 28, in box = np.array([np.array(list(map(int, box.split(',')))) for box in line[1:]]) ValueError: invalid literal for int() with base 10: '72.0'

bubbliiiing commented 3 years ago

兄弟因为你的数据集里面有个xml有特别多的小鼠

bubbliiiing commented 3 years ago

小数

kingrt666666 commented 3 years ago

兄弟因为你的数据集里面有个xml有特别多的小鼠

请问该怎么解决呀?

bubbliiiing commented 3 years ago

。。你把对应的删了就行了

bubbliiiing commented 3 years ago

小数部分