{
  "id": 473101,
  "title": "HMS- Fastai Pipeline",
  "url": "/competitions/hms-harmful-brain-activity-classification/discussion/473101",
  "author_name": "Sonu Jha",
  "post_date": "2024-02-03T13:06:37.091000",
  "votes": 3,
  "comment_count": 0,
  "views": 0,
  "content": "<h2>HMS - Harmful Brain Activity Classification</h2>\n<p><strong>AIM:</strong> Classify seizures and other patterns of harmful brain activity in critically ill patients<br>\n<strong>Provided Data</strong></p>\n<table>\n<thead>\n<tr>\n<th></th>\n<th>Name</th>\n<th>type</th>\n<th>Inside</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>example_figures</td>\n<td>folder</td>\n<td>Lots of pdf file</td>\n<td></td>\n</tr>\n<tr>\n<td>test_eegs</td>\n<td>folder</td>\n<td>1 parquet file</td>\n<td></td>\n</tr>\n<tr>\n<td>test_spectrograms</td>\n<td>folder</td>\n<td>1 parquet file</td>\n<td></td>\n</tr>\n<tr>\n<td>train_eegs</td>\n<td>folder</td>\n<td>info</td>\n<td></td>\n</tr>\n<tr>\n<td>train_spectrograms</td>\n<td>folder</td>\n<td>info</td>\n<td></td>\n</tr>\n<tr>\n<td>train.csv</td>\n<td>file</td>\n<td>Shape (106800, 19)</td>\n<td></td>\n</tr>\n<tr>\n<td><strong>train.csv</strong></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td><img src=\"https://github.com/phlex-ruby/phlex/assets/43055935/ae51e3d7-b0c1-4bee-a943-4f7a09528934\" alt=\"image\"></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td><strong>How To Solve</strong></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>This is an image classification problem with 5 Classes</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Input Image is in the parquet format.</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Classes are : 'Seizure', 'LPD', 'GPD', 'LRDA','GRDA', 'Other'</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>For the trial and baseline, the plan is to build something which works.</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>I'll build a simple image Classification pipeline and make a submission.</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td><strong>Data Prprocessing</strong></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>The train.df size is (106800, 19).</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<ol>\n<li>Will save all the parquet data to numpy data</li>\n<li>Will split the data by grouping the spectrogram_i to avoid data leacikage.</li>\n<li>Will split the data into train and valid with the split ration 80:20.</li>\n<li>Modify fastai datablock to handle .np data</li>\n<li>Create a fastai dataloader and train resnet34 for 3 epochs.<br>\n<strong>Observations</strong></li>\n<li>Trained resnet34 with 3 epochs accuracy is 69.</li>\n<li>Trained and valid loss is : 0.58 and 0.80.</li>\n<li>It performed way worse than expected, something is wrong with pipeline. LB Score: 1.14 <br>\nNotebook Link: <a href=\"https://www.kaggle.com/code/sonujha090/hms-hbac-fastai-starter/notebook\" target=\"_blank\">https://www.kaggle.com/code/sonujha090/hms-hbac-fastai-starter/notebook</a></li>\n</ol>",
  "messages": [
    {
      "id": 2634041,
      "postDate": "2024-02-03T13:06:37.090Z",
      "content": "<h2>HMS - Harmful Brain Activity Classification</h2>\n<p><strong>AIM:</strong> Classify seizures and other patterns of harmful brain activity in critically ill patients<br>\n<strong>Provided Data</strong></p>\n<table>\n<thead>\n<tr>\n<th></th>\n<th>Name</th>\n<th>type</th>\n<th>Inside</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>example_figures</td>\n<td>folder</td>\n<td>Lots of pdf file</td>\n<td></td>\n</tr>\n<tr>\n<td>test_eegs</td>\n<td>folder</td>\n<td>1 parquet file</td>\n<td></td>\n</tr>\n<tr>\n<td>test_spectrograms</td>\n<td>folder</td>\n<td>1 parquet file</td>\n<td></td>\n</tr>\n<tr>\n<td>train_eegs</td>\n<td>folder</td>\n<td>info</td>\n<td></td>\n</tr>\n<tr>\n<td>train_spectrograms</td>\n<td>folder</td>\n<td>info</td>\n<td></td>\n</tr>\n<tr>\n<td>train.csv</td>\n<td>file</td>\n<td>Shape (106800, 19)</td>\n<td></td>\n</tr>\n<tr>\n<td><strong>train.csv</strong></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td><img src=\"https://github.com/phlex-ruby/phlex/assets/43055935/ae51e3d7-b0c1-4bee-a943-4f7a09528934\" alt=\"image\"></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td><strong>How To Solve</strong></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>This is an image classification problem with 5 Classes</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Input Image is in the parquet format.</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Classes are : 'Seizure', 'LPD', 'GPD', 'LRDA','GRDA', 'Other'</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>For the trial and baseline, the plan is to build something which works.</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>I'll build a simple image Classification pipeline and make a submission.</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td><strong>Data Prprocessing</strong></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>The train.df size is (106800, 19).</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<ol>\n<li>Will save all the parquet data to numpy data</li>\n<li>Will split the data by grouping the spectrogram_i to avoid data leacikage.</li>\n<li>Will split the data into train and valid with the split ration 80:20.</li>\n<li>Modify fastai datablock to handle .np data</li>\n<li>Create a fastai dataloader and train resnet34 for 3 epochs.<br>\n<strong>Observations</strong></li>\n<li>Trained resnet34 with 3 epochs accuracy is 69.</li>\n<li>Trained and valid loss is : 0.58 and 0.80.</li>\n<li>It performed way worse than expected, something is wrong with pipeline. LB Score: 1.14 <br>\nNotebook Link: <a href=\"https://www.kaggle.com/code/sonujha090/hms-hbac-fastai-starter/notebook\" target=\"_blank\">https://www.kaggle.com/code/sonujha090/hms-hbac-fastai-starter/notebook</a></li>\n</ol>",
      "rawMarkdown": "\n##HMS - Harmful Brain Activity Classification\n\n**AIM:** Classify seizures and other patterns of harmful brain activity in critically ill patients\n\n**Provided Data**\n| | Name  | type   | Inside   |\n|-------------- | -------------- | -------------- |\n| example_figures    | folder     |  Lots of pdf file    |\n| test_eegs    |  folder    |  1 parquet file    |\n| test_spectrograms    |  folder    |  1 parquet file    |\n| train_eegs    |  folder    |  info    |\n| train_spectrograms    |  folder    |  info|\n| train.csv    |  file    | Shape (106800, 19)    |\n\n**train.csv**\n\n![image](https://github.com/phlex-ruby/phlex/assets/43055935/ae51e3d7-b0c1-4bee-a943-4f7a09528934)\n\n\n**How To Solve**\n\nThis is an image classification problem with 5 Classes\n\nInput Image is in the parquet format.\nClasses are : 'Seizure', 'LPD', 'GPD', 'LRDA','GRDA', 'Other'\n\nFor the trial and baseline, the plan is to build something which works.\nI'll build a simple image Classification pipeline and make a submission.\n\n**Data Prprocessing**\n\nThe train.df size is (106800, 19).\n\n1. Will save all the parquet data to numpy data\n2. Will split the data by grouping the spectrogram_i to avoid data leacikage.\n3. Will split the data into train and valid with the split ration 80:20.\n3. Modify fastai datablock to handle .np data\n5. Create a fastai dataloader and train resnet34 for 3 epochs.\n\n**Observations**\n1. Trained resnet34 with 3 epochs accuracy is 69.\n2. Trained and valid loss is : 0.58 and 0.80.\n3. It performed way worse than expected, something is wrong with pipeline. LB Score: 1.14 \n\nNotebook Link: https://www.kaggle.com/code/sonujha090/hms-hbac-fastai-starter/notebook",
      "votes": 3
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "2634041": "\n##HMS - Harmful Brain Activity Classification\n\n**AIM:** Classify seizures and other patterns of harmful brain activity in critically ill patients\n\n**Provided Data**\n| | Name  | type   | Inside   |\n|-------------- | -------------- | -------------- |\n| example_figures    | folder     |  Lots of pdf file    |\n| test_eegs    |  folder    |  1 parquet file    |\n| test_spectrograms    |  folder    |  1 parquet file    |\n| train_eegs    |  folder    |  info    |\n| train_spectrograms    |  folder    |  info|\n| train.csv    |  file    | Shape (106800, 19)    |\n\n**train.csv**\n\n![image](https://github.com/phlex-ruby/phlex/assets/43055935/ae51e3d7-b0c1-4bee-a943-4f7a09528934)\n\n\n**How To Solve**\n\nThis is an image classification problem with 5 Classes\n\nInput Image is in the parquet format.\nClasses are : 'Seizure', 'LPD', 'GPD', 'LRDA','GRDA', 'Other'\n\nFor the trial and baseline, the plan is to build something which works.\nI'll build a simple image Classification pipeline and make a submission.\n\n**Data Prprocessing**\n\nThe train.df size is (106800, 19).\n\n1. Will save all the parquet data to numpy data\n2. Will split the data by grouping the spectrogram_i to avoid data leacikage.\n3. Will split the data into train and valid with the split ration 80:20.\n3. Modify fastai datablock to handle .np data\n5. Create a fastai dataloader and train resnet34 for 3 epochs.\n\n**Observations**\n1. Trained resnet34 with 3 epochs accuracy is 69.\n2. Trained and valid loss is : 0.58 and 0.80.\n3. It performed way worse than expected, something is wrong with pipeline. LB Score: 1.14 \n\nNotebook Link: https://www.kaggle.com/code/sonujha090/hms-hbac-fastai-starter/notebook"
  }
}