{
  "id": 217222,
  "title": "Unable to load test images using ImageDataGeneator",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/217222",
  "author_name": "Claton Hendricks",
  "post_date": "2021-02-05T22:27:21.569000",
  "votes": 0,
  "comment_count": 0,
  "views": 0,
  "content": "<p>Hello all, </p>\n<p>I am unable to load test images using the ** ImageDataGenrator ** class. I always get \"Found 0 images belonging to 0 classes\" and found that I can need to specify the classes and now I get \"Found 0 images belonging to 4 classes\"<br>\nI've also tried changing the path to \"/kaggle/input/cassava-leaf-disease-classification/test_images\" but it fails to load any images. </p>\n<pre><code>imageDataGenerator = ImageDataGenerator(rescale=1/255.)\n\ntest_gen = imageDataGenerator.flow_from_directory('../input/cassava-leaf-disease-classification/test_images/',classes=['0', '1', '2', '3'], target_size=(380, 380),                                                 class_mode=None, batch_size=32, shuffle=False)\n</code></pre>",
  "messages": [
    {
      "id": 1188037,
      "postDate": "2021-02-05T22:27:21.570Z",
      "content": "<p>Hello all, </p>\n<p>I am unable to load test images using the ** ImageDataGenrator ** class. I always get \"Found 0 images belonging to 0 classes\" and found that I can need to specify the classes and now I get \"Found 0 images belonging to 4 classes\"<br>\nI've also tried changing the path to \"/kaggle/input/cassava-leaf-disease-classification/test_images\" but it fails to load any images. </p>\n<pre><code>imageDataGenerator = ImageDataGenerator(rescale=1/255.)\n\ntest_gen = imageDataGenerator.flow_from_directory('../input/cassava-leaf-disease-classification/test_images/',classes=['0', '1', '2', '3'], target_size=(380, 380),                                                 class_mode=None, batch_size=32, shuffle=False)\n</code></pre>",
      "rawMarkdown": "Hello all, \n\nI am unable to load test images using the ** ImageDataGenrator ** class. I always get \"Found 0 images belonging to 0 classes\" and found that I can need to specify the classes and now I get \"Found 0 images belonging to 4 classes\"\nI've also tried changing the path to \"/kaggle/input/cassava-leaf-disease-classification/test_images\" but it fails to load any images. \n\n```\nimageDataGenerator = ImageDataGenerator(rescale=1/255.)\n\ntest_gen = imageDataGenerator.flow_from_directory('../input/cassava-leaf-disease-classification/test_images/',classes=['0', '1', '2', '3'], target_size=(380, 380),                                                 class_mode=None, batch_size=32, shuffle=False)\n```"
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "1188037": "Hello all, \n\nI am unable to load test images using the ** ImageDataGenrator ** class. I always get \"Found 0 images belonging to 0 classes\" and found that I can need to specify the classes and now I get \"Found 0 images belonging to 4 classes\"\nI've also tried changing the path to \"/kaggle/input/cassava-leaf-disease-classification/test_images\" but it fails to load any images. \n\n```\nimageDataGenerator = ImageDataGenerator(rescale=1/255.)\n\ntest_gen = imageDataGenerator.flow_from_directory('../input/cassava-leaf-disease-classification/test_images/',classes=['0', '1', '2', '3'], target_size=(380, 380),                                                 class_mode=None, batch_size=32, shuffle=False)\n```"
  }
}