Open weiwei23456789 opened 5 years ago
@weiwei23456789 Try this one: Line 74 File icdar.py split_line = line.encode('utf-8').decode('utf-8-sig').strip().split(',')
@weiwei23456789 Try this one: Line 74 File icdar.py split_line = line.encode('utf-8').decode('utf-8-sig').strip().split(',')
感谢你回答我,好像不行,刷出新问题, File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 273, in generator im_mask = get_annotation(index, annotation_path, im.shape) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 72, in get_annotation split_line = line.encode('utf-8').decode('utf-8-sig').strip().split(',') UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)
@weiwei23456789 try this bro: line = [i.strip('\ufeff').strip('\xef\xbb\xbf') for i in line]
@weiwei23456789 try this bro: line = [i.strip('\ufeff').strip('\xef\xbb\xbf') for i in line]
参考您的意见已经改过了,可以进行训练啦,非常感谢您
decode('utf-8-sig') when you open file txt
icdar2015数据集难以辨认的文本设置为###,所以导致以下错误 代码Traceback (most recent call last): File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 278, in generator image, gt_boxes, gt_masks, gt_class_ids = resize_image_and_annotation(im, im_mask, cfg) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 99, in resize_image_and_annotation mode=cfg.IMAGE_RESIZE_MODE) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/nets/utils.py", line 291, in resize_image preserve_range=True) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/nets/utils.py", line 765, in resize preserve_range=preserve_range) TypeError: resize() got an unexpected keyword argument 'clip' Traceback (most recent call last): File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 278, in generator image, gt_boxes, gt_masks, gt_class_ids = resize_image_and_annotation(im, im_mask, cfg) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 99, in resize_image_and_annotation mode=cfg.IMAGE_RESIZE_MODE) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/nets/utils.py", line 291, in resize_image preserve_range=True) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/nets/utils.py", line 765, in resize preserve_range=preserve_range) TypeError: resize() got an unexpected keyword argument 'clip' Traceback (most recent call last): File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 271, in generator im_mask = get_annotation(index, annotation_path, im.shape) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 74, in get_annotation poly = list(map(int, split_line[:8])) ValueError: invalid literal for int() with base 10: '\xef\xbb\xbf278' Traceback (most recent call last): File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 278, in generator image, gt_boxes, gt_masks, gt_class_ids = resize_image_and_annotation(im, im_mask, cfg) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 99, in resize_image_and_annotation mode=cfg.IMAGE_RESIZE_MODE) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/nets/utils.py", line 291, in resize_image preserve_range=True) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/nets/utils.py", line 765, in resize preserve_range=preserve_range) TypeError: resize() got an unexpected keyword argument 'clip' Traceback (most recent call last): File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 278, in generator image, gt_boxes, gt_masks, gt_class_ids = resize_image_and_annotation(im, im_mask, cfg) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 99, in resize_image_and_annotation mode=cfg.IMAGE_RESIZE_MODE) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/nets/utils.py", line 291, in resize_image preserve_range=True) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/nets/utils.py", line 765, in resize preserve_range=preserve_range) TypeError: resize() got an unexpected keyword argument 'clip' Traceback (most recent call last): File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 271, in generator im_mask = get_annotation(index, annotation_path, im.shape) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 74, in get_annotation poly = list(map(int, split_line[:8])) ValueError: invalid literal for int() with base 10: '\xef\xbb\xbf690' Traceback (most recent call last): File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 271, in generator im_mask = get_annotation(index, annotation_path, im.shape) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 74, in get_annotation poly = list(map(int, split_line[:8])) ValueError: invalid literal for int() with base 10: '\xef\xbb\xbf737' Traceback (most recent call last): File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 271, in generator im_mask = get_annotation(index, annotation_path, im.shape) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 74, in get_annotation poly = list(map(int, split_line[:8])) ValueError: invalid literal for int() with base 10: '\xef\xbb\xbf757' Traceback (most recent call last): File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 278, in generator image, gt_boxes, gt_masks, gt_class_ids = resize_image_and_annotation(im, im_mask, cfg) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 99, in resize_image_and_annotation mode=cfg.IMAGE_RESIZE_MODE) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/nets/utils.py", line 291, in resize_image preserve_range=True) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/nets/utils.py", line 765, in resize preserve_range=preserve_range) TypeError: resize() got an unexpected keyword argument 'clip' Traceback (most recent call last): File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 271, in generator im_mask = get_annotation(index, annotation_path, im.shape) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 74, in get_annotation poly = list(map(int, split_line[:8])) ValueError: invalid literal for int() with base 10: '\xef\xbb\xbf482' Traceback (most recent call last): File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 271, in generator im_mask = get_annotation(index, annotation_path, im.shape) File "/media/omnisky/5db8f49c-04ad-4524-98c7-9fad6831d722/weiwei/4hao/Scene-Text-Detection-with-SPCNET-master/data/icdar.py", line 74, in get_annotation poly = list(map(int, split_line[:8])) ValueError: invalid literal for int() with base 10: '\xef\xbb\xbf739'
ValueErro: invalid literal for int() with base 10:r和TypeError:resize() got an unexpected keyword argument 'clip'一直重复出现,请教大神们这个问题怎么改,或者联系qq:1940471243,求指教,谢谢啦