DeepLearningImageCaptcha icon indicating copy to clipboard operation
DeepLearningImageCaptcha copied to clipboard

识别其它图片出错

Open Smawexi opened this issue 3 years ago • 0 comments

Traceback (most recent call last): File "D:\DeepLearningImageCaptcha\DeepLearningImageCaptcha-master\predict.py", line 39, in main() File "D:\DeepLearningImageCaptcha\DeepLearningImageCaptcha-master\predict.py", line 20, in main for i, (images, labels) in enumerate(predict_dataloader): File "D:\fsy\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 628, in next data = self._next_data() File "D:\fsy\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 671, in _next_data data = self.dataset_fetcher.fetch(index) # may raise StopIteration File "D:\fsy\Anaconda3\lib\site-packages\torch\utils\data_utils\fetch.py", line 58, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "D:\fsy\Anaconda3\lib\site-packages\torch\utils\data_utils\fetch.py", line 58, in data = [self.dataset[idx] for idx in possibly_batched_index] File "D:\DeepLearningImageCaptcha\DeepLearningImageCaptcha-master\dataset.py", line 25, in getitem label = ohe.encode(image_name.split('')[0]) File "D:\DeepLearningImageCaptcha\DeepLearningImageCaptcha-master\encoding.py", line 24, in encode vector[idx] = 1.0 IndexError: index 163 is out of bounds for axis 0 with size 144

在用predict.py去预测其它图片时出错,简单看了一下源码文件名是符合格式的xxxx_yyyy.zzz 怎么把predict.py文件改写一下呢,或者要把图片转换成什么格式?本人对深度学习这些不熟悉,望指点一下

Smawexi avatar Nov 24 '22 10:11 Smawexi