CharlesShang / FastMaskRCNN

Mask RCNN in TensorFlow
Apache License 2.0
3.09k stars 1.1k forks source link

Did any one use 2017 coco dataset to run this model successful? #198

Open HanYuanyuaner opened 6 years ago

HanYuanyuaner commented 6 years ago

As I can only download the 2017 coco dataset not 2014 case. In .libs/datasets/download_and_convert.py I change 'train2014' and 'val2014' to 'train2017' and 'val2017'; download "instance-valminusminival2014.json" and "instance_minival2014.json"; add them to ./data/coco/annotations. Then I run the download_and_convert_coco.py, the error is as follows:

/home/hanyuan/anaconda3/lib/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters loading annotations into memory... Done (t=14.84s) creating index... index created! train2017 has 118287 images 2018-04-13 16:33:15.384007: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

Converting image 1/118287 shard 0 Traceback (most recent call last): File "download_and_convert_data.py", line 39, in tf.app.run() File "/home/hanyuan/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 126, in run _sys.exit(main(argv)) File "download_and_convert_data.py", line 33, in main download_and_convert_coco.run(FLAGS.dataset_dir, FLAGS.dataset_split_name) File "/home/hanyuan/PycharmProjects/FastMaskRCNN-master/FastMaskRCNN-master/libs/datasets/download_and_convert_coco.py", line 462, in run dataset_split_name) File "/home/hanyuan/PycharmProjects/FastMaskRCNN-master/FastMaskRCNN-master/libs/datasets/download_and_convert_coco.py", line 276, in _add_to_tfrecord split = imgname.split('')[1] IndexError: list index out of range

I guess it happens because train2017 is larger than train2014. Does anyone know how to solve this problem? Thank you

HanYuanyuaner commented 6 years ago

I solve this problem, add "img_url = imgs[i][1]['coco_url']" and change "split = imgname.split('')[1]" to "split = img_url.split('/')[3]"

zxczhkzxc commented 6 years ago

@HanYuanyuaner hello have you trained your own model based on your dataset?