{
  "id": 47918,
  "title": "Which loss function to use in this task?",
  "url": "/competitions/data-science-bowl-2018/discussion/47918",
  "author_name": "",
  "post_date": "2018-01-20T15:12:20.762450800Z",
  "votes": 1,
  "comment_count": 8,
  "views": 0,
  "content": "<p>I am new to image segmentation, so I am a little confused about loss function here. \nI tried binary cross entropy but what confused me a lot is that even when the validation loss keep increasing, the validation mean IOU keep increasing also. \nDoes anyone tried some other loss functions like soft dice? </p>",
  "messages": [
    {
      "id": "271483",
      "postDate": "01/20/2018 15:12:20",
      "content": "<p>I am new to image segmentation, so I am a little confused about loss function here. \nI tried binary cross entropy but what confused me a lot is that even when the validation loss keep increasing, the validation mean IOU keep increasing also. \nDoes anyone tried some other loss functions like soft dice? </p>",
      "rawMarkdown": "I am new to image segmentation, so I am a little confused about loss function here. \nI tried binary cross entropy but what confused me a lot is that even when the validation loss keep increasing, the validation mean IOU keep increasing also. \nDoes anyone tried some other loss functions like soft dice?",
      "votes": null
    },
    {
      "id": "272256",
      "postDate": "01/22/2018 16:28:45",
      "content": "<p>It’ll be difficult to find a solution with either (and without post-processing or supplementary models). Let me emphasize that this is more of an object detection problem than an image segmentation (i.e. pixel classification) problem. </p>",
      "rawMarkdown": "It’ll be difficult to find a solution with either (and without post-processing or supplementary models). Let me emphasize that this is more of an object detection problem than an image segmentation (i.e. pixel classification) problem.",
      "votes": null
    },
    {
      "id": "273949",
      "postDate": "01/25/2018 14:41:27",
      "content": "<p>Thank you for your reply. I was aware of this and tried to train a Mask RCNN. But with 600 images it is really hard to train a mrcnn with resnet50 or resnet101 backbone. Could you give any advise on how to train the backbone or change to smaller structures like vgg?</p>",
      "rawMarkdown": "Thank you for your reply. I was aware of this and tried to train a Mask RCNN. But with 600 images it is really hard to train a mrcnn with resnet50 or resnet101 backbone. Could you give any advise on how to train the backbone or change to smaller structures like vgg?",
      "votes": null
    },
    {
      "id": "273961",
      "postDate": "01/25/2018 15:29:17",
      "content": "<p>What problems are you running into? If memory is a concern, I’d recommend the following:</p>\n\n<ul>\n<li>Train the convolutional neural network (CNN) and region proposal network (RPN) without the region-based convolutional neural network (RCNN).</li>\n<li>Freeze the CNN and RPN layers.</li>\n<li>Train the RCNN.</li>\n</ul>\n\n<p>I use ResNet-50 for most tasks (e.g. this problem). But I’d also recommend trying ResNet-18 or ResNet-34. I wouldn’t use VGG-16 or VGG-19 since they are actually bigger.</p>",
      "rawMarkdown": "What problems are you running into? If memory is a concern, I’d recommend the following:\n\n* Train the convolutional neural network (CNN) and region proposal network (RPN) without the region-based convolutional neural network (RCNN).\n* Freeze the CNN and RPN layers.\n* Train the RCNN.\n\nI use ResNet-50 for most tasks (e.g. this problem). But I’d also recommend trying ResNet-18 or ResNet-34. I wouldn’t use VGG-16 or VGG-19 since they are actually bigger.",
      "votes": null
    },
    {
      "id": "273975",
      "postDate": "01/25/2018 16:01:02",
      "content": "<p>Do you use imagenet pretrained weights in this task?</p>",
      "rawMarkdown": "Do you use imagenet pretrained weights in this task?",
      "votes": null
    },
    {
      "id": "274001",
      "postDate": "01/25/2018 16:46:21",
      "content": "<p>I didn’t. However, I intentionally didn’t optimize my training loop (like using pre-trained weights or an adaptive loss or loss schedule) so I’d have some data about the training performance that’d be comparable to published results. I’ll probably optimize this in the future and I’ll certainly use pre-trained weights for the speed benefit.</p>",
      "rawMarkdown": "I didn’t. However, I intentionally didn’t optimize my training loop (like using pre-trained weights or an adaptive loss or loss schedule) so I’d have some data about the training performance that’d be comparable to published results. I’ll probably optimize this in the future and I’ll certainly use pre-trained weights for the speed benefit.",
      "votes": null
    },
    {
      "id": "274005",
      "postDate": "01/25/2018 16:50:24",
      "content": "<p>Thanks a lot!! I will give it a try.</p>",
      "rawMarkdown": "Thanks a lot!! I will give it a try.",
      "votes": null
    },
    {
      "id": "276852",
      "postDate": "02/01/2018 17:15:33",
      "content": "<p>allen - did u put the bounding box yourself or u used an automatic code to do that?</p>",
      "rawMarkdown": "allen - did u put the bounding box yourself or u used an automatic code to do that?",
      "votes": null
    },
    {
      "id": "276873",
      "postDate": "02/01/2018 18:03:51",
      "content": "<p>I used skimage.measure.regionprops to compute the minimum and maximum bounding box coordinates.</p>",
      "rawMarkdown": "I used skimage.measure.regionprops to compute the minimum and maximum bounding box coordinates.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 272256,
      "author_name": "agoodman",
      "author_url": "",
      "post_date": "01/22/2018 16:28:45",
      "content": "<p>It’ll be difficult to find a solution with either (and without post-processing or supplementary models). Let me emphasize that this is more of an object detection problem than an image segmentation (i.e. pixel classification) problem. </p>",
      "votes": null,
      "replies": [
        {
          "id": 273949,
          "author_name": "dingkun",
          "author_url": "",
          "post_date": "01/25/2018 14:41:27",
          "content": "<p>Thank you for your reply. I was aware of this and tried to train a Mask RCNN. But with 600 images it is really hard to train a mrcnn with resnet50 or resnet101 backbone. Could you give any advise on how to train the backbone or change to smaller structures like vgg?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 273961,
          "author_name": "agoodman",
          "author_url": "",
          "post_date": "01/25/2018 15:29:17",
          "content": "<p>What problems are you running into? If memory is a concern, I’d recommend the following:</p>\n\n<ul>\n<li>Train the convolutional neural network (CNN) and region proposal network (RPN) without the region-based convolutional neural network (RCNN).</li>\n<li>Freeze the CNN and RPN layers.</li>\n<li>Train the RCNN.</li>\n</ul>\n\n<p>I use ResNet-50 for most tasks (e.g. this problem). But I’d also recommend trying ResNet-18 or ResNet-34. I wouldn’t use VGG-16 or VGG-19 since they are actually bigger.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 273975,
          "author_name": "dingkun",
          "author_url": "",
          "post_date": "01/25/2018 16:01:02",
          "content": "<p>Do you use imagenet pretrained weights in this task?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 274001,
          "author_name": "agoodman",
          "author_url": "",
          "post_date": "01/25/2018 16:46:21",
          "content": "<p>I didn’t. However, I intentionally didn’t optimize my training loop (like using pre-trained weights or an adaptive loss or loss schedule) so I’d have some data about the training performance that’d be comparable to published results. I’ll probably optimize this in the future and I’ll certainly use pre-trained weights for the speed benefit.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 274005,
          "author_name": "dingkun",
          "author_url": "",
          "post_date": "01/25/2018 16:50:24",
          "content": "<p>Thanks a lot!! I will give it a try.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 276852,
          "author_name": "aviwolfson",
          "author_url": "",
          "post_date": "02/01/2018 17:15:33",
          "content": "<p>allen - did u put the bounding box yourself or u used an automatic code to do that?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 276873,
          "author_name": "agoodman",
          "author_url": "",
          "post_date": "02/01/2018 18:03:51",
          "content": "<p>I used skimage.measure.regionprops to compute the minimum and maximum bounding box coordinates.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "271483": "I am new to image segmentation, so I am a little confused about loss function here. \nI tried binary cross entropy but what confused me a lot is that even when the validation loss keep increasing, the validation mean IOU keep increasing also. \nDoes anyone tried some other loss functions like soft dice?",
    "272256": "It’ll be difficult to find a solution with either (and without post-processing or supplementary models). Let me emphasize that this is more of an object detection problem than an image segmentation (i.e. pixel classification) problem.",
    "273949": "Thank you for your reply. I was aware of this and tried to train a Mask RCNN. But with 600 images it is really hard to train a mrcnn with resnet50 or resnet101 backbone. Could you give any advise on how to train the backbone or change to smaller structures like vgg?",
    "273961": "What problems are you running into? If memory is a concern, I’d recommend the following:\n\n* Train the convolutional neural network (CNN) and region proposal network (RPN) without the region-based convolutional neural network (RCNN).\n* Freeze the CNN and RPN layers.\n* Train the RCNN.\n\nI use ResNet-50 for most tasks (e.g. this problem). But I’d also recommend trying ResNet-18 or ResNet-34. I wouldn’t use VGG-16 or VGG-19 since they are actually bigger.",
    "273975": "Do you use imagenet pretrained weights in this task?",
    "274001": "I didn’t. However, I intentionally didn’t optimize my training loop (like using pre-trained weights or an adaptive loss or loss schedule) so I’d have some data about the training performance that’d be comparable to published results. I’ll probably optimize this in the future and I’ll certainly use pre-trained weights for the speed benefit.",
    "274005": "Thanks a lot!! I will give it a try.",
    "276852": "allen - did u put the bounding box yourself or u used an automatic code to do that?",
    "276873": "I used skimage.measure.regionprops to compute the minimum and maximum bounding box coordinates."
  },
  "source": "meta"
}