{
  "id": 49293,
  "title": "Our approach -  47th place",
  "url": "/competitions/sp-society-camera-model-identification/writeups/zeros-our-approach-47th-place",
  "author_name": "",
  "post_date": "2018-02-09T03:56:31.400Z",
  "votes": 6,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Hello, we are sharing our approach for this competition. Getting a silver medal on this competition was not possible without the ideas and codes from @andreas and @Ivan Romanov, nad additional data from @Gleb. A big thanks to them and my teammates.</p>\n\n<p>We obtained this score on our last day submission (public LB 0.962, private 0.969) because we could not run our code fast enough (keras, theano backend) due to limited resources. We decided to use pytorch on the second last day of this competition and were able to run Densnet kind of network in less than 8 hours (single GPU; titanx).</p>\n\n<p>Approach:</p>\n\n<ol>\n<li>We used roughly 7000 images for training, removed bad images (low resolution images, low light images, non unique images).</li>\n<li>Trained three netwroks. One Densenet201 with 448 crop size, and two DenseNet201 with 512 image size but modified FC layers.</li>\n<li>For 448 crop size, we did test time augmentation (random crop and flip). This model alone gave 0.968 on private leaderboard. For others no TTA.</li>\n<li>Final results were obtained from max voting of all the three models.</li>\n</ol>\n\n<p>My take:</p>\n\n<ul>\n<li>Pytorch is relatively faster than keras (theano backend at least). I was hesitant to use it but given the speed, I would like to invest some time learning it. </li>\n</ul>\n\n<p>It would be great if other could share their ideas and help everyone benefit from it.</p>",
  "messages": [
    {
      "id": "279931",
      "postDate": "02/09/2018 00:47:18",
      "content": "<p>Hello, we are sharing our approach for this competition. Getting a silver medal on this competition was not possible without the ideas and codes from @andreas and @Ivan Romanov, nad additional data from @Gleb. A big thanks to them and my teammates.</p>\n\n<p>We obtained this score on our last day submission (public LB 0.962, private 0.969) because we could not run our code fast enough (keras, theano backend) due to limited resources. We decided to use pytorch on the second last day of this competition and were able to run Densnet kind of network in less than 8 hours (single GPU; titanx).</p>\n\n<p>Approach:</p>\n\n<ol>\n<li>We used roughly 7000 images for training, removed bad images (low resolution images, low light images, non unique images).</li>\n<li>Trained three netwroks. One Densenet201 with 448 crop size, and two DenseNet201 with 512 image size but modified FC layers.</li>\n<li>For 448 crop size, we did test time augmentation (random crop and flip). This model alone gave 0.968 on private leaderboard. For others no TTA.</li>\n<li>Final results were obtained from max voting of all the three models.</li>\n</ol>\n\n<p>My take:</p>\n\n<ul>\n<li>Pytorch is relatively faster than keras (theano backend at least). I was hesitant to use it but given the speed, I would like to invest some time learning it. </li>\n</ul>\n\n<p>It would be great if other could share their ideas and help everyone benefit from it.</p>",
      "rawMarkdown": "Hello, we are sharing our approach for this competition. Getting a silver medal on this competition was not possible without the ideas and codes from @andreas and @Ivan Romanov, nad additional data from @Gleb. A big thanks to them and my teammates.\n\nWe obtained this score on our last day submission (public LB 0.962, private 0.969) because we could not run our code fast enough (keras, theano backend) due to limited resources. We decided to use pytorch on the second last day of this competition and were able to run Densnet kind of network in less than 8 hours (single GPU; titanx).\n\nApproach:\n\n 1. We used roughly 7000 images for training, removed bad images (low resolution images, low light images, non unique images).\n 2. Trained three netwroks. One Densenet201 with 448 crop size, and two DenseNet201 with 512 image size but modified FC layers.\n 3. For 448 crop size, we did test time augmentation (random crop and flip). This model alone gave 0.968 on private leaderboard. For others no TTA.\n 4. Final results were obtained from max voting of all the three models.\n\nMy take:\n\n - Pytorch is relatively faster than keras (theano backend at least). I was hesitant to use it but given the speed, I would like to invest some time learning it. \n\nIt would be great if other could share their ideas and help everyone benefit from it.",
      "votes": null
    },
    {
      "id": "280188",
      "postDate": "02/09/2018 14:35:03",
      "content": "<p>Awesome! How many epics have you run to get the final model and what is the validation score?</p>",
      "rawMarkdown": "Awesome! How many epics have you run to get the final model and what is the validation score?",
      "votes": null
    },
    {
      "id": "280309",
      "postDate": "02/09/2018 17:46:11",
      "content": "<p>We trained roughly 120-140 epochs for each model with a batch size of 8. Validation loss was 0.04 and score was between 0.97-0.98</p>",
      "rawMarkdown": "We trained roughly 120-140 epochs for each model with a batch size of 8. Validation loss was 0.04 and score was between 0.97-0.98",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 280188,
      "author_name": "zhaoyangma",
      "author_url": "",
      "post_date": "02/09/2018 14:35:03",
      "content": "<p>Awesome! How many epics have you run to get the final model and what is the validation score?</p>",
      "votes": null,
      "replies": [
        {
          "id": 280309,
          "author_name": "skhemka",
          "author_url": "",
          "post_date": "02/09/2018 17:46:11",
          "content": "<p>We trained roughly 120-140 epochs for each model with a batch size of 8. Validation loss was 0.04 and score was between 0.97-0.98</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "279931": "Hello, we are sharing our approach for this competition. Getting a silver medal on this competition was not possible without the ideas and codes from @andreas and @Ivan Romanov, nad additional data from @Gleb. A big thanks to them and my teammates.\n\nWe obtained this score on our last day submission (public LB 0.962, private 0.969) because we could not run our code fast enough (keras, theano backend) due to limited resources. We decided to use pytorch on the second last day of this competition and were able to run Densnet kind of network in less than 8 hours (single GPU; titanx).\n\nApproach:\n\n 1. We used roughly 7000 images for training, removed bad images (low resolution images, low light images, non unique images).\n 2. Trained three netwroks. One Densenet201 with 448 crop size, and two DenseNet201 with 512 image size but modified FC layers.\n 3. For 448 crop size, we did test time augmentation (random crop and flip). This model alone gave 0.968 on private leaderboard. For others no TTA.\n 4. Final results were obtained from max voting of all the three models.\n\nMy take:\n\n - Pytorch is relatively faster than keras (theano backend at least). I was hesitant to use it but given the speed, I would like to invest some time learning it. \n\nIt would be great if other could share their ideas and help everyone benefit from it.",
    "280188": "Awesome! How many epics have you run to get the final model and what is the validation score?",
    "280309": "We trained roughly 120-140 epochs for each model with a batch size of 8. Validation loss was 0.04 and score was between 0.97-0.98"
  },
  "source": "meta"
}