{
  "id": 170771,
  "title": "Why Pseudo Labeling is not working well with EffDet?",
  "url": "/competitions/global-wheat-detection/discussion/170771",
  "author_name": "",
  "post_date": "2020-07-29T02:48:36.516148500Z",
  "votes": 12,
  "comment_count": 22,
  "views": 0,
  "content": "<p>Does anyone have any idea why pseudo labeling on effdet is not working very well as with yolov5? my base effdet-d5 with TTA can reach ~0.74, but pseudo labeling can only leverage it by 0.01, which comparing the rise on yolov5 is small. And is there anything I can test out to make it better? Appreciate any suggestion or idea!</p>",
  "messages": [
    {
      "id": "949859",
      "postDate": "07/29/2020 02:48:36",
      "content": "<p>Does anyone have any idea why pseudo labeling on effdet is not working very well as with yolov5? my base effdet-d5 with TTA can reach ~0.74, but pseudo labeling can only leverage it by 0.01, which comparing the rise on yolov5 is small. And is there anything I can test out to make it better? Appreciate any suggestion or idea!</p>",
      "rawMarkdown": "Does anyone have any idea why pseudo labeling on effdet is not working very well as with yolov5? my base effdet-d5 with TTA can reach ~0.74, but pseudo labeling can only leverage it by 0.01, which comparing the rise on yolov5 is small. And is there anything I can test out to make it better? Appreciate any suggestion or idea!",
      "votes": null
    },
    {
      "id": "949875",
      "postDate": "07/29/2020 03:09:35",
      "content": "<p>I have the same question.</p>",
      "rawMarkdown": "I have the same question.",
      "votes": null
    },
    {
      "id": "950333",
      "postDate": "07/29/2020 10:44:04",
      "content": "<p>A tin foil hat explanation is that this particular dataset was pre-labeled with Yolov5 and then fine tuned by humans, yadda yadda leaking something something.</p>",
      "rawMarkdown": "A tin foil hat explanation is that this particular dataset was pre-labeled with Yolov5 and then fine tuned by humans, yadda yadda leaking something something.",
      "votes": null
    },
    {
      "id": "951337",
      "postDate": "07/30/2020 04:37:46",
      "content": "<p>In may case PL down my score</p>",
      "rawMarkdown": "In may case PL down my score",
      "votes": null
    },
    {
      "id": "951658",
      "postDate": "07/30/2020 09:50:31",
      "content": "<p>I dont agree it worked well for me. My base model 0.7407 boosted to 0.7558</p>",
      "rawMarkdown": "I dont agree it worked well for me. My base model 0.7407 boosted to 0.7558",
      "votes": null
    },
    {
      "id": "951824",
      "postDate": "07/30/2020 12:40:20",
      "content": "<p>Nice job! Would you mind to share how did you set up the PL, like how many epoch and the lr?</p>",
      "rawMarkdown": "Nice job! Would you mind to share how did you set up the PL, like how many epoch and the lr?",
      "votes": null
    },
    {
      "id": "951974",
      "postDate": "07/30/2020 14:28:42",
      "content": "<p>i use this kernel \n<a href=\"https://www.kaggle.com/gofarther/efficientdet-framework-tta-pl-etc\">https://www.kaggle.com/gofarther/efficientdet-framework-tta-pl-etc</a>\nI only change it to apex and my image size is 1024</p>",
      "rawMarkdown": "i use this kernel \nhttps://www.kaggle.com/gofarther/efficientdet-framework-tta-pl-etc\nI only change it to apex and my image size is 1024",
      "votes": null
    },
    {
      "id": "952306",
      "postDate": "07/30/2020 19:54:49",
      "content": "<p>Hi, did you change the image size in inference?</p>",
      "rawMarkdown": "Hi, did you change the image size in inference?",
      "votes": null
    },
    {
      "id": "952553",
      "postDate": "07/31/2020 03:36:43",
      "content": "<p>Hi , can you solve this?</p>\n\n<p>loss, _, _ = self.model(images, boxes, labels)\nTypeError: forward() takes 3 positional arguments but 4 were given</p>",
      "rawMarkdown": "Hi , can you solve this?\n\nloss, _, _ = self.model(images, boxes, labels)\nTypeError: forward() takes 3 positional arguments but 4 were given",
      "votes": null
    },
    {
      "id": "952575",
      "postDate": "07/31/2020 04:00:36",
      "content": "<p>Yes I change the image size  in inference to 1024</p>",
      "rawMarkdown": "Yes I change the image size  in inference to 1024",
      "votes": null
    },
    {
      "id": "952587",
      "postDate": "07/31/2020 04:15:43",
      "content": "<p>Here is my train_one_epoch function where I add the gradient accumulation:</p>\n\n<p>`</p>\n\n<pre><code>        images = torch.stack(images)\n        images = images.to(self.device).float()\n        batch_size = images.shape[0]\n        boxes = [target['boxes'].to(self.device).float() for target in targets]\n        labels = [target['labels'].to(self.device).float() for target in targets]\n\n        loss, _, _ = self.model(images, boxes, labels)\n        if self.mixed_precision:\n            with amp.scale_loss(loss, self.optimizer) as scaled_loss:\n                scaled_loss.backward()\n        else:\n            loss.backward()\n\n        if step % self.accumulate == 0:\n            self.optimizer.step()\n            self.optimizer.zero_grad()\n\n        summary_loss.update(loss.detach().item(), batch_size)\n\n    return summary_loss`\n</code></pre>",
      "rawMarkdown": "Here is my train_one_epoch function where I add the gradient accumulation:\n\n`\n           \n            images = torch.stack(images)\n            images = images.to(self.device).float()\n            batch_size = images.shape[0]\n            boxes = [target['boxes'].to(self.device).float() for target in targets]\n            labels = [target['labels'].to(self.device).float() for target in targets]\n\n            loss, _, _ = self.model(images, boxes, labels)\n            if self.mixed_precision:\n                with amp.scale_loss(loss, self.optimizer) as scaled_loss:\n                    scaled_loss.backward()\n            else:\n                loss.backward()\n\n            if step % self.accumulate == 0:\n                self.optimizer.step()\n                self.optimizer.zero_grad()\n\n            summary_loss.update(loss.detach().item(), batch_size)\n\n        return summary_loss`",
      "votes": null
    },
    {
      "id": "952592",
      "postDate": "07/31/2020 04:24:49",
      "content": "<p>Thanks</p>",
      "rawMarkdown": "Thanks",
      "votes": null
    },
    {
      "id": "952598",
      "postDate": "07/31/2020 04:33:37",
      "content": "<p>What is the corresponding validation loss that gives a LB score 0.74</p>",
      "rawMarkdown": "What is the corresponding validation loss that gives a LB score 0.74",
      "votes": null
    },
    {
      "id": "952668",
      "postDate": "07/31/2020 06:04:54",
      "content": "<p><a href=\"/zekunn\">@zekunn</a> this <a href=\"https://www.kaggle.com/shonenkov/training-efficientdet/comments#889181\">comment </a>will help you </p>",
      "rawMarkdown": "zekunn this [comment ](https://www.kaggle.com/shonenkov/training-efficientdet/comments#889181)will help you",
      "votes": null
    },
    {
      "id": "952682",
      "postDate": "07/31/2020 06:29:41",
      "content": "<p>Thank you!</p>",
      "rawMarkdown": "Thank you!",
      "votes": null
    },
    {
      "id": "952751",
      "postDate": "07/31/2020 07:29:42",
      "content": "<p>I can confirm a boost of about 0.01 LB (0.74x to 0.75x) using the same TTA and PL configuration as this notebook for EfficientDet, using image size 512, not 1024.</p>",
      "rawMarkdown": "I can confirm a boost of about 0.01 LB (0.74x to 0.75x) using the same TTA and PL configuration as this notebook for EfficientDet, using image size 512, not 1024.",
      "votes": null
    },
    {
      "id": "952782",
      "postDate": "07/31/2020 08:12:45",
      "content": "<p>How much time did it take you to run 7 epochs? Once we submit. we do not need to keep GPU on in the original notebook, right? I submitted this notebook as is and it's been running for 3 hours. Cannot figure out what I am doing wrong.</p>",
      "rawMarkdown": "How much time did it take you to run 7 epochs? Once we submit. we do not need to keep GPU on in the original notebook, right? I submitted this notebook as is and it's been running for 3 hours. Cannot figure out what I am doing wrong.",
      "votes": null
    },
    {
      "id": "952806",
      "postDate": "07/31/2020 08:30:01",
      "content": "<p>More than 3 hours</p>",
      "rawMarkdown": "More than 3 hours",
      "votes": null
    },
    {
      "id": "953053",
      "postDate": "07/31/2020 13:34:11",
      "content": "<p><a href=\"/ahmmadrashid\">@ahmmadrashid</a> Great job!\nYou mean you use 1024 size in both training and inferencing?</p>",
      "rawMarkdown": "ahmmadrashid Great job!\nYou mean you use 1024 size in both training and inferencing?",
      "votes": null
    },
    {
      "id": "953837",
      "postDate": "08/01/2020 07:00:15",
      "content": "<p>Notebook Exceeded Allowed Compute\nI always meet this....😧 </p>",
      "rawMarkdown": "Notebook Exceeded Allowed Compute\nI always meet this....😧",
      "votes": null
    },
    {
      "id": "954470",
      "postDate": "08/01/2020 18:51:22",
      "content": "<p><a href=\"/ahmmadrashid\">@ahmmadrashid</a>  What is best loss did you get ,I can reach up to 328 but not sure why I don't get corresponding score </p>",
      "rawMarkdown": "ahmmadrashid  What is best loss did you get ,I can reach up to 328 but not sure why I don't get corresponding score",
      "votes": null
    },
    {
      "id": "954812",
      "postDate": "08/02/2020 05:50:00",
      "content": "<p><a href=\"/ahmmadrashid\">@ahmmadrashid</a> hi there, is your current score based on efficientdet as well?</p>",
      "rawMarkdown": "ahmmadrashid hi there, is your current score based on efficientdet as well?",
      "votes": null
    },
    {
      "id": "955662",
      "postDate": "08/02/2020 19:50:25",
      "content": "<p>Yes I used 1024 both training and inference</p>",
      "rawMarkdown": "Yes I used 1024 both training and inference",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 949875,
      "author_name": "zekunn",
      "author_url": "",
      "post_date": "07/29/2020 03:09:35",
      "content": "<p>I have the same question.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 950333,
      "author_name": "suicaokhoailang",
      "author_url": "",
      "post_date": "07/29/2020 10:44:04",
      "content": "<p>A tin foil hat explanation is that this particular dataset was pre-labeled with Yolov5 and then fine tuned by humans, yadda yadda leaking something something.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 951337,
      "author_name": "doanquanvietnamca",
      "author_url": "",
      "post_date": "07/30/2020 04:37:46",
      "content": "<p>In may case PL down my score</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 951658,
      "author_name": "ahmmadrashid",
      "author_url": "",
      "post_date": "07/30/2020 09:50:31",
      "content": "<p>I dont agree it worked well for me. My base model 0.7407 boosted to 0.7558</p>",
      "votes": null,
      "replies": [
        {
          "id": 951824,
          "author_name": "creatrol",
          "author_url": "",
          "post_date": "07/30/2020 12:40:20",
          "content": "<p>Nice job! Would you mind to share how did you set up the PL, like how many epoch and the lr?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 951974,
          "author_name": "ahmmadrashid",
          "author_url": "",
          "post_date": "07/30/2020 14:28:42",
          "content": "<p>i use this kernel \n<a href=\"https://www.kaggle.com/gofarther/efficientdet-framework-tta-pl-etc\">https://www.kaggle.com/gofarther/efficientdet-framework-tta-pl-etc</a>\nI only change it to apex and my image size is 1024</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 952306,
          "author_name": "chrisstan",
          "author_url": "",
          "post_date": "07/30/2020 19:54:49",
          "content": "<p>Hi, did you change the image size in inference?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 952553,
          "author_name": "zekunn",
          "author_url": "",
          "post_date": "07/31/2020 03:36:43",
          "content": "<p>Hi , can you solve this?</p>\n\n<p>loss, _, _ = self.model(images, boxes, labels)\nTypeError: forward() takes 3 positional arguments but 4 were given</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 952575,
          "author_name": "ahmmadrashid",
          "author_url": "",
          "post_date": "07/31/2020 04:00:36",
          "content": "<p>Yes I change the image size  in inference to 1024</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 952587,
          "author_name": "ahmmadrashid",
          "author_url": "",
          "post_date": "07/31/2020 04:15:43",
          "content": "<p>Here is my train_one_epoch function where I add the gradient accumulation:</p>\n\n<p>`</p>\n\n<pre><code>        images = torch.stack(images)\n        images = images.to(self.device).float()\n        batch_size = images.shape[0]\n        boxes = [target['boxes'].to(self.device).float() for target in targets]\n        labels = [target['labels'].to(self.device).float() for target in targets]\n\n        loss, _, _ = self.model(images, boxes, labels)\n        if self.mixed_precision:\n            with amp.scale_loss(loss, self.optimizer) as scaled_loss:\n                scaled_loss.backward()\n        else:\n            loss.backward()\n\n        if step % self.accumulate == 0:\n            self.optimizer.step()\n            self.optimizer.zero_grad()\n\n        summary_loss.update(loss.detach().item(), batch_size)\n\n    return summary_loss`\n</code></pre>",
          "votes": null,
          "replies": []
        },
        {
          "id": 952592,
          "author_name": "zekunn",
          "author_url": "",
          "post_date": "07/31/2020 04:24:49",
          "content": "<p>Thanks</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 952598,
          "author_name": "sebastianji",
          "author_url": "",
          "post_date": "07/31/2020 04:33:37",
          "content": "<p>What is the corresponding validation loss that gives a LB score 0.74</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 952668,
          "author_name": "arcticyen",
          "author_url": "",
          "post_date": "07/31/2020 06:04:54",
          "content": "<p><a href=\"/zekunn\">@zekunn</a> this <a href=\"https://www.kaggle.com/shonenkov/training-efficientdet/comments#889181\">comment </a>will help you </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 952682,
          "author_name": "zekunn",
          "author_url": "",
          "post_date": "07/31/2020 06:29:41",
          "content": "<p>Thank you!</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 952751,
          "author_name": "khoongweihao",
          "author_url": "",
          "post_date": "07/31/2020 07:29:42",
          "content": "<p>I can confirm a boost of about 0.01 LB (0.74x to 0.75x) using the same TTA and PL configuration as this notebook for EfficientDet, using image size 512, not 1024.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 953053,
          "author_name": "chrisstan",
          "author_url": "",
          "post_date": "07/31/2020 13:34:11",
          "content": "<p><a href=\"/ahmmadrashid\">@ahmmadrashid</a> Great job!\nYou mean you use 1024 size in both training and inferencing?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 954470,
          "author_name": "jaideepvalani",
          "author_url": "",
          "post_date": "08/01/2020 18:51:22",
          "content": "<p><a href=\"/ahmmadrashid\">@ahmmadrashid</a>  What is best loss did you get ,I can reach up to 328 but not sure why I don't get corresponding score </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 954812,
          "author_name": "reighns",
          "author_url": "",
          "post_date": "08/02/2020 05:50:00",
          "content": "<p><a href=\"/ahmmadrashid\">@ahmmadrashid</a> hi there, is your current score based on efficientdet as well?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 955662,
          "author_name": "ahmmadrashid",
          "author_url": "",
          "post_date": "08/02/2020 19:50:25",
          "content": "<p>Yes I used 1024 both training and inference</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 952782,
      "author_name": "sebastianji",
      "author_url": "",
      "post_date": "07/31/2020 08:12:45",
      "content": "<p>How much time did it take you to run 7 epochs? Once we submit. we do not need to keep GPU on in the original notebook, right? I submitted this notebook as is and it's been running for 3 hours. Cannot figure out what I am doing wrong.</p>",
      "votes": null,
      "replies": [
        {
          "id": 952806,
          "author_name": "guizengyou",
          "author_url": "",
          "post_date": "07/31/2020 08:30:01",
          "content": "<p>More than 3 hours</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 953837,
          "author_name": "zekunn",
          "author_url": "",
          "post_date": "08/01/2020 07:00:15",
          "content": "<p>Notebook Exceeded Allowed Compute\nI always meet this....😧 </p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "949859": "Does anyone have any idea why pseudo labeling on effdet is not working very well as with yolov5? my base effdet-d5 with TTA can reach ~0.74, but pseudo labeling can only leverage it by 0.01, which comparing the rise on yolov5 is small. And is there anything I can test out to make it better? Appreciate any suggestion or idea!",
    "949875": "I have the same question.",
    "950333": "A tin foil hat explanation is that this particular dataset was pre-labeled with Yolov5 and then fine tuned by humans, yadda yadda leaking something something.",
    "951337": "In may case PL down my score",
    "951658": "I dont agree it worked well for me. My base model 0.7407 boosted to 0.7558",
    "951824": "Nice job! Would you mind to share how did you set up the PL, like how many epoch and the lr?",
    "951974": "i use this kernel \nhttps://www.kaggle.com/gofarther/efficientdet-framework-tta-pl-etc\nI only change it to apex and my image size is 1024",
    "952306": "Hi, did you change the image size in inference?",
    "952553": "Hi , can you solve this?\n\nloss, _, _ = self.model(images, boxes, labels)\nTypeError: forward() takes 3 positional arguments but 4 were given",
    "952575": "Yes I change the image size  in inference to 1024",
    "952587": "Here is my train_one_epoch function where I add the gradient accumulation:\n\n`\n           \n            images = torch.stack(images)\n            images = images.to(self.device).float()\n            batch_size = images.shape[0]\n            boxes = [target['boxes'].to(self.device).float() for target in targets]\n            labels = [target['labels'].to(self.device).float() for target in targets]\n\n            loss, _, _ = self.model(images, boxes, labels)\n            if self.mixed_precision:\n                with amp.scale_loss(loss, self.optimizer) as scaled_loss:\n                    scaled_loss.backward()\n            else:\n                loss.backward()\n\n            if step % self.accumulate == 0:\n                self.optimizer.step()\n                self.optimizer.zero_grad()\n\n            summary_loss.update(loss.detach().item(), batch_size)\n\n        return summary_loss`",
    "952592": "Thanks",
    "952598": "What is the corresponding validation loss that gives a LB score 0.74",
    "952668": "zekunn this [comment ](https://www.kaggle.com/shonenkov/training-efficientdet/comments#889181)will help you",
    "952682": "Thank you!",
    "952751": "I can confirm a boost of about 0.01 LB (0.74x to 0.75x) using the same TTA and PL configuration as this notebook for EfficientDet, using image size 512, not 1024.",
    "952782": "How much time did it take you to run 7 epochs? Once we submit. we do not need to keep GPU on in the original notebook, right? I submitted this notebook as is and it's been running for 3 hours. Cannot figure out what I am doing wrong.",
    "952806": "More than 3 hours",
    "953053": "ahmmadrashid Great job!\nYou mean you use 1024 size in both training and inferencing?",
    "953837": "Notebook Exceeded Allowed Compute\nI always meet this....😧",
    "954470": "ahmmadrashid  What is best loss did you get ,I can reach up to 328 but not sure why I don't get corresponding score",
    "954812": "ahmmadrashid hi there, is your current score based on efficientdet as well?",
    "955662": "Yes I used 1024 both training and inference"
  },
  "source": "meta"
}