{
  "id": 32825,
  "title": "Right... I have an accurate model, WHat now?",
  "url": "/competitions/noaa-fisheries-steller-sea-lion-population-count/discussion/32825",
  "author_name": "",
  "post_date": "2017-05-11T07:09:39.042382100Z",
  "votes": -2,
  "comment_count": 17,
  "views": 0,
  "content": "<p>Hello, everyone\nI was able to create a model that received about 87% accuracy given a random photo (tested it by hand), but that was with 64x64 images of each class (including a negative class to train the offsetters). </p>\n\n<p>Now the test data they give us says classify how many there are given a (random size) photo. If my model takes 64x64 images how am I going to convolve over that image to count how many there are?</p>\n\n<p>I'm thinking of starting at the top corner and just going from left to right to down in sequences of 64 and counting what I get for each of those classes, if its negative I won't count it, if it's a class ill add it to the list for that image then save that amount to a row on the submission CSV.</p>\n\n<p>Any other suggestions?</p>\n\n<p>BTW here's the output of the image I fed it:</p>\n\n<p>I also included the caffe model.</p>\n\n<p><strong>This is 24 samples I took and marked correct or not</strong></p>\n\n<p><img src=\"http://imgur.com/oaqlsZY.jpg\" alt=\"image\" title=\"\"></p>",
  "messages": [
    {
      "id": "181848",
      "postDate": "05/11/2017 07:09:39",
      "content": "<p>Hello, everyone\nI was able to create a model that received about 87% accuracy given a random photo (tested it by hand), but that was with 64x64 images of each class (including a negative class to train the offsetters). </p>\n\n<p>Now the test data they give us says classify how many there are given a (random size) photo. If my model takes 64x64 images how am I going to convolve over that image to count how many there are?</p>\n\n<p>I'm thinking of starting at the top corner and just going from left to right to down in sequences of 64 and counting what I get for each of those classes, if its negative I won't count it, if it's a class ill add it to the list for that image then save that amount to a row on the submission CSV.</p>\n\n<p>Any other suggestions?</p>\n\n<p>BTW here's the output of the image I fed it:</p>\n\n<p>I also included the caffe model.</p>\n\n<p><strong>This is 24 samples I took and marked correct or not</strong></p>\n\n<p><img src=\"http://imgur.com/oaqlsZY.jpg\" alt=\"image\" title=\"\"></p>",
      "rawMarkdown": "Hello, everyone\nI was able to create a model that received about 87% accuracy given a random photo (tested it by hand), but that was with 64x64 images of each class (including a negative class to train the offsetters). \n\n\nNow the test data they give us says classify how many there are given a (random size) photo. If my model takes 64x64 images how am I going to convolve over that image to count how many there are?\n\n\nI'm thinking of starting at the top corner and just going from left to right to down in sequences of 64 and counting what I get for each of those classes, if its negative I won't count it, if it's a class ill add it to the list for that image then save that amount to a row on the submission CSV.\n\nAny other suggestions?\n\nBTW here's the output of the image I fed it:\n\nI also included the caffe model.\n\n**This is 24 samples I took and marked correct or not**\n\n![image][1]\n\n\n  [1]: http://imgur.com/oaqlsZY.jpg",
      "votes": null
    },
    {
      "id": "181941",
      "postDate": "05/11/2017 16:05:09",
      "content": "<p>This is a good starting point. As you described, you can now use a sliding window approach to obtain heatmaps for each class. Your patch_size is 64, but you don't necessarily want to have a step_size/stride of 64, you probably need to have a smaller step size to make sure sea lions appear near the center in at least one of the overlapping patches.</p>\n\n<p>This method will give you a good approximation of how crowded each scene is, and good counts in less crowded places, but it will have some difficulty getting actual counts when the animals are very close together or multiple animals in a single patch (very common for pups).</p>",
      "rawMarkdown": "This is a good starting point. As you described, you can now use a sliding window approach to obtain heatmaps for each class. Your patch_size is 64, but you don't necessarily want to have a step_size/stride of 64, you probably need to have a smaller step size to make sure sea lions appear near the center in at least one of the overlapping patches.\n\nThis method will give you a good approximation of how crowded each scene is, and good counts in less crowded places, but it will have some difficulty getting actual counts when the animals are very close together or multiple animals in a single patch (very common for pups).",
      "votes": null
    },
    {
      "id": "181966",
      "postDate": "05/11/2017 17:57:32",
      "content": "<p>Thank you for the response. I appriciatte the help 100%</p>",
      "rawMarkdown": "Thank you for the response. I appriciatte the help 100%",
      "votes": null
    },
    {
      "id": "182170",
      "postDate": "05/12/2017 15:28:35",
      "content": "<p>Sorry, I assumed you had a separate class for background. It seems you trained only with \"positive\" samples so your classifier can't distinguish between animal/no-animal right?</p>",
      "rawMarkdown": "Sorry, I assumed you had a separate class for background. It seems you trained only with \"positive\" samples so your classifier can't distinguish between animal/no-animal right?",
      "votes": null
    },
    {
      "id": "182224",
      "postDate": "05/12/2017 20:39:16",
      "content": "<p>It is up to your model complexity and computing power, but sliding windows approach may be painfully slow - it would take 2 weeks to process all test set in my case. \nMeasure time to run sliding window on a few images. And if it is too slow, I suggest trying simpler/faster model that can propose the location of sea lions (rcnn or unet with lower resolution image?). It will reduce computing time and also give coordinates of sea lion, which can be helpful for next pipeline that classifies sea lion types.\nI'm losing a lot of sea lions in the first pipeline alone, but at least I can get the result in reasonable times and try another experiment for better results.</p>",
      "rawMarkdown": "It is up to your model complexity and computing power, but sliding windows approach may be painfully slow - it would take 2 weeks to process all test set in my case. \nMeasure time to run sliding window on a few images. And if it is too slow, I suggest trying simpler/faster model that can propose the location of sea lions (rcnn or unet with lower resolution image?). It will reduce computing time and also give coordinates of sea lion, which can be helpful for next pipeline that classifies sea lion types.\nI'm losing a lot of sea lions in the first pipeline alone, but at least I can get the result in reasonable times and try another experiment for better results.",
      "votes": null
    },
    {
      "id": "182228",
      "postDate": "05/12/2017 21:00:00",
      "content": "<p>Usually you can convert a network that does classification to a fully connected convolutional network, and apply it to very large batches (edit: I meant patches), in which case it's very fast.</p>",
      "rawMarkdown": "Usually you can convert a network that does classification to a fully connected convolutional network, and apply it to very large batches (edit: I meant patches), in which case it's very fast.",
      "votes": null
    },
    {
      "id": "182229",
      "postDate": "05/12/2017 21:16:39",
      "content": "<p>Thank you for the tip! I should try this method.</p>",
      "rawMarkdown": "Thank you for the tip! I should try this method.",
      "votes": null
    },
    {
      "id": "182237",
      "postDate": "05/12/2017 22:43:27",
      "content": "<p>Yeah I do its called \"negative\"</p>",
      "rawMarkdown": "Yeah I do its called \"negative\"",
      "votes": null
    },
    {
      "id": "182238",
      "postDate": "05/12/2017 22:44:27",
      "content": "<p>Trust me, I have the computing power... (dual titans)</p>",
      "rawMarkdown": "Trust me, I have the computing power... (dual titans)",
      "votes": null
    },
    {
      "id": "182351",
      "postDate": "05/13/2017 10:57:23",
      "content": "<p>I have tried naive sliding window approach and it's about 10 sec per one image, so prediction time on test set will be about 10*18000/3600 ~ 50 h.\nBut it depends on stride, window size, network architecture, hardware.</p>",
      "rawMarkdown": "I have tried naive sliding window approach and it's about 10 sec per one image, so prediction time on test set will be about 10*18000/3600 ~ 50 h.\nBut it depends on stride, window size, network architecture, hardware.",
      "votes": null
    },
    {
      "id": "182428",
      "postDate": "05/13/2017 20:09:42",
      "content": "<p>Can  you share your code @mrgloom</p>",
      "rawMarkdown": "Can  you share your code @mrgloom",
      "votes": null
    },
    {
      "id": "182442",
      "postDate": "05/13/2017 21:26:06",
      "content": "<p>FWIW, my current prediction time for the whole test is about 30-35h, so 50h does not sound too bad.</p>",
      "rawMarkdown": "FWIW, my current prediction time for the whole test is about 30-35h, so 50h does not sound too bad.",
      "votes": null
    },
    {
      "id": "183662",
      "postDate": "05/18/2017 21:36:55",
      "content": "<p>There are two ways to go with cnn: object detection and dense map regression. Your approach is simply bad.</p>",
      "rawMarkdown": "There are two ways to go with cnn: object detection and dense map regression. Your approach is simply bad.",
      "votes": null
    },
    {
      "id": "184463",
      "postDate": "05/22/2017 00:47:24",
      "content": "<p>And youre a fucking dick so go fuck yourself.</p>",
      "rawMarkdown": "And youre a fucking dick so go fuck yourself.",
      "votes": null
    },
    {
      "id": "184740",
      "postDate": "05/22/2017 21:53:44",
      "content": "<blockquote>\n  <p><strong>BogdanRuzhitskiy wrote</strong></p>\n  \n  <blockquote>\n    <p>There are two ways to go with cnn: object detection and dense map regression. Your approach is simply bad.</p>\n  </blockquote>\n</blockquote>\n\n<p>BogdanRuzhitskiy I am not familiar with dense map regression, can you point me to some links/papers on the subject?</p>",
      "rawMarkdown": "&gt; **BogdanRuzhitskiy wrote**\n&gt; \n&gt; &gt; There are two ways to go with cnn: object detection and dense map regression. Your approach is simply bad.\n\nBogdanRuzhitskiy I am not familiar with dense map regression, can you point me to some links/papers on the subject?",
      "votes": null
    },
    {
      "id": "185567",
      "postDate": "05/25/2017 12:13:03",
      "content": "<p>It's a very useful approach, here is the link describing how to convert the sliding window with fully connected layer to much faster conv layer:</p>\n\n<p><a href=\"http://cs231n.github.io/convolutional-networks/#convert\">CS231n</a></p>",
      "rawMarkdown": "It's a very useful approach, here is the link describing how to convert the sliding window with fully connected layer to much faster conv layer:\n\n[CS231n][1]\n\n\n  [1]: http://cs231n.github.io/convolutional-networks/#convert",
      "votes": null
    },
    {
      "id": "190387",
      "postDate": "06/07/2017 15:32:45",
      "content": "<p>How does can the network be applied to very large patches? After converting between convolutional and FC, won't we still have a network that only recognizes individual sea lions?</p>",
      "rawMarkdown": "How does can the network be applied to very large patches? After converting between convolutional and FC, won't we still have a network that only recognizes individual sea lions?",
      "votes": null
    },
    {
      "id": "190673",
      "postDate": "06/08/2017 07:12:59",
      "content": "<p>Even implemented in Keras\n<a href=\"https://www.kaggle.com/c/noaa-fisheries-steller-sea-lion-population-count/discussion/33840\">https://www.kaggle.com/c/noaa-fisheries-steller-sea-lion-population-count/discussion/33840</a></p>",
      "rawMarkdown": "Even implemented in Keras\nhttps://www.kaggle.com/c/noaa-fisheries-steller-sea-lion-population-count/discussion/33840",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 181941,
      "author_name": "aamaia",
      "author_url": "",
      "post_date": "05/11/2017 16:05:09",
      "content": "<p>This is a good starting point. As you described, you can now use a sliding window approach to obtain heatmaps for each class. Your patch_size is 64, but you don't necessarily want to have a step_size/stride of 64, you probably need to have a smaller step size to make sure sea lions appear near the center in at least one of the overlapping patches.</p>\n\n<p>This method will give you a good approximation of how crowded each scene is, and good counts in less crowded places, but it will have some difficulty getting actual counts when the animals are very close together or multiple animals in a single patch (very common for pups).</p>",
      "votes": null,
      "replies": [
        {
          "id": 181966,
          "author_name": "kingburrito666",
          "author_url": "",
          "post_date": "05/11/2017 17:57:32",
          "content": "<p>Thank you for the response. I appriciatte the help 100%</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 182170,
          "author_name": "aamaia",
          "author_url": "",
          "post_date": "05/12/2017 15:28:35",
          "content": "<p>Sorry, I assumed you had a separate class for background. It seems you trained only with \"positive\" samples so your classifier can't distinguish between animal/no-animal right?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 182237,
          "author_name": "kingburrito666",
          "author_url": "",
          "post_date": "05/12/2017 22:43:27",
          "content": "<p>Yeah I do its called \"negative\"</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 182224,
      "author_name": "jandjenter",
      "author_url": "",
      "post_date": "05/12/2017 20:39:16",
      "content": "<p>It is up to your model complexity and computing power, but sliding windows approach may be painfully slow - it would take 2 weeks to process all test set in my case. \nMeasure time to run sliding window on a few images. And if it is too slow, I suggest trying simpler/faster model that can propose the location of sea lions (rcnn or unet with lower resolution image?). It will reduce computing time and also give coordinates of sea lion, which can be helpful for next pipeline that classifies sea lion types.\nI'm losing a lot of sea lions in the first pipeline alone, but at least I can get the result in reasonable times and try another experiment for better results.</p>",
      "votes": null,
      "replies": [
        {
          "id": 182228,
          "author_name": "lopuhin",
          "author_url": "",
          "post_date": "05/12/2017 21:00:00",
          "content": "<p>Usually you can convert a network that does classification to a fully connected convolutional network, and apply it to very large batches (edit: I meant patches), in which case it's very fast.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 182229,
          "author_name": "jandjenter",
          "author_url": "",
          "post_date": "05/12/2017 21:16:39",
          "content": "<p>Thank you for the tip! I should try this method.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 182238,
          "author_name": "kingburrito666",
          "author_url": "",
          "post_date": "05/12/2017 22:44:27",
          "content": "<p>Trust me, I have the computing power... (dual titans)</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 182351,
          "author_name": "mrgloom",
          "author_url": "",
          "post_date": "05/13/2017 10:57:23",
          "content": "<p>I have tried naive sliding window approach and it's about 10 sec per one image, so prediction time on test set will be about 10*18000/3600 ~ 50 h.\nBut it depends on stride, window size, network architecture, hardware.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 182428,
          "author_name": "kingburrito666",
          "author_url": "",
          "post_date": "05/13/2017 20:09:42",
          "content": "<p>Can  you share your code @mrgloom</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 182442,
          "author_name": "lopuhin",
          "author_url": "",
          "post_date": "05/13/2017 21:26:06",
          "content": "<p>FWIW, my current prediction time for the whole test is about 30-35h, so 50h does not sound too bad.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 185567,
          "author_name": "dmytropoplavskiy",
          "author_url": "",
          "post_date": "05/25/2017 12:13:03",
          "content": "<p>It's a very useful approach, here is the link describing how to convert the sliding window with fully connected layer to much faster conv layer:</p>\n\n<p><a href=\"http://cs231n.github.io/convolutional-networks/#convert\">CS231n</a></p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 190387,
          "author_name": "jamesthornton",
          "author_url": "",
          "post_date": "06/07/2017 15:32:45",
          "content": "<p>How does can the network be applied to very large patches? After converting between convolutional and FC, won't we still have a network that only recognizes individual sea lions?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 190673,
          "author_name": "mrgloom",
          "author_url": "",
          "post_date": "06/08/2017 07:12:59",
          "content": "<p>Even implemented in Keras\n<a href=\"https://www.kaggle.com/c/noaa-fisheries-steller-sea-lion-population-count/discussion/33840\">https://www.kaggle.com/c/noaa-fisheries-steller-sea-lion-population-count/discussion/33840</a></p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 183662,
      "author_name": "",
      "author_url": "",
      "post_date": "05/18/2017 21:36:55",
      "content": "<p>There are two ways to go with cnn: object detection and dense map regression. Your approach is simply bad.</p>",
      "votes": null,
      "replies": [
        {
          "id": 184463,
          "author_name": "kingburrito666",
          "author_url": "",
          "post_date": "05/22/2017 00:47:24",
          "content": "<p>And youre a fucking dick so go fuck yourself.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 184740,
          "author_name": "jkarimi91",
          "author_url": "",
          "post_date": "05/22/2017 21:53:44",
          "content": "<blockquote>\n  <p><strong>BogdanRuzhitskiy wrote</strong></p>\n  \n  <blockquote>\n    <p>There are two ways to go with cnn: object detection and dense map regression. Your approach is simply bad.</p>\n  </blockquote>\n</blockquote>\n\n<p>BogdanRuzhitskiy I am not familiar with dense map regression, can you point me to some links/papers on the subject?</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "181848": "Hello, everyone\nI was able to create a model that received about 87% accuracy given a random photo (tested it by hand), but that was with 64x64 images of each class (including a negative class to train the offsetters). \n\n\nNow the test data they give us says classify how many there are given a (random size) photo. If my model takes 64x64 images how am I going to convolve over that image to count how many there are?\n\n\nI'm thinking of starting at the top corner and just going from left to right to down in sequences of 64 and counting what I get for each of those classes, if its negative I won't count it, if it's a class ill add it to the list for that image then save that amount to a row on the submission CSV.\n\nAny other suggestions?\n\nBTW here's the output of the image I fed it:\n\nI also included the caffe model.\n\n**This is 24 samples I took and marked correct or not**\n\n![image][1]\n\n\n  [1]: http://imgur.com/oaqlsZY.jpg",
    "181941": "This is a good starting point. As you described, you can now use a sliding window approach to obtain heatmaps for each class. Your patch_size is 64, but you don't necessarily want to have a step_size/stride of 64, you probably need to have a smaller step size to make sure sea lions appear near the center in at least one of the overlapping patches.\n\nThis method will give you a good approximation of how crowded each scene is, and good counts in less crowded places, but it will have some difficulty getting actual counts when the animals are very close together or multiple animals in a single patch (very common for pups).",
    "181966": "Thank you for the response. I appriciatte the help 100%",
    "182170": "Sorry, I assumed you had a separate class for background. It seems you trained only with \"positive\" samples so your classifier can't distinguish between animal/no-animal right?",
    "182224": "It is up to your model complexity and computing power, but sliding windows approach may be painfully slow - it would take 2 weeks to process all test set in my case. \nMeasure time to run sliding window on a few images. And if it is too slow, I suggest trying simpler/faster model that can propose the location of sea lions (rcnn or unet with lower resolution image?). It will reduce computing time and also give coordinates of sea lion, which can be helpful for next pipeline that classifies sea lion types.\nI'm losing a lot of sea lions in the first pipeline alone, but at least I can get the result in reasonable times and try another experiment for better results.",
    "182228": "Usually you can convert a network that does classification to a fully connected convolutional network, and apply it to very large batches (edit: I meant patches), in which case it's very fast.",
    "182229": "Thank you for the tip! I should try this method.",
    "182237": "Yeah I do its called \"negative\"",
    "182238": "Trust me, I have the computing power... (dual titans)",
    "182351": "I have tried naive sliding window approach and it's about 10 sec per one image, so prediction time on test set will be about 10*18000/3600 ~ 50 h.\nBut it depends on stride, window size, network architecture, hardware.",
    "182428": "Can  you share your code @mrgloom",
    "182442": "FWIW, my current prediction time for the whole test is about 30-35h, so 50h does not sound too bad.",
    "183662": "There are two ways to go with cnn: object detection and dense map regression. Your approach is simply bad.",
    "184463": "And youre a fucking dick so go fuck yourself.",
    "184740": "&gt; **BogdanRuzhitskiy wrote**\n&gt; \n&gt; &gt; There are two ways to go with cnn: object detection and dense map regression. Your approach is simply bad.\n\nBogdanRuzhitskiy I am not familiar with dense map regression, can you point me to some links/papers on the subject?",
    "185567": "It's a very useful approach, here is the link describing how to convert the sliding window with fully connected layer to much faster conv layer:\n\n[CS231n][1]\n\n\n  [1]: http://cs231n.github.io/convolutional-networks/#convert",
    "190387": "How does can the network be applied to very large patches? After converting between convolutional and FC, won't we still have a network that only recognizes individual sea lions?",
    "190673": "Even implemented in Keras\nhttps://www.kaggle.com/c/noaa-fisheries-steller-sea-lion-population-count/discussion/33840"
  },
  "source": "meta"
}