{
  "id": 454755,
  "title": "Submission Scoring Error",
  "url": "/competitions/UBC-OCEAN/discussion/454755",
  "author_name": "Miller Quilindo",
  "post_date": "2023-11-11T15:51:49.945000",
  "votes": 4,
  "comment_count": 1,
  "views": 0,
  "content": "<p>This is my submission code segment, I only evaluate the images inside the test_images folder.  The error message says that some rows are probably missing.   Maybe I have to evaluate both test_thumbnails and test_images folders?  For example, I must first search for the image within test_images;  if it does not exist, search in test_thumbnails.  Is that so? Help me please <a href=\"https://www.kaggle.com/jirkaborovec\" target=\"_blank\">@jirkaborovec</a> </p>\n<pre><code>root_path = \nimages_path = \nthumbnails_path = \n\nlabels = [, , , , ]\n\npredict = []\n i  (test_images.shape[]):\n    tiles = get_tiles(, num_tiles=SAMPLE, size=(, ))\n    X_test_ = [preprocess_input(tile).reshape(, , , )  tile  tiles]\n    y_pred_i = [model.predict(x)  x  X_test_]\n    predict_prev = reduce( x, y: x * y, y_pred_i)\n    predict.append([test_images[i], labels[np.argmax(predict_prev)]])\n     X_test_\n    gc.collect()\n</code></pre>",
  "messages": [
    {
      "id": 2521328,
      "postDate": "2023-11-11T15:51:49.947Z",
      "content": "<p>This is my submission code segment, I only evaluate the images inside the test_images folder.  The error message says that some rows are probably missing.   Maybe I have to evaluate both test_thumbnails and test_images folders?  For example, I must first search for the image within test_images;  if it does not exist, search in test_thumbnails.  Is that so? Help me please <a href=\"https://www.kaggle.com/jirkaborovec\" target=\"_blank\">@jirkaborovec</a> </p>\n<pre><code>root_path = \nimages_path = \nthumbnails_path = \n\nlabels = [, , , , ]\n\npredict = []\n i  (test_images.shape[]):\n    tiles = get_tiles(, num_tiles=SAMPLE, size=(, ))\n    X_test_ = [preprocess_input(tile).reshape(, , , )  tile  tiles]\n    y_pred_i = [model.predict(x)  x  X_test_]\n    predict_prev = reduce( x, y: x * y, y_pred_i)\n    predict.append([test_images[i], labels[np.argmax(predict_prev)]])\n     X_test_\n    gc.collect()\n</code></pre>",
      "rawMarkdown": "This is my submission code segment, I only evaluate the images inside the test_images folder.  The error message says that some rows are probably missing.   Maybe I have to evaluate both test_thumbnails and test_images folders?  For example, I must first search for the image within test_images;  if it does not exist, search in test_thumbnails.  Is that so? Help me please @jirkaborovec \n\n```python\nroot_path = '/kaggle/input/UBC-OCEAN/'\nimages_path = '/kaggle/input/UBC-OCEAN/test_images/'\nthumbnails_path = '/kaggle/input/UBC-OCEAN/test_thumbnails/'\n\nlabels = ['CC', 'EC', 'HGSC', 'LGSC', 'MC']\n\npredict = []\nfor i in range(test_images.shape[0]):\n    tiles = get_tiles(f'{images_path}{test_images[i]}.png', num_tiles=SAMPLE, size=(224, 224))\n    X_test_ = [preprocess_input(tile).reshape(1, 224, 224, 3) for tile in tiles]\n    y_pred_i = [model.predict(x) for x in X_test_]\n    predict_prev = reduce(lambda x, y: x * y, y_pred_i)\n    predict.append([test_images[i], labels[np.argmax(predict_prev)]])\n    del X_test_\n    gc.collect()\n```",
      "votes": 4
    },
    {
      "id": 2523678,
      "postDate": "2023-11-13T16:22:27.243Z",
      "content": "<p>I have been getting the same submission scoring error? </p>",
      "rawMarkdown": "I have been getting the same submission scoring error? "
    }
  ],
  "comments": [
    {
      "id": 2523678,
      "author_name": "samu2505",
      "author_url": "",
      "post_date": "2023-11-13T16:22:27.243000",
      "content": "<p>I have been getting the same submission scoring error? </p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2521328": "This is my submission code segment, I only evaluate the images inside the test_images folder.  The error message says that some rows are probably missing.   Maybe I have to evaluate both test_thumbnails and test_images folders?  For example, I must first search for the image within test_images;  if it does not exist, search in test_thumbnails.  Is that so? Help me please @jirkaborovec \n\n```python\nroot_path = '/kaggle/input/UBC-OCEAN/'\nimages_path = '/kaggle/input/UBC-OCEAN/test_images/'\nthumbnails_path = '/kaggle/input/UBC-OCEAN/test_thumbnails/'\n\nlabels = ['CC', 'EC', 'HGSC', 'LGSC', 'MC']\n\npredict = []\nfor i in range(test_images.shape[0]):\n    tiles = get_tiles(f'{images_path}{test_images[i]}.png', num_tiles=SAMPLE, size=(224, 224))\n    X_test_ = [preprocess_input(tile).reshape(1, 224, 224, 3) for tile in tiles]\n    y_pred_i = [model.predict(x) for x in X_test_]\n    predict_prev = reduce(lambda x, y: x * y, y_pred_i)\n    predict.append([test_images[i], labels[np.argmax(predict_prev)]])\n    del X_test_\n    gc.collect()\n```",
    "2523678": "I have been getting the same submission scoring error? "
  }
}