{
  "id": 210920,
  "title": "The image ids do not match between train dicom files and train.csv",
  "url": "/competitions/vinbigdata-chest-xray-abnormalities-detection/discussion/210920",
  "author_name": "Cyrano",
  "post_date": "2021-01-13T01:28:54.663000",
  "votes": 1,
  "comment_count": 3,
  "views": 0,
  "content": "<p>The image ids seem not to match between train dicom files and the image_id field of train.csv.<br>\nBoth of us are 15000. As I found there are 3504 of them are not same.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1167442%2Fd2d0bf4d635124c81b51acdfafa0f1f1%2FScreen%20Shot%202021-01-13%20at%2009.28.09.png?generation=1610501313266784&amp;alt=media\" alt=\"![\">]</p>\n<p>Do you have this issue? </p>",
  "messages": [
    {
      "id": 1151016,
      "postDate": "2021-01-13T04:27:43.300Z",
      "content": "<p>The way you are extracting the image id from the DICOM filename is causing the problem. The use of <code>.strip('.dicom')</code> isn't working the way you think - <code>strip</code> accepts a set of characters, any of which will be removed if they exist at the start or end of the string. Try replacing <code>.strip('.dicom')</code> with <code>.replace('.dicom', '')</code> instead (see my results below).<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2051313%2Fa6a919953d97fa3cfc186ed86e13592b%2Freplace_instead_of_strip.png?generation=1610512003108527&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "The way you are extracting the image id from the DICOM filename is causing the problem. The use of `.strip('.dicom')` isn't working the way you think - `strip` accepts a set of characters, any of which will be removed if they exist at the start or end of the string. Try replacing `.strip('.dicom')` with `.replace('.dicom', '')` instead (see my results below).\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2051313%2Fa6a919953d97fa3cfc186ed86e13592b%2Freplace_instead_of_strip.png?generation=1610512003108527&alt=media)",
      "votes": 1
    },
    {
      "id": 1150935,
      "postDate": "2021-01-13T01:28:54.663Z",
      "content": "<p>The image ids seem not to match between train dicom files and the image_id field of train.csv.<br>\nBoth of us are 15000. As I found there are 3504 of them are not same.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1167442%2Fd2d0bf4d635124c81b51acdfafa0f1f1%2FScreen%20Shot%202021-01-13%20at%2009.28.09.png?generation=1610501313266784&amp;alt=media\" alt=\"![\">]</p>\n<p>Do you have this issue? </p>",
      "rawMarkdown": "The image ids seem not to match between train dicom files and the image_id field of train.csv.\nBoth of us are 15000. As I found there are 3504 of them are not same.\n\n![![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1167442%2Fd2d0bf4d635124c81b51acdfafa0f1f1%2FScreen%20Shot%202021-01-13%20at%2009.28.09.png?generation=1610501313266784&alt=media)]\n\nDo you have this issue? ",
      "votes": 1
    },
    {
      "id": 1151409,
      "postDate": "2021-01-13T09:59:53.580Z",
      "content": "<p>Thank you for your comment and code. It's my fault. Learnt a lot.</p>",
      "rawMarkdown": "Thank you for your comment and code. It's my fault. Learnt a lot.",
      "replies": [
        {
          "id": 1152018,
          "postDate": "2021-01-13T17:45:37.807Z",
          "content": "<p><a href=\"https://www.kaggle.com/cyrano\" target=\"_blank\">@cyrano</a> no worries, it's always good to raise a concern whenever you see something that looks inconsistent. That way we all get a chance to investigate and learn more too.</p>",
          "rawMarkdown": "@cyrano no worries, it's always good to raise a concern whenever you see something that looks inconsistent. That way we all get a chance to investigate and learn more too."
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 1151016,
      "author_name": "Craig Thomas",
      "author_url": "",
      "post_date": "2021-01-13T04:27:43.300000",
      "content": "<p>The way you are extracting the image id from the DICOM filename is causing the problem. The use of <code>.strip('.dicom')</code> isn't working the way you think - <code>strip</code> accepts a set of characters, any of which will be removed if they exist at the start or end of the string. Try replacing <code>.strip('.dicom')</code> with <code>.replace('.dicom', '')</code> instead (see my results below).<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2051313%2Fa6a919953d97fa3cfc186ed86e13592b%2Freplace_instead_of_strip.png?generation=1610512003108527&amp;alt=media\" alt=\"\"></p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1151409,
      "author_name": "Cyrano",
      "author_url": "",
      "post_date": "2021-01-13T09:59:53.580000",
      "content": "<p>Thank you for your comment and code. It's my fault. Learnt a lot.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1152018,
          "author_name": "Craig Thomas",
          "author_url": "",
          "post_date": "2021-01-13T17:45:37.807000",
          "content": "<p><a href=\"https://www.kaggle.com/cyrano\" target=\"_blank\">@cyrano</a> no worries, it's always good to raise a concern whenever you see something that looks inconsistent. That way we all get a chance to investigate and learn more too.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1151016": "The way you are extracting the image id from the DICOM filename is causing the problem. The use of `.strip('.dicom')` isn't working the way you think - `strip` accepts a set of characters, any of which will be removed if they exist at the start or end of the string. Try replacing `.strip('.dicom')` with `.replace('.dicom', '')` instead (see my results below).\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2051313%2Fa6a919953d97fa3cfc186ed86e13592b%2Freplace_instead_of_strip.png?generation=1610512003108527&alt=media)",
    "1150935": "The image ids seem not to match between train dicom files and the image_id field of train.csv.\nBoth of us are 15000. As I found there are 3504 of them are not same.\n\n![![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1167442%2Fd2d0bf4d635124c81b51acdfafa0f1f1%2FScreen%20Shot%202021-01-13%20at%2009.28.09.png?generation=1610501313266784&alt=media)]\n\nDo you have this issue? ",
    "1151409": "Thank you for your comment and code. It's my fault. Learnt a lot."
  }
}