{
  "id": 152260,
  "title": "Images with no detected wheatheads",
  "url": "/competitions/global-wheat-detection/discussion/152260",
  "author_name": "",
  "post_date": "2020-05-19T04:33:45.741497100Z",
  "votes": 1,
  "comment_count": 3,
  "views": 0,
  "content": "<p>Hello everyone, I had a query regarding how one could incorporate images with no wheat heads within training i.e. how do we represent it in the input dataframe ? </p>\n\n<p>As per EDA, in the dataset provided there are 49 images within training directory with no wheatheads detected. Currently I am taking images with &gt;=1 bounding boxes i.e. as per what is present in train.csv.</p>\n\n<p>Please refer to my notebook below:\n<a href=\"https://www.kaggle.com/shebinscaria/pytorch-resnet50fpn-gwd\">https://www.kaggle.com/shebinscaria/pytorch-resnet50fpn-gwd</a></p>",
  "messages": [
    {
      "id": "853290",
      "postDate": "05/19/2020 04:33:45",
      "content": "<p>Hello everyone, I had a query regarding how one could incorporate images with no wheat heads within training i.e. how do we represent it in the input dataframe ? </p>\n\n<p>As per EDA, in the dataset provided there are 49 images within training directory with no wheatheads detected. Currently I am taking images with &gt;=1 bounding boxes i.e. as per what is present in train.csv.</p>\n\n<p>Please refer to my notebook below:\n<a href=\"https://www.kaggle.com/shebinscaria/pytorch-resnet50fpn-gwd\">https://www.kaggle.com/shebinscaria/pytorch-resnet50fpn-gwd</a></p>",
      "rawMarkdown": "Hello everyone, I had a query regarding how one could incorporate images with no wheat heads within training i.e. how do we represent it in the input dataframe ? \n\nAs per EDA, in the dataset provided there are 49 images within training directory with no wheatheads detected. Currently I am taking images with &gt;=1 bounding boxes i.e. as per what is present in train.csv.\n\nPlease refer to my notebook below:\nhttps://www.kaggle.com/shebinscaria/pytorch-resnet50fpn-gwd",
      "votes": null
    },
    {
      "id": "854365",
      "postDate": "05/20/2020 01:52:42",
      "content": "<p>Cant we label the image as background class ? Not sure what would be the bounding box co-ordinates though</p>",
      "rawMarkdown": "Cant we label the image as background class ? Not sure what would be the bounding box co-ordinates though",
      "votes": null
    },
    {
      "id": "929016",
      "postDate": "07/14/2020 11:59:15",
      "content": "<p>Can we annotate those 49 images as <strong>1 0 0 0 0</strong> in yolo format where <strong>1</strong> because they don't contatin wheat heads and 0 as they have no cordinates for wheat head . whereas <strong>0 _ _ _ _</strong> , where  _ _ _ _  refers to bbox for all the 3373 images in train folder?</p>",
      "rawMarkdown": "Can we annotate those 49 images as **1 0 0 0 0** in yolo format where **1** because they don't contatin wheat heads and 0 as they have no cordinates for wheat head . whereas **0 _ _ _ _** , where  _ _ _ _  refers to bbox for all the 3373 images in train folder?",
      "votes": null
    },
    {
      "id": "929629",
      "postDate": "07/14/2020 20:00:48",
      "content": "<p>It will depend on what framework you are using. In torchvision version 0.6.1, you can simply pass empty tensors like so\n<code>\ntarget[\"boxes\"] = torch.zeros((0, 4), dtype=torch.float32)\ntarget[\"labels\"] = torch.zeros(0, dtype=torch.int64)\n</code></p>\n\n<p>And for your submission.csv, make sure your PredictionString is just an empty string when no boxes are detected instead of a NaN value.</p>",
      "rawMarkdown": "It will depend on what framework you are using. In torchvision version 0.6.1, you can simply pass empty tensors like so\n```\ntarget[\"boxes\"] = torch.zeros((0, 4), dtype=torch.float32)\ntarget[\"labels\"] = torch.zeros(0, dtype=torch.int64)\n```\n\nAnd for your submission.csv, make sure your PredictionString is just an empty string when no boxes are detected instead of a NaN value.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 854365,
      "author_name": "kuramakyubi",
      "author_url": "",
      "post_date": "05/20/2020 01:52:42",
      "content": "<p>Cant we label the image as background class ? Not sure what would be the bounding box co-ordinates though</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 929016,
      "author_name": "soumochatterjee",
      "author_url": "",
      "post_date": "07/14/2020 11:59:15",
      "content": "<p>Can we annotate those 49 images as <strong>1 0 0 0 0</strong> in yolo format where <strong>1</strong> because they don't contatin wheat heads and 0 as they have no cordinates for wheat head . whereas <strong>0 _ _ _ _</strong> , where  _ _ _ _  refers to bbox for all the 3373 images in train folder?</p>",
      "votes": null,
      "replies": [
        {
          "id": 929629,
          "author_name": "matthewmasters",
          "author_url": "",
          "post_date": "07/14/2020 20:00:48",
          "content": "<p>It will depend on what framework you are using. In torchvision version 0.6.1, you can simply pass empty tensors like so\n<code>\ntarget[\"boxes\"] = torch.zeros((0, 4), dtype=torch.float32)\ntarget[\"labels\"] = torch.zeros(0, dtype=torch.int64)\n</code></p>\n\n<p>And for your submission.csv, make sure your PredictionString is just an empty string when no boxes are detected instead of a NaN value.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "853290": "Hello everyone, I had a query regarding how one could incorporate images with no wheat heads within training i.e. how do we represent it in the input dataframe ? \n\nAs per EDA, in the dataset provided there are 49 images within training directory with no wheatheads detected. Currently I am taking images with &gt;=1 bounding boxes i.e. as per what is present in train.csv.\n\nPlease refer to my notebook below:\nhttps://www.kaggle.com/shebinscaria/pytorch-resnet50fpn-gwd",
    "854365": "Cant we label the image as background class ? Not sure what would be the bounding box co-ordinates though",
    "929016": "Can we annotate those 49 images as **1 0 0 0 0** in yolo format where **1** because they don't contatin wheat heads and 0 as they have no cordinates for wheat head . whereas **0 _ _ _ _** , where  _ _ _ _  refers to bbox for all the 3373 images in train folder?",
    "929629": "It will depend on what framework you are using. In torchvision version 0.6.1, you can simply pass empty tensors like so\n```\ntarget[\"boxes\"] = torch.zeros((0, 4), dtype=torch.float32)\ntarget[\"labels\"] = torch.zeros(0, dtype=torch.int64)\n```\n\nAnd for your submission.csv, make sure your PredictionString is just an empty string when no boxes are detected instead of a NaN value."
  },
  "source": "meta"
}