endernewton / tf-faster-rcnn

Tensorflow Faster RCNN for Object Detection
https://arxiv.org/pdf/1702.02138.pdf
MIT License
3.65k stars 1.58k forks source link

testing error of own dataset in excuting task of './experiments/scripts/test_faster_rcnn.sh 0 pascal_voc vgg16 ' #405

Open ccywxhn opened 5 years ago

ccywxhn commented 5 years ago

Evaluating detections Writing car VOC results file VOC07 metric? Yes Reading annotation for 1/637 Traceback (most recent call last): File "./tools/test_net.py", line 120, in test_net(sess, net, imdb, filename, max_per_image=args.max_per_image) File "/home/ccy/fasterrcnn/tf-faster-rcnn/tools/../lib/model/test.py", line 192, in test_net imdb.evaluate_detections(all_boxes, output_dir) File "/home/ccy/fasterrcnn/tf-faster-rcnn/tools/../lib/datasets/pascal_voc.py", line 284, in evaluate_detections self._do_python_eval(output_dir) File "/home/ccy/fasterrcnn/tf-faster-rcnn/tools/../lib/datasets/pascal_voc.py", line 247, in _do_python_eval use_07_metric=use_07_metric, use_diff=self.config['use_diff']) File "/home/ccy/fasterrcnn/tf-faster-rcnn/tools/../lib/datasets/voc_eval.py", line 115, in voc_eval recs[imagename] = parse_rec(annopath.format(imagename)) File "/home/ccy/fasterrcnn/tf-faster-rcnn/tools/../lib/datasets/voc_eval.py", line 23, in parse_rec obj_struct['truncated'] = int(obj.find('truncated').text) ValueError: invalid literal for int() with base 10: '0.0597' Command exited with non-zero status 1 50.86user 8.38system 1:12.69elapsed 81%CPU (0avgtext+0avgdata 3430092maxresident)k 8inputs+5512outputs (0major+1799780minor)pagefaults 0swaps

zyuerugou commented 5 years ago

@ccywxhn str->float->int '0.0597'->int is invalid obj_struct['truncated'] = int(float(obj.find('truncated').text)) will be ok

ccywxhn commented 5 years ago

Thank you for your answer, the problem has been solved.

------------------ 原始邮件 ------------------ 发件人: "zyuerugou"notifications@github.com; 发送时间: 2019年5月2日(星期四) 晚上9:39 收件人: "endernewton/tf-faster-rcnn"tf-faster-rcnn@noreply.github.com; 抄送: "Ccy"1103495664@qq.com; "Mention"mention@noreply.github.com; 主题: Re: [endernewton/tf-faster-rcnn] testing error of own dataset inexcuting task of './experiments/scripts/test_faster_rcnn.sh 0 pascal_vocvgg16 ' (#405)

@ccywxhn str->float->int '0.0597'->int is invalid obj_struct['truncated'] = int(float(obj.find('truncated').text)) will be ok

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.