{
  "id": 155306,
  "title": "using html to view images per patient",
  "url": "/competitions/siim-isic-melanoma-classification/discussion/155306",
  "author_name": "hengck23",
  "post_date": "2020-06-01T07:08:36.184000",
  "votes": 57,
  "comment_count": 13,
  "views": 0,
  "content": "<p>i write a simple python code to generate html to view images per patient. here is it:</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F113660%2Fae0247e50a460e97226a675ce458bea8%2FSelection_044.png?generation=1590995245694735&amp;alt=media\" alt=\"\"></p>\n\n<p>it would be useful to study the data or analyse results (just modify the code to add predict score in a new row), etc</p>",
  "messages": [
    {
      "id": 869640,
      "postDate": "2020-06-01T07:08:36.183Z",
      "content": "<p>i write a simple python code to generate html to view images per patient. here is it:</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F113660%2Fae0247e50a460e97226a675ce458bea8%2FSelection_044.png?generation=1590995245694735&amp;alt=media\" alt=\"\"></p>\n\n<p>it would be useful to study the data or analyse results (just modify the code to add predict score in a new row), etc</p>",
      "rawMarkdown": "i write a simple python code to generate html to view images per patient. here is it:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F113660%2Fae0247e50a460e97226a675ce458bea8%2FSelection_044.png?generation=1590995245694735&amp;alt=media)\n\n\nit would be useful to study the data or analyse results (just modify the code to add predict score in a new row), etc",
      "votes": 55
    },
    {
      "id": 872072,
      "postDate": "2020-06-02T21:54:07.243Z",
      "content": "<p>Hi Heng,</p>\n\n<p>I was doing something similar. If someone wants to use it, you can find the code on my Github: <a href=\"https://github.com/paaatcha/ISIC2020-patient-view\">https://github.com/paaatcha/ISIC2020-patient-view</a>\nInstructions are in Readme.md</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F684838%2F05c301248c7572ce9b2537e445dfef3a%2Fscreenshot.png?generation=1591134791379736&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "Hi Heng,\n\nI was doing something similar. If someone wants to use it, you can find the code on my Github: https://github.com/paaatcha/ISIC2020-patient-view\nInstructions are in Readme.md\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F684838%2F05c301248c7572ce9b2537e445dfef3a%2Fscreenshot.png?generation=1591134791379736&amp;alt=media)\n",
      "votes": 9,
      "replies": [
        {
          "id": 952568,
          "postDate": "2020-07-31T03:53:14.640Z",
          "content": "<p>Superb!</p>",
          "rawMarkdown": "Superb!"
        }
      ]
    },
    {
      "id": 869849,
      "postDate": "2020-06-01T10:14:47.583Z",
      "content": "<p>viewing the data reveals some images refer to the same mole but are of different rotations, viewpoint, etc</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F113660%2F58d7a87e500b57a057bc22c8dbb2ebe2%2FSelection_047.png?generation=1591006451567421&amp;alt=media\" alt=\"\"></p>\n\n<p>this explains why TTA should work and treating image as \"a group\" may help</p>",
      "rawMarkdown": "viewing the data reveals some images refer to the same mole but are of different rotations, viewpoint, etc\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F113660%2F58d7a87e500b57a057bc22c8dbb2ebe2%2FSelection_047.png?generation=1591006451567421&amp;alt=media)\n\nthis explains why TTA should work and treating image as \"a group\" may help",
      "votes": 6
    },
    {
      "id": 957654,
      "postDate": "2020-08-04T13:21:45.917Z",
      "content": "<p>hopefully, one day i can say:\n\"GPT-3 generate a web page that i can shows results ...\"</p>",
      "rawMarkdown": "hopefully, one day i can say:\n\"GPT-3 generate a web page that i can shows results ...\"",
      "votes": 4
    },
    {
      "id": 952570,
      "postDate": "2020-07-31T03:54:05.153Z",
      "content": "<p>Cool. Something I was really in need of when I started.</p>",
      "rawMarkdown": "Cool. Something I was really in need of when I started.",
      "votes": 1
    },
    {
      "id": 870925,
      "postDate": "2020-06-02T03:16:52.953Z",
      "content": "<p>Great work!</p>",
      "rawMarkdown": "Great work!",
      "votes": 1
    },
    {
      "id": 870242,
      "postDate": "2020-06-01T15:25:05.577Z",
      "content": "<p>Great work!</p>",
      "rawMarkdown": "Great work!\n",
      "votes": 1
    },
    {
      "id": 869782,
      "postDate": "2020-06-01T09:30:07.143Z",
      "content": "<p>Wow ! . You never stop surprising :) .. This will be super useful to understand information for each patient.</p>",
      "rawMarkdown": "Wow ! . You never stop surprising :) .. This will be super useful to understand information for each patient.",
      "votes": 1
    },
    {
      "id": 869761,
      "postDate": "2020-06-01T09:14:36.180Z",
      "content": "<p>Nice Work!</p>",
      "rawMarkdown": "Nice Work!",
      "votes": 1
    },
    {
      "id": 903174,
      "postDate": "2020-06-26T16:11:55.440Z",
      "content": "<p>great tool, specially for medical image processing. :+1</p>",
      "rawMarkdown": "great tool, specially for medical image processing. :+1",
      "votes": 2
    },
    {
      "id": 869793,
      "postDate": "2020-06-01T09:38:28.830Z",
      "content": "<p>updated version to see both prediction and ground truth using color cells:\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F113660%2F3365302feee9f87aee04ad657433d99c%2FSelection_045.png?generation=1591004224988005&amp;alt=media\" alt=\"\"></p>\n\n<p>```</p>\n\n<h1>example usage</h1>\n\n<pre><code>df = valid_dataset.df\ndf['predict'] = probability\nassert(np.all(df['image_name']==image_name))\ndf['age_approx'] = df.age_approx.fillna(0)\ndf = df.fillna('none')\n\ng = df.groupby('patient_id')\nfor k, v in g:\n    print(k)\n    d = g.get_group(k)\n    i = d.target.values.sum()\n    j = d.predict.values.sum()\n    html_file = html_dir + '/%d_%3.1f_%s.html' % (i,j, k)\n    make_predict_html(d, html_file)\n</code></pre>\n\n<p>```</p>",
      "rawMarkdown": "updated version to see both prediction and ground truth using color cells:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F113660%2F3365302feee9f87aee04ad657433d99c%2FSelection_045.png?generation=1591004224988005&amp;alt=media)\n\n```\n#example usage\n\n    df = valid_dataset.df\n    df['predict'] = probability\n    assert(np.all(df['image_name']==image_name))\n    df['age_approx'] = df.age_approx.fillna(0)\n    df = df.fillna('none')\n\n    g = df.groupby('patient_id')\n    for k, v in g:\n        print(k)\n        d = g.get_group(k)\n        i = d.target.values.sum()\n        j = d.predict.values.sum()\n        html_file = html_dir + '/%d_%3.1f_%s.html' % (i,j, k)\n        make_predict_html(d, html_file)\n```",
      "votes": 2
    },
    {
      "id": 871002,
      "postDate": "2020-06-02T04:49:34.153Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 870267,
      "postDate": "2020-06-01T15:41:23.587Z",
      "content": "<p>Great work Heng, thanks</p>",
      "rawMarkdown": "Great work Heng, thanks",
      "votes": 1
    }
  ],
  "comments": [
    {
      "id": 872072,
      "author_name": "AndréPacheco",
      "author_url": "",
      "post_date": "2020-06-02T21:54:07.243000",
      "content": "<p>Hi Heng,</p>\n\n<p>I was doing something similar. If someone wants to use it, you can find the code on my Github: <a href=\"https://github.com/paaatcha/ISIC2020-patient-view\">https://github.com/paaatcha/ISIC2020-patient-view</a>\nInstructions are in Readme.md</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F684838%2F05c301248c7572ce9b2537e445dfef3a%2Fscreenshot.png?generation=1591134791379736&amp;alt=media\" alt=\"\"></p>",
      "votes": 9,
      "replies": [
        {
          "id": 952568,
          "author_name": "Jaseem C K",
          "author_url": "",
          "post_date": "2020-07-31T03:53:14.640000",
          "content": "<p>Superb!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 869849,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2020-06-01T10:14:47.583000",
      "content": "<p>viewing the data reveals some images refer to the same mole but are of different rotations, viewpoint, etc</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F113660%2F58d7a87e500b57a057bc22c8dbb2ebe2%2FSelection_047.png?generation=1591006451567421&amp;alt=media\" alt=\"\"></p>\n\n<p>this explains why TTA should work and treating image as \"a group\" may help</p>",
      "votes": 6,
      "replies": []
    },
    {
      "id": 957654,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2020-08-04T13:21:45.917000",
      "content": "<p>hopefully, one day i can say:\n\"GPT-3 generate a web page that i can shows results ...\"</p>",
      "votes": 4,
      "replies": []
    },
    {
      "id": 952570,
      "author_name": "Jaseem C K",
      "author_url": "",
      "post_date": "2020-07-31T03:54:05.153000",
      "content": "<p>Cool. Something I was really in need of when I started.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 870925,
      "author_name": "Antra",
      "author_url": "",
      "post_date": "2020-06-02T03:16:52.953000",
      "content": "<p>Great work!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 870242,
      "author_name": "Vikas V Patil",
      "author_url": "",
      "post_date": "2020-06-01T15:25:05.577000",
      "content": "<p>Great work!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 869782,
      "author_name": "Nirjhar Roy",
      "author_url": "",
      "post_date": "2020-06-01T09:30:07.143000",
      "content": "<p>Wow ! . You never stop surprising :) .. This will be super useful to understand information for each patient.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 869761,
      "author_name": "Safiuddin Mohammad",
      "author_url": "",
      "post_date": "2020-06-01T09:14:36.180000",
      "content": "<p>Nice Work!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 903174,
      "author_name": "Redwan Sony",
      "author_url": "",
      "post_date": "2020-06-26T16:11:55.440000",
      "content": "<p>great tool, specially for medical image processing. :+1</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 869793,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2020-06-01T09:38:28.830000",
      "content": "<p>updated version to see both prediction and ground truth using color cells:\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F113660%2F3365302feee9f87aee04ad657433d99c%2FSelection_045.png?generation=1591004224988005&amp;alt=media\" alt=\"\"></p>\n\n<p>```</p>\n\n<h1>example usage</h1>\n\n<pre><code>df = valid_dataset.df\ndf['predict'] = probability\nassert(np.all(df['image_name']==image_name))\ndf['age_approx'] = df.age_approx.fillna(0)\ndf = df.fillna('none')\n\ng = df.groupby('patient_id')\nfor k, v in g:\n    print(k)\n    d = g.get_group(k)\n    i = d.target.values.sum()\n    j = d.predict.values.sum()\n    html_file = html_dir + '/%d_%3.1f_%s.html' % (i,j, k)\n    make_predict_html(d, html_file)\n</code></pre>\n\n<p>```</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 871002,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-06-02T04:49:34.153000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 870267,
      "author_name": "Chris Deotte",
      "author_url": "",
      "post_date": "2020-06-01T15:41:23.587000",
      "content": "<p>Great work Heng, thanks</p>",
      "votes": 1,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "869640": "i write a simple python code to generate html to view images per patient. here is it:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F113660%2Fae0247e50a460e97226a675ce458bea8%2FSelection_044.png?generation=1590995245694735&amp;alt=media)\n\n\nit would be useful to study the data or analyse results (just modify the code to add predict score in a new row), etc",
    "872072": "Hi Heng,\n\nI was doing something similar. If someone wants to use it, you can find the code on my Github: https://github.com/paaatcha/ISIC2020-patient-view\nInstructions are in Readme.md\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F684838%2F05c301248c7572ce9b2537e445dfef3a%2Fscreenshot.png?generation=1591134791379736&amp;alt=media)\n",
    "869849": "viewing the data reveals some images refer to the same mole but are of different rotations, viewpoint, etc\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F113660%2F58d7a87e500b57a057bc22c8dbb2ebe2%2FSelection_047.png?generation=1591006451567421&amp;alt=media)\n\nthis explains why TTA should work and treating image as \"a group\" may help",
    "957654": "hopefully, one day i can say:\n\"GPT-3 generate a web page that i can shows results ...\"",
    "952570": "Cool. Something I was really in need of when I started.",
    "870925": "Great work!",
    "870242": "Great work!\n",
    "869782": "Wow ! . You never stop surprising :) .. This will be super useful to understand information for each patient.",
    "869761": "Nice Work!",
    "903174": "great tool, specially for medical image processing. :+1",
    "869793": "updated version to see both prediction and ground truth using color cells:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F113660%2F3365302feee9f87aee04ad657433d99c%2FSelection_045.png?generation=1591004224988005&amp;alt=media)\n\n```\n#example usage\n\n    df = valid_dataset.df\n    df['predict'] = probability\n    assert(np.all(df['image_name']==image_name))\n    df['age_approx'] = df.age_approx.fillna(0)\n    df = df.fillna('none')\n\n    g = df.groupby('patient_id')\n    for k, v in g:\n        print(k)\n        d = g.get_group(k)\n        i = d.target.values.sum()\n        j = d.predict.values.sum()\n        html_file = html_dir + '/%d_%3.1f_%s.html' % (i,j, k)\n        make_predict_html(d, html_file)\n```",
    "871002": "",
    "870267": "Great work Heng, thanks"
  }
}