{
  "id": 463368,
  "title": "Who use an algorithm and not use a model?",
  "url": "/competitions/blood-vessel-segmentation/discussion/463368",
  "author_name": "",
  "post_date": "2023-12-24T22:43:14.872758800Z",
  "votes": 3,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Is it okay to use an algorithm and not use a model?</p>\n<p>Labels in Pic 1   <br>\nThe Pic 2 algorithm</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F18286739%2F8819e251f84e37dc1fbf643809d33f6b%2F2023-12-25%20%2001.35.13.png?generation=1703457536124955&amp;alt=media\" alt=\"\"></p>\n<pre><code> ():\n   label = []\n   value = \n    x   (+, Image_open_0900_original_part.size[] ):\n       star = \n\n          ( (-np_data[strY][x-]        &lt; _28100 )  )&amp;(-np_data[strY][x ]   &gt; _26500 ) :\n           star = \n           value = \n          ( (-np_data[strY][x-]        &lt; _28100 )  )&amp;(-np_data[strY][x ]   &gt; _26500 ) :\n           star = \n           value = \n\n        strY+ &lt; Image_open_0900_original_part.size[]:\n            ( (-np_data[strY+][x-]    &lt; _28100 )  )&amp;(-np_data[strY][x ]   &gt; _26500 ) :\n           star = \n           value = \n\n        strY  &gt;=:\n            ( (-np_data[strY-][x-]    &lt; _28100 )  )&amp;(-np_data[strY][x ]   &gt; _26500 ) :\n           star = \n           value = \n\n        strY+ &lt; Image_open_0900_original_part.size[]:\n            ( (-np_data[strY+][x-]    &lt; _28100 )  )&amp;(-np_data[strY][x ]   &gt; _26500 ) :\n           star = \n           value = \n\n        strY  &gt;=:\n            ( (-np_data[strY-][x-]    &lt; _28100 )  )&amp;(-np_data[strY][x ]   &gt; _26500 ) :\n           star = \n           value = \n\n        strY  &gt;=:\n            ( ( result.getpixel( (x,strY- ) )   == )  )&amp;(-np_data[strY][x ]   &gt; _26500 ) :\n           star = \n           value =      \n\n                                                  (-np_data[strY][x -  ]   &gt; _26500_end ) &amp;  (  -np_data[strY][x]  &lt; _26000 )  :\n           star = \n           value =              \n       label = label + [value] \n       result.putpixel( (x , strY ), value)\n    result\n\n\n y   (, Image_open_0900_original_part.size[]):\n    result = to_0_255( Image_open_0900_original_part , result , strY = y ,  _28100 = -, _26500 = -  ,_26500_end = -    , _26000 = - ) \n</code></pre>",
  "messages": [
    {
      "id": "2573347",
      "postDate": "12/24/2023 22:43:14",
      "content": "<p>Is it okay to use an algorithm and not use a model?</p>\n<p>Labels in Pic 1   <br>\nThe Pic 2 algorithm</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F18286739%2F8819e251f84e37dc1fbf643809d33f6b%2F2023-12-25%20%2001.35.13.png?generation=1703457536124955&amp;alt=media\" alt=\"\"></p>\n<pre><code> ():\n   label = []\n   value = \n    x   (+, Image_open_0900_original_part.size[] ):\n       star = \n\n          ( (-np_data[strY][x-]        &lt; _28100 )  )&amp;(-np_data[strY][x ]   &gt; _26500 ) :\n           star = \n           value = \n          ( (-np_data[strY][x-]        &lt; _28100 )  )&amp;(-np_data[strY][x ]   &gt; _26500 ) :\n           star = \n           value = \n\n        strY+ &lt; Image_open_0900_original_part.size[]:\n            ( (-np_data[strY+][x-]    &lt; _28100 )  )&amp;(-np_data[strY][x ]   &gt; _26500 ) :\n           star = \n           value = \n\n        strY  &gt;=:\n            ( (-np_data[strY-][x-]    &lt; _28100 )  )&amp;(-np_data[strY][x ]   &gt; _26500 ) :\n           star = \n           value = \n\n        strY+ &lt; Image_open_0900_original_part.size[]:\n            ( (-np_data[strY+][x-]    &lt; _28100 )  )&amp;(-np_data[strY][x ]   &gt; _26500 ) :\n           star = \n           value = \n\n        strY  &gt;=:\n            ( (-np_data[strY-][x-]    &lt; _28100 )  )&amp;(-np_data[strY][x ]   &gt; _26500 ) :\n           star = \n           value = \n\n        strY  &gt;=:\n            ( ( result.getpixel( (x,strY- ) )   == )  )&amp;(-np_data[strY][x ]   &gt; _26500 ) :\n           star = \n           value =      \n\n                                                  (-np_data[strY][x -  ]   &gt; _26500_end ) &amp;  (  -np_data[strY][x]  &lt; _26000 )  :\n           star = \n           value =              \n       label = label + [value] \n       result.putpixel( (x , strY ), value)\n    result\n\n\n y   (, Image_open_0900_original_part.size[]):\n    result = to_0_255( Image_open_0900_original_part , result , strY = y ,  _28100 = -, _26500 = -  ,_26500_end = -    , _26000 = - ) \n</code></pre>",
      "rawMarkdown": "Is it okay to use an algorithm and not use a model?\n\nLabels in Pic 1   \nThe Pic 2 algorithm\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F18286739%2F8819e251f84e37dc1fbf643809d33f6b%2F2023-12-25%20%2001.35.13.png?generation=1703457536124955&alt=media)\n\n```python\ndef to_0_255( Image_open_0900_original_part , result, strY = 4 ,  _28100 = -28100, _26500 = -26500, _26500_end = -26000    , _26000 = -26000     ):\n   label = [0]\n   value = 0\n   for x in range (0+1, Image_open_0900_original_part.size[0] ):\n       star = False\n        \n       if   ( (-np_data[strY][x-1]        < _28100 )  )&(-np_data[strY][x ]   > _26500 ) :\n           star = True\n           value = 255\n       if   ( (-np_data[strY][x-2]        < _28100 )  )&(-np_data[strY][x ]   > _26500 ) :\n           star = True\n           value = 255\n        \n       if strY+1 < Image_open_0900_original_part.size[1]:\n         if   ( (-np_data[strY+1][x-1]    < _28100 )  )&(-np_data[strY][x ]   > _26500 ) :\n           star = True\n           value = 255\n            \n       if strY  >=1:\n         if   ( (-np_data[strY-1][x-1]    < _28100 )  )&(-np_data[strY][x ]   > _26500 ) :\n           star = True\n           value = 255\n            \n       if strY+2 < Image_open_0900_original_part.size[1]:\n         if   ( (-np_data[strY+2][x-1]    < _28100 )  )&(-np_data[strY][x ]   > _26500 ) :\n           star = True\n           value = 255\n            \n       if strY  >=2:\n         if   ( (-np_data[strY-2][x-1]    < _28100 )  )&(-np_data[strY][x ]   > _26500 ) :\n           star = True\n           value = 255\n            \n       if strY  >=1:\n         if   ( ( result.getpixel( (x,strY-1 ) )   == 255)  )&(-np_data[strY][x ]   > _26500 ) :\n           star = True\n           value = 255     \n        \n       if                                           (-np_data[strY][x -1  ]   > _26500_end ) &  (  -np_data[strY][x]  < _26000 )  :\n           star = False\n           value = 0             \n       label = label + [value] \n       result.putpixel( (x , strY ), value)\n   return result\n\n\nfor y in range (0, Image_open_0900_original_part.size[1]):\n    result = to_0_255( Image_open_0900_original_part , result , strY = y ,  _28100 = -28500, _26500 = -25900  ,_26500_end = -26000    , _26000 = -25400 ) \n```",
      "votes": null
    },
    {
      "id": "2573919",
      "postDate": "12/25/2023 13:29:23",
      "content": "<p>That's totally fine, whatever can fit inside the submission kernel (models or not) are valid approaches</p>",
      "rawMarkdown": "That's totally fine, whatever can fit inside the submission kernel (models or not) are valid approaches",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2573919,
      "author_name": "sirapoabchaikunsaeng",
      "author_url": "",
      "post_date": "12/25/2023 13:29:23",
      "content": "<p>That's totally fine, whatever can fit inside the submission kernel (models or not) are valid approaches</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2573347": "Is it okay to use an algorithm and not use a model?\n\nLabels in Pic 1   \nThe Pic 2 algorithm\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F18286739%2F8819e251f84e37dc1fbf643809d33f6b%2F2023-12-25%20%2001.35.13.png?generation=1703457536124955&alt=media)\n\n```python\ndef to_0_255( Image_open_0900_original_part , result, strY = 4 ,  _28100 = -28100, _26500 = -26500, _26500_end = -26000    , _26000 = -26000     ):\n   label = [0]\n   value = 0\n   for x in range (0+1, Image_open_0900_original_part.size[0] ):\n       star = False\n        \n       if   ( (-np_data[strY][x-1]        < _28100 )  )&(-np_data[strY][x ]   > _26500 ) :\n           star = True\n           value = 255\n       if   ( (-np_data[strY][x-2]        < _28100 )  )&(-np_data[strY][x ]   > _26500 ) :\n           star = True\n           value = 255\n        \n       if strY+1 < Image_open_0900_original_part.size[1]:\n         if   ( (-np_data[strY+1][x-1]    < _28100 )  )&(-np_data[strY][x ]   > _26500 ) :\n           star = True\n           value = 255\n            \n       if strY  >=1:\n         if   ( (-np_data[strY-1][x-1]    < _28100 )  )&(-np_data[strY][x ]   > _26500 ) :\n           star = True\n           value = 255\n            \n       if strY+2 < Image_open_0900_original_part.size[1]:\n         if   ( (-np_data[strY+2][x-1]    < _28100 )  )&(-np_data[strY][x ]   > _26500 ) :\n           star = True\n           value = 255\n            \n       if strY  >=2:\n         if   ( (-np_data[strY-2][x-1]    < _28100 )  )&(-np_data[strY][x ]   > _26500 ) :\n           star = True\n           value = 255\n            \n       if strY  >=1:\n         if   ( ( result.getpixel( (x,strY-1 ) )   == 255)  )&(-np_data[strY][x ]   > _26500 ) :\n           star = True\n           value = 255     \n        \n       if                                           (-np_data[strY][x -1  ]   > _26500_end ) &  (  -np_data[strY][x]  < _26000 )  :\n           star = False\n           value = 0             \n       label = label + [value] \n       result.putpixel( (x , strY ), value)\n   return result\n\n\nfor y in range (0, Image_open_0900_original_part.size[1]):\n    result = to_0_255( Image_open_0900_original_part , result , strY = y ,  _28100 = -28500, _26500 = -25900  ,_26500_end = -26000    , _26000 = -25400 ) \n```",
    "2573919": "That's totally fine, whatever can fit inside the submission kernel (models or not) are valid approaches"
  },
  "source": "meta"
}