{"action":"created","issue":{"url":"https://api.github.com/repos/matterport/Mask_RCNN/issues/715","repository_url":"https://api.github.com/repos/matterport/Mask_RCNN","labels_url":"https://api.github.com/repos/matterport/Mask_RCNN/issues/715/labels{/name}","comments_url":"https://api.github.com/repos/matterport/Mask_RCNN/issues/715/comments","events_url":"https://api.github.com/repos/matterport/Mask_RCNN/issues/715/events","html_url":"https://github.com/matterport/Mask_RCNN/issues/715","id":335212802,"node_id":"MDU6SXNzdWUzMzUyMTI4MDI=","number":715,"title":"mrcnn expects wrong shape for input image","user":{"login":"rbavery","id":22258697,"node_id":"MDQ6VXNlcjIyMjU4Njk3","avatar_url":"https://avatars3.githubusercontent.com/u/22258697?v=4","gravatar_id":"","url":"https://api.github.com/users/rbavery","html_url":"https://github.com/rbavery","followers_url":"https://api.github.com/users/rbavery/followers","following_url":"https://api.github.com/users/rbavery/following{/other_user}","gists_url":"https://api.github.com/users/rbavery/gists{/gist_id}","starred_url":"https://api.github.com/users/rbavery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbavery/subscriptions","organizations_url":"https://api.github.com/users/rbavery/orgs","repos_url":"https://api.github.com/users/rbavery/repos","events_url":"https://api.github.com/users/rbavery/events{/privacy}","received_events_url":"https://api.github.com/users/rbavery/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-06-24T21:23:41Z","updated_at":"2018-10-02T01:17:57Z","closed_at":"2018-06-25T02:28:56Z","author_association":"NONE","body":"Hello! I'm trying to train mrcnn on 8 channel imagery to detect agriculture. (channels are RGBN for on/off growing season). Here a notebook with my code: https://github.com/rbavery/deepimagery/blob/master/notebooks/Train_WV2_MRCNN.ipynb\r\n\r\nI've followed the steps on the wiki for adjusting the mrcnn config and dataset classes for more than 3 channels, except for the last step since I don't want to use pregenerated weights and want the model to initialize those randomly: https://github.com/matterport/Mask_RCNN/wiki\r\n\r\nThe strange error is below, somewhere, something is expecting an array of shape (None,None, 3) but gets shape (256, 256, 8) instead which is the shape it should be expecting. You'll see that I've set the IMAGE_SHAPE channel to accept N, changed MEAN_PIXEL for 8 channels, and changed load_image to accept 8 channels.\r\n\r\nI've tried to dig through the stacktrace to find why it would expect (None,None, 3) but am quite lost. Any help/suggestions are appreciated. I'm also confused why it is throwing `RuntimeError: sequence argument must have length equal to input rank` and if this issue is seperate or not from the other issue.\r\n\r\nPlease let me know if you need anymore information.\r\n\r\n```\r\nTrain all layers\r\nWARNING:tensorflow:From /opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/datasets/base.py:198: retry (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version.\r\nInstructions for updating:\r\nUse the retry module or similar alternatives.\r\n\r\nStarting at epoch 0. LR=0.001\r\n\r\nCheckpoint Path: /home/rave/tana-crunch/waves/deepimagery/data/raw/wv2/models/wv2-gridded20180624T1338/mask_rcnn_wv2-gridded_{epoch:04d}.h5\r\nSelecting layers to train\r\nconv1                  (Conv2D)\r\nbn_conv1               (BatchNorm)\r\nres2a_branch2a         (Conv2D)\r\nbn2a_branch2a          (BatchNorm)\r\nres2a_branch2b         (Conv2D)\r\nbn2a_branch2b          (BatchNorm)\r\nres2a_branch2c         (Conv2D)\r\nres2a_branch1          (Conv2D)\r\nbn2a_branch2c          (BatchNorm)\r\nbn2a_branch1           (BatchNorm)\r\nres2b_branch2a         (Conv2D)\r\nbn2b_branch2a          (BatchNorm)\r\nres2b_branch2b         (Conv2D)\r\nbn2b_branch2b          (BatchNorm)\r\nres2b_branch2c         (Conv2D)\r\nbn2b_branch2c          (BatchNorm)\r\nres2c_branch2a         (Conv2D)\r\nbn2c_branch2a          (BatchNorm)\r\nres2c_branch2b         (Conv2D)\r\nbn2c_branch2b          (BatchNorm)\r\nres2c_branch2c         (Conv2D)\r\nbn2c_branch2c          (BatchNorm)\r\nres3a_branch2a         (Conv2D)\r\nbn3a_branch2a          (BatchNorm)\r\nres3a_branch2b         (Conv2D)\r\nbn3a_branch2b          (BatchNorm)\r\nres3a_branch2c         (Conv2D)\r\nres3a_branch1          (Conv2D)\r\nbn3a_branch2c          (BatchNorm)\r\nbn3a_branch1           (BatchNorm)\r\nres3b_branch2a         (Conv2D)\r\nbn3b_branch2a          (BatchNorm)\r\nres3b_branch2b         (Conv2D)\r\nbn3b_branch2b          (BatchNorm)\r\nres3b_branch2c         (Conv2D)\r\nbn3b_branch2c          (BatchNorm)\r\nres3c_branch2a         (Conv2D)\r\nbn3c_branch2a          (BatchNorm)\r\nres3c_branch2b         (Conv2D)\r\nbn3c_branch2b          (BatchNorm)\r\nres3c_branch2c         (Conv2D)\r\nbn3c_branch2c          (BatchNorm)\r\nres3d_branch2a         (Conv2D)\r\nbn3d_branch2a          (BatchNorm)\r\nres3d_branch2b         (Conv2D)\r\nbn3d_branch2b          (BatchNorm)\r\nres3d_branch2c         (Conv2D)\r\nbn3d_branch2c          (BatchNorm)\r\nres4a_branch2a         (Conv2D)\r\nbn4a_branch2a          (BatchNorm)\r\nres4a_branch2b         (Conv2D)\r\nbn4a_branch2b          (BatchNorm)\r\nres4a_branch2c         (Conv2D)\r\nres4a_branch1          (Conv2D)\r\nbn4a_branch2c          (BatchNorm)\r\nbn4a_branch1           (BatchNorm)\r\nres4b_branch2a         (Conv2D)\r\nbn4b_branch2a          (BatchNorm)\r\nres4b_branch2b         (Conv2D)\r\nbn4b_branch2b          (BatchNorm)\r\nres4b_branch2c         (Conv2D)\r\nbn4b_branch2c          (BatchNorm)\r\nres4c_branch2a         (Conv2D)\r\nbn4c_branch2a          (BatchNorm)\r\nres4c_branch2b         (Conv2D)\r\nbn4c_branch2b          (BatchNorm)\r\nres4c_branch2c         (Conv2D)\r\nbn4c_branch2c          (BatchNorm)\r\nres4d_branch2a         (Conv2D)\r\nbn4d_branch2a          (BatchNorm)\r\nres4d_branch2b         (Conv2D)\r\nbn4d_branch2b          (BatchNorm)\r\nres4d_branch2c         (Conv2D)\r\nbn4d_branch2c          (BatchNorm)\r\nres4e_branch2a         (Conv2D)\r\nbn4e_branch2a          (BatchNorm)\r\nres4e_branch2b         (Conv2D)\r\nbn4e_branch2b          (BatchNorm)\r\nres4e_branch2c         (Conv2D)\r\nbn4e_branch2c          (BatchNorm)\r\nres4f_branch2a         (Conv2D)\r\nbn4f_branch2a          (BatchNorm)\r\nres4f_branch2b         (Conv2D)\r\nbn4f_branch2b          (BatchNorm)\r\nres4f_branch2c         (Conv2D)\r\nbn4f_branch2c          (BatchNorm)\r\nres5a_branch2a         (Conv2D)\r\nbn5a_branch2a          (BatchNorm)\r\nres5a_branch2b         (Conv2D)\r\nbn5a_branch2b          (BatchNorm)\r\nres5a_branch2c         (Conv2D)\r\nres5a_branch1          (Conv2D)\r\nbn5a_branch2c          (BatchNorm)\r\nbn5a_branch1           (BatchNorm)\r\nres5b_branch2a         (Conv2D)\r\nbn5b_branch2a          (BatchNorm)\r\nres5b_branch2b         (Conv2D)\r\nbn5b_branch2b          (BatchNorm)\r\nres5b_branch2c         (Conv2D)\r\nbn5b_branch2c          (BatchNorm)\r\nres5c_branch2a         (Conv2D)\r\nbn5c_branch2a          (BatchNorm)\r\nres5c_branch2b         (Conv2D)\r\nbn5c_branch2b          (BatchNorm)\r\nres5c_branch2c         (Conv2D)\r\nbn5c_branch2c          (BatchNorm)\r\nfpn_c5p5               (Conv2D)\r\nfpn_c4p4               (Conv2D)\r\nfpn_c3p3               (Conv2D)\r\nfpn_c2p2               (Conv2D)\r\nfpn_p5                 (Conv2D)\r\nfpn_p2                 (Conv2D)\r\nfpn_p3                 (Conv2D)\r\nfpn_p4                 (Conv2D)\r\nIn model:  rpn_model\r\n    rpn_conv_shared        (Conv2D)\r\n    rpn_class_raw          (Conv2D)\r\n    rpn_bbox_pred          (Conv2D)\r\nmrcnn_mask_conv1       (TimeDistributed)\r\nmrcnn_mask_bn1         (TimeDistributed)\r\nmrcnn_mask_conv2       (TimeDistributed)\r\nmrcnn_mask_bn2         (TimeDistributed)\r\nmrcnn_class_conv1      (TimeDistributed)\r\nmrcnn_class_bn1        (TimeDistributed)\r\nmrcnn_mask_conv3       (TimeDistributed)\r\nmrcnn_mask_bn3         (TimeDistributed)\r\nmrcnn_class_conv2      (TimeDistributed)\r\nmrcnn_class_bn2        (TimeDistributed)\r\nmrcnn_mask_conv4       (TimeDistributed)\r\nmrcnn_mask_bn4         (TimeDistributed)\r\nmrcnn_bbox_fc          (TimeDistributed)\r\nmrcnn_mask_deconv      (TimeDistributed)\r\nmrcnn_class_logits     (TimeDistributed)\r\nmrcnn_mask             (TimeDistributed)\r\n/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/tensorflow/python/ops/gradients_impl.py:100: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.\r\n  \"Converting sparse IndexedSlices to a dense Tensor of unknown shape. \"\r\n/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/keras/engine/training_generator.py:44: UserWarning: Using a generator with `use_multiprocessing=True` and multiple workers may duplicate your data. Please consider using the`keras.utils.Sequence class.\r\n  UserWarning('Using a generator with `use_multiprocessing=True`'\r\nEpoch 1/40\r\nERROR:root:Error processing image {'id': 'ZA0488124', 'source': 'wv2', 'path': '/home/rave/tana-crunch/waves/deepimagery/data/raw/wv2/train/ZA0488124/image/ZA0488124_OSGS_ms.tif'}\r\nTraceback (most recent call last):\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1695, in data_generator\r\n    use_mini_mask=config.USE_MINI_MASK)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1218, in load_image_gt\r\n    mask = utils.resize_mask(mask, scale, padding, crop)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/utils.py\", line 513, in resize_mask\r\n    mask = scipy.ndimage.zoom(mask, zoom=[scale, scale, 1], order=0)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/interpolation.py\", line 606, in zoom\r\n    zoom = _ni_support._normalize_sequence(zoom, input.ndim)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/_ni_support.py\", line 65, in _normalize_sequence\r\n    raise RuntimeError(err)\r\nRuntimeError: sequence argument must have length equal to input rankERROR:root:Error processing image {'id': 'ZA0116365', 'source': 'wv2', 'path': '/home/rave/tana-crunch/waves/deepimagery/data/raw/wv2/train/ZA0116365/image/ZA0116365_OSGS_ms.tif'}\r\nTraceback (most recent call last):\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1695, in data_generator\r\n    use_mini_mask=config.USE_MINI_MASK)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1218, in load_image_gt\r\n    mask = utils.resize_mask(mask, scale, padding, crop)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/utils.py\", line 513, in resize_mask\r\n    mask = scipy.ndimage.zoom(mask, zoom=[scale, scale, 1], order=0)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/interpolation.py\", line 606, in zoom\r\n    zoom = _ni_support._normalize_sequence(zoom, input.ndim)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/_ni_support.py\", line 65, in _normalize_sequence\r\n    raise RuntimeError(err)\r\nRuntimeError: sequence argument must have length equal to input rank\r\n\r\nERROR:root:Error processing image {'id': 'ZA0493712', 'source': 'wv2', 'path': '/home/rave/tana-crunch/waves/deepimagery/data/raw/wv2/train/ZA0493712/image/ZA0493712_OSGS_ms.tif'}\r\nTraceback (most recent call last):\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1695, in data_generator\r\n    use_mini_mask=config.USE_MINI_MASK)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1218, in load_image_gt\r\n    mask = utils.resize_mask(mask, scale, padding, crop)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/utils.py\", line 513, in resize_mask\r\n    mask = scipy.ndimage.zoom(mask, zoom=[scale, scale, 1], order=0)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/interpolation.py\", line 606, in zoom\r\n    zoom = _ni_support._normalize_sequence(zoom, input.ndim)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/_ni_support.py\", line 65, in _normalize_sequence\r\n    raise RuntimeError(err)\r\nRuntimeError: sequence argument must have length equal to input rankERROR:root:Error processing image {'id': 'ZA0557249', 'source': 'wv2', 'path': '/home/rave/tana-crunch/waves/deepimagery/data/raw/wv2/train/ZA0557249/image/ZA0557249_OSGS_ms.tif'}\r\nTraceback (most recent call last):\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1695, in data_generator\r\n    use_mini_mask=config.USE_MINI_MASK)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1218, in load_image_gt\r\n    mask = utils.resize_mask(mask, scale, padding, crop)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/utils.py\", line 513, in resize_mask\r\n    mask = scipy.ndimage.zoom(mask, zoom=[scale, scale, 1], order=0)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/interpolation.py\", line 606, in zoom\r\n    zoom = _ni_support._normalize_sequence(zoom, input.ndim)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/_ni_support.py\", line 65, in _normalize_sequence\r\n    raise RuntimeError(err)\r\nRuntimeError: sequence argument must have length equal to input rank\r\n\r\nERROR:root:Error processing image {'id': 'ZA0161611', 'source': 'wv2', 'path': '/home/rave/tana-crunch/waves/deepimagery/data/raw/wv2/train/ZA0161611/image/ZA0161611_OSGS_ms.tif'}\r\nTraceback (most recent call last):\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1695, in data_generator\r\n    use_mini_mask=config.USE_MINI_MASK)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1218, in load_image_gt\r\n    mask = utils.resize_mask(mask, scale, padding, crop)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/utils.py\", line 513, in resize_mask\r\n    mask = scipy.ndimage.zoom(mask, zoom=[scale, scale, 1], order=0)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/interpolation.py\", line 606, in zoom\r\n    zoom = _ni_support._normalize_sequence(zoom, input.ndim)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/_ni_support.py\", line 65, in _normalize_sequence\r\n    raise RuntimeError(err)\r\nRuntimeError: sequence argument must have length equal to input rank\r\nERROR:root:Error processing image {'id': 'ZA0488132', 'source': 'wv2', 'path': '/home/rave/tana-crunch/waves/deepimagery/data/raw/wv2/train/ZA0488132/image/ZA0488132_OSGS_ms.tif'}\r\nTraceback (most recent call last):\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1695, in data_generator\r\n    use_mini_mask=config.USE_MINI_MASK)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1218, in load_image_gt\r\n    mask = utils.resize_mask(mask, scale, padding, crop)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/utils.py\", line 513, in resize_mask\r\n    mask = scipy.ndimage.zoom(mask, zoom=[scale, scale, 1], order=0)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/interpolation.py\", line 606, in zoom\r\n    zoom = _ni_support._normalize_sequence(zoom, input.ndim)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/_ni_support.py\", line 65, in _normalize_sequence\r\n    raise RuntimeError(err)\r\nRuntimeError: sequence argument must have length equal to input rank\r\nERROR:root:Error processing image {'id': 'ZA0485502', 'source': 'wv2', 'path': '/home/rave/tana-crunch/waves/deepimagery/data/raw/wv2/train/ZA0485502/image/ZA0485502_OSGS_ms.tif'}\r\nTraceback (most recent call last):\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1695, in data_generator\r\n    use_mini_mask=config.USE_MINI_MASK)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1218, in load_image_gt\r\n    mask = utils.resize_mask(mask, scale, padding, crop)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/utils.py\", line 513, in resize_mask\r\n    mask = scipy.ndimage.zoom(mask, zoom=[scale, scale, 1], order=0)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/interpolation.py\", line 606, in zoom\r\n    zoom = _ni_support._normalize_sequence(zoom, input.ndim)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/_ni_support.py\", line 65, in _normalize_sequence\r\n    raise RuntimeError(err)\r\nRuntimeError: sequence argument must have length equal to input rank\r\nERROR:root:Error processing image {'id': 'ZA0809727', 'source': 'wv2', 'path': '/home/rave/tana-crunch/waves/deepimagery/data/raw/wv2/train/ZA0809727/image/ZA0809727_OSGS_ms.tif'}\r\nTraceback (most recent call last):\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1695, in data_generator\r\n    use_mini_mask=config.USE_MINI_MASK)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1218, in load_image_gt\r\n    mask = utils.resize_mask(mask, scale, padding, crop)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/utils.py\", line 513, in resize_mask\r\n    mask = scipy.ndimage.zoom(mask, zoom=[scale, scale, 1], order=0)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/interpolation.py\", line 606, in zoom\r\n    zoom = _ni_support._normalize_sequence(zoom, input.ndim)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/_ni_support.py\", line 65, in _normalize_sequence\r\n    raise RuntimeError(err)\r\nRuntimeError: sequence argument must have length equal to input rankERROR:root:Error processing image {'id': 'ZA0811581', 'source': 'wv2', 'path': '/home/rave/tana-crunch/waves/deepimagery/data/raw/wv2/train/ZA0811581/image/ZA0811581_OSGS_ms.tif'}\r\nTraceback (most recent call last):\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1695, in data_generator\r\n    use_mini_mask=config.USE_MINI_MASK)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1218, in load_image_gt\r\n    mask = utils.resize_mask(mask, scale, padding, crop)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/utils.py\", line 513, in resize_mask\r\n    mask = scipy.ndimage.zoom(mask, zoom=[scale, scale, 1], order=0)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/interpolation.py\", line 606, in zoom\r\n    zoom = _ni_support._normalize_sequence(zoom, input.ndim)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/_ni_support.py\", line 65, in _normalize_sequence\r\n    raise RuntimeError(err)\r\nRuntimeError: sequence argument must have length equal to input rank\r\n\r\nERROR:root:Error processing image {'id': 'ZA0807883', 'source': 'wv2', 'path': '/home/rave/tana-crunch/waves/deepimagery/data/raw/wv2/train/ZA0807883/image/ZA0807883_OSGS_ms.tif'}\r\nTraceback (most recent call last):\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1695, in data_generator\r\n    use_mini_mask=config.USE_MINI_MASK)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1218, in load_image_gt\r\n    mask = utils.resize_mask(mask, scale, padding, crop)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/utils.py\", line 513, in resize_mask\r\n    mask = scipy.ndimage.zoom(mask, zoom=[scale, scale, 1], order=0)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/interpolation.py\", line 606, in zoom\r\n    zoom = _ni_support._normalize_sequence(zoom, input.ndim)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/_ni_support.py\", line 65, in _normalize_sequence\r\n    raise RuntimeError(err)\r\nRuntimeError: sequence argument must have length equal to input rank\r\nERROR:root:Error processing image {'id': 'ZA0158188', 'source': 'wv2', 'path': '/home/rave/tana-crunch/waves/deepimagery/data/raw/wv2/train/ZA0158188/image/ZA0158188_OSGS_ms.tif'}\r\nTraceback (most recent call last):\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1695, in data_generator\r\n    use_mini_mask=config.USE_MINI_MASK)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1218, in load_image_gt\r\n    mask = utils.resize_mask(mask, scale, padding, crop)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/utils.py\", line 513, in resize_mask\r\n    mask = scipy.ndimage.zoom(mask, zoom=[scale, scale, 1], order=0)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/interpolation.py\", line 606, in zoom\r\n    zoom = _ni_support._normalize_sequence(zoom, input.ndim)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/_ni_support.py\", line 65, in _normalize_sequence\r\n    raise RuntimeError(err)\r\nRuntimeError: sequence argument must have length equal to input rank\r\nERROR:root:Error processing image {'id': 'ZA0489761', 'source': 'wv2', 'path': '/home/rave/tana-crunch/waves/deepimagery/data/raw/wv2/train/ZA0489761/image/ZA0489761_OSGS_ms.tif'}\r\nTraceback (most recent call last):\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1695, in data_generator\r\n    use_mini_mask=config.USE_MINI_MASK)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1218, in load_image_gt\r\n    mask = utils.resize_mask(mask, scale, padding, crop)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/utils.py\", line 513, in resize_mask\r\n    mask = scipy.ndimage.zoom(mask, zoom=[scale, scale, 1], order=0)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/interpolation.py\", line 606, in zoom\r\n    zoom = _ni_support._normalize_sequence(zoom, input.ndim)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/_ni_support.py\", line 65, in _normalize_sequence\r\n    raise RuntimeError(err)\r\nRuntimeError: sequence argument must have length equal to input rank\r\nERROR:root:Error processing image {'id': 'ZA0159037', 'source': 'wv2', 'path': '/home/rave/tana-crunch/waves/deepimagery/data/raw/wv2/train/ZA0159037/image/ZA0159037_OSGS_ms.tif'}\r\nTraceback (most recent call last):\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1695, in data_generator\r\n    use_mini_mask=config.USE_MINI_MASK)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1218, in load_image_gt\r\n    mask = utils.resize_mask(mask, scale, padding, crop)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/utils.py\", line 513, in resize_mask\r\n    mask = scipy.ndimage.zoom(mask, zoom=[scale, scale, 1], order=0)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/interpolation.py\", line 606, in zoom\r\n    zoom = _ni_support._normalize_sequence(zoom, input.ndim)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/_ni_support.py\", line 65, in _normalize_sequence\r\n    raise RuntimeError(err)\r\nRuntimeError: sequence argument must have length equal to input rank\r\nERROR:root:Error processing image {'id': 'ZA0793314', 'source': 'wv2', 'path': '/home/rave/tana-crunch/waves/deepimagery/data/raw/wv2/train/ZA0793314/image/ZA0793314_OSGS_ms.tif'}\r\nTraceback (most recent call last):\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1695, in data_generator\r\n    use_mini_mask=config.USE_MINI_MASK)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1218, in load_image_gt\r\n    mask = utils.resize_mask(mask, scale, padding, crop)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/utils.py\", line 513, in resize_mask\r\n    mask = scipy.ndimage.zoom(mask, zoom=[scale, scale, 1], order=0)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/interpolation.py\", line 606, in zoom\r\n    zoom = _ni_support._normalize_sequence(zoom, input.ndim)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/_ni_support.py\", line 65, in _normalize_sequence\r\n    raise RuntimeError(err)\r\nRuntimeError: sequence argument must have length equal to input rank\r\nERROR:root:Error processing image {'id': 'ZA0806260', 'source': 'wv2', 'path': '/home/rave/tana-crunch/waves/deepimagery/data/raw/wv2/train/ZA0806260/image/ZA0806260_OSGS_ms.tif'}\r\nTraceback (most recent call last):\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1695, in data_generator\r\n    use_mini_mask=config.USE_MINI_MASK)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1218, in load_image_gt\r\n    mask = utils.resize_mask(mask, scale, padding, crop)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/utils.py\", line 513, in resize_mask\r\n    mask = scipy.ndimage.zoom(mask, zoom=[scale, scale, 1], order=0)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/interpolation.py\", line 606, in zoom\r\n    zoom = _ni_support._normalize_sequence(zoom, input.ndim)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/_ni_support.py\", line 65, in _normalize_sequence\r\n    raise RuntimeError(err)\r\nRuntimeError: sequence argument must have length equal to input rank\r\nERROR:root:Error processing image {'id': 'ZA0807887', 'source': 'wv2', 'path': '/home/rave/tana-crunch/waves/deepimagery/data/raw/wv2/train/ZA0807887/image/ZA0807887_OSGS_ms.tif'}\r\nTraceback (most recent call last):\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1695, in data_generator\r\n    use_mini_mask=config.USE_MINI_MASK)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1218, in load_image_gt\r\n    mask = utils.resize_mask(mask, scale, padding, crop)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/utils.py\", line 513, in resize_mask\r\n    mask = scipy.ndimage.zoom(mask, zoom=[scale, scale, 1], order=0)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/interpolation.py\", line 606, in zoom\r\n    zoom = _ni_support._normalize_sequence(zoom, input.ndim)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/_ni_support.py\", line 65, in _normalize_sequence\r\n    raise RuntimeError(err)\r\nRuntimeError: sequence argument must have length equal to input rank\r\nERROR:root:Error processing image {'id': 'ZA0116365', 'source': 'wv2', 'path': '/home/rave/tana-crunch/waves/deepimagery/data/raw/wv2/train/ZA0116365/image/ZA0116365_OSGS_ms.tif'}\r\nTraceback (most recent call last):\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1695, in data_generator\r\n    use_mini_mask=config.USE_MINI_MASK)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py\", line 1218, in load_image_gt\r\n    mask = utils.resize_mask(mask, scale, padding, crop)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/utils.py\", line 513, in resize_mask\r\n    mask = scipy.ndimage.zoom(mask, zoom=[scale, scale, 1], order=0)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/interpolation.py\", line 606, in zoom\r\n    zoom = _ni_support._normalize_sequence(zoom, input.ndim)\r\n  File \"/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/scipy/ndimage/_ni_support.py\", line 65, in _normalize_sequence\r\n    raise RuntimeError(err)\r\nRuntimeError: sequence argument must have length equal to input rank\r\n0\r\n7\r\n(4, 256, 256, 8)\r\n[]\r\n---------------------------------------------------------------------------\r\nValueError                                Traceback (most recent call last)\r\n<ipython-input-6-cd5e9087bf26> in <module>()\r\n      3 model = modellib.MaskRCNN(mode=\"training\", config=config,\r\n      4                                   model_dir=MODEL_DIR)\r\n----> 5 train(model, ROOT_DIR, \"train\")\r\n\r\n<ipython-input-5-03b570344448> in train(model, dataset_dir, subset)\r\n     30                 epochs=40,\r\n     31                 augmentation=augmentation,\r\n---> 32                 layers='all')\r\n     33 \r\n     34 \r\n\r\n/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py in train(self, train_dataset, val_dataset, learning_rate, epochs, layers, augmentation)\r\n   2326             max_queue_size=100,\r\n   2327             workers=workers,\r\n-> 2328             use_multiprocessing=True,\r\n   2329         )\r\n   2330         self.epoch = max(self.epoch, epochs)\r\n\r\n/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/keras/legacy/interfaces.py in wrapper(*args, **kwargs)\r\n     89                 warnings.warn('Update your `' + object_name +\r\n     90                               '` call to the Keras 2 API: ' + signature, stacklevel=2)\r\n---> 91             return func(*args, **kwargs)\r\n     92         wrapper._original_function = func\r\n     93         return wrapper\r\n\r\n/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/keras/engine/training.py in fit_generator(self, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch)\r\n   1427             use_multiprocessing=use_multiprocessing,\r\n   1428             shuffle=shuffle,\r\n-> 1429             initial_epoch=initial_epoch)\r\n   1430 \r\n   1431     @interfaces.legacy_generator_methods_support\r\n\r\n/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/keras/engine/training_generator.py in fit_generator(model, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch)\r\n    189                 outs = model.train_on_batch(x, y,\r\n    190                                             sample_weight=sample_weight,\r\n--> 191                                             class_weight=class_weight)\r\n    192 \r\n    193                 if not isinstance(outs, list):\r\n\r\n/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/keras/engine/training.py in train_on_batch(self, x, y, sample_weight, class_weight)\r\n   1215             x, y,\r\n   1216             sample_weight=sample_weight,\r\n-> 1217             class_weight=class_weight)\r\n   1218         if self._uses_dynamic_learning_phase():\r\n   1219             ins = x + y + sample_weights + [1.]\r\n\r\n/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/keras/engine/training.py in _standardize_user_data(self, x, y, sample_weight, class_weight, check_array_lengths, batch_size)\r\n    751             feed_input_shapes,\r\n    752             check_batch_axis=False,  # Don't enforce the batch size.\r\n--> 753             exception_prefix='input')\r\n    754 \r\n    755         if y is not None:\r\n\r\n/opt/anaconda3/envs/maskrcnn/lib/python3.6/site-packages/keras/engine/training_utils.py in standardize_input_data(data, names, shapes, check_batch_axis, exception_prefix)\r\n    134                             ': expected ' + names[i] + ' to have shape ' +\r\n    135                             str(shape) + ' but got array with shape ' +\r\n--> 136                             str(data_shape))\r\n    137     return data\r\n    138 \r\n\r\nValueError: Error when checking input: expected input_image to have shape (None, None, 3) but got array with shape (256, 256, 8)\r\n```"},"comment":{"url":"https://api.github.com/repos/matterport/Mask_RCNN/issues/comments/426114879","html_url":"https://github.com/matterport/Mask_RCNN/issues/715#issuecomment-426114879","issue_url":"https://api.github.com/repos/matterport/Mask_RCNN/issues/715","id":426114879,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjExNDg3OQ==","user":{"login":"fastlater","id":30107093,"node_id":"MDQ6VXNlcjMwMTA3MDkz","avatar_url":"https://avatars3.githubusercontent.com/u/30107093?v=4","gravatar_id":"","url":"https://api.github.com/users/fastlater","html_url":"https://github.com/fastlater","followers_url":"https://api.github.com/users/fastlater/followers","following_url":"https://api.github.com/users/fastlater/following{/other_user}","gists_url":"https://api.github.com/users/fastlater/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlater/subscriptions","organizations_url":"https://api.github.com/users/fastlater/orgs","repos_url":"https://api.github.com/users/fastlater/repos","events_url":"https://api.github.com/users/fastlater/events{/privacy}","received_events_url":"https://api.github.com/users/fastlater/received_events","type":"User","site_admin":false},"created_at":"2018-10-02T01:17:57Z","updated_at":"2018-10-02T01:17:57Z","author_association":"NONE","body":"Solved. I forgot to change the load_mask method"}}
{"actor":{"display_login":"fastlater"}}