{
  "id": 331862,
  "title": "UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x>",
  "url": "/competitions/be-honest-what-do-you-think-of-this-image/discussion/331862",
  "author_name": "",
  "post_date": "2022-06-19T07:53:36.807975800Z",
  "votes": null,
  "comment_count": 7,
  "views": 0,
  "content": "<p>I have Loaded 20k images with ImageGenerator <strong>jpg Format.</strong> During My Model training it raise an error <strong>UnidentifiedImageError.</strong></p>\n<p>Here is My Nootbook, View Version[6] for Error……<br>\n<a href=\"https://www.kaggle.com/code/muki2003/image-interest-evaluator-tensorflow\" target=\"_blank\">https://www.kaggle.com/code/muki2003/image-interest-evaluator-tensorflow</a></p>\n<ul>\n<li>I think few images are corrupted. Hot to find and remove the corrupted image ?</li>\n</ul>",
  "messages": [
    {
      "id": "1825297",
      "postDate": "06/19/2022 07:53:36",
      "content": "<p>I have Loaded 20k images with ImageGenerator <strong>jpg Format.</strong> During My Model training it raise an error <strong>UnidentifiedImageError.</strong></p>\n<p>Here is My Nootbook, View Version[6] for Error……<br>\n<a href=\"https://www.kaggle.com/code/muki2003/image-interest-evaluator-tensorflow\" target=\"_blank\">https://www.kaggle.com/code/muki2003/image-interest-evaluator-tensorflow</a></p>\n<ul>\n<li>I think few images are corrupted. Hot to find and remove the corrupted image ?</li>\n</ul>",
      "rawMarkdown": "I have Loaded 20k images with ImageGenerator **jpg Format.** During My Model training it raise an error **UnidentifiedImageError.**\n\nHere is My Nootbook, View Version[6] for Error......\nhttps://www.kaggle.com/code/muki2003/image-interest-evaluator-tensorflow\n\n- I think few images are corrupted. Hot to find and remove the corrupted image ?",
      "votes": null
    },
    {
      "id": "1829662",
      "postDate": "06/22/2022 19:41:19",
      "content": "<p><a href=\"https://www.kaggle.com/muki2003\" target=\"_blank\">@muki2003</a> why you use 1.75?</p>\n<p>for i in range(int(len(train) / 1.75)):</p>",
      "rawMarkdown": "muki2003 why you use 1.75?\n\nfor i in range(int(len(train) / 1.75)):",
      "votes": null
    },
    {
      "id": "1829866",
      "postDate": "06/23/2022 02:27:43",
      "content": "<p>That My old Notebook, can't load all 20k images thats why / 1.75 to load only 11k images</p>\n<p>Thats my Old Version, Now using flow_from_dataframe loaded all 20k images. View <strong>Version[6]</strong> for the <strong>UnidentifiedImageError</strong></p>",
      "rawMarkdown": "That My old Notebook, can't load all 20k images thats why / 1.75 to load only 11k images\n\nThats my Old Version, Now using flow_from_dataframe loaded all 20k images. View **Version[6]** for the **UnidentifiedImageError**",
      "votes": null
    },
    {
      "id": "1831950",
      "postDate": "06/24/2022 14:36:04",
      "content": "<p>for j in c_i:<br>\n    index_names = train[train['Id']=<strong>=i</strong>].index<br>\n    train.drop(index_names, inplace=True)</p>\n<p>by the way i've check the code, not i you adjust i with y </p>",
      "rawMarkdown": "for j in c_i:\n    index_names = train[train['Id']=**=i**].index\n    train.drop(index_names, inplace=True)\n\n\n\nby the way i've check the code, not i you adjust i with y",
      "votes": null
    },
    {
      "id": "1831955",
      "postDate": "06/24/2022 14:41:38",
      "content": "<p>Thanks <a href=\"https://www.kaggle.com/baycelik\" target=\"_blank\">@baycelik</a> I made a logical error in the code……. Thanks for the Code Correction !</p>",
      "rawMarkdown": "Thanks @baycelik I made a logical error in the code....... Thanks for the Code Correction !",
      "votes": null
    },
    {
      "id": "1831983",
      "postDate": "06/24/2022 15:03:52",
      "content": "<p><a href=\"https://www.kaggle.com/muki2003\" target=\"_blank\">@muki2003</a>  your welcome.</p>\n<p>i faced a problem </p>\n<p>Found 0 validated image filenames.<br>\nFound 0 validated image filenames.</p>\n<p>instead of </p>\n<p>Found 15994 validated image filenames.<br>\nFound 3998 validated image filenames.</p>\n<p>do you have any idea ?</p>",
      "rawMarkdown": "muki2003  your welcome.\n\ni faced a problem \n\nFound 0 validated image filenames.\nFound 0 validated image filenames.\n\ninstead of \n\nFound 15994 validated image filenames.\nFound 3998 validated image filenames.\n\ndo you have any idea ?",
      "votes": null
    },
    {
      "id": "1832030",
      "postDate": "06/24/2022 16:00:15",
      "content": "<p>Yeah ! This due to wrong path of directory….</p>\n<p>Check your <strong>image Directory Path</strong>. Can you share image loading code for reference ?</p>",
      "rawMarkdown": "Yeah ! This due to wrong path of directory....\n\nCheck your **image Directory Path**. Can you share image loading code for reference ?",
      "votes": null
    },
    {
      "id": "1832036",
      "postDate": "06/24/2022 16:02:46",
      "content": "<p>thanks i got it</p>",
      "rawMarkdown": "thanks i got it",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1829662,
      "author_name": "baycelik",
      "author_url": "",
      "post_date": "06/22/2022 19:41:19",
      "content": "<p><a href=\"https://www.kaggle.com/muki2003\" target=\"_blank\">@muki2003</a> why you use 1.75?</p>\n<p>for i in range(int(len(train) / 1.75)):</p>",
      "votes": null,
      "replies": [
        {
          "id": 1829866,
          "author_name": "muki2003",
          "author_url": "",
          "post_date": "06/23/2022 02:27:43",
          "content": "<p>That My old Notebook, can't load all 20k images thats why / 1.75 to load only 11k images</p>\n<p>Thats my Old Version, Now using flow_from_dataframe loaded all 20k images. View <strong>Version[6]</strong> for the <strong>UnidentifiedImageError</strong></p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1831950,
          "author_name": "baycelik",
          "author_url": "",
          "post_date": "06/24/2022 14:36:04",
          "content": "<p>for j in c_i:<br>\n    index_names = train[train['Id']=<strong>=i</strong>].index<br>\n    train.drop(index_names, inplace=True)</p>\n<p>by the way i've check the code, not i you adjust i with y </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1831955,
          "author_name": "muki2003",
          "author_url": "",
          "post_date": "06/24/2022 14:41:38",
          "content": "<p>Thanks <a href=\"https://www.kaggle.com/baycelik\" target=\"_blank\">@baycelik</a> I made a logical error in the code……. Thanks for the Code Correction !</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1831983,
          "author_name": "baycelik",
          "author_url": "",
          "post_date": "06/24/2022 15:03:52",
          "content": "<p><a href=\"https://www.kaggle.com/muki2003\" target=\"_blank\">@muki2003</a>  your welcome.</p>\n<p>i faced a problem </p>\n<p>Found 0 validated image filenames.<br>\nFound 0 validated image filenames.</p>\n<p>instead of </p>\n<p>Found 15994 validated image filenames.<br>\nFound 3998 validated image filenames.</p>\n<p>do you have any idea ?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1832030,
          "author_name": "muki2003",
          "author_url": "",
          "post_date": "06/24/2022 16:00:15",
          "content": "<p>Yeah ! This due to wrong path of directory….</p>\n<p>Check your <strong>image Directory Path</strong>. Can you share image loading code for reference ?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1832036,
          "author_name": "baycelik",
          "author_url": "",
          "post_date": "06/24/2022 16:02:46",
          "content": "<p>thanks i got it</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1825297": "I have Loaded 20k images with ImageGenerator **jpg Format.** During My Model training it raise an error **UnidentifiedImageError.**\n\nHere is My Nootbook, View Version[6] for Error......\nhttps://www.kaggle.com/code/muki2003/image-interest-evaluator-tensorflow\n\n- I think few images are corrupted. Hot to find and remove the corrupted image ?",
    "1829662": "muki2003 why you use 1.75?\n\nfor i in range(int(len(train) / 1.75)):",
    "1829866": "That My old Notebook, can't load all 20k images thats why / 1.75 to load only 11k images\n\nThats my Old Version, Now using flow_from_dataframe loaded all 20k images. View **Version[6]** for the **UnidentifiedImageError**",
    "1831950": "for j in c_i:\n    index_names = train[train['Id']=**=i**].index\n    train.drop(index_names, inplace=True)\n\n\n\nby the way i've check the code, not i you adjust i with y",
    "1831955": "Thanks @baycelik I made a logical error in the code....... Thanks for the Code Correction !",
    "1831983": "muki2003  your welcome.\n\ni faced a problem \n\nFound 0 validated image filenames.\nFound 0 validated image filenames.\n\ninstead of \n\nFound 15994 validated image filenames.\nFound 3998 validated image filenames.\n\ndo you have any idea ?",
    "1832030": "Yeah ! This due to wrong path of directory....\n\nCheck your **image Directory Path**. Can you share image loading code for reference ?",
    "1832036": "thanks i got it"
  },
  "source": "meta"
}