SUYEgit / Surgery-Robot-Detection-Segmentation

Object detection and segmentation for a surgery robot using Mask-RCNN on Python 3, Keras, and TensorFlow..
Other
181 stars 83 forks source link

error in reading images in json or surgery.py #7

Open umair-sabir opened 6 years ago

umair-sabir commented 6 years ago

Hi,

I am getting this error when i start training. Is there something wrong with my json file or change in codes. I have two classes in my picture labelling. One is "yes and another is "normal". I just replaced your dataset with mine and changed the "arm" and "ring" names to "yes" and "normal". but still i am getting this error.

mrcnn_mask (TimeDistributed) /home/hdfsf16/.conda/envs/mask/lib/python3.5/site-packages/tensorflow/python/ops/gradients_impl.py💯 UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory. "Converting sparse IndexedSlices to a dense Tensor of unknown shape. " /home/hdfsf16/.conda/envs/mask/lib/python3.5/site-packages/keras/engine/training.py:1987: UserWarning: Using a generator with use_multiprocessing=True and multiple workers may duplicate your data. Please consider using thekeras.utils.Sequence class. UserWarning('Using a generator withuse_multiprocessing=True`' ERROR:root:Error processing image {'width': 1280, 'id': '15691.png', 'names': [{'type': 'yes'}], 'source': 'type', 'height': 1024, 'polygons': [{'all_points_y': [647, 648, 657, 657, 669, 666, 657, 652, 640, 615, 619, 641, 647], 'name': 'polygon', 'all_points_x': [661, 676, 686, 700, 695, 658, 651, 651, 653, 647, 658, 660, 661]}], 'path': 'data/surgery/train/15691.png'} Traceback (most recent call last): File "/home/hdfsf16/.conda/envs/mask/Surgery-Robot-Detection-Segmentation-master/Surgery-Robot-Detection-Segmentation-master/mrcnn/model.py", line 1696, in data_generator use_mini_mask=config.USE_MINI_MASK) File "/home/hdfsf16/.conda/envs/mask/Surgery-Robot-Detection-Segmentation-master/Surgery-Robot-Detection-Segmentation-master/mrcnn/model.py", line 1210, in load_image_gt mask, class_ids = dataset.load_mask(image_id) File "surgery.py", line 164, in load_mask class_names = info["type"] KeyError: 'type' ERROR:root:Error processing image {'width': 1280, 'id': '2103.png', 'names': [{'type': 'yes'}], 'source': 'type', 'height': 1024, 'polygons': [{'all_points_y': [661, 655, 651, 645, 639, 648, 657, 661], 'name': 'polygon', 'all_points_x': [657, 669, 685, 669, 650, 646, 646, 657]}], 'path': 'data/surgery/train/2103.png'} Traceback (most recent call last): File "/home/hdfsf16/.conda/envs/mask/Surgery-Robot-Detection-Segmentation-master/Surgery-Robot-Detection-Segmentation-master/mrcnn/model.py", line 1696, in data_generator use_mini_mask=config.USE_MINI_MASK) File "/home/hdfsf16/.conda/envs/mask/Surgery-Robot-Detection-Segmentation-master/Surgery-Robot-Detection-Segmentation-master/mrcnn/model.py", line 1210, in load_image_gt mask, class_ids = dataset.load_mask(image_id) File "surgery.py", line 164, in load_mask class_names = info["type"] KeyError: 'type'

Joeyeee commented 5 years ago

can u share the data, thanks
reeeeeeally need the data of this git!!!