{
  "id": 33754,
  "title": "Predicting bounding boxes",
  "url": "/competitions/intel-mobileodt-cervical-cancer-screening/discussion/33754",
  "author_name": "",
  "post_date": "2017-05-29T05:15:10.092348800Z",
  "votes": 8,
  "comment_count": 5,
  "views": 0,
  "content": "<p>Given the quality of the images and inspired by other competitions such as right whale and fisheries I set out at the start of this competition to do cropping. So I tried to train a bounding box predictor but I found that to be quite hard. Eventually what worked for me was a simple CNN inspired by the right whale winner writeup, using a small learning rate and letting it train for 6000 epochs on small images (64x64). In the end it performed quite well, getting a 0.0073 validation loss (mse) and generating useful bounding boxes. It sounds like a lot of epochs but it only takes 2 hours to train on half of a Tesla K80. The network has no activation on the final dense layer and outputs all four coordinates at once.</p>\n\n<p>I found that implementing IOU was too difficult, and simply copying over dice coefficient loss code from other people did not work for me with the loss jumping around wildly in each epoch. I would still like to implement IOU but given the deadline I will focus on actually predicting the cervix types for now.</p>\n\n<p>For cervix types I have attempted squeezenet on the unfiltered, uncropped images but that only got me too 0.98854 on the LB. A simple 2-layer CNN got me at 1.06. I wonder how far the cropped images will take me.</p>\n\n<p>The reason I am posting this is because I discussed this same information on the KaggleNoobs Slack channel and I do not want to be 'privately' sharing information. Of course the slack channel is open to all but people who are not on there would miss out on this. Still I think it would nice if the rules could be a little more 'slack' because I enjoy discussing the competition on Slack and it would be better if we did not have to consider whether or not what we discuss should be shared on here too. OTOH it would force people in competitions to join the channel and read everything for FOMO..</p>",
  "messages": [
    {
      "id": "186723",
      "postDate": "05/29/2017 05:15:10",
      "content": "<p>Given the quality of the images and inspired by other competitions such as right whale and fisheries I set out at the start of this competition to do cropping. So I tried to train a bounding box predictor but I found that to be quite hard. Eventually what worked for me was a simple CNN inspired by the right whale winner writeup, using a small learning rate and letting it train for 6000 epochs on small images (64x64). In the end it performed quite well, getting a 0.0073 validation loss (mse) and generating useful bounding boxes. It sounds like a lot of epochs but it only takes 2 hours to train on half of a Tesla K80. The network has no activation on the final dense layer and outputs all four coordinates at once.</p>\n\n<p>I found that implementing IOU was too difficult, and simply copying over dice coefficient loss code from other people did not work for me with the loss jumping around wildly in each epoch. I would still like to implement IOU but given the deadline I will focus on actually predicting the cervix types for now.</p>\n\n<p>For cervix types I have attempted squeezenet on the unfiltered, uncropped images but that only got me too 0.98854 on the LB. A simple 2-layer CNN got me at 1.06. I wonder how far the cropped images will take me.</p>\n\n<p>The reason I am posting this is because I discussed this same information on the KaggleNoobs Slack channel and I do not want to be 'privately' sharing information. Of course the slack channel is open to all but people who are not on there would miss out on this. Still I think it would nice if the rules could be a little more 'slack' because I enjoy discussing the competition on Slack and it would be better if we did not have to consider whether or not what we discuss should be shared on here too. OTOH it would force people in competitions to join the channel and read everything for FOMO..</p>",
      "rawMarkdown": "Given the quality of the images and inspired by other competitions such as right whale and fisheries I set out at the start of this competition to do cropping. So I tried to train a bounding box predictor but I found that to be quite hard. Eventually what worked for me was a simple CNN inspired by the right whale winner writeup, using a small learning rate and letting it train for 6000 epochs on small images (64x64). In the end it performed quite well, getting a 0.0073 validation loss (mse) and generating useful bounding boxes. It sounds like a lot of epochs but it only takes 2 hours to train on half of a Tesla K80. The network has no activation on the final dense layer and outputs all four coordinates at once.\n\nI found that implementing IOU was too difficult, and simply copying over dice coefficient loss code from other people did not work for me with the loss jumping around wildly in each epoch. I would still like to implement IOU but given the deadline I will focus on actually predicting the cervix types for now.\n\nFor cervix types I have attempted squeezenet on the unfiltered, uncropped images but that only got me too 0.98854 on the LB. A simple 2-layer CNN got me at 1.06. I wonder how far the cropped images will take me.\n\nThe reason I am posting this is because I discussed this same information on the KaggleNoobs Slack channel and I do not want to be 'privately' sharing information. Of course the slack channel is open to all but people who are not on there would miss out on this. Still I think it would nice if the rules could be a little more 'slack' because I enjoy discussing the competition on Slack and it would be better if we did not have to consider whether or not what we discuss should be shared on here too. OTOH it would force people in competitions to join the channel and read everything for FOMO..",
      "votes": null
    },
    {
      "id": "186855",
      "postDate": "05/29/2017 14:35:05",
      "content": "<p>And if you didn't happen to know about the KaggleNoobs Slack channel, see <a href=\"https://www.kaggle.com/getting-started/20577\">https://www.kaggle.com/getting-started/20577</a></p>",
      "rawMarkdown": "And if you didn't happen to know about the KaggleNoobs Slack channel, see https://www.kaggle.com/getting-started/20577",
      "votes": null
    },
    {
      "id": "187139",
      "postDate": "05/30/2017 15:16:19",
      "content": "<p>That was quite a complete explanation @alutrin!</p>\n\n<p>Thinking if there is anything else to add, cause also actively took part on the cited conversation on  Slack about the ROI detection... \nMaybe my  statement on ROI detection precision not being that important for this competition, the advice not to use big images for it, (bigger than 64x64 will be overkilling for ROI) and the advice to try detecting bounding boxes coordinates one by one if averaged error of rectangles shows no progress. Also to adapt LR using the learning curves and trying it to be more exponential than linear.</p>\n\n<p>And... that's it!!! No big secrets to climb LB here... anyway, 100% transparency is nice and in this case not difficult to achieve.</p>\n\n<p>As @alutrin has already done, I also recommend Kagglenoobs channel on Slack, great place to exchange ML oppinions, knowdlege in general and also some fun stuff!</p>",
      "rawMarkdown": "That was quite a complete explanation @alutrin!\n\nThinking if there is anything else to add, cause also actively took part on the cited conversation on  Slack about the ROI detection... \nMaybe my  statement on ROI detection precision not being that important for this competition, the advice not to use big images for it, (bigger than 64x64 will be overkilling for ROI) and the advice to try detecting bounding boxes coordinates one by one if averaged error of rectangles shows no progress. Also to adapt LR using the learning curves and trying it to be more exponential than linear.\n\nAnd... that's it!!! No big secrets to climb LB here... anyway, 100% transparency is nice and in this case not difficult to achieve.\n\nAs @alutrin has already done, I also recommend Kagglenoobs channel on Slack, great place to exchange ML oppinions, knowdlege in general and also some fun stuff!",
      "votes": null
    },
    {
      "id": "187211",
      "postDate": "05/30/2017 18:16:35",
      "content": "<p>Hi All, \nJust to note, I have also thought segmenting the cervix would be useful for this competition and found that an appropriately trained CNN can segment the cervix quite successfully. Unfortunately, however, it has not helped with the classification at all despite many attempts. I have somewhat given up on it and my only explanation was that the non-cervix parts of the images are leaking information about the cervix type probably because a single subject has many images in the dataset and the non-cervix part of the images thus help with the classification. Not useful for a general classification tool but unfortunately seems to work with the dataset we have.</p>",
      "rawMarkdown": "Hi All, \nJust to note, I have also thought segmenting the cervix would be useful for this competition and found that an appropriately trained CNN can segment the cervix quite successfully. Unfortunately, however, it has not helped with the classification at all despite many attempts. I have somewhat given up on it and my only explanation was that the non-cervix parts of the images are leaking information about the cervix type probably because a single subject has many images in the dataset and the non-cervix part of the images thus help with the classification. Not useful for a general classification tool but unfortunately seems to work with the dataset we have.",
      "votes": null
    },
    {
      "id": "187597",
      "postDate": "05/31/2017 18:04:00",
      "content": "<p>Hi alutrin, you are trying the bbox coordinates model from this link?\n<a href=\"https://www.kaggle.com/c/intel-mobileodt-cervical-cancer-screening/discussion/31565#latest-186218\">https://www.kaggle.com/c/intel-mobileodt-cervical-cancer-screening/discussion/31565#latest-186218</a></p>",
      "rawMarkdown": "Hi alutrin, you are trying the bbox coordinates model from this link?\nhttps://www.kaggle.com/c/intel-mobileodt-cervical-cancer-screening/discussion/31565#latest-186218",
      "votes": null
    },
    {
      "id": "187771",
      "postDate": "06/01/2017 06:04:05",
      "content": "<p>No I made my own annotations, because I thought knowing the position of the cervix would be more useful than knowing where lesions are.</p>",
      "rawMarkdown": "No I made my own annotations, because I thought knowing the position of the cervix would be more useful than knowing where lesions are.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 186855,
      "author_name": "carlosaguayo",
      "author_url": "",
      "post_date": "05/29/2017 14:35:05",
      "content": "<p>And if you didn't happen to know about the KaggleNoobs Slack channel, see <a href=\"https://www.kaggle.com/getting-started/20577\">https://www.kaggle.com/getting-started/20577</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 187139,
      "author_name": "miguelpm",
      "author_url": "",
      "post_date": "05/30/2017 15:16:19",
      "content": "<p>That was quite a complete explanation @alutrin!</p>\n\n<p>Thinking if there is anything else to add, cause also actively took part on the cited conversation on  Slack about the ROI detection... \nMaybe my  statement on ROI detection precision not being that important for this competition, the advice not to use big images for it, (bigger than 64x64 will be overkilling for ROI) and the advice to try detecting bounding boxes coordinates one by one if averaged error of rectangles shows no progress. Also to adapt LR using the learning curves and trying it to be more exponential than linear.</p>\n\n<p>And... that's it!!! No big secrets to climb LB here... anyway, 100% transparency is nice and in this case not difficult to achieve.</p>\n\n<p>As @alutrin has already done, I also recommend Kagglenoobs channel on Slack, great place to exchange ML oppinions, knowdlege in general and also some fun stuff!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 187211,
      "author_name": "bk0000",
      "author_url": "",
      "post_date": "05/30/2017 18:16:35",
      "content": "<p>Hi All, \nJust to note, I have also thought segmenting the cervix would be useful for this competition and found that an appropriately trained CNN can segment the cervix quite successfully. Unfortunately, however, it has not helped with the classification at all despite many attempts. I have somewhat given up on it and my only explanation was that the non-cervix parts of the images are leaking information about the cervix type probably because a single subject has many images in the dataset and the non-cervix part of the images thus help with the classification. Not useful for a general classification tool but unfortunately seems to work with the dataset we have.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 187597,
      "author_name": "rteja1113",
      "author_url": "",
      "post_date": "05/31/2017 18:04:00",
      "content": "<p>Hi alutrin, you are trying the bbox coordinates model from this link?\n<a href=\"https://www.kaggle.com/c/intel-mobileodt-cervical-cancer-screening/discussion/31565#latest-186218\">https://www.kaggle.com/c/intel-mobileodt-cervical-cancer-screening/discussion/31565#latest-186218</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 187771,
          "author_name": "alutrin",
          "author_url": "",
          "post_date": "06/01/2017 06:04:05",
          "content": "<p>No I made my own annotations, because I thought knowing the position of the cervix would be more useful than knowing where lesions are.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "186723": "Given the quality of the images and inspired by other competitions such as right whale and fisheries I set out at the start of this competition to do cropping. So I tried to train a bounding box predictor but I found that to be quite hard. Eventually what worked for me was a simple CNN inspired by the right whale winner writeup, using a small learning rate and letting it train for 6000 epochs on small images (64x64). In the end it performed quite well, getting a 0.0073 validation loss (mse) and generating useful bounding boxes. It sounds like a lot of epochs but it only takes 2 hours to train on half of a Tesla K80. The network has no activation on the final dense layer and outputs all four coordinates at once.\n\nI found that implementing IOU was too difficult, and simply copying over dice coefficient loss code from other people did not work for me with the loss jumping around wildly in each epoch. I would still like to implement IOU but given the deadline I will focus on actually predicting the cervix types for now.\n\nFor cervix types I have attempted squeezenet on the unfiltered, uncropped images but that only got me too 0.98854 on the LB. A simple 2-layer CNN got me at 1.06. I wonder how far the cropped images will take me.\n\nThe reason I am posting this is because I discussed this same information on the KaggleNoobs Slack channel and I do not want to be 'privately' sharing information. Of course the slack channel is open to all but people who are not on there would miss out on this. Still I think it would nice if the rules could be a little more 'slack' because I enjoy discussing the competition on Slack and it would be better if we did not have to consider whether or not what we discuss should be shared on here too. OTOH it would force people in competitions to join the channel and read everything for FOMO..",
    "186855": "And if you didn't happen to know about the KaggleNoobs Slack channel, see https://www.kaggle.com/getting-started/20577",
    "187139": "That was quite a complete explanation @alutrin!\n\nThinking if there is anything else to add, cause also actively took part on the cited conversation on  Slack about the ROI detection... \nMaybe my  statement on ROI detection precision not being that important for this competition, the advice not to use big images for it, (bigger than 64x64 will be overkilling for ROI) and the advice to try detecting bounding boxes coordinates one by one if averaged error of rectangles shows no progress. Also to adapt LR using the learning curves and trying it to be more exponential than linear.\n\nAnd... that's it!!! No big secrets to climb LB here... anyway, 100% transparency is nice and in this case not difficult to achieve.\n\nAs @alutrin has already done, I also recommend Kagglenoobs channel on Slack, great place to exchange ML oppinions, knowdlege in general and also some fun stuff!",
    "187211": "Hi All, \nJust to note, I have also thought segmenting the cervix would be useful for this competition and found that an appropriately trained CNN can segment the cervix quite successfully. Unfortunately, however, it has not helped with the classification at all despite many attempts. I have somewhat given up on it and my only explanation was that the non-cervix parts of the images are leaking information about the cervix type probably because a single subject has many images in the dataset and the non-cervix part of the images thus help with the classification. Not useful for a general classification tool but unfortunately seems to work with the dataset we have.",
    "187597": "Hi alutrin, you are trying the bbox coordinates model from this link?\nhttps://www.kaggle.com/c/intel-mobileodt-cervical-cancer-screening/discussion/31565#latest-186218",
    "187771": "No I made my own annotations, because I thought knowing the position of the cervix would be more useful than knowing where lesions are."
  },
  "source": "meta"
}