{
  "id": 33021,
  "title": "Corrupted image?",
  "url": "/competitions/intel-mobileodt-cervical-cancer-screening/discussion/33021",
  "author_name": "",
  "post_date": "2017-05-15T16:40:25.156929200Z",
  "votes": null,
  "comment_count": 4,
  "views": 0,
  "content": "<p>I try this image from additional:</p>\n\n<pre><code>additional/Type_1/3068.jpg\n</code></pre>\n\n<p>I try to load this with keras image preprocessor.</p>\n\n<pre><code>[oystein@jupiter ]$ python\nPython 3.6.1 (default, Mar 27 2017, 00:27:06) \n[GCC 6.3.1 20170306] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n&gt;&gt;&gt; from keras.preprocessing import image\nUsing Theano backend.\n&gt;&gt;&gt; img = image.load_img(\"./additional/Type_1/3068.jpg\", target_size=(224, 224))\nTraceback (most recent call last):\n  File \"&lt;stdin&gt;\", line 1, in &lt;module&gt;\n  File \"/usr/lib/python3.6/site-packages/keras/preprocessing/image.py\", line 330, in load_img\n    img = img.resize(hw_tuple)\n  File \"/usr/lib/python3.6/site-packages/PIL/Image.py\", line 1630, in resize self.load()\n  File \"/usr/lib/python3.6/site-packages/PIL/ImageFile.py\", line 231, in load\n    \"(%d bytes not processed)\" % len(b))\nOSError: image file is truncated (107 bytes not processed)\n</code></pre>\n\n<p>Has anyone else had the same problem with this image. Can anyone verify my md5sum of this image? <strong>0b8cfe3f0d6256532dade1c1216024d8</strong></p>\n\n<p><strong>Update:</strong> There is another <a href=\"https://www.kaggle.com/c/intel-mobileodt-cervical-cancer-screening/discussion\">thread</a> describing this. I should have checked the archive before posting.</p>",
  "messages": [
    {
      "id": "182733",
      "postDate": "05/15/2017 16:40:25",
      "content": "<p>I try this image from additional:</p>\n\n<pre><code>additional/Type_1/3068.jpg\n</code></pre>\n\n<p>I try to load this with keras image preprocessor.</p>\n\n<pre><code>[oystein@jupiter ]$ python\nPython 3.6.1 (default, Mar 27 2017, 00:27:06) \n[GCC 6.3.1 20170306] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n&gt;&gt;&gt; from keras.preprocessing import image\nUsing Theano backend.\n&gt;&gt;&gt; img = image.load_img(\"./additional/Type_1/3068.jpg\", target_size=(224, 224))\nTraceback (most recent call last):\n  File \"&lt;stdin&gt;\", line 1, in &lt;module&gt;\n  File \"/usr/lib/python3.6/site-packages/keras/preprocessing/image.py\", line 330, in load_img\n    img = img.resize(hw_tuple)\n  File \"/usr/lib/python3.6/site-packages/PIL/Image.py\", line 1630, in resize self.load()\n  File \"/usr/lib/python3.6/site-packages/PIL/ImageFile.py\", line 231, in load\n    \"(%d bytes not processed)\" % len(b))\nOSError: image file is truncated (107 bytes not processed)\n</code></pre>\n\n<p>Has anyone else had the same problem with this image. Can anyone verify my md5sum of this image? <strong>0b8cfe3f0d6256532dade1c1216024d8</strong></p>\n\n<p><strong>Update:</strong> There is another <a href=\"https://www.kaggle.com/c/intel-mobileodt-cervical-cancer-screening/discussion\">thread</a> describing this. I should have checked the archive before posting.</p>",
      "rawMarkdown": "I try this image from additional:\n\n    additional/Type_1/3068.jpg\n\nI try to load this with keras image preprocessor.\n\n    [oystein@jupiter ]$ python\n    Python 3.6.1 (default, Mar 27 2017, 00:27:06) \n    [GCC 6.3.1 20170306] on linux\n    Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n    &gt;&gt;&gt; from keras.preprocessing import image\n    Using Theano backend.\n    &gt;&gt;&gt; img = image.load_img(\"./additional/Type_1/3068.jpg\", target_size=(224, 224))\n    Traceback (most recent call last):\n      File \"",
      "votes": null
    },
    {
      "id": "183225",
      "postDate": "05/17/2017 11:35:59",
      "content": "<p>Had same problem, but did know with which file. Now at least I know ;) </p>\n\n<p>ValueError: output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: None </p>",
      "rawMarkdown": "Had same problem, but did know with which file. Now at least I know ;) \n\nValueError: output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: None",
      "votes": null
    },
    {
      "id": "183233",
      "postDate": "05/17/2017 12:46:57",
      "content": "<p>Thanks for your confirmation: Here are my corrupted(?) images:</p>\n\n<pre><code>/additional/Type_1/3068.jpg\n/additional/Type_1/5893.jpg (empty)\n/additional/Type_2/2845.jpg (empty)\n/additional/Type_2/5892.jpg (empty)\n/additional/Type_2/7.jpg \n/train/Type_1/1339.jpg\n</code></pre>\n\n<p>Of these six files, three of them is empty. That's not a mystery. The other three files are all JFIF standard 1.01, but there is also other files in this standard that loads perfectly. I guess I can open these three files in GIMP or something similar and save them in another standard. That may help.</p>",
      "rawMarkdown": "Thanks for your confirmation: Here are my corrupted(?) images:\n\n    /additional/Type_1/3068.jpg\n    /additional/Type_1/5893.jpg (empty)\n    /additional/Type_2/2845.jpg (empty)\n    /additional/Type_2/5892.jpg (empty)\n    /additional/Type_2/7.jpg \n    /train/Type_1/1339.jpg\n\nOf these six files, three of them is empty. That's not a mystery. The other three files are all JFIF standard 1.01, but there is also other files in this standard that loads perfectly. I guess I can open these three files in GIMP or something similar and save them in another standard. That may help.",
      "votes": null
    },
    {
      "id": "183546",
      "postDate": "05/18/2017 14:19:51",
      "content": "<p>I haven't dug into the additional data, but I have the same problem with 1339.jpg. I was wondering if my download was corrupted, but if others are seeing the same thing there is probably a problem with the original data source.</p>",
      "rawMarkdown": "I haven't dug into the additional data, but I have the same problem with 1339.jpg. I was wondering if my download was corrupted, but if others are seeing the same thing there is probably a problem with the original data source.",
      "votes": null
    },
    {
      "id": "183598",
      "postDate": "05/18/2017 17:30:58",
      "content": "<p>The MD5 hash of additional/Type_1/3068.jpg is 0B8CFE3F0D6256532DADE1C1216024D8 it's a valid file.\nThose are empty on my side too :\nadditional/Type_1/5893.jpg\nadditional/Type_2/2845.jpg\nadditional/Type_2/5892.jpg\nOthers are corrupted but I can still read them (partially) with C++ OpenCV.</p>",
      "rawMarkdown": "The MD5 hash of additional/Type_1/3068.jpg is 0B8CFE3F0D6256532DADE1C1216024D8 it's a valid file.\nThose are empty on my side too :\nadditional/Type_1/5893.jpg\nadditional/Type_2/2845.jpg\nadditional/Type_2/5892.jpg\nOthers are corrupted but I can still read them (partially) with C++ OpenCV.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 183225,
      "author_name": "matias3",
      "author_url": "",
      "post_date": "05/17/2017 11:35:59",
      "content": "<p>Had same problem, but did know with which file. Now at least I know ;) </p>\n\n<p>ValueError: output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: None </p>",
      "votes": null,
      "replies": [
        {
          "id": 183233,
          "author_name": "oysteijo",
          "author_url": "",
          "post_date": "05/17/2017 12:46:57",
          "content": "<p>Thanks for your confirmation: Here are my corrupted(?) images:</p>\n\n<pre><code>/additional/Type_1/3068.jpg\n/additional/Type_1/5893.jpg (empty)\n/additional/Type_2/2845.jpg (empty)\n/additional/Type_2/5892.jpg (empty)\n/additional/Type_2/7.jpg \n/train/Type_1/1339.jpg\n</code></pre>\n\n<p>Of these six files, three of them is empty. That's not a mystery. The other three files are all JFIF standard 1.01, but there is also other files in this standard that loads perfectly. I guess I can open these three files in GIMP or something similar and save them in another standard. That may help.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 183546,
          "author_name": "gkericks",
          "author_url": "",
          "post_date": "05/18/2017 14:19:51",
          "content": "<p>I haven't dug into the additional data, but I have the same problem with 1339.jpg. I was wondering if my download was corrupted, but if others are seeing the same thing there is probably a problem with the original data source.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 183598,
      "author_name": "atmarouane",
      "author_url": "",
      "post_date": "05/18/2017 17:30:58",
      "content": "<p>The MD5 hash of additional/Type_1/3068.jpg is 0B8CFE3F0D6256532DADE1C1216024D8 it's a valid file.\nThose are empty on my side too :\nadditional/Type_1/5893.jpg\nadditional/Type_2/2845.jpg\nadditional/Type_2/5892.jpg\nOthers are corrupted but I can still read them (partially) with C++ OpenCV.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "182733": "I try this image from additional:\n\n    additional/Type_1/3068.jpg\n\nI try to load this with keras image preprocessor.\n\n    [oystein@jupiter ]$ python\n    Python 3.6.1 (default, Mar 27 2017, 00:27:06) \n    [GCC 6.3.1 20170306] on linux\n    Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n    &gt;&gt;&gt; from keras.preprocessing import image\n    Using Theano backend.\n    &gt;&gt;&gt; img = image.load_img(\"./additional/Type_1/3068.jpg\", target_size=(224, 224))\n    Traceback (most recent call last):\n      File \"",
    "183225": "Had same problem, but did know with which file. Now at least I know ;) \n\nValueError: output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: None",
    "183233": "Thanks for your confirmation: Here are my corrupted(?) images:\n\n    /additional/Type_1/3068.jpg\n    /additional/Type_1/5893.jpg (empty)\n    /additional/Type_2/2845.jpg (empty)\n    /additional/Type_2/5892.jpg (empty)\n    /additional/Type_2/7.jpg \n    /train/Type_1/1339.jpg\n\nOf these six files, three of them is empty. That's not a mystery. The other three files are all JFIF standard 1.01, but there is also other files in this standard that loads perfectly. I guess I can open these three files in GIMP or something similar and save them in another standard. That may help.",
    "183546": "I haven't dug into the additional data, but I have the same problem with 1339.jpg. I was wondering if my download was corrupted, but if others are seeing the same thing there is probably a problem with the original data source.",
    "183598": "The MD5 hash of additional/Type_1/3068.jpg is 0B8CFE3F0D6256532DADE1C1216024D8 it's a valid file.\nThose are empty on my side too :\nadditional/Type_1/5893.jpg\nadditional/Type_2/2845.jpg\nadditional/Type_2/5892.jpg\nOthers are corrupted but I can still read them (partially) with C++ OpenCV."
  },
  "source": "meta"
}