{
  "id": 110298,
  "title": "Keras datagen Issue !",
  "url": "/competitions/rsna-intracranial-hemorrhage-detection/discussion/110298",
  "author_name": "Mayank Pathak",
  "post_date": "2019-09-26T17:51:55.943000",
  "votes": 5,
  "comment_count": 6,
  "views": 0,
  "content": "<p>can some please advice why I am getting this error .. </p>\n\n<p>/opt/conda/lib/python3.6/site-packages/keras_preprocessing/image/dataframe_iterator.py:273: UserWarning: Found 674258 invalid image filename(s) in x_col=\"filename\". These filename(s) will be ignored.\n  .format(n_invalid, x_col)</p>\n\n<p><a href=\"https://www.kaggle.com/mayank17/kernel64b48e0332?scriptVersionId=21141145\">https://www.kaggle.com/mayank17/kernel64b48e0332?scriptVersionId=21141145</a></p>",
  "messages": [
    {
      "id": 635547,
      "postDate": "2019-09-27T19:43:59.077Z",
      "content": "<p>Have you tried setting <strong>validate_filenames</strong> in <strong>flow_from_dataframe</strong> to <strong>False</strong>? See <a href=\"https://keras.io/preprocessing/image/\">https://keras.io/preprocessing/image/</a>. I bet it's checking for certain file extensions.</p>",
      "rawMarkdown": "Have you tried setting **validate\\_filenames** in **flow\\_from\\_dataframe** to **False**? See https://keras.io/preprocessing/image/. I bet it's checking for certain file extensions.",
      "votes": 9,
      "replies": [
        {
          "id": 870272,
          "postDate": "2020-06-01T15:45:20.083Z",
          "content": "<p>I had a similar error on another dataset. This worked for me. Thank you so much !!!</p>",
          "rawMarkdown": "I had a similar error on another dataset. This worked for me. Thank you so much !!!"
        },
        {
          "id": 960027,
          "postDate": "2020-08-06T05:04:47.510Z",
          "content": "<p>Thank you so much. It worked for me too.. Had been trying to solve this since last hour.</p>",
          "rawMarkdown": "Thank you so much. It worked for me too.. Had been trying to solve this since last hour."
        }
      ]
    },
    {
      "id": 634750,
      "postDate": "2019-09-26T17:51:55.943Z",
      "content": "<p>can some please advice why I am getting this error .. </p>\n\n<p>/opt/conda/lib/python3.6/site-packages/keras_preprocessing/image/dataframe_iterator.py:273: UserWarning: Found 674258 invalid image filename(s) in x_col=\"filename\". These filename(s) will be ignored.\n  .format(n_invalid, x_col)</p>\n\n<p><a href=\"https://www.kaggle.com/mayank17/kernel64b48e0332?scriptVersionId=21141145\">https://www.kaggle.com/mayank17/kernel64b48e0332?scriptVersionId=21141145</a></p>",
      "rawMarkdown": "can some please advice why I am getting this error .. \n\n\n/opt/conda/lib/python3.6/site-packages/keras_preprocessing/image/dataframe_iterator.py:273: UserWarning: Found 674258 invalid image filename(s) in x_col=\"filename\". These filename(s) will be ignored.\n  .format(n_invalid, x_col)\n\n\n[https://www.kaggle.com/mayank17/kernel64b48e0332?scriptVersionId=21141145](https://www.kaggle.com/mayank17/kernel64b48e0332?scriptVersionId=21141145)",
      "votes": 5
    },
    {
      "id": 786906,
      "postDate": "2020-03-26T10:24:44.900Z",
      "content": "<p><a href=\"/mayank17\">@mayank17</a> \nHaving same problem.\nHow to resolve it?</p>",
      "rawMarkdown": "@mayank17 \nHaving same problem.\nHow to resolve it?",
      "votes": 1
    },
    {
      "id": 1144246,
      "postDate": "2021-01-08T10:47:17.093Z",
      "content": "<p>train_data = train_generator.flow_from_dataframe(dataframe=train,x_col = \"id\", y_col = \"label\", batch_size = 64,directory = \"/content/drive/MyDrive/catDog/train_images/train\", shuffle = True, class_mode = \"categorical\", target_size = (299,299))</p>\n<p>Hi friends ı have a problem about this code block. <br>\nerror :Found 0 validated image filenames belonging to 0 classes.<br>\n/usr/local/lib/python3.6/dist-packages/keras_preprocessing/image/dataframe_iterator.py:282: UserWarning: Found 11933 invalid image filename(s) in x_col=\"id\". These filename(s) will be ignored.<br>\n  .format(n_invalid, x_col)<br>\nPls help me!</p>",
      "rawMarkdown": "train_data = train_generator.flow_from_dataframe(dataframe=train,x_col = \"id\", y_col = \"label\", batch_size = 64,directory = \"/content/drive/MyDrive/catDog/train_images/train\", shuffle = True, class_mode = \"categorical\", target_size = (299,299))\n\nHi friends ı have a problem about this code block. \nerror :Found 0 validated image filenames belonging to 0 classes.\n/usr/local/lib/python3.6/dist-packages/keras_preprocessing/image/dataframe_iterator.py:282: UserWarning: Found 11933 invalid image filename(s) in x_col=\"id\". These filename(s) will be ignored.\n  .format(n_invalid, x_col)\nPls help me!"
    },
    {
      "id": 634811,
      "postDate": "2019-09-26T19:44:07.360Z",
      "content": "<p>Cant I directly feed DCM file to Keras datagenrator? I am using pre-processing step also.. </p>",
      "rawMarkdown": "Cant I directly feed DCM file to Keras datagenrator? I am using pre-processing step also.. "
    }
  ],
  "comments": [
    {
      "id": 635547,
      "author_name": "Branden Murray",
      "author_url": "",
      "post_date": "2019-09-27T19:43:59.077000",
      "content": "<p>Have you tried setting <strong>validate_filenames</strong> in <strong>flow_from_dataframe</strong> to <strong>False</strong>? See <a href=\"https://keras.io/preprocessing/image/\">https://keras.io/preprocessing/image/</a>. I bet it's checking for certain file extensions.</p>",
      "votes": 9,
      "replies": [
        {
          "id": 870272,
          "author_name": "Janmejai Singh",
          "author_url": "",
          "post_date": "2020-06-01T15:45:20.083000",
          "content": "<p>I had a similar error on another dataset. This worked for me. Thank you so much !!!</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 960027,
          "author_name": "Pratikshya Mishra",
          "author_url": "",
          "post_date": "2020-08-06T05:04:47.510000",
          "content": "<p>Thank you so much. It worked for me too.. Had been trying to solve this since last hour.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 786906,
      "author_name": "sbcool",
      "author_url": "",
      "post_date": "2020-03-26T10:24:44.900000",
      "content": "<p><a href=\"/mayank17\">@mayank17</a> \nHaving same problem.\nHow to resolve it?</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1144246,
      "author_name": "Büşra Duygu",
      "author_url": "",
      "post_date": "2021-01-08T10:47:17.093000",
      "content": "<p>train_data = train_generator.flow_from_dataframe(dataframe=train,x_col = \"id\", y_col = \"label\", batch_size = 64,directory = \"/content/drive/MyDrive/catDog/train_images/train\", shuffle = True, class_mode = \"categorical\", target_size = (299,299))</p>\n<p>Hi friends ı have a problem about this code block. <br>\nerror :Found 0 validated image filenames belonging to 0 classes.<br>\n/usr/local/lib/python3.6/dist-packages/keras_preprocessing/image/dataframe_iterator.py:282: UserWarning: Found 11933 invalid image filename(s) in x_col=\"id\". These filename(s) will be ignored.<br>\n  .format(n_invalid, x_col)<br>\nPls help me!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 634811,
      "author_name": "Mayank Pathak",
      "author_url": "",
      "post_date": "2019-09-26T19:44:07.360000",
      "content": "<p>Cant I directly feed DCM file to Keras datagenrator? I am using pre-processing step also.. </p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "635547": "Have you tried setting **validate\\_filenames** in **flow\\_from\\_dataframe** to **False**? See https://keras.io/preprocessing/image/. I bet it's checking for certain file extensions.",
    "634750": "can some please advice why I am getting this error .. \n\n\n/opt/conda/lib/python3.6/site-packages/keras_preprocessing/image/dataframe_iterator.py:273: UserWarning: Found 674258 invalid image filename(s) in x_col=\"filename\". These filename(s) will be ignored.\n  .format(n_invalid, x_col)\n\n\n[https://www.kaggle.com/mayank17/kernel64b48e0332?scriptVersionId=21141145](https://www.kaggle.com/mayank17/kernel64b48e0332?scriptVersionId=21141145)",
    "786906": "@mayank17 \nHaving same problem.\nHow to resolve it?",
    "1144246": "train_data = train_generator.flow_from_dataframe(dataframe=train,x_col = \"id\", y_col = \"label\", batch_size = 64,directory = \"/content/drive/MyDrive/catDog/train_images/train\", shuffle = True, class_mode = \"categorical\", target_size = (299,299))\n\nHi friends ı have a problem about this code block. \nerror :Found 0 validated image filenames belonging to 0 classes.\n/usr/local/lib/python3.6/dist-packages/keras_preprocessing/image/dataframe_iterator.py:282: UserWarning: Found 11933 invalid image filename(s) in x_col=\"id\". These filename(s) will be ignored.\n  .format(n_invalid, x_col)\nPls help me!",
    "634811": "Cant I directly feed DCM file to Keras datagenrator? I am using pre-processing step also.. "
  }
}