{
  "id": 50428,
  "title": "SSD with a mask head (pytorch)",
  "url": "/competitions/data-science-bowl-2018/discussion/50428",
  "author_name": "",
  "post_date": "2018-02-24T04:47:21.465467700Z",
  "votes": 10,
  "comment_count": 15,
  "views": 0,
  "content": "<p>i modified the mask-rcnn (from <a href=\"https://www.kaggle.com/c/data-science-bowl-2018/discussion/49692\">https://www.kaggle.com/c/data-science-bowl-2018/discussion/49692</a>) to mask-ssd.</p>\n\n<p>the observation is that the rpn of mask-rcnn is already quite accurate so i think we can use rpn proposal to crop patches directly. To improve results i used:</p>\n\n<ul>\n<li><p>focal loss : \"Focal Loss for Dense Object Detection\" from <a href=\"https://arxiv.org/abs/1708.02002\">https://arxiv.org/abs/1708.02002</a></p></li>\n<li><p>iou box loss: \"UnitBox: An Advanced Object Detection Network\", <a href=\"https://arxiv.org/abs/1608.01471\">https://arxiv.org/abs/1608.01471</a></p></li>\n</ul>\n\n<p>Here is an initial version that use resnet50-fpn as backbone for mask-ssd:</p>\n\n<p>code download: <a href=\"https://drive.google.com/open?id=1EtBdlPK3BVahHBZtB103QQxNUdWaJ6di\">https://drive.google.com/open?id=1EtBdlPK3BVahHBZtB103QQxNUdWaJ6di</a>\n(see folder 20180225)</p>\n\n<hr>\n\n<p>latest version:  dummy-15.3\n- implement focal loss</p>",
  "messages": [
    {
      "id": "287254",
      "postDate": "02/24/2018 04:47:21",
      "content": "<p>i modified the mask-rcnn (from <a href=\"https://www.kaggle.com/c/data-science-bowl-2018/discussion/49692\">https://www.kaggle.com/c/data-science-bowl-2018/discussion/49692</a>) to mask-ssd.</p>\n\n<p>the observation is that the rpn of mask-rcnn is already quite accurate so i think we can use rpn proposal to crop patches directly. To improve results i used:</p>\n\n<ul>\n<li><p>focal loss : \"Focal Loss for Dense Object Detection\" from <a href=\"https://arxiv.org/abs/1708.02002\">https://arxiv.org/abs/1708.02002</a></p></li>\n<li><p>iou box loss: \"UnitBox: An Advanced Object Detection Network\", <a href=\"https://arxiv.org/abs/1608.01471\">https://arxiv.org/abs/1608.01471</a></p></li>\n</ul>\n\n<p>Here is an initial version that use resnet50-fpn as backbone for mask-ssd:</p>\n\n<p>code download: <a href=\"https://drive.google.com/open?id=1EtBdlPK3BVahHBZtB103QQxNUdWaJ6di\">https://drive.google.com/open?id=1EtBdlPK3BVahHBZtB103QQxNUdWaJ6di</a>\n(see folder 20180225)</p>\n\n<hr>\n\n<p>latest version:  dummy-15.3\n- implement focal loss</p>",
      "rawMarkdown": "i modified the mask-rcnn (from https://www.kaggle.com/c/data-science-bowl-2018/discussion/49692) to mask-ssd.\n\nthe observation is that the rpn of mask-rcnn is already quite accurate so i think we can use rpn proposal to crop patches directly. To improve results i used:\n\n- focal loss : \"Focal Loss for Dense Object Detection\" from https://arxiv.org/abs/1708.02002\n\n- iou box loss: \"UnitBox: An Advanced Object Detection Network\", https://arxiv.org/abs/1608.01471\n\nHere is an initial version that use resnet50-fpn as backbone for mask-ssd:\n\ncode download: https://drive.google.com/open?id=1EtBdlPK3BVahHBZtB103QQxNUdWaJ6di\n(see folder 20180225)\n\n ---\nlatest version:  dummy-15.3\n- implement focal loss",
      "votes": null
    },
    {
      "id": "287260",
      "postDate": "02/24/2018 05:08:04",
      "content": "<p>Awesome work! \nThanks!</p>",
      "rawMarkdown": "Awesome work! \nThanks!",
      "votes": null
    },
    {
      "id": "287262",
      "postDate": "02/24/2018 05:12:15",
      "content": "<p>Interesting! What is LB score did you achive use ssd?</p>",
      "rawMarkdown": "Interesting! What is LB score did you achive use ssd?",
      "votes": null
    },
    {
      "id": "287678",
      "postDate": "02/25/2018 16:49:49",
      "content": "<p>as attached:</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/287678/8638/Slide4.png\" alt=\"enter image description here\"></p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/287678/8636/Slide6.png\" alt=\"enter image description here\"></p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/287678/8635/Slide7.png\" alt=\"enter image description here\"></p>",
      "rawMarkdown": "as attached:\n\n  ![enter image description here][1]\n\n  ![enter image description here][2]\n\n  ![enter image description here][3]\n\n\n  [1]: https://kaggle2.blob.core.windows.net/forum-message-attachments/287678/8638/Slide4.png\n  [2]: https://kaggle2.blob.core.windows.net/forum-message-attachments/287678/8636/Slide6.png\n  [3]: https://kaggle2.blob.core.windows.net/forum-message-attachments/287678/8635/Slide7.png",
      "votes": null
    },
    {
      "id": "287757",
      "postDate": "02/25/2018 21:48:50",
      "content": "<p>Amaing! Do you think ssd will be better than faster rcnn</p>",
      "rawMarkdown": "Amaing! Do you think ssd will be better than faster rcnn",
      "votes": null
    },
    {
      "id": "287895",
      "postDate": "02/26/2018 06:45:58",
      "content": "<p>the results for fitting 10 images are out! This is done using fpn_mask_ssd/train0a.py of  dummy-15.4</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/287895/8641/results.png\" alt=\"enter image description here\"></p>",
      "rawMarkdown": "the results for fitting 10 images are out! This is done using fpn_mask_ssd/train0a.py of  dummy-15.4\n\n  ![enter image description here][1]\n\n\n  [1]: https://kaggle2.blob.core.windows.net/forum-message-attachments/287895/8641/results.png",
      "votes": null
    },
    {
      "id": "287935",
      "postDate": "02/26/2018 09:03:57",
      "content": "<p>the pretrain file you used is pretrain by yourself? </p>",
      "rawMarkdown": "the pretrain file you used is pretrain by yourself?",
      "votes": null
    },
    {
      "id": "287939",
      "postDate": "02/26/2018 09:18:25",
      "content": "<p>i train from scratch</p>",
      "rawMarkdown": "i train from scratch",
      "votes": null
    },
    {
      "id": "287951",
      "postDate": "02/26/2018 10:17:24",
      "content": "<p>what is the size of batch did you set when you train the nuclei dataset?</p>",
      "rawMarkdown": "what is the size of batch did you set when you train the nuclei dataset?",
      "votes": null
    },
    {
      "id": "287978",
      "postDate": "02/26/2018 11:30:45",
      "content": "<p>ssd may or may not be faster (or more accurate) than mask rcnn for this task.</p>\n\n<p>experiments are needed</p>",
      "rawMarkdown": "ssd may or may not be faster (or more accurate) than mask rcnn for this task.\n\nexperiments are needed",
      "votes": null
    },
    {
      "id": "288063",
      "postDate": "02/26/2018 16:09:35",
      "content": "<p>Very interesting ! This could also potentially improve generalizability with fewer overall trained parameters. I'll definitely follow your work.</p>\n\n<p>Do you think it makes sense because we are only dealing with 2 classes (nuclei vs background) ? This could be the reason why the RPN already has very good detection accuracy.</p>",
      "rawMarkdown": "Very interesting ! This could also potentially improve generalizability with fewer overall trained parameters. I'll definitely follow your work.\n\nDo you think it makes sense because we are only dealing with 2 classes (nuclei vs background) ? This could be the reason why the RPN already has very good detection accuracy.",
      "votes": null
    },
    {
      "id": "288295",
      "postDate": "02/27/2018 06:25:19",
      "content": "<p>hello,I run the test mode of your code ,but it always out of memory for some high pixel pictures? My gpu is 8G,what's of your gpu capacity？thank you very much for helping me!</p>",
      "rawMarkdown": "hello,I run the test mode of your code ,but it always out of memory for some high pixel pictures? My gpu is 8G,what's of your gpu capacity？thank you very much for helping me!",
      "votes": null
    },
    {
      "id": "288297",
      "postDate": "02/27/2018 06:28:57",
      "content": "<p>This is becuase the cropping layer upsize the feature map to image size. Currently you can divide your test image to different parts.</p>\n\n<p>I have any version that do cropping on the small feature map without upsizing.</p>\n\n<p>My gpu is 11 gb, 1080 ti</p>",
      "rawMarkdown": "This is becuase the cropping layer upsize the feature map to image size. Currently you can divide your test image to different parts.\n\n\nI have any version that do cropping on the small feature map without upsizing.\n\n\nMy gpu is 11 gb, 1080 ti",
      "votes": null
    },
    {
      "id": "288298",
      "postDate": "02/27/2018 06:30:00",
      "content": "<p>You need large batch size for ssd. I used 16 on 4x 1080ti</p>",
      "rawMarkdown": "You need large batch size for ssd. I used 16 on 4x 1080ti",
      "votes": null
    },
    {
      "id": "301897",
      "postDate": "03/23/2018 12:39:55",
      "content": "<p>hello,I want to run your code ,but it can't build the torch*.so librayies following your instruction. could you show me something details about the command \"&gt;&gt;&gt;python build\"\nThe error like this\n\"cffi.error.CDefError: cannot parse \"#ifndef <strong>cuda_cuda_h</strong>\"\"\n\"can't find the cuda.h\"</p>",
      "rawMarkdown": "hello,I want to run your code ,but it can't build the torch*.so librayies following your instruction. could you show me something details about the command \"&gt;&gt;&gt;python build\"\nThe error like this\n\"cffi.error.CDefError: cannot parse \"#ifndef __cuda_cuda_h__\"\"\n\"can't find the cuda.h\"",
      "votes": null
    },
    {
      "id": "1022661",
      "postDate": "09/22/2020 16:59:01",
      "content": "<p>Can we use it with only CPU ?</p>",
      "rawMarkdown": "Can we use it with only CPU ?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1022661,
      "author_name": "devich",
      "author_url": "",
      "post_date": "09/22/2020 16:59:01",
      "content": "<p>Can we use it with only CPU ?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 287260,
      "author_name": "yyll008",
      "author_url": "",
      "post_date": "02/24/2018 05:08:04",
      "content": "<p>Awesome work! \nThanks!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 287262,
      "author_name": "john1231983",
      "author_url": "",
      "post_date": "02/24/2018 05:12:15",
      "content": "<p>Interesting! What is LB score did you achive use ssd?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 287678,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "02/25/2018 16:49:49",
      "content": "<p>as attached:</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/287678/8638/Slide4.png\" alt=\"enter image description here\"></p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/287678/8636/Slide6.png\" alt=\"enter image description here\"></p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/287678/8635/Slide7.png\" alt=\"enter image description here\"></p>",
      "votes": null,
      "replies": [
        {
          "id": 287757,
          "author_name": "john1231983",
          "author_url": "",
          "post_date": "02/25/2018 21:48:50",
          "content": "<p>Amaing! Do you think ssd will be better than faster rcnn</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 287978,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "02/26/2018 11:30:45",
          "content": "<p>ssd may or may not be faster (or more accurate) than mask rcnn for this task.</p>\n\n<p>experiments are needed</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 288063,
          "author_name": "alexandrecc",
          "author_url": "",
          "post_date": "02/26/2018 16:09:35",
          "content": "<p>Very interesting ! This could also potentially improve generalizability with fewer overall trained parameters. I'll definitely follow your work.</p>\n\n<p>Do you think it makes sense because we are only dealing with 2 classes (nuclei vs background) ? This could be the reason why the RPN already has very good detection accuracy.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 287895,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "02/26/2018 06:45:58",
      "content": "<p>the results for fitting 10 images are out! This is done using fpn_mask_ssd/train0a.py of  dummy-15.4</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/287895/8641/results.png\" alt=\"enter image description here\"></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 287935,
      "author_name": "chenyr14",
      "author_url": "",
      "post_date": "02/26/2018 09:03:57",
      "content": "<p>the pretrain file you used is pretrain by yourself? </p>",
      "votes": null,
      "replies": [
        {
          "id": 287939,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "02/26/2018 09:18:25",
          "content": "<p>i train from scratch</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 287951,
      "author_name": "chenyr14",
      "author_url": "",
      "post_date": "02/26/2018 10:17:24",
      "content": "<p>what is the size of batch did you set when you train the nuclei dataset?</p>",
      "votes": null,
      "replies": [
        {
          "id": 288298,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "02/27/2018 06:30:00",
          "content": "<p>You need large batch size for ssd. I used 16 on 4x 1080ti</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 288295,
      "author_name": "chenyr14",
      "author_url": "",
      "post_date": "02/27/2018 06:25:19",
      "content": "<p>hello,I run the test mode of your code ,but it always out of memory for some high pixel pictures? My gpu is 8G,what's of your gpu capacity？thank you very much for helping me!</p>",
      "votes": null,
      "replies": [
        {
          "id": 288297,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "02/27/2018 06:28:57",
          "content": "<p>This is becuase the cropping layer upsize the feature map to image size. Currently you can divide your test image to different parts.</p>\n\n<p>I have any version that do cropping on the small feature map without upsizing.</p>\n\n<p>My gpu is 11 gb, 1080 ti</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 301897,
      "author_name": "binfengjia",
      "author_url": "",
      "post_date": "03/23/2018 12:39:55",
      "content": "<p>hello,I want to run your code ,but it can't build the torch*.so librayies following your instruction. could you show me something details about the command \"&gt;&gt;&gt;python build\"\nThe error like this\n\"cffi.error.CDefError: cannot parse \"#ifndef <strong>cuda_cuda_h</strong>\"\"\n\"can't find the cuda.h\"</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "287254": "i modified the mask-rcnn (from https://www.kaggle.com/c/data-science-bowl-2018/discussion/49692) to mask-ssd.\n\nthe observation is that the rpn of mask-rcnn is already quite accurate so i think we can use rpn proposal to crop patches directly. To improve results i used:\n\n- focal loss : \"Focal Loss for Dense Object Detection\" from https://arxiv.org/abs/1708.02002\n\n- iou box loss: \"UnitBox: An Advanced Object Detection Network\", https://arxiv.org/abs/1608.01471\n\nHere is an initial version that use resnet50-fpn as backbone for mask-ssd:\n\ncode download: https://drive.google.com/open?id=1EtBdlPK3BVahHBZtB103QQxNUdWaJ6di\n(see folder 20180225)\n\n ---\nlatest version:  dummy-15.3\n- implement focal loss",
    "287260": "Awesome work! \nThanks!",
    "287262": "Interesting! What is LB score did you achive use ssd?",
    "287678": "as attached:\n\n  ![enter image description here][1]\n\n  ![enter image description here][2]\n\n  ![enter image description here][3]\n\n\n  [1]: https://kaggle2.blob.core.windows.net/forum-message-attachments/287678/8638/Slide4.png\n  [2]: https://kaggle2.blob.core.windows.net/forum-message-attachments/287678/8636/Slide6.png\n  [3]: https://kaggle2.blob.core.windows.net/forum-message-attachments/287678/8635/Slide7.png",
    "287757": "Amaing! Do you think ssd will be better than faster rcnn",
    "287895": "the results for fitting 10 images are out! This is done using fpn_mask_ssd/train0a.py of  dummy-15.4\n\n  ![enter image description here][1]\n\n\n  [1]: https://kaggle2.blob.core.windows.net/forum-message-attachments/287895/8641/results.png",
    "287935": "the pretrain file you used is pretrain by yourself?",
    "287939": "i train from scratch",
    "287951": "what is the size of batch did you set when you train the nuclei dataset?",
    "287978": "ssd may or may not be faster (or more accurate) than mask rcnn for this task.\n\nexperiments are needed",
    "288063": "Very interesting ! This could also potentially improve generalizability with fewer overall trained parameters. I'll definitely follow your work.\n\nDo you think it makes sense because we are only dealing with 2 classes (nuclei vs background) ? This could be the reason why the RPN already has very good detection accuracy.",
    "288295": "hello,I run the test mode of your code ,but it always out of memory for some high pixel pictures? My gpu is 8G,what's of your gpu capacity？thank you very much for helping me!",
    "288297": "This is becuase the cropping layer upsize the feature map to image size. Currently you can divide your test image to different parts.\n\n\nI have any version that do cropping on the small feature map without upsizing.\n\n\nMy gpu is 11 gb, 1080 ti",
    "288298": "You need large batch size for ssd. I used 16 on 4x 1080ti",
    "301897": "hello,I want to run your code ,but it can't build the torch*.so librayies following your instruction. could you show me something details about the command \"&gt;&gt;&gt;python build\"\nThe error like this\n\"cffi.error.CDefError: cannot parse \"#ifndef __cuda_cuda_h__\"\"\n\"can't find the cuda.h\"",
    "1022661": "Can we use it with only CPU ?"
  },
  "source": "meta"
}