Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python download_and_convert_data.py 出现错误怎么解决呀 #182

Open
pbbpby231456 opened this issue Dec 29, 2017 · 2 comments
Open

Comments

@pbbpby231456
Copy link

Traceback (most recent call last):
File "download_and_convert_data.py", line 39, in
tf.app.run()
File "/mnt/anaconda/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "download_and_convert_data.py", line 33, in main
download_and_convert_coco.run(FLAGS.dataset_dir, FLAGS.dataset_split_name)
File "/mnt/FastMaskRCNN-master/libs/datasets/download_and_convert_coco.py", line 460, in run
dataset_split_name)
File "/mnt/FastMaskRCNN-master/libs/datasets/download_and_convert_coco.py", line 296, in _add_to_tfrecord
gt_boxes, masks, mask = _get_coco_masks(coco, img_id, height, width, img_name)
File "/mnt/FastMaskRCNN-master/libs/datasets/download_and_convert_coco.py", line 209, in _get_coco_masks
cat_id = _cat_id_to_real_id(ann['category_id'])
File "/mnt/FastMaskRCNN-master/libs/datasets/download_and_convert_coco.py", line 88, in _cat_id_to_real_id
return cat_id_to_real_id[readId]
KeyError: 121

@chongkong
Copy link

Little suggestion:

  1. It would be helpful for other readers if you use the English rather than Chinese at the title
  2. stack trace is better readable with ``` formatting (you can use the language console)

@EMCL
Copy link

EMCL commented Mar 28, 2018

creating index...
index created!
Traceback (most recent call last):
  File "download_and_convert_data.py", line 39, in <module>
    tf.app.run()
  File "/home/.local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "download_and_convert_data.py", line 33, in main
    download_and_convert_coco.run(FLAGS.dataset_dir, FLAGS.dataset_split_name)
  File "/home/work/FastMaskRCNN/libs/datasets/download_and_convert_coco.py", line 457, in run
    dataset_split_name)
  File "/home/work/FastMaskRCNN/libs/datasets/download_and_convert_coco.py", line 245, in _add_to_tfrecord
    cats = `coco.loadCats(coco.getCatIds())`
  File "/home/work/FastMaskRCNN/libs/datasets/pycocotools/coco.py", line 165, in getCatIds
    cats = self.dataset['''categories''']
KeyError: 'categories'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants