{
  "id": 310153,
  "title": "Releasing my Dorsal Fin Dataset & Code",
  "url": "/competitions/happy-whale-and-dolphin/discussion/310153",
  "author_name": "Jan Bre",
  "post_date": "2022-02-27T20:31:02.626000",
  "votes": 142,
  "comment_count": 12,
  "views": 0,
  "content": "<p><strong>Hey everybody</strong></p>\n<p>Unfortunately I am not able to further participate in this competition, due to lack of time and I want to reduce the burden of entry for people to create some strong solutions for this good cause.</p>\n<p>Therefore I am releasing my custom Bounding Box Dataset for Backfin Detection including 4500 manually annotated backfins with code. </p>\n<p>Feel free to ask questions in the comments.</p>\n<h1>Object Detection</h1>\n<p>It includes bounding boxes for 4500 whales with a dorsal fin, not including beluge, southern right whale and gray whale.<br>\n<strong>Please upvote the dataset if you are using it in your pipeline</strong><br>\n<strong>Here it is:</strong><br>\n<a href=\"https://www.kaggle.com/jpbremer/backfin-annotations\" target=\"_blank\">https://www.kaggle.com/jpbremer/backfin-annotations</a></p>\n<p><a href=\"https://postimg.cc/LnNhmdwD\" target=\"_blank\"><img src=\"https://i.postimg.cc/0yqSdPCT/dorsal-fin-crops.png\" alt=\"dorsal-fin-crops.png\"></a></p>\n<p>Here I show you how to derive a yolov5 object detector from that dataset:<br>\n<a href=\"https://www.kaggle.com/jpbremer/backfin-detection-with-yolov5\" target=\"_blank\">https://www.kaggle.com/jpbremer/backfin-detection-with-yolov5</a></p>\n<p>and here I create TF-Records from that dataset:<br>\n<a href=\"https://www.kaggle.com/jpbremer/cropped-backfin-tfrecords-dataset\" target=\"_blank\">https://www.kaggle.com/jpbremer/cropped-backfin-tfrecords-dataset</a></p>\n<p>Here is the TF-Records dataset:<br>\n<a href=\"https://www.kaggle.com/jpbremer/backfintfrecords\" target=\"_blank\">https://www.kaggle.com/jpbremer/backfintfrecords</a></p>\n<h3>Train Examples</h3>\n<p><a href=\"https://postimg.cc/4Hcj4hJt\" target=\"_blank\"><img src=\"https://i.postimg.cc/FzCvZj8P/dorsal-fin-crop-train-tfrecords.png\" alt=\"dorsal-fin-crop-train-tfrecords.png\"></a></p>\n<h3>Test Examples</h3>\n<p><a href=\"https://postimg.cc/fJx16XqQ\" target=\"_blank\"><img src=\"https://i.postimg.cc/tCfynNhJ/dorsal-fin-crop-test-tfrecords.png\" alt=\"dorsal-fin-crop-test-tfrecords.png\"></a></p>\n<p>Notice that there are some whales without dorsal fins (beluga, southern right whale and gray whale partially). Highlighted in red above.  You can easily drop them for the training dataset. For testing you have to remove them in another way as the object detector returns false positives there. I built a simple classifier for that purpose.</p>\n<h1>Using the datasets:</h1>\n<p>Here I show you how you can boost the current public notebooks by a lot using the cropped dataset:</p>\n<p><a href=\"https://www.kaggle.com/jpbremer/backfins-arcface-tpu-effnet\" target=\"_blank\">https://www.kaggle.com/jpbremer/backfins-arcface-tpu-effnet</a></p>\n<p>I simply changed the dataset and substitute the predictions of all whales without a backfin (derived from the classifier) and which have not been assigned a bounding box with predictions from a public notebook. You can easily get &gt; 0.7 and probably also &gt; 0.75 with some adjustements such as bigger models and k-fold.</p>\n<p>I have created one more dataset, which I may change in the following days.</p>\n<p>Please also upvote the original kernels I copied my code from.</p>\n<p>Let me know if you have any questions.</p>\n<p><strong>Cheers</strong></p>",
  "messages": [
    {
      "id": 1706806,
      "postDate": "2022-02-27T20:31:02.627Z",
      "content": "<p><strong>Hey everybody</strong></p>\n<p>Unfortunately I am not able to further participate in this competition, due to lack of time and I want to reduce the burden of entry for people to create some strong solutions for this good cause.</p>\n<p>Therefore I am releasing my custom Bounding Box Dataset for Backfin Detection including 4500 manually annotated backfins with code. </p>\n<p>Feel free to ask questions in the comments.</p>\n<h1>Object Detection</h1>\n<p>It includes bounding boxes for 4500 whales with a dorsal fin, not including beluge, southern right whale and gray whale.<br>\n<strong>Please upvote the dataset if you are using it in your pipeline</strong><br>\n<strong>Here it is:</strong><br>\n<a href=\"https://www.kaggle.com/jpbremer/backfin-annotations\" target=\"_blank\">https://www.kaggle.com/jpbremer/backfin-annotations</a></p>\n<p><a href=\"https://postimg.cc/LnNhmdwD\" target=\"_blank\"><img src=\"https://i.postimg.cc/0yqSdPCT/dorsal-fin-crops.png\" alt=\"dorsal-fin-crops.png\"></a></p>\n<p>Here I show you how to derive a yolov5 object detector from that dataset:<br>\n<a href=\"https://www.kaggle.com/jpbremer/backfin-detection-with-yolov5\" target=\"_blank\">https://www.kaggle.com/jpbremer/backfin-detection-with-yolov5</a></p>\n<p>and here I create TF-Records from that dataset:<br>\n<a href=\"https://www.kaggle.com/jpbremer/cropped-backfin-tfrecords-dataset\" target=\"_blank\">https://www.kaggle.com/jpbremer/cropped-backfin-tfrecords-dataset</a></p>\n<p>Here is the TF-Records dataset:<br>\n<a href=\"https://www.kaggle.com/jpbremer/backfintfrecords\" target=\"_blank\">https://www.kaggle.com/jpbremer/backfintfrecords</a></p>\n<h3>Train Examples</h3>\n<p><a href=\"https://postimg.cc/4Hcj4hJt\" target=\"_blank\"><img src=\"https://i.postimg.cc/FzCvZj8P/dorsal-fin-crop-train-tfrecords.png\" alt=\"dorsal-fin-crop-train-tfrecords.png\"></a></p>\n<h3>Test Examples</h3>\n<p><a href=\"https://postimg.cc/fJx16XqQ\" target=\"_blank\"><img src=\"https://i.postimg.cc/tCfynNhJ/dorsal-fin-crop-test-tfrecords.png\" alt=\"dorsal-fin-crop-test-tfrecords.png\"></a></p>\n<p>Notice that there are some whales without dorsal fins (beluga, southern right whale and gray whale partially). Highlighted in red above.  You can easily drop them for the training dataset. For testing you have to remove them in another way as the object detector returns false positives there. I built a simple classifier for that purpose.</p>\n<h1>Using the datasets:</h1>\n<p>Here I show you how you can boost the current public notebooks by a lot using the cropped dataset:</p>\n<p><a href=\"https://www.kaggle.com/jpbremer/backfins-arcface-tpu-effnet\" target=\"_blank\">https://www.kaggle.com/jpbremer/backfins-arcface-tpu-effnet</a></p>\n<p>I simply changed the dataset and substitute the predictions of all whales without a backfin (derived from the classifier) and which have not been assigned a bounding box with predictions from a public notebook. You can easily get &gt; 0.7 and probably also &gt; 0.75 with some adjustements such as bigger models and k-fold.</p>\n<p>I have created one more dataset, which I may change in the following days.</p>\n<p>Please also upvote the original kernels I copied my code from.</p>\n<p>Let me know if you have any questions.</p>\n<p><strong>Cheers</strong></p>",
      "rawMarkdown": "**Hey everybody**\n\nUnfortunately I am not able to further participate in this competition, due to lack of time and I want to reduce the burden of entry for people to create some strong solutions for this good cause.\n\nTherefore I am releasing my custom Bounding Box Dataset for Backfin Detection including 4500 manually annotated backfins with code. \n\nFeel free to ask questions in the comments.\n\n# Object Detection\nIt includes bounding boxes for 4500 whales with a dorsal fin, not including beluge, southern right whale and gray whale.\n**Please upvote the dataset if you are using it in your pipeline**\n**Here it is:**\nhttps://www.kaggle.com/jpbremer/backfin-annotations\n\n[![dorsal-fin-crops.png](https://i.postimg.cc/0yqSdPCT/dorsal-fin-crops.png)](https://postimg.cc/LnNhmdwD)\n\nHere I show you how to derive a yolov5 object detector from that dataset:\nhttps://www.kaggle.com/jpbremer/backfin-detection-with-yolov5\n\nand here I create TF-Records from that dataset:\nhttps://www.kaggle.com/jpbremer/cropped-backfin-tfrecords-dataset\n\nHere is the TF-Records dataset:\nhttps://www.kaggle.com/jpbremer/backfintfrecords\n\n\n### Train Examples\n[![dorsal-fin-crop-train-tfrecords.png](https://i.postimg.cc/FzCvZj8P/dorsal-fin-crop-train-tfrecords.png)](https://postimg.cc/4Hcj4hJt)\n\n### Test Examples\n[![dorsal-fin-crop-test-tfrecords.png](https://i.postimg.cc/tCfynNhJ/dorsal-fin-crop-test-tfrecords.png)](https://postimg.cc/fJx16XqQ)\n\nNotice that there are some whales without dorsal fins (beluga, southern right whale and gray whale partially). Highlighted in red above.  You can easily drop them for the training dataset. For testing you have to remove them in another way as the object detector returns false positives there. I built a simple classifier for that purpose.\n\n\n# Using the datasets:\n\nHere I show you how you can boost the current public notebooks by a lot using the cropped dataset:\n\nhttps://www.kaggle.com/jpbremer/backfins-arcface-tpu-effnet\n\nI simply changed the dataset and substitute the predictions of all whales without a backfin (derived from the classifier) and which have not been assigned a bounding box with predictions from a public notebook. You can easily get > 0.7 and probably also > 0.75 with some adjustements such as bigger models and k-fold.\n\nI have created one more dataset, which I may change in the following days.\n\nPlease also upvote the original kernels I copied my code from.\n\nLet me know if you have any questions.\n\n**Cheers**",
      "votes": 142
    },
    {
      "id": 1711771,
      "postDate": "2022-03-04T09:58:16.697Z",
      "content": "<p>I'm curious about the reasons behind keeping only the fins. In my opinion, the rest of the body can have useful features for an identification task</p>",
      "rawMarkdown": "I'm curious about the reasons behind keeping only the fins. In my opinion, the rest of the body can have useful features for an identification task",
      "votes": 4,
      "replies": [
        {
          "id": 1712017,
          "postDate": "2022-03-04T14:46:04.083Z",
          "content": "<p>My rational was that backfins are the only thing consistently represented in the images. <br>\nYou need to consider that there may be many cases, where the same whale id does have full body images in train, while only backfins in test. </p>\n<p>However, my idea was to build models for backfins only and whole body only and combine them downstream in the pipeline. </p>\n<p>I easily achieved my current score with only backfins and single fold.</p>",
          "rawMarkdown": "My rational was that backfins are the only thing consistently represented in the images. \nYou need to consider that there may be many cases, where the same whale id does have full body images in train, while only backfins in test. \n\nHowever, my idea was to build models for backfins only and whole body only and combine them downstream in the pipeline. \n\nI easily achieved my current score with only backfins and single fold.",
          "votes": 5
        }
      ]
    },
    {
      "id": 1710534,
      "postDate": "2022-03-03T06:13:19.340Z",
      "content": "<p>\"It includes bounding boxes for 4500 whales with a dorsal fin, not including beluge, southern right whale and gray whale.\"</p>\n<p>May I ask, why three species not include?   They don't have back fin or the detector is not trained or can't detect them?</p>\n<p>Thanks for your reply!!!</p>",
      "rawMarkdown": "\"It includes bounding boxes for 4500 whales with a dorsal fin, not including beluge, southern right whale and gray whale.\"\n\nMay I ask, why three species not include?   They don't have back fin or the detector is not trained or can't detect them?\n\nThanks for your reply!!!\n\n",
      "votes": 1,
      "replies": [
        {
          "id": 1710696,
          "postDate": "2022-03-03T08:46:36.837Z",
          "content": "<p>These 3 whale species are very different in nature to the others. <br>\nTake a look here for example: <a href=\"https://www.kaggle.com/kwentar/what-about-species\" target=\"_blank\">https://www.kaggle.com/kwentar/what-about-species</a></p>\n<p>They dont have backfins in the same way the other whales do. </p>\n<p>So I skipped those in labeling. Consequently the detector is not trained to detect them. </p>\n<p>You could make the case that for some belugas you can see the resemblance of a dorsal fin. However it is so hard to spot in many images that I skipped them entirely.</p>\n<p>However, I may release my 2nd dataset covering those whales on the weekend.</p>",
          "rawMarkdown": "These 3 whale species are very different in nature to the others. \nTake a look here for example: https://www.kaggle.com/kwentar/what-about-species\n\nThey dont have backfins in the same way the other whales do. \n\nSo I skipped those in labeling. Consequently the detector is not trained to detect them. \n\nYou could make the case that for some belugas you can see the resemblance of a dorsal fin. However it is so hard to spot in many images that I skipped them entirely.\n\nHowever, I may release my 2nd dataset covering those whales on the weekend.",
          "votes": 1
        }
      ]
    },
    {
      "id": 1715667,
      "postDate": "2022-03-08T08:32:50.403Z",
      "content": "<p>Hello Jan Bre, <br>\nThanks for sharing! <br>\nSome of the ways used in the notebook is obviously new to most of us! Will be considering for our future ventures. <br>\nKeep contributing ^_^</p>",
      "rawMarkdown": "Hello Jan Bre, \nThanks for sharing! \nSome of the ways used in the notebook is obviously new to most of us! Will be considering for our future ventures. \nKeep contributing ^_^"
    },
    {
      "id": 1715653,
      "postDate": "2022-03-08T08:14:54.837Z",
      "content": "<p>Hi,How many data with backfins in your dataset?</p>",
      "rawMarkdown": "Hi,How many data with backfins in your dataset?",
      "replies": [
        {
          "id": 1719393,
          "postDate": "2022-03-11T17:54:24Z",
          "content": "<p>~4500 annotations manually</p>",
          "rawMarkdown": "~4500 annotations manually"
        }
      ]
    },
    {
      "id": 1746189,
      "postDate": "2022-04-05T14:48:38.107Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 1707792,
      "postDate": "2022-02-28T19:37:35.467Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 1717649,
      "postDate": "2022-03-10T05:25:17.983Z",
      "content": "<p>Thanks for sharing! </p>",
      "rawMarkdown": "Thanks for sharing! "
    },
    {
      "id": 1707532,
      "postDate": "2022-02-28T14:52:33.577Z",
      "content": "<p>Thanks for sharing!!!</p>",
      "rawMarkdown": "Thanks for sharing!!!"
    },
    {
      "id": 1707042,
      "postDate": "2022-02-28T05:04:39.943Z",
      "content": "<p>thanks for sharing! upvote</p>",
      "rawMarkdown": "thanks for sharing! upvote"
    }
  ],
  "comments": [
    {
      "id": 1711771,
      "author_name": "Théo Boyer",
      "author_url": "",
      "post_date": "2022-03-04T09:58:16.697000",
      "content": "<p>I'm curious about the reasons behind keeping only the fins. In my opinion, the rest of the body can have useful features for an identification task</p>",
      "votes": 4,
      "replies": [
        {
          "id": 1712017,
          "author_name": "Jan Bre",
          "author_url": "",
          "post_date": "2022-03-04T14:46:04.083000",
          "content": "<p>My rational was that backfins are the only thing consistently represented in the images. <br>\nYou need to consider that there may be many cases, where the same whale id does have full body images in train, while only backfins in test. </p>\n<p>However, my idea was to build models for backfins only and whole body only and combine them downstream in the pipeline. </p>\n<p>I easily achieved my current score with only backfins and single fold.</p>",
          "votes": 5,
          "replies": []
        }
      ]
    },
    {
      "id": 1710534,
      "author_name": "dragon zhang",
      "author_url": "",
      "post_date": "2022-03-03T06:13:19.340000",
      "content": "<p>\"It includes bounding boxes for 4500 whales with a dorsal fin, not including beluge, southern right whale and gray whale.\"</p>\n<p>May I ask, why three species not include?   They don't have back fin or the detector is not trained or can't detect them?</p>\n<p>Thanks for your reply!!!</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1710696,
          "author_name": "Jan Bre",
          "author_url": "",
          "post_date": "2022-03-03T08:46:36.837000",
          "content": "<p>These 3 whale species are very different in nature to the others. <br>\nTake a look here for example: <a href=\"https://www.kaggle.com/kwentar/what-about-species\" target=\"_blank\">https://www.kaggle.com/kwentar/what-about-species</a></p>\n<p>They dont have backfins in the same way the other whales do. </p>\n<p>So I skipped those in labeling. Consequently the detector is not trained to detect them. </p>\n<p>You could make the case that for some belugas you can see the resemblance of a dorsal fin. However it is so hard to spot in many images that I skipped them entirely.</p>\n<p>However, I may release my 2nd dataset covering those whales on the weekend.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1715667,
      "author_name": "SJ",
      "author_url": "",
      "post_date": "2022-03-08T08:32:50.403000",
      "content": "<p>Hello Jan Bre, <br>\nThanks for sharing! <br>\nSome of the ways used in the notebook is obviously new to most of us! Will be considering for our future ventures. <br>\nKeep contributing ^_^</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1715653,
      "author_name": "Zekun",
      "author_url": "",
      "post_date": "2022-03-08T08:14:54.837000",
      "content": "<p>Hi,How many data with backfins in your dataset?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1719393,
          "author_name": "Jan Bre",
          "author_url": "",
          "post_date": "2022-03-11T17:54:24",
          "content": "<p>~4500 annotations manually</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1746189,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-04-05T14:48:38.107000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1707792,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-02-28T19:37:35.467000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1717649,
      "author_name": "Zewen Zheng",
      "author_url": "",
      "post_date": "2022-03-10T05:25:17.983000",
      "content": "<p>Thanks for sharing! </p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1707532,
      "author_name": "Artem Burenok",
      "author_url": "",
      "post_date": "2022-02-28T14:52:33.577000",
      "content": "<p>Thanks for sharing!!!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1707042,
      "author_name": "dragon zhang",
      "author_url": "",
      "post_date": "2022-02-28T05:04:39.943000",
      "content": "<p>thanks for sharing! upvote</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1706806": "**Hey everybody**\n\nUnfortunately I am not able to further participate in this competition, due to lack of time and I want to reduce the burden of entry for people to create some strong solutions for this good cause.\n\nTherefore I am releasing my custom Bounding Box Dataset for Backfin Detection including 4500 manually annotated backfins with code. \n\nFeel free to ask questions in the comments.\n\n# Object Detection\nIt includes bounding boxes for 4500 whales with a dorsal fin, not including beluge, southern right whale and gray whale.\n**Please upvote the dataset if you are using it in your pipeline**\n**Here it is:**\nhttps://www.kaggle.com/jpbremer/backfin-annotations\n\n[![dorsal-fin-crops.png](https://i.postimg.cc/0yqSdPCT/dorsal-fin-crops.png)](https://postimg.cc/LnNhmdwD)\n\nHere I show you how to derive a yolov5 object detector from that dataset:\nhttps://www.kaggle.com/jpbremer/backfin-detection-with-yolov5\n\nand here I create TF-Records from that dataset:\nhttps://www.kaggle.com/jpbremer/cropped-backfin-tfrecords-dataset\n\nHere is the TF-Records dataset:\nhttps://www.kaggle.com/jpbremer/backfintfrecords\n\n\n### Train Examples\n[![dorsal-fin-crop-train-tfrecords.png](https://i.postimg.cc/FzCvZj8P/dorsal-fin-crop-train-tfrecords.png)](https://postimg.cc/4Hcj4hJt)\n\n### Test Examples\n[![dorsal-fin-crop-test-tfrecords.png](https://i.postimg.cc/tCfynNhJ/dorsal-fin-crop-test-tfrecords.png)](https://postimg.cc/fJx16XqQ)\n\nNotice that there are some whales without dorsal fins (beluga, southern right whale and gray whale partially). Highlighted in red above.  You can easily drop them for the training dataset. For testing you have to remove them in another way as the object detector returns false positives there. I built a simple classifier for that purpose.\n\n\n# Using the datasets:\n\nHere I show you how you can boost the current public notebooks by a lot using the cropped dataset:\n\nhttps://www.kaggle.com/jpbremer/backfins-arcface-tpu-effnet\n\nI simply changed the dataset and substitute the predictions of all whales without a backfin (derived from the classifier) and which have not been assigned a bounding box with predictions from a public notebook. You can easily get > 0.7 and probably also > 0.75 with some adjustements such as bigger models and k-fold.\n\nI have created one more dataset, which I may change in the following days.\n\nPlease also upvote the original kernels I copied my code from.\n\nLet me know if you have any questions.\n\n**Cheers**",
    "1711771": "I'm curious about the reasons behind keeping only the fins. In my opinion, the rest of the body can have useful features for an identification task",
    "1710534": "\"It includes bounding boxes for 4500 whales with a dorsal fin, not including beluge, southern right whale and gray whale.\"\n\nMay I ask, why three species not include?   They don't have back fin or the detector is not trained or can't detect them?\n\nThanks for your reply!!!\n\n",
    "1715667": "Hello Jan Bre, \nThanks for sharing! \nSome of the ways used in the notebook is obviously new to most of us! Will be considering for our future ventures. \nKeep contributing ^_^",
    "1715653": "Hi,How many data with backfins in your dataset?",
    "1746189": "",
    "1707792": "",
    "1717649": "Thanks for sharing! ",
    "1707532": "Thanks for sharing!!!",
    "1707042": "thanks for sharing! upvote"
  }
}