question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error:run ./experiments/scripts/test_faster_rcnn.sh 0 pascal_voc vgg16

See original GitHub issue

when i run ./experiments/scripts/test_faster_rcnn.sh 0 pascal_voc vgg16, i encountered the following error

Reading annotation for 4901/4952 Saving cached annotations to /home/xupt/awesome-tensorflow/tf-faster-rcnn/data/VOCdevkit2007/VOC2007/ImageSets/Main/test.txt_annots.pkl Traceback (most recent call last): File "./tools/test_net.py", line 120, in <module> test_net(sess, net, imdb, filename, max_per_image=args.max_per_image) File "/home/xupt/awesome-tensorflow/tf-faster-rcnn/tools/../lib/model/test.py", line 192, in test_net imdb.evaluate_detections(all_boxes, output_dir) File "/home/xupt/awesome-tensorflow/tf-faster-rcnn/tools/../lib/datasets/pascal_voc.py", line 283, in evaluate_detections self._do_python_eval(output_dir) File "/home/xupt/awesome-tensorflow/tf-faster-rcnn/tools/../lib/datasets/pascal_voc.py", line 246, in _do_python_eval use_07_metric=use_07_metric, use_diff=self.config['use_diff']) File "/home/xupt/awesome-tensorflow/tf-faster-rcnn/tools/../lib/datasets/voc_eval.py", line 122, in voc_eval pickle.dump(recs, f) TypeError: write() argument must be str, not bytes Command exited with non-zero status 1

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

38reactions
tensor-flowercommented, Jan 30, 2018

https://github.com/endernewton/tf-faster-rcnn/issues/171

basically edit tf-faster-rcnn/lib/datasets/voc_eval.py line121, change ‘b’ to ‘wb’ so it will become

with open(cachefile,'wb') as f

After you do that, it may throw you a new EOF ran out of input error. You then need to edit same file line 105. Change it to

cachefile = os.path.join(cachedir, '%s_annots.pkl' % imagesetfile.split("/")[-1].split(".")[0])
5reactions
engineer1109commented, Dec 14, 2017

delete test.txt_annots.pkl

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found