{
  "id": 185211,
  "title": "EfficientDet, semantic segmentation",
  "url": "/competitions/lyft-motion-prediction-autonomous-vehicles/discussion/185211",
  "author_name": "",
  "post_date": "2020-09-19T22:37:35.668310300Z",
  "votes": 1,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I have been using EfficientNet for some of my Kernels, but it seems there is a modified version, EfficientDet, much better tailored for the competition task, i.e. semantic segmentation and object recognition.  <a href=\"https://www.kaggle.com/mathurinache/efficientdet\" target=\"_blank\">https://www.kaggle.com/mathurinache/efficientdet</a></p>\n<p>Still, anyone has used it before and would know how to apply it to the Lyft dataset?</p>\n<p>I tried but after installing packages and dependencies I cannot build the model </p>\n<p>def build_model(cfg) -&gt; torch.nn.Module:<br>\n    \"\"\"Creates an instance of the pretrained model with custom input and output\"\"\"</p>\n<pre><code>model_config = get_efficientdet_config('tf_efficientdet_d7')\nmodel = EfficientDet(model_config,pretrained_backbone=True)\n\nmodel_config.image_size = 224\n\nnum_history_channels = (cfg[\"model_params\"][\"history_num_frames\"] + 1) * 2\nnum_in_channels = 3 + num_history_channels\nnum_targets = 2*cfg[\"model_params\"][\"future_num_frames\"]\n\nmodel_config.num_classes = num_targets\n\nmodel.class_net = HeadNet(model_config, num_in_channels, num_outputs=model_config.num_classes,norm_kwargs=dict(eps=.001,momentum=0.01))\n\nreturn model\n</code></pre>\n<p>(error as I run training function:  <strong>init</strong>() got multiple values for argument 'num_outputs'<br>\n)</p>",
  "messages": [
    {
      "id": "1018731",
      "postDate": "09/19/2020 22:37:35",
      "content": "<p>I have been using EfficientNet for some of my Kernels, but it seems there is a modified version, EfficientDet, much better tailored for the competition task, i.e. semantic segmentation and object recognition.  <a href=\"https://www.kaggle.com/mathurinache/efficientdet\" target=\"_blank\">https://www.kaggle.com/mathurinache/efficientdet</a></p>\n<p>Still, anyone has used it before and would know how to apply it to the Lyft dataset?</p>\n<p>I tried but after installing packages and dependencies I cannot build the model </p>\n<p>def build_model(cfg) -&gt; torch.nn.Module:<br>\n    \"\"\"Creates an instance of the pretrained model with custom input and output\"\"\"</p>\n<pre><code>model_config = get_efficientdet_config('tf_efficientdet_d7')\nmodel = EfficientDet(model_config,pretrained_backbone=True)\n\nmodel_config.image_size = 224\n\nnum_history_channels = (cfg[\"model_params\"][\"history_num_frames\"] + 1) * 2\nnum_in_channels = 3 + num_history_channels\nnum_targets = 2*cfg[\"model_params\"][\"future_num_frames\"]\n\nmodel_config.num_classes = num_targets\n\nmodel.class_net = HeadNet(model_config, num_in_channels, num_outputs=model_config.num_classes,norm_kwargs=dict(eps=.001,momentum=0.01))\n\nreturn model\n</code></pre>\n<p>(error as I run training function:  <strong>init</strong>() got multiple values for argument 'num_outputs'<br>\n)</p>",
      "rawMarkdown": "I have been using EfficientNet for some of my Kernels, but it seems there is a modified version, EfficientDet, much better tailored for the competition task, i.e. semantic segmentation and object recognition.  https://www.kaggle.com/mathurinache/efficientdet\n\nStill, anyone has used it before and would know how to apply it to the Lyft dataset?\n\nI tried but after installing packages and dependencies I cannot build the model \n\ndef build_model(cfg) -> torch.nn.Module:\n    \"\"\"Creates an instance of the pretrained model with custom input and output\"\"\"\n    \n    model_config = get_efficientdet_config('tf_efficientdet_d7')\n    model = EfficientDet(model_config,pretrained_backbone=True)\n    \n    model_config.image_size = 224\n          \n    num_history_channels = (cfg[\"model_params\"][\"history_num_frames\"] + 1) * 2\n    num_in_channels = 3 + num_history_channels\n    num_targets = 2*cfg[\"model_params\"][\"future_num_frames\"]\n    \n    model_config.num_classes = num_targets\n    \n    model.class_net = HeadNet(model_config, num_in_channels, num_outputs=model_config.num_classes,norm_kwargs=dict(eps=.001,momentum=0.01))\n    \n    return model\n\n(error as I run training function:  __init__() got multiple values for argument 'num_outputs'\n)",
      "votes": null
    },
    {
      "id": "1020502",
      "postDate": "09/21/2020 07:53:25",
      "content": "<p>How do you plan to use that? It expects different input which we dont have. The model needs 3 variables: images, boxes, labels. EfficientDet uses EfficientNet as backbone. Please refer to the official paper: <a href=\"https://arxiv.org/pdf/1911.09070.pdf\" target=\"_blank\">https://arxiv.org/pdf/1911.09070.pdf</a></p>\n<p>Or do you mean something different?</p>",
      "rawMarkdown": "How do you plan to use that? It expects different input which we dont have. The model needs 3 variables: images, boxes, labels. EfficientDet uses EfficientNet as backbone. Please refer to the official paper: https://arxiv.org/pdf/1911.09070.pdf\n\nOr do you mean something different?",
      "votes": null
    },
    {
      "id": "1020770",
      "postDate": "09/21/2020 12:09:03",
      "content": "<p>I see, my mistake. Sorry. I thought it needed only images and targets</p>",
      "rawMarkdown": "I see, my mistake. Sorry. I thought it needed only images and targets",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1020502,
      "author_name": "aliabdin1",
      "author_url": "",
      "post_date": "09/21/2020 07:53:25",
      "content": "<p>How do you plan to use that? It expects different input which we dont have. The model needs 3 variables: images, boxes, labels. EfficientDet uses EfficientNet as backbone. Please refer to the official paper: <a href=\"https://arxiv.org/pdf/1911.09070.pdf\" target=\"_blank\">https://arxiv.org/pdf/1911.09070.pdf</a></p>\n<p>Or do you mean something different?</p>",
      "votes": null,
      "replies": [
        {
          "id": 1020770,
          "author_name": "mclikmb4",
          "author_url": "",
          "post_date": "09/21/2020 12:09:03",
          "content": "<p>I see, my mistake. Sorry. I thought it needed only images and targets</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1018731": "I have been using EfficientNet for some of my Kernels, but it seems there is a modified version, EfficientDet, much better tailored for the competition task, i.e. semantic segmentation and object recognition.  https://www.kaggle.com/mathurinache/efficientdet\n\nStill, anyone has used it before and would know how to apply it to the Lyft dataset?\n\nI tried but after installing packages and dependencies I cannot build the model \n\ndef build_model(cfg) -> torch.nn.Module:\n    \"\"\"Creates an instance of the pretrained model with custom input and output\"\"\"\n    \n    model_config = get_efficientdet_config('tf_efficientdet_d7')\n    model = EfficientDet(model_config,pretrained_backbone=True)\n    \n    model_config.image_size = 224\n          \n    num_history_channels = (cfg[\"model_params\"][\"history_num_frames\"] + 1) * 2\n    num_in_channels = 3 + num_history_channels\n    num_targets = 2*cfg[\"model_params\"][\"future_num_frames\"]\n    \n    model_config.num_classes = num_targets\n    \n    model.class_net = HeadNet(model_config, num_in_channels, num_outputs=model_config.num_classes,norm_kwargs=dict(eps=.001,momentum=0.01))\n    \n    return model\n\n(error as I run training function:  __init__() got multiple values for argument 'num_outputs'\n)",
    "1020502": "How do you plan to use that? It expects different input which we dont have. The model needs 3 variables: images, boxes, labels. EfficientDet uses EfficientNet as backbone. Please refer to the official paper: https://arxiv.org/pdf/1911.09070.pdf\n\nOr do you mean something different?",
    "1020770": "I see, my mistake. Sorry. I thought it needed only images and targets"
  },
  "source": "meta"
}