Traceback (most recent call last):
File "D:\anaconda\b\envs\labelimg\lib\site-packages\labelImg\labelImg.py", line 1376, in open_next_image
self.load_file(filename)
File "D:\anaconda\b\envs\labelimg\lib\site-packages\labelImg\labelImg.py", line 1111, in load_file
self.show_bounding_box_from_annotation_file(file_path)
File "D:\anaconda\b\envs\labelimg\lib\site-packages\labelImg\labelImg.py", line 1154, in show_bounding_box_from_annotation_file
self.load_yolo_txt_by_filename(txt_path)
File "D:\anaconda\b\envs\labelimg\lib\site-packages\labelImg\labelImg.py", line 1557, in load_yolo_txt_by_filename
t_yolo_parse_reader = YoloReader(txt_path, self.image)
File "D:\anaconda\b\envs\labelimg\lib\site-packages\libs\yolo_io.py", line 112, in __init__
self.parse_yolo_format()
File "D:\anaconda\b\envs\labelimg\lib\site-packages\libs\yolo_io.py", line 142, in parse_yolo_format
class_index, x_center, y_center, w, h = bndBox.strip().split(' ')
ValueError: not enough values to unpack (expected 5, got 1)
错误翻译:期待返回5个值,只返回了1个。
错误原因:存在回车键(对应的txt文件或下一个)
没有多余行,就能解决问题了。