{
  "id": 412943,
  "title": "Introduction to SAM (Segment Anything Model) by Meta AI",
  "url": "/competitions/hubmap-hacking-the-human-vasculature/discussion/412943",
  "author_name": "Azmine Toushik Wasi",
  "post_date": "2023-05-26T02:55:35.211000",
  "votes": 17,
  "comment_count": 8,
  "views": 0,
  "content": "<h1>Segment Anything Model (SAM) by Meta</h1>\n<p><a href=\"https://github.com/facebookresearch/segment-anything\" target=\"_blank\">GitHub</a>  | <a href=\"https://arxiv.org/abs/2304.02643\" target=\"_blank\">arXiv</a></p>\n<p>Segment Anything Model (SAM): a new AI model from Meta AI that can \"cut out\" any object, in any image, with a single click. SAM is a promptable segmentation system with zero-shot generalization to unfamiliar objects and images, without the need for additional training. <a href=\"https://colab.research.google.com/github/facebookresearch/segment-anything/blob/main/notebooks/automatic_mask_generator_example.ipynb\" target=\"_blank\">official notebook</a></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7168168%2Fb8c6d4829d3ed9d1122362cef035a149%2F68747470733a2f2f6d656469612e726f626f666c6f772e636f6d2f6e6f7465626f6f6b732f6578616d706c65732f7365676d656e742d616e797468696e672d6d6f64656c2d626c6f67706f73742e706e67.png?generation=1685069463019129&amp;alt=media\" alt=\"\"></p>\n<h2>Complementary Materials</h2>\n<h1><a href=\")(https://colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/how-to-segment-anything-with-sam.ipynb\" target=\"_blank\">Colab</a> | <a href=\"https://youtu.be/D-D6ZmadzPE\" target=\"_blank\">YouTube</a> | <a href=\"https://blog.roboflow.com/how-to-use-segment-anything-model-sam\" target=\"_blank\">Roboflow</a> | <a href=\"https://blog.roboflow.com/how-to-use-segment-anything-model-sam\" target=\"_blank\">segment anything model blogpost</a> | <a href=\"https://www.youtube.com/watch?v=D-D6ZmadzPE\" target=\"_blank\">Youtube</a> | <a href=\"https://kaggle.com/kernels/welcome?src=https://github.com/roboflow-ai/notebooks/blob/main/notebooks/zero-shot-object-detection-with-grounding-dino.ipynb\" target=\"_blank\">Kaggle</a> | <a href=\"https://colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/how-to-segment-anything-with-sam.ipynb\" target=\"_blank\">Google Colab</a></h1>",
  "messages": [
    {
      "id": 2274451,
      "postDate": "2023-05-26T02:55:35.210Z",
      "content": "<h1>Segment Anything Model (SAM) by Meta</h1>\n<p><a href=\"https://github.com/facebookresearch/segment-anything\" target=\"_blank\">GitHub</a>  | <a href=\"https://arxiv.org/abs/2304.02643\" target=\"_blank\">arXiv</a></p>\n<p>Segment Anything Model (SAM): a new AI model from Meta AI that can \"cut out\" any object, in any image, with a single click. SAM is a promptable segmentation system with zero-shot generalization to unfamiliar objects and images, without the need for additional training. <a href=\"https://colab.research.google.com/github/facebookresearch/segment-anything/blob/main/notebooks/automatic_mask_generator_example.ipynb\" target=\"_blank\">official notebook</a></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7168168%2Fb8c6d4829d3ed9d1122362cef035a149%2F68747470733a2f2f6d656469612e726f626f666c6f772e636f6d2f6e6f7465626f6f6b732f6578616d706c65732f7365676d656e742d616e797468696e672d6d6f64656c2d626c6f67706f73742e706e67.png?generation=1685069463019129&amp;alt=media\" alt=\"\"></p>\n<h2>Complementary Materials</h2>\n<h1><a href=\")(https://colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/how-to-segment-anything-with-sam.ipynb\" target=\"_blank\">Colab</a> | <a href=\"https://youtu.be/D-D6ZmadzPE\" target=\"_blank\">YouTube</a> | <a href=\"https://blog.roboflow.com/how-to-use-segment-anything-model-sam\" target=\"_blank\">Roboflow</a> | <a href=\"https://blog.roboflow.com/how-to-use-segment-anything-model-sam\" target=\"_blank\">segment anything model blogpost</a> | <a href=\"https://www.youtube.com/watch?v=D-D6ZmadzPE\" target=\"_blank\">Youtube</a> | <a href=\"https://kaggle.com/kernels/welcome?src=https://github.com/roboflow-ai/notebooks/blob/main/notebooks/zero-shot-object-detection-with-grounding-dino.ipynb\" target=\"_blank\">Kaggle</a> | <a href=\"https://colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/how-to-segment-anything-with-sam.ipynb\" target=\"_blank\">Google Colab</a></h1>",
      "rawMarkdown": "# Segment Anything Model (SAM) by Meta\n\n[GitHub](https://github.com/facebookresearch/segment-anything)  | [arXiv](https://arxiv.org/abs/2304.02643)\n\nSegment Anything Model (SAM): a new AI model from Meta AI that can \"cut out\" any object, in any image, with a single click. SAM is a promptable segmentation system with zero-shot generalization to unfamiliar objects and images, without the need for additional training. [official notebook](https://colab.research.google.com/github/facebookresearch/segment-anything/blob/main/notebooks/automatic_mask_generator_example.ipynb)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7168168%2Fb8c6d4829d3ed9d1122362cef035a149%2F68747470733a2f2f6d656469612e726f626f666c6f772e636f6d2f6e6f7465626f6f6b732f6578616d706c65732f7365676d656e742d616e797468696e672d6d6f64656c2d626c6f67706f73742e706e67.png?generation=1685069463019129&alt=media)\n\n## Complementary Materials\n\n# [Colab]()(https://colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/how-to-segment-anything-with-sam.ipynb) | [YouTube](https://youtu.be/D-D6ZmadzPE) | [Roboflow](https://blog.roboflow.com/how-to-use-segment-anything-model-sam) | [segment anything model blogpost](https://blog.roboflow.com/how-to-use-segment-anything-model-sam) | [Youtube](https://www.youtube.com/watch?v=D-D6ZmadzPE) | [Kaggle](https://kaggle.com/kernels/welcome?src=https://github.com/roboflow-ai/notebooks/blob/main/notebooks/zero-shot-object-detection-with-grounding-dino.ipynb) | [Google Colab](https://colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/how-to-segment-anything-with-sam.ipynb)\n",
      "votes": 17
    },
    {
      "id": 2274466,
      "postDate": "2023-05-26T03:12:56.120Z",
      "content": "<p>Thank you for sharing. It seems that you have provided an idea that we can use SAM to segment everything and identify which of the segmented content are blood vessels.</p>",
      "rawMarkdown": "Thank you for sharing. It seems that you have provided an idea that we can use SAM to segment everything and identify which of the segmented content are blood vessels.",
      "votes": 1,
      "replies": [
        {
          "id": 2322956,
          "postDate": "2023-06-29T15:36:59.640Z",
          "content": "<p>could you please share an annotation refinement tool that will be handy for this task?</p>",
          "rawMarkdown": "could you please share an annotation refinement tool that will be handy for this task?",
          "replies": [
            {
              "id": 2328970,
              "postDate": "2023-07-04T02:39:38.790Z",
              "content": "<p>Labelme, you may take a try. If you mean annotation tool.</p>",
              "rawMarkdown": "Labelme, you may take a try. If you mean annotation tool."
            },
            {
              "id": 2330706,
              "postDate": "2023-07-05T06:40:28.637Z",
              "rawMarkdown": "",
              "isDeleted": true
            }
          ]
        }
      ]
    },
    {
      "id": 2307124,
      "postDate": "2023-06-17T20:51:34.730Z",
      "content": "<p>I created a proof of concept that just finetunes the mask decoder. The main issue is that I would need the bounding box to do this decoding, which are not readily available. Hope someone wants to continue working on this! </p>\n<p><a href=\"https://www.kaggle.com/code/dlobatog/capillaries-sam-pretrained\" target=\"_blank\">https://www.kaggle.com/code/dlobatog/capillaries-sam-pretrained</a> </p>",
      "rawMarkdown": "I created a proof of concept that just finetunes the mask decoder. The main issue is that I would need the bounding box to do this decoding, which are not readily available. Hope someone wants to continue working on this! \n\nhttps://www.kaggle.com/code/dlobatog/capillaries-sam-pretrained ",
      "votes": 1,
      "replies": [
        {
          "id": 2307145,
          "postDate": "2023-06-17T21:38:58.930Z",
          "content": "<p>You could train a lightweight decoder. <br>\nI trained YOLO(v7), and use it to get bounding boxes, and then use SAM for improving the masks: <a href=\"https://www.kaggle.com/code/fnands/yolov7-sam-inference-only\" target=\"_blank\">https://www.kaggle.com/code/fnands/yolov7-sam-inference-only</a></p>",
          "rawMarkdown": "You could train a lightweight decoder. \nI trained YOLO(v7), and use it to get bounding boxes, and then use SAM for improving the masks: https://www.kaggle.com/code/fnands/yolov7-sam-inference-only"
        }
      ]
    },
    {
      "id": 2327979,
      "postDate": "2023-07-03T09:23:11.400Z",
      "content": "<p>Inapainting from SAM model segments : Mask Contours Analysis from DAM model : <a href=\"https://youtu.be/fAw13m3Eb28\" target=\"_blank\">https://youtu.be/fAw13m3Eb28</a></p>",
      "rawMarkdown": "Inapainting from SAM model segments : Mask Contours Analysis from DAM model : https://youtu.be/fAw13m3Eb28"
    },
    {
      "id": 2327977,
      "postDate": "2023-07-03T09:22:22.017Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 2274466,
      "author_name": "Dewei Chen",
      "author_url": "",
      "post_date": "2023-05-26T03:12:56.120000",
      "content": "<p>Thank you for sharing. It seems that you have provided an idea that we can use SAM to segment everything and identify which of the segmented content are blood vessels.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 2322956,
          "author_name": "Manzhura Dmitrii",
          "author_url": "",
          "post_date": "2023-06-29T15:36:59.640000",
          "content": "<p>could you please share an annotation refinement tool that will be handy for this task?</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2328970,
              "author_name": "Dewei Chen",
              "author_url": "",
              "post_date": "2023-07-04T02:39:38.790000",
              "content": "<p>Labelme, you may take a try. If you mean annotation tool.</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2330706,
              "author_name": "",
              "author_url": "",
              "post_date": "2023-07-05T06:40:28.637000",
              "content": "",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2307124,
      "author_name": "Daniel Lobato Garcia",
      "author_url": "",
      "post_date": "2023-06-17T20:51:34.730000",
      "content": "<p>I created a proof of concept that just finetunes the mask decoder. The main issue is that I would need the bounding box to do this decoding, which are not readily available. Hope someone wants to continue working on this! </p>\n<p><a href=\"https://www.kaggle.com/code/dlobatog/capillaries-sam-pretrained\" target=\"_blank\">https://www.kaggle.com/code/dlobatog/capillaries-sam-pretrained</a> </p>",
      "votes": 1,
      "replies": [
        {
          "id": 2307145,
          "author_name": "fnands",
          "author_url": "",
          "post_date": "2023-06-17T21:38:58.930000",
          "content": "<p>You could train a lightweight decoder. <br>\nI trained YOLO(v7), and use it to get bounding boxes, and then use SAM for improving the masks: <a href=\"https://www.kaggle.com/code/fnands/yolov7-sam-inference-only\" target=\"_blank\">https://www.kaggle.com/code/fnands/yolov7-sam-inference-only</a></p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2327979,
      "author_name": "kildongGo",
      "author_url": "",
      "post_date": "2023-07-03T09:23:11.400000",
      "content": "<p>Inapainting from SAM model segments : Mask Contours Analysis from DAM model : <a href=\"https://youtu.be/fAw13m3Eb28\" target=\"_blank\">https://youtu.be/fAw13m3Eb28</a></p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2327977,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-07-03T09:22:22.017000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2274451": "# Segment Anything Model (SAM) by Meta\n\n[GitHub](https://github.com/facebookresearch/segment-anything)  | [arXiv](https://arxiv.org/abs/2304.02643)\n\nSegment Anything Model (SAM): a new AI model from Meta AI that can \"cut out\" any object, in any image, with a single click. SAM is a promptable segmentation system with zero-shot generalization to unfamiliar objects and images, without the need for additional training. [official notebook](https://colab.research.google.com/github/facebookresearch/segment-anything/blob/main/notebooks/automatic_mask_generator_example.ipynb)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7168168%2Fb8c6d4829d3ed9d1122362cef035a149%2F68747470733a2f2f6d656469612e726f626f666c6f772e636f6d2f6e6f7465626f6f6b732f6578616d706c65732f7365676d656e742d616e797468696e672d6d6f64656c2d626c6f67706f73742e706e67.png?generation=1685069463019129&alt=media)\n\n## Complementary Materials\n\n# [Colab]()(https://colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/how-to-segment-anything-with-sam.ipynb) | [YouTube](https://youtu.be/D-D6ZmadzPE) | [Roboflow](https://blog.roboflow.com/how-to-use-segment-anything-model-sam) | [segment anything model blogpost](https://blog.roboflow.com/how-to-use-segment-anything-model-sam) | [Youtube](https://www.youtube.com/watch?v=D-D6ZmadzPE) | [Kaggle](https://kaggle.com/kernels/welcome?src=https://github.com/roboflow-ai/notebooks/blob/main/notebooks/zero-shot-object-detection-with-grounding-dino.ipynb) | [Google Colab](https://colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/how-to-segment-anything-with-sam.ipynb)\n",
    "2274466": "Thank you for sharing. It seems that you have provided an idea that we can use SAM to segment everything and identify which of the segmented content are blood vessels.",
    "2307124": "I created a proof of concept that just finetunes the mask decoder. The main issue is that I would need the bounding box to do this decoding, which are not readily available. Hope someone wants to continue working on this! \n\nhttps://www.kaggle.com/code/dlobatog/capillaries-sam-pretrained ",
    "2327979": "Inapainting from SAM model segments : Mask Contours Analysis from DAM model : https://youtu.be/fAw13m3Eb28",
    "2327977": ""
  }
}