{
  "id": 99456,
  "title": "Easy use of multiple datasets",
  "url": "/competitions/aptos2019-blindness-detection/discussion/99456",
  "author_name": "sh",
  "post_date": "2019-07-11T13:05:10.332000",
  "votes": 2,
  "comment_count": 0,
  "views": 0,
  "content": "<p>So i'm really bad at creating dataloaders with multiple datasets so I've been using symlinks to \"cheat\"\nOne example is when using the given dataset and ilovescience's resized dataset(from old competition).\nI made a folder in working called train and then just symlinked all of the training images into that one folder.\nThen you just can append the two dataframes with the labels(after renaming columns).\nJust make sure to use os.readlink('train/[imagename]') as the path.</p>\n\n<p>Edit: Also if anyone has a more concise way of doing multiple folders, i'd love to know\nEdit:\nhere is some sample code:\n<code>!mkdir train</code>\n<code>!ln -s ../input/aptos2019-blindness-detection/train_images/* train</code></p>\n\n<p>to read from symlink(modified from abisheks kernel)\n<code>img_name = os.readlink(os.path.join('train/', self.data.loc[idx, 'id_code'] + '.png'))</code></p>",
  "messages": [
    {
      "id": 572838,
      "postDate": "2019-07-11T13:05:10.333Z",
      "content": "<p>So i'm really bad at creating dataloaders with multiple datasets so I've been using symlinks to \"cheat\"\nOne example is when using the given dataset and ilovescience's resized dataset(from old competition).\nI made a folder in working called train and then just symlinked all of the training images into that one folder.\nThen you just can append the two dataframes with the labels(after renaming columns).\nJust make sure to use os.readlink('train/[imagename]') as the path.</p>\n\n<p>Edit: Also if anyone has a more concise way of doing multiple folders, i'd love to know\nEdit:\nhere is some sample code:\n<code>!mkdir train</code>\n<code>!ln -s ../input/aptos2019-blindness-detection/train_images/* train</code></p>\n\n<p>to read from symlink(modified from abisheks kernel)\n<code>img_name = os.readlink(os.path.join('train/', self.data.loc[idx, 'id_code'] + '.png'))</code></p>",
      "rawMarkdown": "So i'm really bad at creating dataloaders with multiple datasets so I've been using symlinks to \"cheat\"\nOne example is when using the given dataset and ilovescience's resized dataset(from old competition).\nI made a folder in working called train and then just symlinked all of the training images into that one folder.\nThen you just can append the two dataframes with the labels(after renaming columns).\nJust make sure to use os.readlink('train/[imagename]') as the path.\n\nEdit: Also if anyone has a more concise way of doing multiple folders, i'd love to know\nEdit:\nhere is some sample code:\n`!mkdir train`\n`!ln -s ../input/aptos2019-blindness-detection/train_images/* train`\n\nto read from symlink(modified from abisheks kernel)\n` img_name = os.readlink(os.path.join('train/', self.data.loc[idx, 'id_code'] + '.png'))`",
      "votes": 2
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "572838": "So i'm really bad at creating dataloaders with multiple datasets so I've been using symlinks to \"cheat\"\nOne example is when using the given dataset and ilovescience's resized dataset(from old competition).\nI made a folder in working called train and then just symlinked all of the training images into that one folder.\nThen you just can append the two dataframes with the labels(after renaming columns).\nJust make sure to use os.readlink('train/[imagename]') as the path.\n\nEdit: Also if anyone has a more concise way of doing multiple folders, i'd love to know\nEdit:\nhere is some sample code:\n`!mkdir train`\n`!ln -s ../input/aptos2019-blindness-detection/train_images/* train`\n\nto read from symlink(modified from abisheks kernel)\n` img_name = os.readlink(os.path.join('train/', self.data.loc[idx, 'id_code'] + '.png'))`"
  }
}