{
  "id": 54423,
  "title": "Attribute Error",
  "url": "/competitions/data-science-bowl-2018/discussion/54423",
  "author_name": "William Green",
  "post_date": "2018-04-13T03:16:52.590000",
  "votes": 0,
  "comment_count": 0,
  "views": 0,
  "content": "<p>Has anyone encounter the error below while using Matterport?</p>\n\n<pre><code>---------------------------------------------------------------------------\nAttributeError                            Traceback (most recent call last)\n&lt;ipython-input-12-92fce63a47a2&gt; in &lt;module&gt;()\n 68                         ]\n 69 \n  ---&gt; 70     main(model_paths, cluster, output_dir, test_dir)\n\n&lt;ipython-input-12-92fce63a47a2&gt; in main(model_paths, cluster, output_dir, test_dir)\n 40             image_path = os.path.join(test_dir, image_id, 'images', image_id + '.png')\n 41             original_image = cv2.imread(image_path)\n  ---&gt; 42             results = model.detect([original_image], verbose=0)\n 43             r = results[0]\n 44             masks = r['masks']\n\n /output/instance-segmentation/mask_rcnn.py in detect(self, images, verbose)\n  2405                 log(\"image\", image)\n  2406         # Mold inputs to format expected by the neural network\n  -&gt; 2407         molded_images, image_metas, windows = self.mold_inputs(images)\n    2408         if verbose:\n    2409             log(\"molded_images\", molded_images)\n\n  /output/instance-segmentation/mask_rcnn.py in mold_inputs(self, images)\n  2310                 min_dim=self.config.IMAGE_MIN_DIM,\n  2311                 max_dim=self.config.IMAGE_MAX_DIM,\n  -&gt; 2312                 padding=self.config.IMAGE_PADDING)\n  2313             molded_image = mold_image(molded_image, self.config)\n  2314             # Build image_meta\n\n /output/instance-segmentation/utils.py in resize_image(image, min_dim, max_dim, padding)\n404     \"\"\"\n405     # Default window (y1, x1, y2, x2) and default scale == 1.\n --&gt; 406     h, w = image.shape[:2]\n407     window = (0, 0, h, w)\n408     scale = 1\n\nAttributeError: 'NoneType' object has no attribute 'shape'\n</code></pre>",
  "messages": [
    {
      "id": 313275,
      "postDate": "2018-04-13T03:16:52.590Z",
      "content": "<p>Has anyone encounter the error below while using Matterport?</p>\n\n<pre><code>---------------------------------------------------------------------------\nAttributeError                            Traceback (most recent call last)\n&lt;ipython-input-12-92fce63a47a2&gt; in &lt;module&gt;()\n 68                         ]\n 69 \n  ---&gt; 70     main(model_paths, cluster, output_dir, test_dir)\n\n&lt;ipython-input-12-92fce63a47a2&gt; in main(model_paths, cluster, output_dir, test_dir)\n 40             image_path = os.path.join(test_dir, image_id, 'images', image_id + '.png')\n 41             original_image = cv2.imread(image_path)\n  ---&gt; 42             results = model.detect([original_image], verbose=0)\n 43             r = results[0]\n 44             masks = r['masks']\n\n /output/instance-segmentation/mask_rcnn.py in detect(self, images, verbose)\n  2405                 log(\"image\", image)\n  2406         # Mold inputs to format expected by the neural network\n  -&gt; 2407         molded_images, image_metas, windows = self.mold_inputs(images)\n    2408         if verbose:\n    2409             log(\"molded_images\", molded_images)\n\n  /output/instance-segmentation/mask_rcnn.py in mold_inputs(self, images)\n  2310                 min_dim=self.config.IMAGE_MIN_DIM,\n  2311                 max_dim=self.config.IMAGE_MAX_DIM,\n  -&gt; 2312                 padding=self.config.IMAGE_PADDING)\n  2313             molded_image = mold_image(molded_image, self.config)\n  2314             # Build image_meta\n\n /output/instance-segmentation/utils.py in resize_image(image, min_dim, max_dim, padding)\n404     \"\"\"\n405     # Default window (y1, x1, y2, x2) and default scale == 1.\n --&gt; 406     h, w = image.shape[:2]\n407     window = (0, 0, h, w)\n408     scale = 1\n\nAttributeError: 'NoneType' object has no attribute 'shape'\n</code></pre>",
      "rawMarkdown": "Has anyone encounter the error below while using Matterport?\n\n    ---------------------------------------------------------------------------\n    AttributeError                            Traceback (most recent call last)\n    "
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "313275": "Has anyone encounter the error below while using Matterport?\n\n    ---------------------------------------------------------------------------\n    AttributeError                            Traceback (most recent call last)\n    "
  }
}