{
  "id": 148754,
  "title": "Pytorch FasterRCNN starter",
  "url": "/competitions/global-wheat-detection/discussion/148754",
  "author_name": "Peter",
  "post_date": "2020-05-05T14:42:35.181000",
  "votes": 29,
  "comment_count": 7,
  "views": 0,
  "content": "<h2>Pytorch FasterRCNN starter code</h2>\n\n<p>I published my starter code. The backbone is the default Resnet-50, I used <a href=\"https://github.com/albumentations-team/albumentations\">albumentations</a> library for augmentation (only flip for now).</p>\n\n<ul>\n<li><a href=\"https://www.kaggle.com/pestipeti/pytorch-starter-fasterrcnn-train\">Train notebook</a></li>\n<li><a href=\"https://www.kaggle.com/pestipeti/pytorch-starter-fasterrcnn-inference\">Inference notebook</a></li>\n</ul>\n\n<p>You can find the Torchvision's tutorial <a href=\"https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html\">here</a></p>\n\n<h2>Options to improve</h2>\n\n<ul>\n<li>Try different backbone</li>\n<li>Train more (I trained 30 epochs only)</li>\n<li>Use larger images (I rescaled to 512 during train/inference)</li>\n<li>More augmentations (I added only random flip for now)</li>\n<li>Optimize (loss, box-selection threshold, etc)</li>\n<li>Different anchor configuration (See torchvision's AnchorGenerator)</li>\n<li>etc.</li>\n</ul>\n\n<p>Good luck to everyone.</p>",
  "messages": [
    {
      "id": 834447,
      "postDate": "2020-05-05T14:42:35.183Z",
      "content": "<h2>Pytorch FasterRCNN starter code</h2>\n\n<p>I published my starter code. The backbone is the default Resnet-50, I used <a href=\"https://github.com/albumentations-team/albumentations\">albumentations</a> library for augmentation (only flip for now).</p>\n\n<ul>\n<li><a href=\"https://www.kaggle.com/pestipeti/pytorch-starter-fasterrcnn-train\">Train notebook</a></li>\n<li><a href=\"https://www.kaggle.com/pestipeti/pytorch-starter-fasterrcnn-inference\">Inference notebook</a></li>\n</ul>\n\n<p>You can find the Torchvision's tutorial <a href=\"https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html\">here</a></p>\n\n<h2>Options to improve</h2>\n\n<ul>\n<li>Try different backbone</li>\n<li>Train more (I trained 30 epochs only)</li>\n<li>Use larger images (I rescaled to 512 during train/inference)</li>\n<li>More augmentations (I added only random flip for now)</li>\n<li>Optimize (loss, box-selection threshold, etc)</li>\n<li>Different anchor configuration (See torchvision's AnchorGenerator)</li>\n<li>etc.</li>\n</ul>\n\n<p>Good luck to everyone.</p>",
      "rawMarkdown": "## Pytorch FasterRCNN starter code\nI published my starter code. The backbone is the default Resnet-50, I used [albumentations](https://github.com/albumentations-team/albumentations) library for augmentation (only flip for now).\n\n- [Train notebook](https://www.kaggle.com/pestipeti/pytorch-starter-fasterrcnn-train)\n- [Inference notebook](https://www.kaggle.com/pestipeti/pytorch-starter-fasterrcnn-inference)\n\nYou can find the Torchvision's tutorial [here](https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html)\n\n## Options to improve\n- Try different backbone\n- Train more (I trained 30 epochs only)\n- Use larger images (I rescaled to 512 during train/inference)\n- More augmentations (I added only random flip for now)\n- Optimize (loss, box-selection threshold, etc)\n- Different anchor configuration (See torchvision's AnchorGenerator)\n- etc.\n\nGood luck to everyone.",
      "votes": 28
    },
    {
      "id": 834621,
      "postDate": "2020-05-05T16:52:53.473Z",
      "content": "<p>Thank for sharing ! An idea: instead of using larger images, you can randomly sample patch of 512x512 from a larger image. It will act like a Data Augmentation. </p>",
      "rawMarkdown": "Thank for sharing ! An idea: instead of using larger images, you can randomly sample patch of 512x512 from a larger image. It will act like a Data Augmentation. ",
      "votes": 13
    },
    {
      "id": 834896,
      "postDate": "2020-05-05T21:42:08.837Z",
      "content": "<p>I found this useful</p>",
      "rawMarkdown": "I found this useful\n",
      "votes": 1
    },
    {
      "id": 841023,
      "postDate": "2020-05-10T14:44:25.207Z",
      "content": "<p>Hi <a href=\"/pestipeti\">@pestipeti</a> how many times each epoch takes in your cases? and what about the GPU usages during training? In one of my cases, my CPU gets too high (even 200%) but GPU seems to remain idle but VM ram was high. </p>",
      "rawMarkdown": "Hi @pestipeti how many times each epoch takes in your cases? and what about the GPU usages during training? In one of my cases, my CPU gets too high (even 200%) but GPU seems to remain idle but VM ram was high. ",
      "replies": [
        {
          "id": 841117,
          "postDate": "2020-05-10T15:57:21.620Z",
          "content": "<p>1 epoch ~4-5 minutes (with validation). My GPU usage is above 95% (rtx-2080ti) and I have more than enough ram (128g). I did not optimize the code, for me it is working.</p>",
          "rawMarkdown": "1 epoch ~4-5 minutes (with validation). My GPU usage is above 95% (rtx-2080ti) and I have more than enough ram (128g). I did not optimize the code, for me it is working."
        },
        {
          "id": 850823,
          "postDate": "2020-05-17T03:56:51.330Z",
          "content": "<p>hi, is it possible that some wheat head contains images don't h have the annotation! I've observed some samples which should have the box but they haven't. As the organizer informed not all images contains box, are they talking about them? I just want to ensure my understanding is correct. \n<a href=\"/pestipeti\">@pestipeti</a> </p>",
          "rawMarkdown": "hi, is it possible that some wheat head contains images don't h have the annotation! I've observed some samples which should have the box but they haven't. As the organizer informed not all images contains box, are they talking about them? I just want to ensure my understanding is correct. \n@pestipeti "
        }
      ]
    },
    {
      "id": 839446,
      "postDate": "2020-05-09T11:56:06.177Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 942271,
      "postDate": "2020-07-23T17:10:57.953Z",
      "content": "<p>Thank you for these useful notebook.</p>",
      "rawMarkdown": "Thank you for these useful notebook."
    }
  ],
  "comments": [
    {
      "id": 834621,
      "author_name": "Etienne David",
      "author_url": "",
      "post_date": "2020-05-05T16:52:53.473000",
      "content": "<p>Thank for sharing ! An idea: instead of using larger images, you can randomly sample patch of 512x512 from a larger image. It will act like a Data Augmentation. </p>",
      "votes": 13,
      "replies": []
    },
    {
      "id": 834896,
      "author_name": "sarah g",
      "author_url": "",
      "post_date": "2020-05-05T21:42:08.837000",
      "content": "<p>I found this useful</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 841023,
      "author_name": "Innat",
      "author_url": "",
      "post_date": "2020-05-10T14:44:25.207000",
      "content": "<p>Hi <a href=\"/pestipeti\">@pestipeti</a> how many times each epoch takes in your cases? and what about the GPU usages during training? In one of my cases, my CPU gets too high (even 200%) but GPU seems to remain idle but VM ram was high. </p>",
      "votes": 0,
      "replies": [
        {
          "id": 841117,
          "author_name": "Peter",
          "author_url": "",
          "post_date": "2020-05-10T15:57:21.620000",
          "content": "<p>1 epoch ~4-5 minutes (with validation). My GPU usage is above 95% (rtx-2080ti) and I have more than enough ram (128g). I did not optimize the code, for me it is working.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 850823,
          "author_name": "Innat",
          "author_url": "",
          "post_date": "2020-05-17T03:56:51.330000",
          "content": "<p>hi, is it possible that some wheat head contains images don't h have the annotation! I've observed some samples which should have the box but they haven't. As the organizer informed not all images contains box, are they talking about them? I just want to ensure my understanding is correct. \n<a href=\"/pestipeti\">@pestipeti</a> </p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 839446,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-05-09T11:56:06.177000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 942271,
      "author_name": "Koubouratou IDJATON",
      "author_url": "",
      "post_date": "2020-07-23T17:10:57.953000",
      "content": "<p>Thank you for these useful notebook.</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "834447": "## Pytorch FasterRCNN starter code\nI published my starter code. The backbone is the default Resnet-50, I used [albumentations](https://github.com/albumentations-team/albumentations) library for augmentation (only flip for now).\n\n- [Train notebook](https://www.kaggle.com/pestipeti/pytorch-starter-fasterrcnn-train)\n- [Inference notebook](https://www.kaggle.com/pestipeti/pytorch-starter-fasterrcnn-inference)\n\nYou can find the Torchvision's tutorial [here](https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html)\n\n## Options to improve\n- Try different backbone\n- Train more (I trained 30 epochs only)\n- Use larger images (I rescaled to 512 during train/inference)\n- More augmentations (I added only random flip for now)\n- Optimize (loss, box-selection threshold, etc)\n- Different anchor configuration (See torchvision's AnchorGenerator)\n- etc.\n\nGood luck to everyone.",
    "834621": "Thank for sharing ! An idea: instead of using larger images, you can randomly sample patch of 512x512 from a larger image. It will act like a Data Augmentation. ",
    "834896": "I found this useful\n",
    "841023": "Hi @pestipeti how many times each epoch takes in your cases? and what about the GPU usages during training? In one of my cases, my CPU gets too high (even 200%) but GPU seems to remain idle but VM ram was high. ",
    "839446": "",
    "942271": "Thank you for these useful notebook."
  }
}