YOLOv3_TensorFlow icon indicating copy to clipboard operation
YOLOv3_TensorFlow copied to clipboard

train error

Open YSQC opened this issue 5 years ago • 8 comments

1%| | 21/2284 [00:22<10:13, 3.69it/s]2019-10-09 15:44:18.935865: W tensorflow/core/framework/op_kernel.cc:1490] Unknown: AssertionError: Annotation error! Please check your annotation file. Make sure there is at least one target object in each image. Traceback (most recent call last):

File "E:\SOFTWARE\anaconada\envs\python3.6\lib\site-packages\tensorflow\python\ops\script_ops.py", line 209, in call ret = func(*args)

File "D:\下载\YOLOv3_TensorFlow-master\utils\data_utils.py", line 214, in get_batch_data img_idx, img, y_true_13, y_true_26, y_true_52 = parse_data(line, class_num, img_size, anchors, mode, letterbox_resize)

File "D:\下载\YOLOv3_TensorFlow-master\utils\data_utils.py", line 129, in parse_data img_idx, pic_path, boxes, labels, _, _ = parse_line(line)

File "D:\下载\YOLOv3_TensorFlow-master\utils\data_utils.py", line 31, in parse_line assert len(s) > 8, 'Annotation error! Please check your annotation file. Make sure there is at least one target object in each image.'

AssertionError: Annotation error! Please check your annotation file. Make sure there is at least one target object in each image.

2%|▏ | 36/2284 [00:26<09:24, 3.98it/s]Traceback (most recent call last): File "E:\SOFTWARE\anaconada\envs\python3.6\lib\site-packages\tensorflow\python\client\session.py", line 1356, in _do_call return fn(*args) File "E:\SOFTWARE\anaconada\envs\python3.6\lib\site-packages\tensorflow\python\client\session.py", line 1341, in _run_fn options, feed_dict, fetch_list, target_list, run_metadata) File "E:\SOFTWARE\anaconada\envs\python3.6\lib\site-packages\tensorflow\python\client\session.py", line 1429, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.UnknownError: AssertionError: Annotation error! Please check your annotation file. Make sure there is at least one target object in each image. Traceback (most recent call last):

File "E:\SOFTWARE\anaconada\envs\python3.6\lib\site-packages\tensorflow\python\ops\script_ops.py", line 209, in call ret = func(*args)

File "D:\下载\YOLOv3_TensorFlow-master\utils\data_utils.py", line 214, in get_batch_data img_idx, img, y_true_13, y_true_26, y_true_52 = parse_data(line, class_num, img_size, anchors, mode, letterbox_resize)

File "D:\下载\YOLOv3_TensorFlow-master\utils\data_utils.py", line 129, in parse_data img_idx, pic_path, boxes, labels, _, _ = parse_line(line)

File "D:\下载\YOLOv3_TensorFlow-master\utils\data_utils.py", line 31, in parse_line assert len(s) > 8, 'Annotation error! Please check your annotation file. Make sure there is at least one target object in each image.'

AssertionError: Annotation error! Please check your annotation file. Make sure there is at least one target object in each image.

 [[{{node PyFunc}}]]
 [[IteratorGetNext]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:/下载/YOLOv3_TensorFlow-master/train.py", line 141, in feed_dict={is_training: True}) File "E:\SOFTWARE\anaconada\envs\python3.6\lib\site-packages\tensorflow\python\client\session.py", line 950, in run run_metadata_ptr) File "E:\SOFTWARE\anaconada\envs\python3.6\lib\site-packages\tensorflow\python\client\session.py", line 1173, in _run feed_dict_tensor, options, run_metadata) File "E:\SOFTWARE\anaconada\envs\python3.6\lib\site-packages\tensorflow\python\client\session.py", line 1350, in _do_run run_metadata) File "E:\SOFTWARE\anaconada\envs\python3.6\lib\site-packages\tensorflow\python\client\session.py", line 1370, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.UnknownError: AssertionError: Annotation error! Please check your annotation file. Make sure there is at least one target object in each image. Traceback (most recent call last):

File "E:\SOFTWARE\anaconada\envs\python3.6\lib\site-packages\tensorflow\python\ops\script_ops.py", line 209, in call ret = func(*args)

File "D:\下载\YOLOv3_TensorFlow-master\utils\data_utils.py", line 214, in get_batch_data img_idx, img, y_true_13, y_true_26, y_true_52 = parse_data(line, class_num, img_size, anchors, mode, letterbox_resize)

File "D:\下载\YOLOv3_TensorFlow-master\utils\data_utils.py", line 129, in parse_data img_idx, pic_path, boxes, labels, _, _ = parse_line(line)

File "D:\下载\YOLOv3_TensorFlow-master\utils\data_utils.py", line 31, in parse_line assert len(s) > 8, 'Annotation error! Please check your annotation file. Make sure there is at least one target object in each image.'

AssertionError: Annotation error! Please check your annotation file. Make sure there is at least one target object in each image.

 [[{{node PyFunc}}]]
 [[IteratorGetNext]]

YSQC avatar Oct 09 '19 07:10 YSQC

that is only use pycharm open train.py but used anaconada open it can running some minutes,but have some error Unknown: AssertionError: Annotation error! Please check your annotation file. Make sure there is at least one target object in each image.

YSQC avatar Oct 09 '19 07:10 YSQC

I meet the same problem!

BaronLeeLZP avatar Oct 10 '19 05:10 BaronLeeLZP

Put the right formatted annotation file in the right place, then this should not happen. lol

bitgs avatar Oct 23 '19 03:10 bitgs

Put the right formatted annotation file in the right place, then this should not happen. lol

1/The right formatted annotation files are in the right place; 2/Training, operation is right. After some minutes, the error comes out! 3/Following "data_utils.py", line 31, I check in the annotation file and make sure that there is at least one target object in each image.

BaronLeeLZP avatar Oct 24 '19 07:10 BaronLeeLZP

this may help:

# in ./misc/parse_voc_xml.py

# original:
# if len(objects) > 1:
# after
if len(objects) > 4:

simplestory avatar Dec 20 '19 05:12 simplestory

Same question!

lingffff avatar Dec 31 '19 09:12 lingffff

Same question!

At first I got a stupid mistake,and now my problem solved. For me, I got my datasheet in wrong format. Plz check your datasheet. (training&&Evaluation)

lingffff avatar Jan 02 '20 07:01 lingffff

Same question!

At first I got a stupid mistake,and now my problem solved. For me, I got my datasheet in wrong format. Plz check your datasheet. (training&&Evaluation)

彼此彼此

BaronLeeLZP avatar Jan 10 '20 09:01 BaronLeeLZP