{
  "id": 78109,
  "title": "A CNN classifier and a Metric Learning model,1st Place Solution ",
  "url": "/competitions/human-protein-atlas-image-classification/discussion/78109",
  "author_name": "bestfitting",
  "post_date": "2019-01-19T20:49:54.063000",
  "votes": 628,
  "comment_count": 244,
  "views": 0,
  "content": "<p>Congrats to all the winners, and thanks to the host and kaggle hosted such an interesting competetion.<br><br>\nI am sorry for late share, I have worked hard to prepare it in recent days,tried to verify my solution and to make sure it’s reproducible,stable,efficient as well as interpretative.</p>\n<p><strong>Overview</strong><br>\n<img src=\"https://bestfitting.github.io/kaggle/protein/images/001_pipeline.png\" alt=\"enter image description here\"><br>\n<strong>Challenges:</strong><br><br>\n<em>Extreme Imbalance,rare classes hard to train and predict but play an important role in the score.</em><br><br>\n<em>Data distribution is not consistent in train set,test set,and HPA v18 external data.</em><br><br>\n<em>The images are with high quality,but we must find a balance between model efficiency and accuracy.</em><br></p>\n<p><strong>Validation for CNNs:</strong><br><br>\nI split the val set according to <a href=\"https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/67819\" target=\"_blank\">https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/67819</a> great thanks to <a href=\"https://www.kaggle.com/trentb\" target=\"_blank\">@trentb</a></p>\n<p>I found Focal Loss of the whole val set is a relative good metric to the model capability, F1 is not a good metric as it’s sensitive to the threshold and the threshold is depend on the distribution of the train and val set.</p>\n<p>I tried to evaluate the capability of a model by set the ratio of each class to the same as train set. I did so because I thought I should not adjust the thresholds according to the public LB,but if I set the ratio of the prediction stable,and,if the model is stronger,the score will improve. That’s to say,I used public LB as another validation set.</p>\n<p><strong>Training Time Augmentations:</strong><br><br>\nRotate 90,flip and randomly crop 512x512 patches from 768x768 images(or crop 1024x1024 patches from 1536x1536 images)</p>\n<p><strong>Data Pre-Processing:</strong><br>\nRemove about 6000 duplicates samples from v18 external data, using hash method which been used to find test set leak.</p>\n<p>Calculate mean and std using train+test,and used them before feeding images to the model.</p>\n<p><strong>Model training:</strong><br><br>\n<strong>Optimizer</strong>:Adam<br><br>\n<strong>Scheduler</strong>:</p><pre>lr = 30e-5\nif epoch &gt; 25:\n    lr = 15e-5\nif epoch &gt; 30:\n    lr = 7.5e-5\nif epoch &gt; 35:\n    lr = 3e-5\nif epoch &gt; 40:\n    lr = 1e-5\n</pre><br>\n<strong>Loss Functions</strong>:FocalLoss+Lovasz,I did not use macro F1 soft loss, because the batch size is small and some classes are rare, I think it’s not suitable for this competition.I used lovasz loss function because I thought although the IOU and F1 are not the same,but it can balance the Recall and Precision to some extend.<p></p>\n<p><strong>I did not use oversample.</strong><br><br>\n<strong>Model structure:</strong><br>\nMy best model is a densenet121 model, which is very simple,the head of the model is almost same as public kernel <a href=\"https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb\" target=\"_blank\">https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb</a> by <a href=\"https://www.kaggle.com/iafoss\" target=\"_blank\">@iafoss</a>.</p>\n<pre>  (1): AdaptiveConcatPool2d(\n    (ap): AdaptiveAvgPool2d(output_size=(1, 1))\n    (mp): AdaptiveMaxPool2d(output_size=(1, 1))\n  )\n  (2): Flatten()\n  (3): BatchNorm1d(2048, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n  (4): Dropout(p=0.5)\n  (5): Linear(in_features=2048, out_features=1024, bias=True)\n  (6): ReLU()\n  (7): BatchNorm1d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n  (8): Dropout(p=0.5)\n  (9): Linear(in_features=1024, out_features=28, bias=True)\n</pre>\n<p>I tried all kinds of network structure according to the Multi-Label classification papers, the results were not improved instead of their beautiful structures and theory behind them.:) <br><br>\n<strong>Prediction time augmentations:</strong><br>\nI predicted the test set by using best focal loss epoch with 4 seeds to random crop 512x512 patches from 768x768 images, and got the max probs from the predictions. </p>\n<p><strong>Post-processing:</strong><br>\nAt the final stage of the competition, I decided to generate two submissions:<br>\n1.The first one was keep the ratio of the labels to the public test set,since we did not know the ratio of the rare classes,I set them to the ratio of the train set.<br>\n2.The second one was keep the ratio of the labels to the average ratio of train set and public test set.</p>\n<p>Why? Although I tried to add or reduce the count of rare classes by 2-5 samples,the public LB can improve, but this was a dangerous way.I just only used it to   evaluate the possible shakeup.<br>\n</p><hr><br>\nMetric Learning:<br>\nI took part in the landmark recognition challenge in May 2018,<a href=\"https://www.kaggle.com/c/landmark-recognition-challenge,and\" target=\"_blank\">https://www.kaggle.com/c/landmark-recognition-challenge,and</a> I had planed to use metric learning in that competition,but time was limited after I finished the TalkingData competition. But I read many  papers related,and did many experiments after that. <p></p>\n<p>When I analyzed the predictions of my models,I wanted to find the nearest samples to compare,I first used the features from CNN model,I found they are not so good,so I decided to try Metric Learning.</p>\n<p>I found it’s very hard to train in this competition,it took me a lot of time but the result was not so good,and I found the same algorithm can work very well in Whale identification competition,but I did not give up and finally found a good model in last two days.</p>\n<p>By using the model,I could find the nearest sample on validation set,<strong>the top1 accuracy &gt;0.9</strong><br>\nThese are the demo:<br><br>\nCorrect sample with single Label<br>\n<img src=\"https://bestfitting.github.io/kaggle/protein/images/002_Sample%20with%20single%20Label.jpg\" alt=\"\"><br>\nCorrect sample multiple labels<br>\n<img src=\"https://bestfitting.github.io/kaggle/protein/images/003_Sampe%20with%20multi%20labels.jpg\" alt=\"\"><br>\nCorrect sample with rare label:Lipid droplets<br>\n<img src=\"https://bestfitting.github.io/kaggle/protein/images/004_Rare%20Label_Lipid%20droplets.jpg\" alt=\"\"><br>\nCorrect sample with rare label:Rods &amp; rings<br>\n<img src=\"https://bestfitting.github.io/kaggle/protein/images/005_Rare%20Label_Rods%20%26%20rings.jpg\" alt=\"\"><br>\nMissed a label<br>\n<img src=\"https://bestfitting.github.io/kaggle/protein/images/006_Missed%20a%20label.jpg\" alt=\"\"><br>\nIncorrectly add a label<br>\n<img src=\"https://bestfitting.github.io/kaggle/protein/images/007_incorrectly%20add%20a%20label.jpg\" alt=\"\"></p>\n<p>Since the top1 accuracy&gt;0.9,I thought I could just use the metric learning result to set the labels of test set. But I found that the test set is a little different to V18, and some of samples can not find nearest neighbor in train set and V18. So I set a threshold and replace the labels with found sample’s. Fortunately,the threshold is not sensitive to the threshold. Replacing 1000 samples in test set is almost the same score as replacing 1300 samples. By doing so, my score can improve 0.03+,which was a huge improvement in this competition.</p>\n<p>I think my method is important not only improve the score,it can help HPA and their users in following way:<br><br>\n<em>1.When someone want to label or learn to label an image or check the quality, he can get the nearest images for referring to.<br>\n2.We can cluster the images by the metric and find the label noises and then improve the quality of the labels.<br>\n3.We can explain why the model is good by visualizing the predictions.<br></em></p>\n<p><strong>Ensemble:</strong><br>\nTo keep the solution simple,I don't discuss the ensemble here, a single model or even a single fold + metric learning result is good enough to get the first place.</p>\n<p><strong>The scores on LB:</strong><br>\n<img src=\"https://bestfitting.github.io/kaggle/protein/images/008_scores.png\" alt=\"\"><br>\n<br><br>\nI am sorry I can not describe the details of this part now, as I mentioned before,the whale identification competition is still on-going. </p>\n<p><strong>Introspection</strong>:<br>\nBefore I entered this competition,I never expected I can find a way out,it’s very hard to build a stable CV and the score is sensitive to the distribution of rare classes.A gold medal is my max expectation.<br><br>\nI feel kaggle competitions are becoming harder and harder.In all honesty,there are no secrets but hard work.I treat every competition as a force to push me forward.I force myself not to learn and use too much competition skills but knowledge to solve real problems.<br><br>\nIt’s quite lucky I found a relatively good solution in this competition as I failed to find a Reinforcement Learning algorithm in Track ML, and failed to finish a good CNN-RNN model in Quick Draw competition in time,but anyway,if we compete only for win,we may loss,if we compete for learning and providing useful solution to the host,nothing to loss.</p>\n<p><strong>Update,Metric Learning Part:</strong></p>\n<p>Sorry for late update!</p>\n<p>As I noticed that the sample with same antibody-id have almost same labels, so I thought I may treat the antibody-id as face id, and use face-recognition algorithms on HPA v18 dataset.</p>\n<p>When training, I used V18 data antibody IDs to split the samples,keep a sample in validation set,and put the other samples with same ID in train set.I used top1-acc as validation metric.</p>\n<p><strong>Metric Learning Model:</strong><br>\nNetwork:resnet50<br>\nAugmentations:Rotate 90,flip<br>\nLoss Functions:ArcFaceLoss<br>\nOptimizer:Adam<br>\nScheduler:lr = 10e-5, 50 epochs.</p>\n<p><strong>Model details:</strong></p>\n<pre>class ArcFaceLoss(nn.modules.Module):\n    def __init__(self,s=30.0,m=0.5):\n        super(ArcFaceLoss, self).__init__()\n        self.classify_loss = nn.CrossEntropyLoss()\n        self.s = s\n        self.easy_margin = False\n        self.cos_m = math.cos(m)\n        self.sin_m = math.sin(m)\n        self.th = math.cos(math.pi - m)\n        self.mm = math.sin(math.pi - m) * m\n\n    def forward(self, logits, labels, epoch=0):\n        cosine = logits\n        sine = torch.sqrt(1.0 - torch.pow(cosine, 2))\n        phi = cosine * self.cos_m - sine * self.sin_m\n        if self.easy_margin:\n            phi = torch.where(cosine &gt; 0, phi, cosine)\n        else:\n            phi = torch.where(cosine &gt; self.th, phi, cosine - self.mm)\n\n        one_hot = torch.zeros(cosine.size(), device='cuda')\n        one_hot.scatter_(1, labels.view(-1, 1).long(), 1)\n        # -------------torch.where(out_i = {x_i if condition_i else y_i) -------------\n        output = (one_hot * phi) + ((1.0 - one_hot) * cosine)\n        output *= self.s\n        loss1 = self.classify_loss(output, labels)\n        loss2 = self.classify_loss(cosine, labels)\n        gamma=1\n        loss=(loss1+gamma*loss2)/(1+gamma)\n        return loss\n\nclass ArcMarginProduct(nn.Module):\n    r\"\"\"Implement of large margin arc distance: :\n        Args:\n            in_features: size of each input sample\n            out_features: size of each output sample\n            s: norm of input feature\n            m: margin\n            cos(theta + m)\n        \"\"\"\n    def __init__(self, in_features, out_features):\n        super(ArcMarginProduct, self).__init__()\n        self.weight = Parameter(torch.FloatTensor(out_features, in_features))\n        # nn.init.xavier_uniform_(self.weight)\n        self.reset_parameters()\n\n    def reset_parameters(self):\n        stdv = 1. / math.sqrt(self.weight.size(1))\n        self.weight.data.uniform_(-stdv, stdv)\n\n    def forward(self, features):\n        cosine = F.linear(F.normalize(features), F.normalize(self.weight.cuda()))\n        return cosine\n\n def __init__(self,....\n     ... ...\n    self.avgpool = nn.AdaptiveAvgPool2d(1)\n    self.arc_margin_product=ArcMarginProduct(512, num_classes)\n    self.bn1 = nn.BatchNorm1d(1024 * self.EX)\n    self.fc1 = nn.Linear(1024 * self.EX, 512 * self.EX)\n    self.bn2 = nn.BatchNorm1d(512 * self.EX)\n    self.relu = nn.ReLU(inplace=True)\n    self.fc2 = nn.Linear(512 * self.EX, 512)\n    self.bn3 = nn.BatchNorm1d(512)\n\ndef forward(self, x):\n    ... ...\n    x = torch.cat((nn.AdaptiveAvgPool2d(1)(e5), nn.AdaptiveMaxPool2d(1)(e5)), dim=1)\n    x = x.view(x.size(0), -1)\n    x = self.bn1(x)\n    x = F.dropout(x, p=0.25)\n    x = self.fc1(x)\n    x = self.relu(x)\n    x = self.bn2(x)\n    x = F.dropout(x, p=0.5)\n\n    x = x.view(x.size(0), -1)\n\n    x = self.fc2(x)\n    feature = self.bn3(x)\n\n    cosine=self.arc_margin_product(feature)\n    if self.extract_feature:\n        return cosine, feature\n    else:\n        return cosine\n</pre>\n<p>Please refer to the paper:<br>\nArcFace: Additive Angular Margin Loss for Deep Face Recognition <br>\n<a href=\"https://arxiv.org/pdf/1801.07698v1.pdf\" target=\"_blank\">https://arxiv.org/pdf/1801.07698v1.pdf</a><br>\nDeep Face Recognition: A Survey    <br>\n<a href=\"https://arxiv.org/pdf/1804.06655.pdf\" target=\"_blank\">https://arxiv.org/pdf/1804.06655.pdf</a></p>\n<p>As I was very busy after this competition(and will be for a little long time),I used almost the same model finsihed the Whale competition and the winners' models are very good, so I think I need not write a summary of that competition. I the person re-idenfication related papers and solutions are good choice to Whale competition.</p>\n<p>Thanks for your patience! </p>",
  "messages": [
    {
      "id": 458525,
      "postDate": "2019-01-19T20:49:54.063Z",
      "content": "<p>Congrats to all the winners, and thanks to the host and kaggle hosted such an interesting competetion.<br><br>\nI am sorry for late share, I have worked hard to prepare it in recent days,tried to verify my solution and to make sure it’s reproducible,stable,efficient as well as interpretative.</p>\n<p><strong>Overview</strong><br>\n<img src=\"https://bestfitting.github.io/kaggle/protein/images/001_pipeline.png\" alt=\"enter image description here\"><br>\n<strong>Challenges:</strong><br><br>\n<em>Extreme Imbalance,rare classes hard to train and predict but play an important role in the score.</em><br><br>\n<em>Data distribution is not consistent in train set,test set,and HPA v18 external data.</em><br><br>\n<em>The images are with high quality,but we must find a balance between model efficiency and accuracy.</em><br></p>\n<p><strong>Validation for CNNs:</strong><br><br>\nI split the val set according to <a href=\"https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/67819\" target=\"_blank\">https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/67819</a> great thanks to <a href=\"https://www.kaggle.com/trentb\" target=\"_blank\">@trentb</a></p>\n<p>I found Focal Loss of the whole val set is a relative good metric to the model capability, F1 is not a good metric as it’s sensitive to the threshold and the threshold is depend on the distribution of the train and val set.</p>\n<p>I tried to evaluate the capability of a model by set the ratio of each class to the same as train set. I did so because I thought I should not adjust the thresholds according to the public LB,but if I set the ratio of the prediction stable,and,if the model is stronger,the score will improve. That’s to say,I used public LB as another validation set.</p>\n<p><strong>Training Time Augmentations:</strong><br><br>\nRotate 90,flip and randomly crop 512x512 patches from 768x768 images(or crop 1024x1024 patches from 1536x1536 images)</p>\n<p><strong>Data Pre-Processing:</strong><br>\nRemove about 6000 duplicates samples from v18 external data, using hash method which been used to find test set leak.</p>\n<p>Calculate mean and std using train+test,and used them before feeding images to the model.</p>\n<p><strong>Model training:</strong><br><br>\n<strong>Optimizer</strong>:Adam<br><br>\n<strong>Scheduler</strong>:</p><pre>lr = 30e-5\nif epoch &gt; 25:\n    lr = 15e-5\nif epoch &gt; 30:\n    lr = 7.5e-5\nif epoch &gt; 35:\n    lr = 3e-5\nif epoch &gt; 40:\n    lr = 1e-5\n</pre><br>\n<strong>Loss Functions</strong>:FocalLoss+Lovasz,I did not use macro F1 soft loss, because the batch size is small and some classes are rare, I think it’s not suitable for this competition.I used lovasz loss function because I thought although the IOU and F1 are not the same,but it can balance the Recall and Precision to some extend.<p></p>\n<p><strong>I did not use oversample.</strong><br><br>\n<strong>Model structure:</strong><br>\nMy best model is a densenet121 model, which is very simple,the head of the model is almost same as public kernel <a href=\"https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb\" target=\"_blank\">https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb</a> by <a href=\"https://www.kaggle.com/iafoss\" target=\"_blank\">@iafoss</a>.</p>\n<pre>  (1): AdaptiveConcatPool2d(\n    (ap): AdaptiveAvgPool2d(output_size=(1, 1))\n    (mp): AdaptiveMaxPool2d(output_size=(1, 1))\n  )\n  (2): Flatten()\n  (3): BatchNorm1d(2048, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n  (4): Dropout(p=0.5)\n  (5): Linear(in_features=2048, out_features=1024, bias=True)\n  (6): ReLU()\n  (7): BatchNorm1d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n  (8): Dropout(p=0.5)\n  (9): Linear(in_features=1024, out_features=28, bias=True)\n</pre>\n<p>I tried all kinds of network structure according to the Multi-Label classification papers, the results were not improved instead of their beautiful structures and theory behind them.:) <br><br>\n<strong>Prediction time augmentations:</strong><br>\nI predicted the test set by using best focal loss epoch with 4 seeds to random crop 512x512 patches from 768x768 images, and got the max probs from the predictions. </p>\n<p><strong>Post-processing:</strong><br>\nAt the final stage of the competition, I decided to generate two submissions:<br>\n1.The first one was keep the ratio of the labels to the public test set,since we did not know the ratio of the rare classes,I set them to the ratio of the train set.<br>\n2.The second one was keep the ratio of the labels to the average ratio of train set and public test set.</p>\n<p>Why? Although I tried to add or reduce the count of rare classes by 2-5 samples,the public LB can improve, but this was a dangerous way.I just only used it to   evaluate the possible shakeup.<br>\n</p><hr><br>\nMetric Learning:<br>\nI took part in the landmark recognition challenge in May 2018,<a href=\"https://www.kaggle.com/c/landmark-recognition-challenge,and\" target=\"_blank\">https://www.kaggle.com/c/landmark-recognition-challenge,and</a> I had planed to use metric learning in that competition,but time was limited after I finished the TalkingData competition. But I read many  papers related,and did many experiments after that. <p></p>\n<p>When I analyzed the predictions of my models,I wanted to find the nearest samples to compare,I first used the features from CNN model,I found they are not so good,so I decided to try Metric Learning.</p>\n<p>I found it’s very hard to train in this competition,it took me a lot of time but the result was not so good,and I found the same algorithm can work very well in Whale identification competition,but I did not give up and finally found a good model in last two days.</p>\n<p>By using the model,I could find the nearest sample on validation set,<strong>the top1 accuracy &gt;0.9</strong><br>\nThese are the demo:<br><br>\nCorrect sample with single Label<br>\n<img src=\"https://bestfitting.github.io/kaggle/protein/images/002_Sample%20with%20single%20Label.jpg\" alt=\"\"><br>\nCorrect sample multiple labels<br>\n<img src=\"https://bestfitting.github.io/kaggle/protein/images/003_Sampe%20with%20multi%20labels.jpg\" alt=\"\"><br>\nCorrect sample with rare label:Lipid droplets<br>\n<img src=\"https://bestfitting.github.io/kaggle/protein/images/004_Rare%20Label_Lipid%20droplets.jpg\" alt=\"\"><br>\nCorrect sample with rare label:Rods &amp; rings<br>\n<img src=\"https://bestfitting.github.io/kaggle/protein/images/005_Rare%20Label_Rods%20%26%20rings.jpg\" alt=\"\"><br>\nMissed a label<br>\n<img src=\"https://bestfitting.github.io/kaggle/protein/images/006_Missed%20a%20label.jpg\" alt=\"\"><br>\nIncorrectly add a label<br>\n<img src=\"https://bestfitting.github.io/kaggle/protein/images/007_incorrectly%20add%20a%20label.jpg\" alt=\"\"></p>\n<p>Since the top1 accuracy&gt;0.9,I thought I could just use the metric learning result to set the labels of test set. But I found that the test set is a little different to V18, and some of samples can not find nearest neighbor in train set and V18. So I set a threshold and replace the labels with found sample’s. Fortunately,the threshold is not sensitive to the threshold. Replacing 1000 samples in test set is almost the same score as replacing 1300 samples. By doing so, my score can improve 0.03+,which was a huge improvement in this competition.</p>\n<p>I think my method is important not only improve the score,it can help HPA and their users in following way:<br><br>\n<em>1.When someone want to label or learn to label an image or check the quality, he can get the nearest images for referring to.<br>\n2.We can cluster the images by the metric and find the label noises and then improve the quality of the labels.<br>\n3.We can explain why the model is good by visualizing the predictions.<br></em></p>\n<p><strong>Ensemble:</strong><br>\nTo keep the solution simple,I don't discuss the ensemble here, a single model or even a single fold + metric learning result is good enough to get the first place.</p>\n<p><strong>The scores on LB:</strong><br>\n<img src=\"https://bestfitting.github.io/kaggle/protein/images/008_scores.png\" alt=\"\"><br>\n<br><br>\nI am sorry I can not describe the details of this part now, as I mentioned before,the whale identification competition is still on-going. </p>\n<p><strong>Introspection</strong>:<br>\nBefore I entered this competition,I never expected I can find a way out,it’s very hard to build a stable CV and the score is sensitive to the distribution of rare classes.A gold medal is my max expectation.<br><br>\nI feel kaggle competitions are becoming harder and harder.In all honesty,there are no secrets but hard work.I treat every competition as a force to push me forward.I force myself not to learn and use too much competition skills but knowledge to solve real problems.<br><br>\nIt’s quite lucky I found a relatively good solution in this competition as I failed to find a Reinforcement Learning algorithm in Track ML, and failed to finish a good CNN-RNN model in Quick Draw competition in time,but anyway,if we compete only for win,we may loss,if we compete for learning and providing useful solution to the host,nothing to loss.</p>\n<p><strong>Update,Metric Learning Part:</strong></p>\n<p>Sorry for late update!</p>\n<p>As I noticed that the sample with same antibody-id have almost same labels, so I thought I may treat the antibody-id as face id, and use face-recognition algorithms on HPA v18 dataset.</p>\n<p>When training, I used V18 data antibody IDs to split the samples,keep a sample in validation set,and put the other samples with same ID in train set.I used top1-acc as validation metric.</p>\n<p><strong>Metric Learning Model:</strong><br>\nNetwork:resnet50<br>\nAugmentations:Rotate 90,flip<br>\nLoss Functions:ArcFaceLoss<br>\nOptimizer:Adam<br>\nScheduler:lr = 10e-5, 50 epochs.</p>\n<p><strong>Model details:</strong></p>\n<pre>class ArcFaceLoss(nn.modules.Module):\n    def __init__(self,s=30.0,m=0.5):\n        super(ArcFaceLoss, self).__init__()\n        self.classify_loss = nn.CrossEntropyLoss()\n        self.s = s\n        self.easy_margin = False\n        self.cos_m = math.cos(m)\n        self.sin_m = math.sin(m)\n        self.th = math.cos(math.pi - m)\n        self.mm = math.sin(math.pi - m) * m\n\n    def forward(self, logits, labels, epoch=0):\n        cosine = logits\n        sine = torch.sqrt(1.0 - torch.pow(cosine, 2))\n        phi = cosine * self.cos_m - sine * self.sin_m\n        if self.easy_margin:\n            phi = torch.where(cosine &gt; 0, phi, cosine)\n        else:\n            phi = torch.where(cosine &gt; self.th, phi, cosine - self.mm)\n\n        one_hot = torch.zeros(cosine.size(), device='cuda')\n        one_hot.scatter_(1, labels.view(-1, 1).long(), 1)\n        # -------------torch.where(out_i = {x_i if condition_i else y_i) -------------\n        output = (one_hot * phi) + ((1.0 - one_hot) * cosine)\n        output *= self.s\n        loss1 = self.classify_loss(output, labels)\n        loss2 = self.classify_loss(cosine, labels)\n        gamma=1\n        loss=(loss1+gamma*loss2)/(1+gamma)\n        return loss\n\nclass ArcMarginProduct(nn.Module):\n    r\"\"\"Implement of large margin arc distance: :\n        Args:\n            in_features: size of each input sample\n            out_features: size of each output sample\n            s: norm of input feature\n            m: margin\n            cos(theta + m)\n        \"\"\"\n    def __init__(self, in_features, out_features):\n        super(ArcMarginProduct, self).__init__()\n        self.weight = Parameter(torch.FloatTensor(out_features, in_features))\n        # nn.init.xavier_uniform_(self.weight)\n        self.reset_parameters()\n\n    def reset_parameters(self):\n        stdv = 1. / math.sqrt(self.weight.size(1))\n        self.weight.data.uniform_(-stdv, stdv)\n\n    def forward(self, features):\n        cosine = F.linear(F.normalize(features), F.normalize(self.weight.cuda()))\n        return cosine\n\n def __init__(self,....\n     ... ...\n    self.avgpool = nn.AdaptiveAvgPool2d(1)\n    self.arc_margin_product=ArcMarginProduct(512, num_classes)\n    self.bn1 = nn.BatchNorm1d(1024 * self.EX)\n    self.fc1 = nn.Linear(1024 * self.EX, 512 * self.EX)\n    self.bn2 = nn.BatchNorm1d(512 * self.EX)\n    self.relu = nn.ReLU(inplace=True)\n    self.fc2 = nn.Linear(512 * self.EX, 512)\n    self.bn3 = nn.BatchNorm1d(512)\n\ndef forward(self, x):\n    ... ...\n    x = torch.cat((nn.AdaptiveAvgPool2d(1)(e5), nn.AdaptiveMaxPool2d(1)(e5)), dim=1)\n    x = x.view(x.size(0), -1)\n    x = self.bn1(x)\n    x = F.dropout(x, p=0.25)\n    x = self.fc1(x)\n    x = self.relu(x)\n    x = self.bn2(x)\n    x = F.dropout(x, p=0.5)\n\n    x = x.view(x.size(0), -1)\n\n    x = self.fc2(x)\n    feature = self.bn3(x)\n\n    cosine=self.arc_margin_product(feature)\n    if self.extract_feature:\n        return cosine, feature\n    else:\n        return cosine\n</pre>\n<p>Please refer to the paper:<br>\nArcFace: Additive Angular Margin Loss for Deep Face Recognition <br>\n<a href=\"https://arxiv.org/pdf/1801.07698v1.pdf\" target=\"_blank\">https://arxiv.org/pdf/1801.07698v1.pdf</a><br>\nDeep Face Recognition: A Survey    <br>\n<a href=\"https://arxiv.org/pdf/1804.06655.pdf\" target=\"_blank\">https://arxiv.org/pdf/1804.06655.pdf</a></p>\n<p>As I was very busy after this competition(and will be for a little long time),I used almost the same model finsihed the Whale competition and the winners' models are very good, so I think I need not write a summary of that competition. I the person re-idenfication related papers and solutions are good choice to Whale competition.</p>\n<p>Thanks for your patience! </p>",
      "rawMarkdown": "Congrats to all the winners, and thanks to the host and kaggle hosted such an interesting competetion.<br>\nI am sorry for late share, I have worked hard to prepare it in recent days,tried to verify my solution and to make sure it’s reproducible,stable,efficient as well as interpretative.\n\n**Overview**\n![enter image description here][1]\n**Challenges:**<br>\n*Extreme Imbalance,rare classes hard to train and predict but play an important role in the score.*<br>\n*Data distribution is not consistent in train set,test set,and HPA v18 external data.*<br>\n*The images are with high quality,but we must find a balance between model efficiency and accuracy.*<br>\n\n**Validation for CNNs:**<br>\nI split the val set according to https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/67819 great thanks to @trentb\n\nI found Focal Loss of the whole val set is a relative good metric to the model capability, F1 is not a good metric as it’s sensitive to the threshold and the threshold is depend on the distribution of the train and val set.\n\nI tried to evaluate the capability of a model by set the ratio of each class to the same as train set. I did so because I thought I should not adjust the thresholds according to the public LB,but if I set the ratio of the prediction stable,and,if the model is stronger,the score will improve. That’s to say,I used public LB as another validation set.\n\n**Training Time Augmentations:**<br>\nRotate 90,flip and randomly crop 512x512 patches from 768x768 images(or crop 1024x1024 patches from 1536x1536 images)\n\n\n**Data Pre-Processing:**\nRemove about 6000 duplicates samples from v18 external data, using hash method which been used to find test set leak.\n\nCalculate mean and std using train+test,and used them before feeding images to the model.\n\n**Model training:**<br>\n**Optimizer**:Adam<br>\n**Scheduler**:<pre>lr = 30e-5\nif epoch &gt; 25:\n    lr = 15e-5\nif epoch &gt; 30:\n    lr = 7.5e-5\nif epoch &gt; 35:\n    lr = 3e-5\nif epoch &gt; 40:\n    lr = 1e-5\n</pre>\n**Loss Functions**:FocalLoss+Lovasz,I did not use macro F1 soft loss, because the batch size is small and some classes are rare, I think it’s not suitable for this competition.I used lovasz loss function because I thought although the IOU and F1 are not the same,but it can balance the Recall and Precision to some extend.\n\n**I did not use oversample.**<br>\n**Model structure:**\nMy best model is a densenet121 model, which is very simple,the head of the model is almost same as public kernel https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb by @iafoss.\n<pre>  (1): AdaptiveConcatPool2d(\n    (ap): AdaptiveAvgPool2d(output_size=(1, 1))\n    (mp): AdaptiveMaxPool2d(output_size=(1, 1))\n  )\n  (2): Flatten()\n  (3): BatchNorm1d(2048, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n  (4): Dropout(p=0.5)\n  (5): Linear(in_features=2048, out_features=1024, bias=True)\n  (6): ReLU()\n  (7): BatchNorm1d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n  (8): Dropout(p=0.5)\n  (9): Linear(in_features=1024, out_features=28, bias=True)\n</pre>\nI tried all kinds of network structure according to the Multi-Label classification papers, the results were not improved instead of their beautiful structures and theory behind them.:) <br>\n**Prediction time augmentations:**\nI predicted the test set by using best focal loss epoch with 4 seeds to random crop 512x512 patches from 768x768 images, and got the max probs from the predictions. \n\n**Post-processing:**\nAt the final stage of the competition, I decided to generate two submissions:\n1.The first one was keep the ratio of the labels to the public test set,since we did not know the ratio of the rare classes,I set them to the ratio of the train set.\n2.The second one was keep the ratio of the labels to the average ratio of train set and public test set.\n\nWhy? Although I tried to add or reduce the count of rare classes by 2-5 samples,the public LB can improve, but this was a dangerous way.I just only used it to   evaluate the possible shakeup.\n<hr>\nMetric Learning:\nI took part in the landmark recognition challenge in May 2018,https://www.kaggle.com/c/landmark-recognition-challenge,and I had planed to use metric learning in that competition,but time was limited after I finished the TalkingData competition. But I read many  papers related,and did many experiments after that. \n\nWhen I analyzed the predictions of my models,I wanted to find the nearest samples to compare,I first used the features from CNN model,I found they are not so good,so I decided to try Metric Learning.\n\nI found it’s very hard to train in this competition,it took me a lot of time but the result was not so good,and I found the same algorithm can work very well in Whale identification competition,but I did not give up and finally found a good model in last two days.\n\nBy using the model,I could find the nearest sample on validation set,**the top1 accuracy &gt;0.9**\nThese are the demo:<br>\nCorrect sample with single Label\n![][2]\nCorrect sample multiple labels\n![][3]\nCorrect sample with rare label:Lipid droplets\n![][4]\nCorrect sample with rare label:Rods &amp; rings\n![][5]\nMissed a label\n![][6]\nIncorrectly add a label\n![][7]\n\nSince the top1 accuracy&gt;0.9,I thought I could just use the metric learning result to set the labels of test set. But I found that the test set is a little different to V18, and some of samples can not find nearest neighbor in train set and V18. So I set a threshold and replace the labels with found sample’s. Fortunately,the threshold is not sensitive to the threshold. Replacing 1000 samples in test set is almost the same score as replacing 1300 samples. By doing so, my score can improve 0.03+,which was a huge improvement in this competition.\n\nI think my method is important not only improve the score,it can help HPA and their users in following way:<br>\n*1.When someone want to label or learn to label an image or check the quality, he can get the nearest images for referring to.<br>\n2.We can cluster the images by the metric and find the label noises and then improve the quality of the labels.<br>\n3.We can explain why the model is good by visualizing the predictions.<br>*\n\n**Ensemble:**\nTo keep the solution simple,I don't discuss the ensemble here, a single model or even a single fold + metric learning result is good enough to get the first place.\n\n**The scores on LB:**\n![][8]\n<br>\nI am sorry I can not describe the details of this part now, as I mentioned before,the whale identification competition is still on-going. \n\n\n**Introspection**:\nBefore I entered this competition,I never expected I can find a way out,it’s very hard to build a stable CV and the score is sensitive to the distribution of rare classes.A gold medal is my max expectation.<br>\nI feel kaggle competitions are becoming harder and harder.In all honesty,there are no secrets but hard work.I treat every competition as a force to push me forward.I force myself not to learn and use too much competition skills but knowledge to solve real problems.<br>\nIt’s quite lucky I found a relatively good solution in this competition as I failed to find a Reinforcement Learning algorithm in Track ML, and failed to finish a good CNN-RNN model in Quick Draw competition in time,but anyway,if we compete only for win,we may loss,if we compete for learning and providing useful solution to the host,nothing to loss.\n\n**Update,Metric Learning Part:**\n\nSorry for late update!\n\nAs I noticed that the sample with same antibody-id have almost same labels, so I thought I may treat the antibody-id as face id, and use face-recognition algorithms on HPA v18 dataset.\n\nWhen training, I used V18 data antibody IDs to split the samples,keep a sample in validation set,and put the other samples with same ID in train set.I used top1-acc as validation metric.\n\n**Metric Learning Model:**\nNetwork:resnet50\nAugmentations:Rotate 90,flip\nLoss Functions:ArcFaceLoss\nOptimizer:Adam\nScheduler:lr = 10e-5, 50 epochs.\n\n**Model details:**\n\n<pre>class ArcFaceLoss(nn.modules.Module):\n    def __init__(self,s=30.0,m=0.5):\n        super(ArcFaceLoss, self).__init__()\n        self.classify_loss = nn.CrossEntropyLoss()\n        self.s = s\n        self.easy_margin = False\n        self.cos_m = math.cos(m)\n        self.sin_m = math.sin(m)\n        self.th = math.cos(math.pi - m)\n        self.mm = math.sin(math.pi - m) * m\n\n    def forward(self, logits, labels, epoch=0):\n        cosine = logits\n        sine = torch.sqrt(1.0 - torch.pow(cosine, 2))\n        phi = cosine * self.cos_m - sine * self.sin_m\n        if self.easy_margin:\n            phi = torch.where(cosine &gt; 0, phi, cosine)\n        else:\n            phi = torch.where(cosine &gt; self.th, phi, cosine - self.mm)\n\n        one_hot = torch.zeros(cosine.size(), device='cuda')\n        one_hot.scatter_(1, labels.view(-1, 1).long(), 1)\n        # -------------torch.where(out_i = {x_i if condition_i else y_i) -------------\n        output = (one_hot * phi) + ((1.0 - one_hot) * cosine)\n        output *= self.s\n        loss1 = self.classify_loss(output, labels)\n        loss2 = self.classify_loss(cosine, labels)\n        gamma=1\n        loss=(loss1+gamma*loss2)/(1+gamma)\n        return loss\n\nclass ArcMarginProduct(nn.Module):\n    r\"\"\"Implement of large margin arc distance: :\n        Args:\n            in_features: size of each input sample\n            out_features: size of each output sample\n            s: norm of input feature\n            m: margin\n            cos(theta + m)\n        \"\"\"\n    def __init__(self, in_features, out_features):\n        super(ArcMarginProduct, self).__init__()\n        self.weight = Parameter(torch.FloatTensor(out_features, in_features))\n        # nn.init.xavier_uniform_(self.weight)\n        self.reset_parameters()\n\n    def reset_parameters(self):\n        stdv = 1. / math.sqrt(self.weight.size(1))\n        self.weight.data.uniform_(-stdv, stdv)\n\n    def forward(self, features):\n        cosine = F.linear(F.normalize(features), F.normalize(self.weight.cuda()))\n        return cosine\n\n def __init__(self,....\n \t... ...\n\tself.avgpool = nn.AdaptiveAvgPool2d(1)\n\tself.arc_margin_product=ArcMarginProduct(512, num_classes)\n\tself.bn1 = nn.BatchNorm1d(1024 * self.EX)\n\tself.fc1 = nn.Linear(1024 * self.EX, 512 * self.EX)\n\tself.bn2 = nn.BatchNorm1d(512 * self.EX)\n\tself.relu = nn.ReLU(inplace=True)\n\tself.fc2 = nn.Linear(512 * self.EX, 512)\n\tself.bn3 = nn.BatchNorm1d(512)\n\ndef forward(self, x):\n\t... ...\n\tx = torch.cat((nn.AdaptiveAvgPool2d(1)(e5), nn.AdaptiveMaxPool2d(1)(e5)), dim=1)\n\tx = x.view(x.size(0), -1)\n\tx = self.bn1(x)\n\tx = F.dropout(x, p=0.25)\n\tx = self.fc1(x)\n\tx = self.relu(x)\n\tx = self.bn2(x)\n\tx = F.dropout(x, p=0.5)\n\n\tx = x.view(x.size(0), -1)\n\n\tx = self.fc2(x)\n\tfeature = self.bn3(x)\n\n\tcosine=self.arc_margin_product(feature)\n\tif self.extract_feature:\n\t    return cosine, feature\n\telse:\n\t    return cosine\n</pre>\n\nPlease refer to the paper:\nArcFace: Additive Angular Margin Loss for Deep Face Recognition \nhttps://arxiv.org/pdf/1801.07698v1.pdf\nDeep Face Recognition: A Survey    \nhttps://arxiv.org/pdf/1804.06655.pdf\n\nAs I was very busy after this competition(and will be for a little long time),I used almost the same model finsihed the Whale competition and the winners' models are very good, so I think I need not write a summary of that competition. I the person re-idenfication related papers and solutions are good choice to Whale competition.\n\nThanks for your patience! \n\n\n  [1]: https://bestfitting.github.io/kaggle/protein/images/001_pipeline.png\n[2]:https://bestfitting.github.io/kaggle/protein/images/002_Sample%20with%20single%20Label.jpg\n[3]:https://bestfitting.github.io/kaggle/protein/images/003_Sampe%20with%20multi%20labels.jpg\n[4]:https://bestfitting.github.io/kaggle/protein/images/004_Rare%20Label_Lipid%20droplets.jpg\n[5]:https://bestfitting.github.io/kaggle/protein/images/005_Rare%20Label_Rods%20%26%20rings.jpg\n[6]:https://bestfitting.github.io/kaggle/protein/images/006_Missed%20a%20label.jpg\n[7]:https://bestfitting.github.io/kaggle/protein/images/007_incorrectly%20add%20a%20label.jpg\n[8]: https://bestfitting.github.io/kaggle/protein/images/008_scores.png\n",
      "votes": 628
    },
    {
      "id": 459759,
      "postDate": "2019-01-22T10:06:31.650Z",
      "content": "<p>Thanks for sharing, this shows that a rather simple, but well thought solution overcomes more complex ensembles.  </p>\n\n<blockquote>\n  <p>I feel kaggle competitions are becoming harder and harder.</p>\n</blockquote>\n\n<p>I guess many of us can relate to this!</p>",
      "rawMarkdown": "Thanks for sharing, this shows that a rather simple, but well thought solution overcomes more complex ensembles.  \n\n&gt; I feel kaggle competitions are becoming harder and harder.\n\nI guess many of us can relate to this!",
      "votes": 17
    },
    {
      "id": 538844,
      "postDate": "2019-05-29T07:14:57.777Z",
      "content": "<p>Congratulations on currently being first on Kaggle, your work is inspiring an entire Generation. Keep up the good work 💯 </p>",
      "rawMarkdown": "Congratulations on currently being first on Kaggle, your work is inspiring an entire Generation. Keep up the good work 💯 ",
      "votes": 4
    },
    {
      "id": 458547,
      "postDate": "2019-01-19T22:32:19.530Z",
      "content": "<p>Congratulations not only on the impressive result but on having the courage to try a new technique and then find a way to have it work so well! </p>\n\n<p>Appreciating that you are very busy, I wonder if you could take a minute to post a link towards any useful article you found to get started with understanding the metric learning approach?</p>",
      "rawMarkdown": "Congratulations not only on the impressive result but on having the courage to try a new technique and then find a way to have it work so well! \n\nAppreciating that you are very busy, I wonder if you could take a minute to post a link towards any useful article you found to get started with understanding the metric learning approach?",
      "votes": 5,
      "replies": [
        {
          "id": 458904,
          "postDate": "2019-01-20T19:25:37.107Z",
          "content": "<p>Hi,Tim,thank you!\nAndrew Ng's Deep Learning  Course on Coursera introduces Siamese network and Triplet Loss,I remember it's Part 4.2-4.5,it's a good start,although these can not ensure a good position in a competition related.\nSince you are interested in the metric learning,I invite you to the Whale identification challenge,you will find some kernels useful <a href=\"https://www.kaggle.com/c/humpback-whale-identification/kernels\">https://www.kaggle.com/c/humpback-whale-identification/kernels</a>. As I am busy recently,I did not read them carefully,but most upvoted ones are always useful.\nWhale competition is a suitable competition with not so many images,I think you can  get a very good understanding of  metric learning after a month and use it in a lot of scenarios.<br></p>",
          "rawMarkdown": "Hi,Tim,thank you!\nAndrew Ng's Deep Learning  Course on Coursera introduces Siamese network and Triplet Loss,I remember it's Part 4.2-4.5,it's a good start,although these can not ensure a good position in a competition related.\nSince you are interested in the metric learning,I invite you to the Whale identification challenge,you will find some kernels useful https://www.kaggle.com/c/humpback-whale-identification/kernels. As I am busy recently,I did not read them carefully,but most upvoted ones are always useful.\nWhale competition is a suitable competition with not so many images,I think you can  get a very good understanding of  metric learning after a month and use it in a lot of scenarios.<br>\n",
          "votes": 16
        },
        {
          "id": 458978,
          "postDate": "2019-01-21T00:00:28.233Z",
          "content": "<p>Thank you. You've refreshed my memory on Andrew Ng's excellent course.  </p>\n\n<p>I am just starting to look at the earthquake prediction challenge but might take your advice and look at the whale competition as well.</p>",
          "rawMarkdown": "Thank you. You've refreshed my memory on Andrew Ng's excellent course.  \n\nI am just starting to look at the earthquake prediction challenge but might take your advice and look at the whale competition as well."
        },
        {
          "id": 468346,
          "postDate": "2019-02-08T17:51:56.180Z",
          "content": "<p><a href=\"/bestfitting\">@bestfitting</a> Is it possible that you can share your data generator for metric learning? </p>",
          "rawMarkdown": "@bestfitting Is it possible that you can share your data generator for metric learning? "
        }
      ]
    },
    {
      "id": 820135,
      "postDate": "2020-04-25T07:09:20.013Z",
      "content": "<p>Thanks. This is a very helpful piece with good learning material for beginners.</p>",
      "rawMarkdown": "Thanks. This is a very helpful piece with good learning material for beginners.",
      "votes": 1
    },
    {
      "id": 792253,
      "postDate": "2020-03-31T02:59:46.177Z",
      "content": "<p>Really amazing</p>",
      "rawMarkdown": "Really amazing",
      "votes": 1
    },
    {
      "id": 539913,
      "postDate": "2019-05-30T17:42:27.343Z",
      "content": "<p>Excellent report, would be very helpful if top solution got reports with this quality, congrats!</p>",
      "rawMarkdown": "Excellent report, would be very helpful if top solution got reports with this quality, congrats!",
      "votes": 3
    },
    {
      "id": 508855,
      "postDate": "2019-04-06T22:09:52.123Z",
      "content": "<p>Hi Bestfitting, how did you do lovasz loss on label predictions instead of mask predictions? Thanks!</p>",
      "rawMarkdown": "Hi Bestfitting, how did you do lovasz loss on label predictions instead of mask predictions? Thanks!",
      "votes": 3,
      "replies": [
        {
          "id": 509028,
          "postDate": "2019-04-07T08:17:35.797Z",
          "content": "<p>I used lovasz loss to let the network balance the precision and recall.Since we use sigmoid and binary classification on every pixel on mask prediction tasks, we can treat 28 labels as 28 pixels and then we can use lovasz loss on it. </p>",
          "rawMarkdown": " I used lovasz loss to let the network balance the precision and recall.Since we use sigmoid and binary classification on every pixel on mask prediction tasks, we can treat 28 labels as 28 pixels and then we can use lovasz loss on it. ",
          "votes": 9
        },
        {
          "id": 510937,
          "postDate": "2019-04-09T16:13:39.530Z",
          "content": "<p>Thanks, it's amazing how this can work too!</p>",
          "rawMarkdown": "Thanks, it's amazing how this can work too!"
        }
      ]
    },
    {
      "id": 459954,
      "postDate": "2019-01-22T17:35:02.670Z",
      "content": "<p>Congratulations! Thank you for writing your solution. If I may ask you a few questions:</p>\n\n<ol>\n<li><p>I did not use oversample -- it did not improve the score or you did not go for it as the score was good enough?</p></li>\n<li><p>For metric learning:  did you use siamese or triple-net (like anchor-positive-negative) for this set?</p></li>\n<li><p><code>So I set a threshold and replace the labels with found sample’s. Fortunately, the threshold is not sensitive to the threshold.</code> -- This one I did not quite understand... could you please add more comments about setting threshold, and what you mean by threshold is not sensitive to the threshold?</p></li>\n</ol>\n\n<p>I am a newbie, sorry if some questions are stupid :)))</p>",
      "rawMarkdown": "Congratulations! Thank you for writing your solution. If I may ask you a few questions:\n\n1. I did not use oversample -- it did not improve the score or you did not go for it as the score was good enough?\n\n2. For metric learning:  did you use siamese or triple-net (like anchor-positive-negative) for this set?\n\n3. ```So I set a threshold and replace the labels with found sample’s. Fortunately, the threshold is not sensitive to the threshold.``` -- This one I did not quite understand... could you please add more comments about setting threshold, and what you mean by threshold is not sensitive to the threshold?\n\nI am a newbie, sorry if some questions are stupid :)))",
      "votes": 3,
      "replies": [
        {
          "id": 459980,
          "postDate": "2019-01-22T18:46:10.803Z",
          "content": "<p>1.According to my experiences, oversample by adding samples will change the probabilities of some classes, but will not change the model's capability a lot, the real problem is not the probabilities of a class in this competition, the problem is the order of them instead.But,I must say, I did not do experiments to verify it.  Perhaps I will use oversample in other competitions, for example, there is only one image of many categories in whale competition.And, oversample is time consuming.Competition is a series of decision in limited time and resources, we must try to select most promising methods.\n2.To keep whale challenge not be disturbed by my post,I think you can understand I can not say too much, there are so many clever kagglers here, it's unfair to those leading teams.(Perhaps I had said too much already)\n3.I must decide which samples be replaced, so I should set a distance, to say,0.35, if the distance&lt;0.35, then I replace the labels with found sample in V18. If I set the the threshold to 0.3, the score on LB does not change too much, we can say, it's not sensitive to the threshold.As I did not try to overfit to public LB when select the thresholds of CNN model, so I can say, my solution is not sensitive to thresholds in a whole.</p>",
          "rawMarkdown": "1.According to my experiences, oversample by adding samples will change the probabilities of some classes, but will not change the model's capability a lot, the real problem is not the probabilities of a class in this competition, the problem is the order of them instead.But,I must say, I did not do experiments to verify it.  Perhaps I will use oversample in other competitions, for example, there is only one image of many categories in whale competition.And, oversample is time consuming.Competition is a series of decision in limited time and resources, we must try to select most promising methods.\n2.To keep whale challenge not be disturbed by my post,I think you can understand I can not say too much, there are so many clever kagglers here, it's unfair to those leading teams.(Perhaps I had said too much already)\n3.I must decide which samples be replaced, so I should set a distance, to say,0.35, if the distance&lt;0.35, then I replace the labels with found sample in V18. If I set the the threshold to 0.3, the score on LB does not change too much, we can say, it's not sensitive to the threshold.As I did not try to overfit to public LB when select the thresholds of CNN model, so I can say, my solution is not sensitive to thresholds in a whole.\n\n",
          "votes": 7
        },
        {
          "id": 460113,
          "postDate": "2019-01-23T02:48:07.673Z",
          "content": "<p>i am so  proud of you <a href=\"/bestfitting\">@bestfitting</a>, learned too much from your open solution. Thanks .</p>",
          "rawMarkdown": "i am so  proud of you @bestfitting, learned too much from your open solution. Thanks ."
        },
        {
          "id": 483206,
          "postDate": "2019-03-04T10:08:12.597Z",
          "content": "<p>Hi, <a href=\"/bestfitting\">@bestfitting</a>, whales now are over. Would you mind to give full details now, please?</p>",
          "rawMarkdown": "Hi, @bestfitting, whales now are over. Would you mind to give full details now, please?",
          "votes": 1
        },
        {
          "id": 483217,
          "postDate": "2019-03-04T10:25:36.800Z",
          "content": "<p>Please please... </p>",
          "rawMarkdown": "Please please... "
        },
        {
          "id": 483419,
          "postDate": "2019-03-04T15:35:52.343Z",
          "content": "<p>Hi oldufo,moshel,\nThe quickest way to get details of my metric learning is read the <a href=\"https://www.kaggle.com/c/humpback-whale-identification/discussion/82484\">3rd place solution </a> from <a href=\"/pudae81\">@pudae81</a> of Whale competition, I am happy to find that it is quite similar to mine, but I missed the flip whale tricks.  I have been very busy with my everyday job recently,   I just used the same model structure, hyper-parameters, training  methods...in both competitions（This is not an excuse, I may not find those good tricks either, even if I had a lot of time) , I also found that many others' solutions are very good, I suggest you refer to those beautiful ones, when I have time, I will learn and experiment some of their great ideas, for example,  <a href=\"https://www.kaggle.com/c/humpback-whale-identification/discussion/82366\">The first place solution</a> from <a href=\"/qiaojian\">@qiaojian</a> is very creative on make full use of the data and design on loss function.</p>",
          "rawMarkdown": "Hi oldufo,moshel,\nThe quickest way to get details of my metric learning is read the [3rd place solution ](https://www.kaggle.com/c/humpback-whale-identification/discussion/82484) from @pudae81 of Whale competition, I am happy to find that it is quite similar to mine, but I missed the flip whale tricks.  I have been very busy with my everyday job recently,   I just used the same model structure, hyper-parameters, training  methods...in both competitions（This is not an excuse, I may not find those good tricks either, even if I had a lot of time) , I also found that many others' solutions are very good, I suggest you refer to those beautiful ones, when I have time, I will learn and experiment some of their great ideas, for example,  [The first place solution]( https://www.kaggle.com/c/humpback-whale-identification/discussion/82366 ) from @qiaojian is very creative on make full use of the data and design on loss function.\n\n\n",
          "votes": 4
        }
      ]
    },
    {
      "id": 459542,
      "postDate": "2019-01-22T00:37:11.080Z",
      "content": "<p>Congratulations on your win and thanks for sharing the solution. It's simple and elegant. Surely knowledge is more valuable than competition skills, and you have proved it many times. </p>",
      "rawMarkdown": "Congratulations on your win and thanks for sharing the solution. It's simple and elegant. Surely knowledge is more valuable than competition skills, and you have proved it many times. ",
      "votes": 3
    },
    {
      "id": 458586,
      "postDate": "2019-01-20T01:47:05.757Z",
      "content": "<p>Congratulations! This is a large margin win.\nI'v started working on the Whale competition too and hope to catch up with you.</p>",
      "rawMarkdown": "Congratulations! This is a large margin win.\nI'v started working on the Whale competition too and hope to catch up with you.",
      "votes": 3
    },
    {
      "id": 459151,
      "postDate": "2019-01-21T09:30:46.737Z",
      "content": "<p>Congrats Bestfitting for your consistent winning while being solo in many of competitions. Truly inspirational. </p>\n\n<p>And I praise your philosophy : learn and try to push things forward by testing new and efficient approaches, instead of solely competing for winning. </p>",
      "rawMarkdown": "Congrats Bestfitting for your consistent winning while being solo in many of competitions. Truly inspirational. \n\nAnd I praise your philosophy : learn and try to push things forward by testing new and efficient approaches, instead of solely competing for winning. ",
      "votes": 4
    },
    {
      "id": 458919,
      "postDate": "2019-01-20T20:04:59.113Z",
      "content": "<p><strong>if we compete only for win,we may loss,if we compete for learning and providing useful solution to the host,nothing to loss.</strong> I have not edited this but these are great words put together. Congratulations!!! </p>",
      "rawMarkdown": "**if we compete only for win,we may loss,if we compete for learning and providing useful solution to the host,nothing to loss.** I have not edited this but these are great words put together. Congratulations!!! ",
      "votes": 4
    },
    {
      "id": 474197,
      "postDate": "2019-02-19T04:10:36.100Z",
      "content": "<p>This is inspirational to many</p>",
      "rawMarkdown": "This is inspirational to many",
      "votes": 1
    },
    {
      "id": 471694,
      "postDate": "2019-02-14T19:03:01.797Z",
      "content": "<p>Thanks for the great writeup of an impressive solution! If you don't mind sharing, roughly  how many hours did you spend on this competition?</p>",
      "rawMarkdown": "Thanks for the great writeup of an impressive solution! If you don't mind sharing, roughly  how many hours did you spend on this competition?",
      "votes": 1,
      "replies": [
        {
          "id": 472761,
          "postDate": "2019-02-16T16:18:43.207Z",
          "content": "<p>I usually spend more time after I entered a competition,then do all kinds of experiments on server as automatically as possible,and then work hard in the last week of the competition,so my GPU server work all the time ,and I can finish other jobs or go out to run at the same time,and  I think if we want to get top 10, we all want to have as much time as possible :)  </p>",
          "rawMarkdown": "I usually spend more time after I entered a competition,then do all kinds of experiments on server as automatically as possible,and then work hard in the last week of the competition,so my GPU server work all the time ,and I can finish other jobs or go out to run at the same time,and  I think if we want to get top 10, we all want to have as much time as possible :)  ",
          "votes": 3
        }
      ]
    },
    {
      "id": 470744,
      "postDate": "2019-02-13T13:45:20.670Z",
      "content": "<p>Great work, Thanks for sharing <a href=\"/bestfitting\">@bestfitting</a></p>",
      "rawMarkdown": "Great work, Thanks for sharing @bestfitting",
      "votes": 1
    },
    {
      "id": 466124,
      "postDate": "2019-02-04T18:11:49.873Z",
      "content": "<p>This is so amazing and many thanks for sharing.  Could you let me know whether you will be interested in consulting/mentoring? Please send me a message if you do.  Thanks again!!</p>",
      "rawMarkdown": "This is so amazing and many thanks for sharing.  Could you let me know whether you will be interested in consulting/mentoring? Please send me a message if you do.  Thanks again!!",
      "votes": 1
    },
    {
      "id": 465962,
      "postDate": "2019-02-04T12:14:41.663Z",
      "content": "<p>Thank you for sharing this clear but enough detail solution.</p>",
      "rawMarkdown": "Thank you for sharing this clear but enough detail solution.",
      "votes": 1
    },
    {
      "id": 465833,
      "postDate": "2019-02-04T05:17:15.987Z",
      "content": "<p>Amazing read!!</p>",
      "rawMarkdown": "Amazing read!!",
      "votes": 1
    },
    {
      "id": 464438,
      "postDate": "2019-01-31T21:51:43.220Z",
      "content": "<p>Thank you for the approach! It really minds me.</p>",
      "rawMarkdown": "Thank you for the approach! It really minds me.",
      "votes": 1
    },
    {
      "id": 464174,
      "postDate": "2019-01-31T09:47:36.213Z",
      "content": "<p>Nice</p>",
      "rawMarkdown": "Nice",
      "votes": 1
    },
    {
      "id": 463982,
      "postDate": "2019-01-31T02:08:18.190Z",
      "content": "<p>Wonderful!!</p>",
      "rawMarkdown": "Wonderful!!",
      "votes": 1
    },
    {
      "id": 463290,
      "postDate": "2019-01-29T18:45:22.340Z",
      "content": "<p>Congratulations and thank your for sharing your approach!</p>",
      "rawMarkdown": "Congratulations and thank your for sharing your approach!",
      "votes": 1
    },
    {
      "id": 463247,
      "postDate": "2019-01-29T17:07:49.480Z",
      "content": "<p>erudite! _/_</p>",
      "rawMarkdown": "erudite! _/\\_",
      "votes": 1
    },
    {
      "id": 463131,
      "postDate": "2019-01-29T13:38:05.290Z",
      "content": "<p>hi best you are indeed the best..\nmay i request you  you to let me know how u download the tiff images from gcp  ,if you can post the script would be great. <a href=\"https://console.cloud.google.com/storage/browser/kaggle-human-protein-atlas\">https://console.cloud.google.com/storage/browser/kaggle-human-protein-atlas</a></p>",
      "rawMarkdown": "hi best you are indeed the best..\nmay i request you  you to let me know how u download the tiff images from gcp  ,if you can post the script would be great. https://console.cloud.google.com/storage/browser/kaggle-human-protein-atlas\n",
      "votes": 1
    },
    {
      "id": 463037,
      "postDate": "2019-01-29T09:42:29.563Z",
      "content": "<p>Thanks for sharing your experience with us!!!</p>",
      "rawMarkdown": "Thanks for sharing your experience with us!!!",
      "votes": 1
    },
    {
      "id": 462711,
      "postDate": "2019-01-28T18:48:33.807Z",
      "content": "<p>cool! :D</p>",
      "rawMarkdown": "cool! :D",
      "votes": 1
    },
    {
      "id": 462692,
      "postDate": "2019-01-28T18:17:31.517Z",
      "content": "<p>Amazing! Tnx for sharing!!!</p>",
      "rawMarkdown": "Amazing! Tnx for sharing!!!",
      "votes": 1
    },
    {
      "id": 462683,
      "postDate": "2019-01-28T18:13:37.857Z",
      "content": "<p>Congratulations and thank you for writing this - as someone newish to kaggle and ML competitions it's great to see what people doing well are doing. Even if you may not realise it, I learnt a lot from this and have plenty to go away and read!</p>\n\n<p>Also, thank you for the words at the end - it's good to know everyone finds it hard!! :)</p>",
      "rawMarkdown": "Congratulations and thank you for writing this - as someone newish to kaggle and ML competitions it's great to see what people doing well are doing. Even if you may not realise it, I learnt a lot from this and have plenty to go away and read!\n\nAlso, thank you for the words at the end - it's good to know everyone finds it hard!! :)",
      "votes": 1
    },
    {
      "id": 462595,
      "postDate": "2019-01-28T15:09:58.640Z",
      "content": "<p>Nice</p>",
      "rawMarkdown": "Nice",
      "votes": 1
    },
    {
      "id": 462421,
      "postDate": "2019-01-28T09:17:49.357Z",
      "content": "<p>it's so good</p>",
      "rawMarkdown": "it's so good",
      "votes": 1
    },
    {
      "id": 462316,
      "postDate": "2019-01-28T05:06:29.037Z",
      "content": "<p>Impressive. Thanks for sharing such a good solution! kudos! </p>",
      "rawMarkdown": "Impressive. Thanks for sharing such a good solution! kudos! ",
      "votes": 1
    },
    {
      "id": 462129,
      "postDate": "2019-01-27T18:31:25.383Z",
      "content": "<p>Congrats. Thanks for sharing this wonderful information.</p>",
      "rawMarkdown": "Congrats. Thanks for sharing this wonderful information.",
      "votes": 1
    },
    {
      "id": 462034,
      "postDate": "2019-01-27T14:24:16.980Z",
      "content": "<p>Great work!</p>",
      "rawMarkdown": "Great work!",
      "votes": 1
    },
    {
      "id": 462005,
      "postDate": "2019-01-27T12:48:35.050Z",
      "content": "<p>Great work!</p>",
      "rawMarkdown": "Great work!",
      "votes": 1
    },
    {
      "id": 461797,
      "postDate": "2019-01-27T02:48:37.460Z",
      "content": "<p>Awesome! Thx for ur sharing!</p>",
      "rawMarkdown": "Awesome! Thx for ur sharing!",
      "votes": 1
    },
    {
      "id": 461657,
      "postDate": "2019-01-26T16:41:31.117Z",
      "content": "<p>Great work!!!!</p>",
      "rawMarkdown": "Great work!!!!",
      "votes": 1
    },
    {
      "id": 461548,
      "postDate": "2019-01-26T10:13:00.017Z",
      "content": "<p>Congrats on the win! You're not only winning one competition after another, you are doing this consistently by large margins over other top Kagglers. Truly exceptional</p>",
      "rawMarkdown": "Congrats on the win! You're not only winning one competition after another, you are doing this consistently by large margins over other top Kagglers. Truly exceptional",
      "votes": 1
    },
    {
      "id": 461426,
      "postDate": "2019-01-26T01:44:22.957Z",
      "content": "<p>cool!</p>",
      "rawMarkdown": "cool!",
      "votes": 1
    },
    {
      "id": 461392,
      "postDate": "2019-01-25T22:32:29.417Z",
      "content": "<p>Great Work!! </p>",
      "rawMarkdown": "Great Work!! ",
      "votes": 1
    },
    {
      "id": 461075,
      "postDate": "2019-01-25T06:56:11.387Z",
      "content": "<p>great</p>",
      "rawMarkdown": "great",
      "votes": 1
    },
    {
      "id": 460794,
      "postDate": "2019-01-24T12:43:06.987Z",
      "content": "<p>amazing read!</p>",
      "rawMarkdown": "amazing read!",
      "votes": 1
    },
    {
      "id": 460729,
      "postDate": "2019-01-24T10:06:29.860Z",
      "content": "<p>Great!</p>",
      "rawMarkdown": "Great!",
      "votes": 1
    },
    {
      "id": 460716,
      "postDate": "2019-01-24T09:48:24.747Z",
      "content": "<p>I am really intrigued by the metric learning. Are you going to release some more details on the implementation after the humpback comp is over? </p>",
      "rawMarkdown": "I am really intrigued by the metric learning. Are you going to release some more details on the implementation after the humpback comp is over? ",
      "votes": 1
    },
    {
      "id": 460582,
      "postDate": "2019-01-24T02:44:54.827Z",
      "content": "<p>Really impressed by:</p>\n\n<blockquote>\n  <p>if we compete only for win,we may loss,if we compete for learning and\n  providing useful solution to the host,nothing to loss</p>\n</blockquote>\n\n<p>your metric learning pipeline is also a great idea, you deserve the best. </p>",
      "rawMarkdown": "Really impressed by:\n\n&gt; if we compete only for win,we may loss,if we compete for learning and\n&gt; providing useful solution to the host,nothing to loss\n\nyour metric learning pipeline is also a great idea, you deserve the best. \n",
      "votes": 1
    },
    {
      "id": 460380,
      "postDate": "2019-01-23T15:30:40.347Z",
      "content": "<p>Great work! I learn a lot from it! Thank you very much!</p>",
      "rawMarkdown": "Great work! I learn a lot from it! Thank you very much!",
      "votes": 1
    },
    {
      "id": 460323,
      "postDate": "2019-01-23T13:12:02.323Z",
      "content": "<p>nice work!</p>",
      "rawMarkdown": "nice work!",
      "votes": 1
    },
    {
      "id": 460322,
      "postDate": "2019-01-23T13:11:30.607Z",
      "content": "<p>great and impressed work!</p>",
      "rawMarkdown": "great and impressed work!",
      "votes": 1
    },
    {
      "id": 460320,
      "postDate": "2019-01-23T13:09:05.950Z",
      "content": "<p>nice work! </p>",
      "rawMarkdown": "nice work! ",
      "votes": 1
    },
    {
      "id": 460248,
      "postDate": "2019-01-23T09:34:26.843Z",
      "content": "<p>Thanks for sharing. For the first stage CNN models (before metric learning), how did you choose a threshold for the test predictions?</p>",
      "rawMarkdown": "Thanks for sharing. For the first stage CNN models (before metric learning), how did you choose a threshold for the test predictions?",
      "votes": 1,
      "replies": [
        {
          "id": 460491,
          "postDate": "2019-01-23T20:39:56.217Z",
          "content": "<p>Please refer to 'Post-processing' part of the solution,if select the threshold to make sure there are certain number of samples in a class.So I  have 28 thresholds.</p>",
          "rawMarkdown": "Please refer to 'Post-processing' part of the solution,if select the threshold to make sure there are certain number of samples in a class.So I  have 28 thresholds.",
          "votes": 3
        }
      ]
    },
    {
      "id": 460145,
      "postDate": "2019-01-23T04:46:39.597Z",
      "content": "<p>Magnific! :)\nThanks for share for us your approach.\nCongratulations!!</p>",
      "rawMarkdown": "Magnific! :)\nThanks for share for us your approach.\nCongratulations!!",
      "votes": 1
    },
    {
      "id": 460139,
      "postDate": "2019-01-23T04:23:48.537Z",
      "content": "<p>Hey Bestfitting,</p>\n\n<p>Any particular reason as for why DenseNet outperforms ResNet34 or InceptionResNet50 for that matter? I spent the entirety of the competition fine-tuning the aftermentioned networks. Needless to say, it was way off the charts. </p>\n\n<p>Could you tell me why d you choose the DenseNet? Also, for the sake of future competitions, how do I choose which model to train using transfer learning, what's the gist for model selection?</p>\n\n<p>Thanks for sharing your solution and yes, congratulations!</p>",
      "rawMarkdown": "Hey Bestfitting,\n\nAny particular reason as for why DenseNet outperforms ResNet34 or InceptionResNet50 for that matter? I spent the entirety of the competition fine-tuning the aftermentioned networks. Needless to say, it was way off the charts. \n\nCould you tell me why d you choose the DenseNet? Also, for the sake of future competitions, how do I choose which model to train using transfer learning, what's the gist for model selection?\n\nThanks for sharing your solution and yes, congratulations!",
      "votes": 1,
      "replies": [
        {
          "id": 460494,
          "postDate": "2019-01-23T20:48:42.767Z",
          "content": "<p>I usually start from a simple network,such us resnet 18, I do almost all the experiments on it. Then I will transfer the model structure and parameters,augmentations...to resnet 34 resnet 50. Then I will try densenet,inception v3 if time is enough.\nI like resnet, the result of resnet 50 is also good, but densenet is a little more better in this competition.\nAs to select model,if the dataset is large, I will choose large and deeper model,but I will start from resnet 18 resnet34 too.</p>",
          "rawMarkdown": "I usually start from a simple network,such us resnet 18, I do almost all the experiments on it. Then I will transfer the model structure and parameters,augmentations...to resnet 34 resnet 50. Then I will try densenet,inception v3 if time is enough.\nI like resnet, the result of resnet 50 is also good, but densenet is a little more better in this competition.\nAs to select model,if the dataset is large, I will choose large and deeper model,but I will start from resnet 18 resnet34 too.\n\n",
          "votes": 11
        },
        {
          "id": 460657,
          "postDate": "2019-01-24T07:08:16.993Z",
          "content": "<p>Very helpful. Thanks!</p>",
          "rawMarkdown": "Very helpful. Thanks!"
        }
      ]
    },
    {
      "id": 459862,
      "postDate": "2019-01-22T14:04:30.517Z",
      "content": "<p>Thanks for sharing!!!\nHow to find nearest samples between test and val?</p>",
      "rawMarkdown": "Thanks for sharing!!!\nHow to find nearest samples between test and val?",
      "votes": 1,
      "replies": [
        {
          "id": 459971,
          "postDate": "2019-01-22T18:15:47.037Z",
          "content": "<p>I trained a model to generate a vector for each sample(with RGBY 4 channels ),then calculate the distance between every val/test set sample and every train/V18 sample, and sort the distance, then I can get the nearest sample of each val/test sample.</p>",
          "rawMarkdown": "I trained a model to generate a vector for each sample(with RGBY 4 channels ),then calculate the distance between every val/test set sample and every train/V18 sample, and sort the distance, then I can get the nearest sample of each val/test sample.",
          "votes": 1
        }
      ]
    },
    {
      "id": 459764,
      "postDate": "2019-01-22T10:22:59.523Z",
      "content": "<p>Thanks for sharing! Did you used pretrained models (especially for your lr schedule)</p>",
      "rawMarkdown": "Thanks for sharing! Did you used pretrained models (especially for your lr schedule)",
      "votes": 1,
      "replies": [
        {
          "id": 459973,
          "postDate": "2019-01-22T18:20:39.823Z",
          "content": "<p>Yes, I used pre-trained model, the LR schedule is OK, I did not try too many other options, I pay more attention to the data and the train-val loss relationship usually.</p>",
          "rawMarkdown": "Yes, I used pre-trained model, the LR schedule is OK, I did not try too many other options, I pay more attention to the data and the train-val loss relationship usually.",
          "votes": 2
        },
        {
          "id": 460758,
          "postDate": "2019-01-24T11:25:35.443Z",
          "content": "<p>Thanks for the post, just a simple question since you standardize the data by scaling with mean and std of training+testing example, and also use a pretrained model. Do you scale the data again using the mean and std used for the images used to train the pretrained models?</p>",
          "rawMarkdown": "Thanks for the post, just a simple question since you standardize the data by scaling with mean and std of training+testing example, and also use a pretrained model. Do you scale the data again using the mean and std used for the images used to train the pretrained models?"
        },
        {
          "id": 460860,
          "postDate": "2019-01-24T15:00:41.807Z",
          "content": "<p>mmm then you use the schedule with all freezed except new top layers and after that unfreeze all with  lr=1e-5? I have doubts allways of how to do this and I cannot try a lot of configurations :( Thanks for your tips!</p>",
          "rawMarkdown": "mmm then you use the schedule with all freezed except new top layers and after that unfreeze all with  lr=1e-5? I have doubts allways of how to do this and I cannot try a lot of configurations :( Thanks for your tips!"
        }
      ]
    },
    {
      "id": 459703,
      "postDate": "2019-01-22T07:55:30.520Z",
      "content": "<p>Great work! I learn a lot from it! Thank you very much!</p>",
      "rawMarkdown": "Great work! I learn a lot from it! Thank you very much!",
      "votes": 1
    },
    {
      "id": 459668,
      "postDate": "2019-01-22T06:42:42.433Z",
      "content": "<p>Great works!! Quite impressive</p>",
      "rawMarkdown": "Great works!! Quite impressive",
      "votes": 1
    },
    {
      "id": 459289,
      "postDate": "2019-01-21T14:04:15.793Z",
      "content": "<p>Congratulations...</p>",
      "rawMarkdown": "Congratulations...",
      "votes": 1
    },
    {
      "id": 459246,
      "postDate": "2019-01-21T12:51:25.337Z",
      "content": "<p>Congratulations! </p>",
      "rawMarkdown": "Congratulations! ",
      "votes": 1
    },
    {
      "id": 459108,
      "postDate": "2019-01-21T07:37:26.433Z",
      "content": "<p>Congratulation for your success, bestfitting! Thanks for sharing.</p>",
      "rawMarkdown": "Congratulation for your success, bestfitting! Thanks for sharing.",
      "votes": 1
    },
    {
      "id": 459091,
      "postDate": "2019-01-21T06:40:31Z",
      "content": "<p>Sir\n Congratulations and thank you for sharing.</p>",
      "rawMarkdown": "Sir\n Congratulations and thank you for sharing.\n",
      "votes": 1
    },
    {
      "id": 458887,
      "postDate": "2019-01-20T18:23:11.680Z",
      "content": "<p>I am in awe. </p>\n\n<p>Thank you for these excellent insights. </p>\n\n<p>And thank you for not forgetting that despite all the effort and work expended here to improve machine learning, this is really all about human learning. </p>\n\n<p>Let’s keep improving together!</p>",
      "rawMarkdown": "I am in awe. \n\nThank you for these excellent insights. \n\nAnd thank you for not forgetting that despite all the effort and work expended here to improve machine learning, this is really all about human learning. \n\nLet’s keep improving together!",
      "votes": 1
    },
    {
      "id": 458825,
      "postDate": "2019-01-20T14:53:22.190Z",
      "content": "<p>Great Work !!!</p>",
      "rawMarkdown": "Great Work !!!",
      "votes": 1
    },
    {
      "id": 458792,
      "postDate": "2019-01-20T13:58:09.300Z",
      "content": "<p>Congratulations bestfitting for your amazing work, it's incredible all you did in such a short period of time. It's great to learn from you.</p>",
      "rawMarkdown": "Congratulations bestfitting for your amazing work, it's incredible all you did in such a short period of time. It's great to learn from you.",
      "votes": 1
    },
    {
      "id": 458597,
      "postDate": "2019-01-20T02:49:09.387Z",
      "content": "<p>Congrats and thanks for the motivation. Wish to see your solution after whale detection finished : )</p>",
      "rawMarkdown": "Congrats and thanks for the motivation. Wish to see your solution after whale detection finished : )",
      "votes": 1
    },
    {
      "id": 458560,
      "postDate": "2019-01-19T23:35:02.410Z",
      "content": "<p>Congratulations and thank you for sharing.</p>",
      "rawMarkdown": "Congratulations and thank you for sharing.",
      "votes": 1
    },
    {
      "id": 458541,
      "postDate": "2019-01-19T22:20:29.380Z",
      "content": "<p>Thank you for sharing your solution, and apologies for bringing up your name in the other horrible santa discussion. I hope you understand (unlike some of the people there) it was a counterexample.</p>\n\n<p>Looking forward to the metric learning!</p>",
      "rawMarkdown": "Thank you for sharing your solution, and apologies for bringing up your name in the other horrible santa discussion. I hope you understand (unlike some of the people there) it was a counterexample.\n\n\nLooking forward to the metric learning!",
      "votes": 1
    },
    {
      "id": 458533,
      "postDate": "2019-01-19T21:30:05.400Z",
      "content": "<p>\"if we compete for learning and providing useful solution to the host,nothing to loss.\"\nI agree with you.</p>",
      "rawMarkdown": "\"if we compete for learning and providing useful solution to the host,nothing to loss.\"\nI agree with you.",
      "votes": 1
    },
    {
      "id": 524144,
      "postDate": "2019-04-28T04:13:07.283Z",
      "content": "<p>Awesome! Congrats! I learned a lot from you and big thanks for your generous write-up.</p>",
      "rawMarkdown": "Awesome! Congrats! I learned a lot from you and big thanks for your generous write-up.",
      "votes": 2
    },
    {
      "id": 486393,
      "postDate": "2019-03-08T17:56:23.203Z",
      "content": "<p>Greate!</p>",
      "rawMarkdown": "Greate!",
      "votes": 2
    },
    {
      "id": 484869,
      "postDate": "2019-03-06T15:42:25.607Z",
      "content": "<p>Congratulations <a href=\"/bestfitting\">@bestfitting</a> , How much time you will spend after entering a competition?</p>",
      "rawMarkdown": "Congratulations @bestfitting , How much time you will spend after entering a competition?",
      "votes": 2,
      "replies": [
        {
          "id": 485181,
          "postDate": "2019-03-07T03:22:59.580Z",
          "content": "<p>It is case by case, it depend on the competition and the free time I have during a competition, I tried to do experiments automatically and re-use the source codes from previous competitions and github, so I can work or study at the same time. You can also refer my reply before. <a href=\"https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/78109#472761\">https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/78109#472761</a></p>",
          "rawMarkdown": "It is case by case, it depend on the competition and the free time I have during a competition, I tried to do experiments automatically and re-use the source codes from previous competitions and github, so I can work or study at the same time. You can also refer my reply before. https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/78109#472761\n",
          "votes": 10
        }
      ]
    },
    {
      "id": 478033,
      "postDate": "2019-02-25T16:26:22.520Z",
      "content": "<p>thnx</p>",
      "rawMarkdown": "thnx",
      "votes": 2
    },
    {
      "id": 474899,
      "postDate": "2019-02-20T00:46:43.713Z",
      "content": "<p>Great write up!!\nThanks..</p>\n\n<p>Did you use gradient accumulation for the large image sizes?\nIf yes, how did you handle the Batch Normalization for small batch sizes. I think gradient accumulation would be better with a custom BN, like group normalization or instance normalization especially for extremely low batch sizes.</p>\n\n<p>Here is an interesting blog post + paper on group normalization as an alternative to BN:\n<a href=\"https://medium.com/syncedreview/facebook-ai-proposes-group-normalization-alternative-to-batch-normalization-fb0699bffae7\">https://medium.com/syncedreview/facebook-ai-proposes-group-normalization-alternative-to-batch-normalization-fb0699bffae7</a></p>\n\n<p><a href=\"http://openaccess.thecvf.com/content_ECCV_2018/papers/Yuxin_Wu_Group_Normalization_ECCV_2018_paper.pdf\">http://openaccess.thecvf.com/content_ECCV_2018/papers/Yuxin_Wu_Group_Normalization_ECCV_2018_paper.pdf</a></p>",
      "rawMarkdown": "Great write up!!\nThanks..\n\nDid you use gradient accumulation for the large image sizes?\nIf yes, how did you handle the Batch Normalization for small batch sizes. I think gradient accumulation would be better with a custom BN, like group normalization or instance normalization especially for extremely low batch sizes.\n\nHere is an interesting blog post + paper on group normalization as an alternative to BN:\nhttps://medium.com/syncedreview/facebook-ai-proposes-group-normalization-alternative-to-batch-normalization-fb0699bffae7\n\nhttp://openaccess.thecvf.com/content_ECCV_2018/papers/Yuxin_Wu_Group_Normalization_ECCV_2018_paper.pdf",
      "votes": 2,
      "replies": [
        {
          "id": 475031,
          "postDate": "2019-02-20T06:34:55.307Z",
          "content": "<p>I used gradient accumulation in Carvana competition and tried in this one but it did not work</p>",
          "rawMarkdown": "I used gradient accumulation in Carvana competition and tried in this one but it did not work",
          "votes": 3
        },
        {
          "id": 475047,
          "postDate": "2019-02-20T06:50:28.180Z",
          "content": "<p>When you try gradient accumulation do you care to change Batch Normalization into Group Normalization or instance normalization ? \nand what is your lowest Batch size limit that you are trying?</p>",
          "rawMarkdown": "When you try gradient accumulation do you care to change Batch Normalization into Group Normalization or instance normalization ? \nand what is your lowest Batch size limit that you are trying?"
        },
        {
          "id": 476189,
          "postDate": "2019-02-21T18:23:43.300Z",
          "content": "<p>I remember I used Batch Normalization in Carvana Competition, I accumulated several iterations and then updated the parameters. And Since I have 4 GPUS on my server, when I trained my densenet121 model with image size of 1024,the batch_size is 36,it is big enough for use Batch Normalization.</p>",
          "rawMarkdown": "I remember I used Batch Normalization in Carvana Competition, I accumulated several iterations and then updated the parameters. And Since I have 4 GPUS on my server, when I trained my densenet121 model with image size of 1024,the batch_size is 36,it is big enough for use Batch Normalization.",
          "votes": 1
        },
        {
          "id": 476402,
          "postDate": "2019-02-22T04:43:47.927Z",
          "content": "<p><a href=\"/bestfitting\">@bestfitting</a>,\n    Prediction time augmentations:\n    I predicted the test set by using best focal loss epoch with 4 seeds to random crop 512x512 patches from 768x768 images, and got the max probs from the predictions.</p>\n\n<p>Did you use only the crops with max probability out of several crops inferenced with the same model? Or several crops with several folds? Did you just used max or votes between the crops? </p>",
          "rawMarkdown": "@bestfitting,\n    Prediction time augmentations:\n    I predicted the test set by using best focal loss epoch with 4 seeds to random crop 512x512 patches from 768x768 images, and got the max probs from the predictions.\n\nDid you use only the crops with max probability out of several crops inferenced with the same model? Or several crops with several folds? Did you just used max or votes between the crops? "
        },
        {
          "id": 476496,
          "postDate": "2019-02-22T08:44:44.217Z",
          "content": "<p>Same fold,several crops,max probability from the predictions.</p>",
          "rawMarkdown": "Same fold,several crops,max probability from the predictions."
        },
        {
          "id": 476567,
          "postDate": "2019-02-22T10:49:20.117Z",
          "content": "<p>Thanks and good luck with the whales! </p>",
          "rawMarkdown": "Thanks and good luck with the whales! ",
          "votes": 2
        }
      ]
    },
    {
      "id": 470628,
      "postDate": "2019-02-13T09:25:40.863Z",
      "content": "<p>can u share your kernel if u don't mind ????</p>",
      "rawMarkdown": "can u share your kernel if u don't mind ????",
      "votes": 2
    },
    {
      "id": 465709,
      "postDate": "2019-02-03T20:36:54.800Z",
      "content": "<p>Thanks for sharing! I didn't participate this competition but I am here for some inspirations. I am confused about the \"Post_Processing\" part after stage 1. You said you kept the ratio of each label to the public test set for one of your submissions. But how do you know the ratio for each label in the public test set before setting the threshold?</p>",
      "rawMarkdown": "Thanks for sharing! I didn't participate this competition but I am here for some inspirations. I am confused about the \"Post_Processing\" part after stage 1. You said you kept the ratio of each label to the public test set for one of your submissions. But how do you know the ratio for each label in the public test set before setting the threshold?",
      "votes": 2,
      "replies": [
        {
          "id": 465903,
          "postDate": "2019-02-04T09:44:13.093Z",
          "content": "<p>Hi, I referred to this link, :) \n<a href=\"https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/68678\">https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/68678</a></p>",
          "rawMarkdown": "Hi, I referred to this link, :) \nhttps://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/68678",
          "votes": 1
        }
      ]
    },
    {
      "id": 465516,
      "postDate": "2019-02-03T10:34:26.057Z",
      "content": "<p>Amazing job!!! Congratulations and many thanks to share it :-)</p>",
      "rawMarkdown": "Amazing job!!! Congratulations and many thanks to share it :-)",
      "votes": 2
    },
    {
      "id": 465232,
      "postDate": "2019-02-02T17:09:42.910Z",
      "content": "<p>Congrats <a href=\"/bestfitting\">@bestfitting</a> !</p>\n\n<p>Thanks a lot for sharing your solution.</p>\n\n<p>There were classes in the dataset, like Cytokinetic Bridges, which appeared in a very localized way, and only once or twice per image.</p>\n\n<p>How did you avoid that these regions of interest (bridges, etc.) were not taken off from the images by the random crops?</p>\n\n<p>I can figure out, that the max(probs) in TTA was enough to solve this problem to perform predictions... but didn't it make worse the training of such a unbalanced dataset?</p>",
      "rawMarkdown": "Congrats @bestfitting !\n\nThanks a lot for sharing your solution.\n\nThere were classes in the dataset, like Cytokinetic Bridges, which appeared in a very localized way, and only once or twice per image.\n\nHow did you avoid that these regions of interest (bridges, etc.) were not taken off from the images by the random crops?\n\nI can figure out, that the max(probs) in TTA was enough to solve this problem to perform predictions... but didn't it make worse the training of such a unbalanced dataset?",
      "votes": 2,
      "replies": [
        {
          "id": 465904,
          "postDate": "2019-02-04T09:49:49.770Z",
          "content": "<p>According to my experiments, this was a key augmentation to prevent overfitting to train set, anding some label noises is not harmful here. And to the test set, max probs can solve the problem of missing region of a target label.</p>",
          "rawMarkdown": "According to my experiments, this was a key augmentation to prevent overfitting to train set, anding some label noises is not harmful here. And to the test set, max probs can solve the problem of missing region of a target label.",
          "votes": 2
        },
        {
          "id": 467396,
          "postDate": "2019-02-07T02:40:23.683Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 467599,
          "postDate": "2019-02-07T11:57:43.027Z",
          "content": "<p>if the batch size is b, the results from 4 crops probs will be bx4x28, max(probs,1) will return bx28 vector, after applying thresholds on the result, we can get labels for each sample.</p>",
          "rawMarkdown": "if the batch size is b, the results from 4 crops probs will be bx4x28, max(probs,1) will return bx28 vector, after applying thresholds on the result, we can get labels for each sample."
        },
        {
          "id": 467910,
          "postDate": "2019-02-08T00:07:36.363Z",
          "rawMarkdown": "",
          "isDeleted": true
        }
      ]
    },
    {
      "id": 462548,
      "postDate": "2019-01-28T13:38:08.280Z",
      "content": "<p>Great Work</p>",
      "rawMarkdown": "Great Work",
      "votes": 2
    },
    {
      "id": 462287,
      "postDate": "2019-01-28T03:49:35.410Z",
      "content": "<p>Brilliant , and I admire you humbleness above all.\n\"It’s quite lucky I found a relatively good solution in this competition\"</p>",
      "rawMarkdown": "Brilliant , and I admire you humbleness above all.\n\"It’s quite lucky I found a relatively good solution in this competition\"\n",
      "votes": 2
    },
    {
      "id": 462218,
      "postDate": "2019-01-27T22:23:16.250Z",
      "content": "<p>Nice man, nice!</p>",
      "rawMarkdown": "Nice man, nice!",
      "votes": 2
    },
    {
      "id": 458959,
      "postDate": "2019-01-20T22:28:56.313Z",
      "content": "<p>Congrats on the win! You're not only winning one competition after another, you are doing this consistently by large margins over other top Kagglers. Truly exceptional</p>",
      "rawMarkdown": "Congrats on the win! You're not only winning one competition after another, you are doing this consistently by large margins over other top Kagglers. Truly exceptional",
      "votes": 2
    },
    {
      "id": 458750,
      "postDate": "2019-01-20T12:38:15.480Z",
      "content": "<p>Congratulations!</p>",
      "rawMarkdown": "Congratulations!",
      "votes": 2
    },
    {
      "id": 458630,
      "postDate": "2019-01-20T05:11:10.797Z",
      "content": "<p>This was amazing, Looking Forward to the metric learning.</p>",
      "rawMarkdown": "This was amazing, Looking Forward to the metric learning.",
      "votes": 2
    },
    {
      "id": 458610,
      "postDate": "2019-01-20T03:31:56.603Z",
      "content": "<p>Congratulations on the win! This is such an elegant solution, and you are truly the best of the best.</p>",
      "rawMarkdown": "Congratulations on the win! This is such an elegant solution, and you are truly the best of the best.",
      "votes": 2
    },
    {
      "id": 592537,
      "postDate": "2019-08-05T12:57:29.330Z",
      "content": "<p>why don't have angone use tensorflow.slim to solve this classification problem?\nI am a newbie, sorry if some questions are stupid :)))</p>",
      "rawMarkdown": "why don't have angone use tensorflow.slim to solve this classification problem?\nI am a newbie, sorry if some questions are stupid :)))",
      "votes": -2
    },
    {
      "id": 2562544,
      "postDate": "2023-12-15T14:04:14.190Z",
      "content": "<p>The concept that simpler organisms can be more fit is often related to evolutionary biology. In some cases, simpler organisms may have advantages in terms of energy efficiency, adaptability, and reproductive strategies, allowing them to thrive in certain environments<br>\nThe parallel between using neural networks in biology and the phenomenon of simple organisms thriving is captivating. In the intricate landscape of cell image classification, the elegance of simple neural network models mirrors the adaptability and efficiency seen in less complex life forms. Just as nature often favors simplicity for survival, these streamlined models prove to be formidable predictors in deciphering the intricacies of biological data. It's a testament to the notion that, in both artificial and natural realms, simplicity can wield a surprising and powerful influence, unlocking insights into the complexities of life on both micro and macro scales.</p>",
      "rawMarkdown": " The concept that simpler organisms can be more fit is often related to evolutionary biology. In some cases, simpler organisms may have advantages in terms of energy efficiency, adaptability, and reproductive strategies, allowing them to thrive in certain environments\n\nThe parallel between using neural networks in biology and the phenomenon of simple organisms thriving is captivating. In the intricate landscape of cell image classification, the elegance of simple neural network models mirrors the adaptability and efficiency seen in less complex life forms. Just as nature often favors simplicity for survival, these streamlined models prove to be formidable predictors in deciphering the intricacies of biological data. It's a testament to the notion that, in both artificial and natural realms, simplicity can wield a surprising and powerful influence, unlocking insights into the complexities of life on both micro and macro scales.\n"
    },
    {
      "id": 2241693,
      "postDate": "2023-05-01T18:02:46.873Z",
      "content": "<p>coolio. Lots of amazing ideas, love it.</p>",
      "rawMarkdown": "coolio. Lots of amazing ideas, love it."
    },
    {
      "id": 2238665,
      "postDate": "2023-04-28T17:56:25.897Z",
      "content": "<p>Thanks for sharing the detail approach.got to learn about several useful ideas.</p>",
      "rawMarkdown": "Thanks for sharing the detail approach.got to learn about several useful ideas."
    },
    {
      "id": 1910181,
      "postDate": "2022-08-23T08:25:56.857Z",
      "content": "<p>thankyou sir</p>",
      "rawMarkdown": "thankyou sir"
    },
    {
      "id": 1367632,
      "postDate": "2021-06-28T01:16:21.030Z",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/bestfitting\" target=\"_blank\">@bestfitting</a>,<br>\nI know, I know, this is old but I have run into a similar problem in a project and when trying to implement the metric learning, I realised its a tad complicated with multilabel. The whale competition is multiclass so perfect for contrastive or arcface loss but this competition was multi-label, so how did you define the distances/contrast? I found that if you define every combination of labels as class, the network is a bit perplexed by the overlap. Did you use triplet or only a pair?</p>",
      "rawMarkdown": "Hi @bestfitting,\nI know, I know, this is old but I have run into a similar problem in a project and when trying to implement the metric learning, I realised its a tad complicated with multilabel. The whale competition is multiclass so perfect for contrastive or arcface loss but this competition was multi-label, so how did you define the distances/contrast? I found that if you define every combination of labels as class, the network is a bit perplexed by the overlap. Did you use triplet or only a pair?",
      "replies": [
        {
          "id": 1368926,
          "postDate": "2021-06-29T03:10:04.807Z",
          "content": "<p>Ah found an answer below. Antibody ID was the \"class\". </p>",
          "rawMarkdown": "Ah found an answer below. Antibody ID was the \"class\". ",
          "votes": 1,
          "replies": [
            {
              "id": 1398556,
              "postDate": "2021-07-24T09:26:11.267Z",
              "content": "<blockquote>\n  <p>Ah found an answer below. Antibody ID was the \"class\".</p>\n</blockquote>\n<p>Hi, Just wondering if you can help me here.<br>\nIsn't it that even if antibody ID is a class for this problem, it is still same as having every combination of labels as one class. Please correct me if I am wrong. Thanks</p>",
              "rawMarkdown": "> Ah found an answer below. Antibody ID was the \"class\".\n\nHi, Just wondering if you can help me here.\nIsn't it that even if antibody ID is a class for this problem, it is still same as having every combination of labels as one class. Please correct me if I am wrong. Thanks\n\n"
            }
          ]
        },
        {
          "id": 1398612,
          "postDate": "2021-07-24T10:29:17.897Z",
          "content": "<p>Not exactly. Every antibody represents a combination but they are a tiny subset of all the combinations. Hope this is clear, let me know if it's not. </p>",
          "rawMarkdown": "Not exactly. Every antibody represents a combination but they are a tiny subset of all the combinations. Hope this is clear, let me know if it's not. "
        },
        {
          "id": 1398638,
          "postDate": "2021-07-24T10:59:30.643Z",
          "content": "<p>Thank you so much for your reply. <br>\nSo does that mean that the two or more different label combinations may have same Antibody Id?<br>\nBtw just wondering from where can I  obtain these antibody Ids?</p>",
          "rawMarkdown": "Thank you so much for your reply. \nSo does that mean that the two or more different label combinations may have same Antibody Id?\nBtw just wondering from where can I  obtain these antibody Ids?"
        },
        {
          "id": 1398699,
          "postDate": "2021-07-24T12:09:09.253Z",
          "content": "<p>It means that there are many combinations that do not antibody id because they just don't apoear in the body. Its like names. Nit every combination of letters is a valud name. Bestfitting mention where he got it from in one of his replies. I am on the phone so awkward to search. Let me know if you can't find it. </p>",
          "rawMarkdown": "It means that there are many combinations that do not antibody id because they just don't apoear in the body. Its like names. Nit every combination of letters is a valud name. Bestfitting mention where he got it from in one of his replies. I am on the phone so awkward to search. Let me know if you can't find it. ",
          "votes": 1
        },
        {
          "id": 1399541,
          "postDate": "2021-07-25T12:26:50.780Z",
          "content": "<p>I spotted his reply. thanks for the help</p>",
          "rawMarkdown": "I spotted his reply. thanks for the help"
        }
      ]
    },
    {
      "id": 1330670,
      "postDate": "2021-06-01T03:40:56.650Z",
      "content": "<p>great work</p>",
      "rawMarkdown": "great work"
    },
    {
      "id": 1330668,
      "postDate": "2021-06-01T03:40:44.843Z",
      "content": "<p>great work!</p>",
      "rawMarkdown": "great work!"
    },
    {
      "id": 1316943,
      "postDate": "2021-05-21T03:43:42.740Z",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/bestfitting\" target=\"_blank\">@bestfitting</a> , Thanks for this write up</p>\n<p>I was wondering if your work process or results of this project would have been better if you had more GPU's on your system ?</p>",
      "rawMarkdown": "Hi @bestfitting , Thanks for this write up\n\nI was wondering if your work process or results of this project would have been better if you had more GPU's on your system ?"
    },
    {
      "id": 1201902,
      "postDate": "2021-02-15T18:19:59.523Z",
      "content": "<p><a href=\"https://www.kaggle.com/bestfitting\" target=\"_blank\">@bestfitting</a> Amazing work. its clean work especially code part.</p>",
      "rawMarkdown": "@bestfitting Amazing work. its clean work especially code part."
    },
    {
      "id": 1200453,
      "postDate": "2021-02-14T17:18:56.280Z",
      "content": "<p>Real Stuff thanks for sharing this material.</p>",
      "rawMarkdown": "Real Stuff thanks for sharing this material."
    },
    {
      "id": 964060,
      "postDate": "2020-08-09T14:59:09.060Z",
      "content": "<p>the data is greater than 17GB . how do i unzip it? (windows is showing about 10 hours)</p>",
      "rawMarkdown": "the data is greater than 17GB . how do i unzip it? (windows is showing about 10 hours)",
      "replies": [
        {
          "id": 1013877,
          "postDate": "2020-09-17T03:24:08.687Z",
          "content": "<p>I got the same problem. I used google colab but it always have unzip readfile error</p>",
          "rawMarkdown": "I got the same problem. I used google colab but it always have unzip readfile error"
        }
      ]
    },
    {
      "id": 919055,
      "postDate": "2020-07-07T17:23:11.233Z",
      "content": "<p>Hi <a href=\"/bestfitting\">@bestfitting</a> can you please share your implementation?</p>",
      "rawMarkdown": "Hi @bestfitting can you please share your implementation?"
    },
    {
      "id": 896340,
      "postDate": "2020-06-22T05:06:49.850Z",
      "content": "<p>Congratulations!</p>",
      "rawMarkdown": "Congratulations!\n\n"
    },
    {
      "id": 863943,
      "postDate": "2020-05-27T16:56:28.410Z",
      "content": "<p>Great Thanks a lot for valuable information.</p>",
      "rawMarkdown": "Great Thanks a lot for valuable information."
    },
    {
      "id": 741340,
      "postDate": "2020-02-10T14:02:37.317Z",
      "content": "<p>Hi <a href=\"/bestfitting\">@bestfitting</a>, your work is nice and thank you for sharing. I'm new to this field and I feel a bit confused about why there is no method using traditional machine learning techniques like SVM for feature selection, since I read some papers regarding protein subcellular localization prediction which use SVM. </p>",
      "rawMarkdown": "Hi @bestfitting, your work is nice and thank you for sharing. I'm new to this field and I feel a bit confused about why there is no method using traditional machine learning techniques like SVM for feature selection, since I read some papers regarding protein subcellular localization prediction which use SVM. "
    },
    {
      "id": 676029,
      "postDate": "2019-11-18T22:58:35.167Z",
      "content": "<p>Hi <a href=\"/bestfitting\">@bestfitting</a>\nCongratulations on your win.\nI was wondering how many crops you did per image? And why not resize instead of crop?\nI was also wondering about what research papers you tried that didn't actually work.\nYou said you split your validation set using stratification but I thought that stratification was for building train and test sets.\nThanks </p>",
      "rawMarkdown": "Hi @bestfitting\nCongratulations on your win.\nI was wondering how many crops you did per image? And why not resize instead of crop?\nI was also wondering about what research papers you tried that didn't actually work.\nYou said you split your validation set using stratification but I thought that stratification was for building train and test sets.\nThanks ",
      "replies": [
        {
          "id": 691496,
          "postDate": "2019-12-10T07:51:57.043Z",
          "content": "<p>Sorry for late reply.</p>\n\n<p><strong>I was wondering how many crops you did per image? And why not resize instead of crop?</strong>\nI randomly cropped during training and predicting, using cropping instead of resizing was to adding diversity of the data, and this step was similar to the process of the images were captured, I guess.</p>\n\n<p><strong>I was also wondering about what research papers you tried that didn't actually work.</strong>\nI read a lot of papers about multi-label classification, but it not work in this one since most of them were on image-net. This task was a little challenging.</p>\n\n<p><strong>You said you split your validation set using stratification but I thought that stratification was for building train and test sets.</strong>\nYes, it's for building train and test sets.</p>",
          "rawMarkdown": "Sorry for late reply.\n\n**I was wondering how many crops you did per image? And why not resize instead of crop?**\nI randomly cropped during training and predicting, using cropping instead of resizing was to adding diversity of the data, and this step was similar to the process of the images were captured, I guess.\n\n**I was also wondering about what research papers you tried that didn't actually work.**\nI read a lot of papers about multi-label classification, but it not work in this one since most of them were on image-net. This task was a little challenging.\n\n**You said you split your validation set using stratification but I thought that stratification was for building train and test sets.**\nYes, it's for building train and test sets.",
          "votes": 1
        }
      ]
    },
    {
      "id": 632983,
      "postDate": "2019-09-24T09:33:50.123Z",
      "content": "<p>Good solution!</p>",
      "rawMarkdown": "Good solution!"
    },
    {
      "id": 589339,
      "postDate": "2019-07-31T19:11:50.150Z",
      "content": "<p>amazed!</p>",
      "rawMarkdown": "amazed!"
    },
    {
      "id": 560973,
      "postDate": "2019-06-26T02:09:04.477Z",
      "content": "<p>wonderful job!</p>",
      "rawMarkdown": "wonderful job!"
    },
    {
      "id": 491113,
      "postDate": "2019-03-15T08:02:27.763Z",
      "content": "<p>Thank you for sharing your ideas!</p>\n\n<p>How did you get antibody-IDs for samples?</p>",
      "rawMarkdown": "Thank you for sharing your ideas!\n\nHow did you get antibody-IDs for samples?",
      "replies": [
        {
          "id": 494881,
          "postDate": "2019-03-20T10:54:02.333Z",
          "content": "<p>HPA website provided the all the information needed.</p>",
          "rawMarkdown": "HPA website provided the all the information needed.",
          "votes": 1
        }
      ]
    },
    {
      "id": 490869,
      "postDate": "2019-03-14T23:46:14.727Z",
      "content": "<p><a href=\"/bestfitting\">@bestfitting</a>, another question about the head... I have never seen something like the AdaptiveConcatPool2d part that concats max and avg (might be that I am just too newbie). Is it to let the model figure out by itself which one (or part of) the pooling systems to use?\nI know you are busy, no rush. Just curious</p>",
      "rawMarkdown": "@bestfitting, another question about the head... I have never seen something like the AdaptiveConcatPool2d part that concats max and avg (might be that I am just too newbie). Is it to let the model figure out by itself which one (or part of) the pooling systems to use?\nI know you are busy, no rush. Just curious",
      "replies": [
        {
          "id": 494433,
          "postDate": "2019-03-19T20:31:10.357Z",
          "content": "<p>if you can just point me in the right direction.... I have failed to find any reference to this head.</p>",
          "rawMarkdown": "if you can just point me in the right direction.... I have failed to find any reference to this head."
        },
        {
          "id": 494583,
          "postDate": "2019-03-20T02:47:52.637Z",
          "content": "<p>Hi,this is a  common practice when we want to pool the feature map to feed to fc layers, as you can find in CBAM related paper, as Max and AVG are both important signals retrieved by the network.</p>",
          "rawMarkdown": "Hi,this is a  common practice when we want to pool the feature map to feed to fc layers, as you can find in CBAM related paper, as Max and AVG are both important signals retrieved by the network.",
          "votes": 1
        },
        {
          "id": 494671,
          "postDate": "2019-03-20T05:24:01.430Z",
          "content": "<p>Thank you!</p>",
          "rawMarkdown": "Thank you!"
        },
        {
          "id": 494678,
          "postDate": "2019-03-20T05:39:51.680Z",
          "content": "<p>hi best thanks for your detailed input above...\nI am able to make use of the above layers and score 88-89 in Hump back competition.size 324\n1) What more could be needed to reach above 90 and come in top 10 scores.?\nThanks for your help till now..\n<a href=\"https://www.kaggle.com/jaideepvalani/arcface-humpback-customhead-fastai/output?scriptVersionId=11803461\">https://www.kaggle.com/jaideepvalani/arcface-humpback-customhead-fastai/output?scriptVersionId=11803461</a></p>",
          "rawMarkdown": "hi best thanks for your detailed input above...\nI am able to make use of the above layers and score 88-89 in Hump back competition.size 324\n1) What more could be needed to reach above 90 and come in top 10 scores.?\nThanks for your help till now..\nhttps://www.kaggle.com/jaideepvalani/arcface-humpback-customhead-fastai/output?scriptVersionId=11803461\n\n\n\n"
        },
        {
          "id": 494778,
          "postDate": "2019-03-20T08:55:54.290Z",
          "content": "<p>1.Heavy augmentation, please refer to winners' source code.\n2.512x256 size may help.</p>",
          "rawMarkdown": "1.Heavy augmentation, please refer to winners' source code.\n2.512x256 size may help."
        },
        {
          "id": 505430,
          "postDate": "2019-04-02T02:19:02.437Z",
          "content": "<p>meaning more in height and less in width ... images get compressed in length.frame gets some thing like this,less in width\n ....\n|....|</p>",
          "rawMarkdown": "meaning more in height and less in width ... images get compressed in length.frame gets some thing like this,less in width\n ....\n|....|"
        },
        {
          "id": 509650,
          "postDate": "2019-04-08T05:00:48.843Z",
          "content": "<p>hi best..\nif you could have look at above query..\nyou mentioned using size of 512 *256 would be more useful.. it would result into a image that is more in height like the two line belows and less in width .\n||</p>",
          "rawMarkdown": "hi best..\nif you could have look at above query..\nyou mentioned using size of 512 *256 would be more useful.. it would result into a image that is more in height like the two line belows and less in width .\n||"
        },
        {
          "id": 510577,
          "postDate": "2019-04-09T08:43:15.927Z",
          "content": "<p>512x256 means width=512 height=256. Please refer to codes of the top solutions of whale competition.</p>",
          "rawMarkdown": "512x256 means width=512 height=256. Please refer to codes of the top solutions of whale competition."
        }
      ]
    },
    {
      "id": 461807,
      "postDate": "2019-01-27T03:21:08.397Z",
      "content": "<p>I am trying to use focal loss but its seems to be converging really really slowly. I have 4.4 after 5 epochs. wat did you use as gamma and alpha? (I used 2 and 0.25)</p>",
      "rawMarkdown": "I am trying to use focal loss but its seems to be converging really really slowly. I have 4.4 after 5 epochs. wat did you use as gamma and alpha? (I used 2 and 0.25)",
      "replies": [
        {
          "id": 462058,
          "postDate": "2019-01-27T15:15:10.447Z",
          "content": "<p>If I use FocalLoss, the model converge rapidly, the only problem is overfit to train set, so I added crop augment and 512x512 image size, I paste focal loss code I used here for you reference.</p>\n\n<pre>class FocalLoss(nn.Module):\n    def __init__(self, gamma=2):\n        super().__init__()\n        self.gamma = gamma\n\n    def forward(self, logit, target):\n        target = target.float()\n        max_val = (-logit).clamp(min=0)\n        loss = logit - logit * target + max_val + \\\n               ((-max_val).exp() + (-logit - max_val).exp()).log()\n\n        invprobs = F.logsigmoid(-logit * (target * 2.0 - 1.0))\n        loss = (invprobs * self.gamma).exp() * loss\n        if len(loss.size())==2:\n            loss = loss.sum(dim=1)\n        return loss.mean()\n</pre>",
          "rawMarkdown": "If I use FocalLoss, the model converge rapidly, the only problem is overfit to train set, so I added crop augment and 512x512 image size, I paste focal loss code I used here for you reference.\n<pre>class FocalLoss(nn.Module):\n    def __init__(self, gamma=2):\n        super().__init__()\n        self.gamma = gamma\n\n    def forward(self, logit, target):\n        target = target.float()\n        max_val = (-logit).clamp(min=0)\n        loss = logit - logit * target + max_val + \\\n               ((-max_val).exp() + (-logit - max_val).exp()).log()\n\n        invprobs = F.logsigmoid(-logit * (target * 2.0 - 1.0))\n        loss = (invprobs * self.gamma).exp() * loss\n        if len(loss.size())==2:\n            loss = loss.sum(dim=1)\n        return loss.mean()\n</pre>",
          "votes": 6
        },
        {
          "id": 462185,
          "postDate": "2019-01-27T20:33:10.613Z",
          "content": "<p>Thank you. I should really switch to pytorch. It seems that everyone else has moved to it. In keras it looks very different, i'll try to map it and see where the problem is.</p>\n\n<pre><code>def focal_loss(gamma=2., alpha=.25):\n  def focal_loss_fixed(y_true, y_pred):\n    pt_1 = tf.where(tf.equal(y_true, 1), y_pred, tf.ones_like(y_pred))\n    pt_0 = tf.where(tf.equal(y_true, 0), y_pred, tf.zeros_like(y_pred))\n\n    pt_1 = K.clip(pt_1, 1e-3, .999)\n    pt_0 = K.clip(pt_0, 1e-3, .999)\n\n    return -K.sum(alpha * K.pow(1. - pt_1, gamma) * K.log(pt_1))-K.sum((1-alpha) * K.pow( pt_0, gamma) * \nK.log(1. - pt_0))\nreturn focal_loss_fixed\n</code></pre>",
          "rawMarkdown": "Thank you. I should really switch to pytorch. It seems that everyone else has moved to it. In keras it looks very different, i'll try to map it and see where the problem is.\n\n    def focal_loss(gamma=2., alpha=.25):\n      def focal_loss_fixed(y_true, y_pred):\n        pt_1 = tf.where(tf.equal(y_true, 1), y_pred, tf.ones_like(y_pred))\n        pt_0 = tf.where(tf.equal(y_true, 0), y_pred, tf.zeros_like(y_pred))\n    \n        pt_1 = K.clip(pt_1, 1e-3, .999)\n        pt_0 = K.clip(pt_0, 1e-3, .999)\n    \n        return -K.sum(alpha * K.pow(1. - pt_1, gamma) * K.log(pt_1))-K.sum((1-alpha) * K.pow( pt_0, gamma) * \n    K.log(1. - pt_0))\n    return focal_loss_fixed\n",
          "votes": 1
        },
        {
          "id": 463063,
          "postDate": "2019-01-29T10:40:18.230Z",
          "content": "<p>EDIT: Not sure this works as intended. It converges superfast, like the loss is 0.05 after seeing 100 batches so something must be wrong here</p>\n\n<p>just if anyone is interested, this focal loss works like <a href=\"/bestfitting\">@bestfitting</a>'s one. Its from Chengwei Zhang's web site, dlology.com which is worth reading... it does converge much much too fast. </p>\n\n<pre><code>def focal_loss(gamma=2., alpha=4.):\n\n    gamma = float(gamma)\n    alpha = float(alpha)\n\n    def focal_loss_fixed(y_true, y_pred):\n        epsilon = 1.e-9\n        y_true = tf.convert_to_tensor(y_true, tf.float32)\n        y_pred = tf.convert_to_tensor(y_pred, tf.float32)\n\n        model_out = tf.add(y_pred, epsilon)\n        ce = tf.multiply(y_true, -tf.log(model_out))\n        weight = tf.multiply(y_true, tf.pow(tf.subtract(1., model_out), gamma))\n        fl = tf.multiply(alpha, tf.multiply(weight, ce))\n        reduced_fl = tf.reduce_max(fl, axis=1)\n        return tf.reduce_mean(reduced_fl)\n    return focal_loss_fixed\n</code></pre>",
          "rawMarkdown": "EDIT: Not sure this works as intended. It converges superfast, like the loss is 0.05 after seeing 100 batches so something must be wrong here\n\njust if anyone is interested, this focal loss works like @bestfitting's one. Its from Chengwei Zhang's web site, dlology.com which is worth reading... it does converge much much too fast. \n\n    def focal_loss(gamma=2., alpha=4.):\n\n        gamma = float(gamma)\n        alpha = float(alpha)\n\n        def focal_loss_fixed(y_true, y_pred):\n            epsilon = 1.e-9\n            y_true = tf.convert_to_tensor(y_true, tf.float32)\n            y_pred = tf.convert_to_tensor(y_pred, tf.float32)\n\n            model_out = tf.add(y_pred, epsilon)\n            ce = tf.multiply(y_true, -tf.log(model_out))\n            weight = tf.multiply(y_true, tf.pow(tf.subtract(1., model_out), gamma))\n            fl = tf.multiply(alpha, tf.multiply(weight, ce))\n            reduced_fl = tf.reduce_max(fl, axis=1)\n            return tf.reduce_mean(reduced_fl)\n        return focal_loss_fixed\n\n",
          "votes": 2
        },
        {
          "id": 463135,
          "postDate": "2019-01-29T13:43:19.400Z",
          "content": "<p>hi best you are indeed the best..\nmay i request you you to let me know how u downloaded the tiff images from gcp ,if you can post the script would be great.\n <a href=\"https://console.cloud.google.com/storage/browser/kaggle-human-protein-atlas\">https://console.cloud.google.com/storage/browser/kaggle-human-protein-atlas</a></p>",
          "rawMarkdown": "hi best you are indeed the best..\nmay i request you you to let me know how u downloaded the tiff images from gcp ,if you can post the script would be great.\n https://console.cloud.google.com/storage/browser/kaggle-human-protein-atlas"
        },
        {
          "id": 463315,
          "postDate": "2019-01-29T19:43:30.167Z",
          "content": "<p>I downloaded the zip files from the link in data page of this competition,it is same as your link.</p>",
          "rawMarkdown": "I downloaded the zip files from the link in data page of this competition,it is same as your link."
        },
        {
          "id": 463648,
          "postDate": "2019-01-30T11:15:39.467Z",
          "content": "<p>is there a single command or we have to use some script ... if you can post the same thanks in advance..</p>",
          "rawMarkdown": "is there a single command or we have to use some script ... if you can post the same thanks in advance.."
        },
        {
          "id": 465906,
          "postDate": "2019-02-04T09:51:35.937Z",
          "content": "<p>Perhaps I did not get you question correctly, the zip file containing tiff files can download directly using the links above.</p>",
          "rawMarkdown": "Perhaps I did not get you question correctly, the zip file containing tiff files can download directly using the links above.",
          "votes": 1
        },
        {
          "id": 469669,
          "postDate": "2019-02-11T16:28:35.453Z",
          "content": "<p>the reason i asked,i dont have fast internet to download huge data directly and dont have much space in gcp . ,so i was hoping download it via gcp command prompt and reshape it on fly to save the space . Like the way we are doing with hpa... </p>",
          "rawMarkdown": "the reason i asked,i dont have fast internet to download huge data directly and dont have much space in gcp . ,so i was hoping download it via gcp command prompt and reshape it on fly to save the space . Like the way we are doing with hpa... "
        },
        {
          "id": 469699,
          "postDate": "2019-02-11T17:29:21.803Z",
          "content": "<p>oh,I see, but I am afraid I can not help you as I have never used GCP service.</p>",
          "rawMarkdown": "oh,I see, but I am afraid I can not help you as I have never used GCP service."
        },
        {
          "id": 486633,
          "postDate": "2019-03-09T06:20:22.700Z",
          "content": "<p>hi best.. \ncould you please provide details about your metric learning layer. What was architecture used and computation done</p>",
          "rawMarkdown": "hi best.. \ncould you please provide details about your metric learning layer. What was architecture used and computation done"
        },
        {
          "id": 486638,
          "postDate": "2019-03-09T06:30:03.403Z",
          "content": "<p>He already answered that here <a href=\"https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/78109#483419\">https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/78109#483419</a></p>",
          "rawMarkdown": "He already answered that here https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/78109#483419"
        },
        {
          "id": 487053,
          "postDate": "2019-03-10T02:40:17.393Z",
          "content": "<p>@Moshel，<a href=\"/jaideepvalani\">@jaideepvalani</a>,I have updated the main post and have added some details.\n Thanks.</p>",
          "rawMarkdown": "@Moshel，@jaideepvalani,I have updated the main post and have added some details.\n Thanks."
        },
        {
          "id": 487122,
          "postDate": "2019-03-10T07:11:30.817Z",
          "content": "<p>Thanks best i understand now  Arcface part.. some clarifications\n1) In your notes you have  mentioned in model structure dense121 head </p>\n\n<p>```\n(1): AdaptiveConcatPool2d(\n    (ap): AdaptiveAvgPool2d(output_size=(1, 1))\n    (mp): AdaptiveMaxPool2d(output_size=(1, 1))\n  )\n  (2): Flatten()\n  (3): BatchNorm1d(2048, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n  (4): Dropout(p=0.5)\n  (5): Linear(in_features=2048, out_features=1024, bias=True)\n  (6): ReLU()\n  (7): BatchNorm1d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n  (8): Dropout(p=0.5)\n  (9): Linear(in_features=1024, out_features=28, bias=True)</p>\n\n<p><code>\nin Arcface you are using a one more head which is giving input to ArcProductMargin \n.Which module does the below init belong to ,is it replacing replacing every thing above till 9th Linear layer?\n</code>\ndef <strong>init</strong>(self,....\n     ... ...\n    self.avgpool = nn.AdaptiveAvgPool2d(1)\n    self.arc_margin_product=ArcMarginProduct(512, num_classes)\n    self.bn1 = nn.BatchNorm1d(1024 * self.EX)\n    self.fc1 = nn.Linear(1024 * self.EX, 512 * self.EX)\n    self.bn2 = nn.BatchNorm1d(512 * self.EX)\n    self.relu = nn.ReLU(inplace=True)\n    self.fc2 = nn.Linear(512 * self.EX, 512)\n    self.bn3 = nn.BatchNorm1d(512)\ndef forward(self, x):\n    ... ...\n    x = torch.cat((nn.AdaptiveAvgPool2d(1)(e5), nn.AdaptiveMaxPool2d(1)(e5)), dim=1)\n    x = x.view(x.size(0), -1)\n    x = self.bn1(x)\n    x = F.dropout(x, p=0.25)\n    x = self.fc1(x)\n    x = self.relu(x)\n    x = self.bn2(x)\n    x = F.dropout(x, p=0.5)</p>\n\n<pre><code>x = x.view(x.size(0), -1)\n\nx = self.fc2(x)\nfeature = self.bn3(x)\n\ncosine=self.arc_margin_product(feature)\n</code></pre>\n\n<p>```</p>\n\n<p>2) What is purpose of using CrossEntropyLoss at the end in Arcface loss</p>",
          "rawMarkdown": "Thanks best i understand now  Arcface part.. some clarifications\n1) In your notes you have  mentioned in model structure dense121 head \n\n```\n(1): AdaptiveConcatPool2d(\n    (ap): AdaptiveAvgPool2d(output_size=(1, 1))\n    (mp): AdaptiveMaxPool2d(output_size=(1, 1))\n  )\n  (2): Flatten()\n  (3): BatchNorm1d(2048, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n  (4): Dropout(p=0.5)\n  (5): Linear(in_features=2048, out_features=1024, bias=True)\n  (6): ReLU()\n  (7): BatchNorm1d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n  (8): Dropout(p=0.5)\n  (9): Linear(in_features=1024, out_features=28, bias=True)\n\n```\nin Arcface you are using a one more head which is giving input to ArcProductMargin \n.Which module does the below init belong to ,is it replacing replacing every thing above till 9th Linear layer?\n```\ndef __init__(self,....\n     ... ...\n    self.avgpool = nn.AdaptiveAvgPool2d(1)\n    self.arc_margin_product=ArcMarginProduct(512, num_classes)\n    self.bn1 = nn.BatchNorm1d(1024 * self.EX)\n    self.fc1 = nn.Linear(1024 * self.EX, 512 * self.EX)\n    self.bn2 = nn.BatchNorm1d(512 * self.EX)\n    self.relu = nn.ReLU(inplace=True)\n    self.fc2 = nn.Linear(512 * self.EX, 512)\n    self.bn3 = nn.BatchNorm1d(512)\ndef forward(self, x):\n    ... ...\n    x = torch.cat((nn.AdaptiveAvgPool2d(1)(e5), nn.AdaptiveMaxPool2d(1)(e5)), dim=1)\n    x = x.view(x.size(0), -1)\n    x = self.bn1(x)\n    x = F.dropout(x, p=0.25)\n    x = self.fc1(x)\n    x = self.relu(x)\n    x = self.bn2(x)\n    x = F.dropout(x, p=0.5)\n\n    x = x.view(x.size(0), -1)\n\n    x = self.fc2(x)\n    feature = self.bn3(x)\n\n    cosine=self.arc_margin_product(feature)\n```\n\n2) What is purpose of using CrossEntropyLoss at the end in Arcface loss"
        },
        {
          "id": 487163,
          "postDate": "2019-03-10T08:38:24.137Z",
          "content": "<p>Metric Learning is based on resnet50 model,so the ... ... means resnet50 backbone the get the feature map.\nAnd I used CrossEntropyLoss to help coverage quickly, but you may need it as I find if I remove it,it is also ok </p>",
          "rawMarkdown": "Metric Learning is based on resnet50 model,so the ... ... means resnet50 backbone the get the feature map.\nAnd I used CrossEntropyLoss to help coverage quickly, but you may need it as I find if I remove it,it is also ok "
        },
        {
          "id": 487898,
          "postDate": "2019-03-11T16:09:44.853Z",
          "content": "<p>hi best \n1) why do we have to again normalize the input features in Arc.. shouldnt Batchnorm1d added before Arch layer should take care of it ?</p>\n\n<p>2) Secondly i face an error at below line \n self.cos_m = math.cos(m)\n\"Only one elements tensor can be converted into python Scalars\" did you face this error ?</p>",
          "rawMarkdown": "hi best \n1) why do we have to again normalize the input features in Arc.. shouldnt Batchnorm1d added before Arch layer should take care of it ?\n\n2) Secondly i face an error at below line \n self.cos_m = math.cos(m)\n\"Only one elements tensor can be converted into python Scalars\" did you face this error ?"
        }
      ]
    },
    {
      "id": 1297783,
      "postDate": "2021-05-08T10:01:13.497Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 820208,
      "postDate": "2020-04-25T08:32:07.637Z",
      "rawMarkdown": "",
      "votes": 1,
      "isDeleted": true
    },
    {
      "id": 551905,
      "postDate": "2019-06-13T09:12:56.900Z",
      "rawMarkdown": "",
      "votes": 4,
      "isDeleted": true
    },
    {
      "id": 531051,
      "postDate": "2019-05-14T07:41:08.600Z",
      "rawMarkdown": "",
      "isDeleted": true,
      "replies": [
        {
          "id": 539189,
          "postDate": "2019-05-29T16:54:23.153Z",
          "content": "<p>Sorry for late reply,  I did not read this post recently. The antibody ids are from hpav18 dataset, I remembered in the External data threads, where there is a csv file containing information of every hpa v18 image. And if you want to test metric learning, I suggest you use Whale competition.</p>",
          "rawMarkdown": "Sorry for late reply,  I did not read this post recently. The antibody ids are from hpav18 dataset, I remembered in the External data threads, where there is a csv file containing information of every hpa v18 image. And if you want to test metric learning, I suggest you use Whale competition."
        }
      ]
    },
    {
      "id": 527869,
      "postDate": "2019-05-06T13:43:02.120Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 517369,
      "postDate": "2019-04-16T00:35:31.237Z",
      "rawMarkdown": "",
      "isDeleted": true,
      "replies": [
        {
          "id": 523162,
          "postDate": "2019-04-25T17:00:33.440Z",
          "content": "<p>Hi\nThe densenet121's  head is in my post above.\nI splitted the data into 5 folds, so the val set was 20% of all the data.\nThe focalloss of my val set was about 0.57 without TTA.\nNo other augmentation, randomly cropping from 768x768 then resize to 512x512 was enough,we should use external data.</p>",
          "rawMarkdown": "Hi\nThe densenet121's  head is in my post above.\nI splitted the data into 5 folds, so the val set was 20% of all the data.\nThe focalloss of my val set was about 0.57 without TTA.\nNo other augmentation, randomly cropping from 768x768 then resize to 512x512 was enough,we should use external data.\n\n",
          "votes": 2
        },
        {
          "id": 524763,
          "postDate": "2019-04-29T13:33:18.367Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 524879,
          "postDate": "2019-04-29T17:29:04.333Z",
          "content": "<p>Same as you</p>",
          "rawMarkdown": "Same as you"
        },
        {
          "id": 524978,
          "postDate": "2019-04-29T22:38:54.190Z",
          "rawMarkdown": "",
          "isDeleted": true
        }
      ]
    },
    {
      "id": 509134,
      "postDate": "2019-04-07T11:33:46.603Z",
      "rawMarkdown": "",
      "isDeleted": true,
      "replies": [
        {
          "id": 510575,
          "postDate": "2019-04-09T08:41:08.023Z",
          "content": "\ndef fit_test_th(x,y):\n    p = []\n    for idx in tqdm(range(len(y))):\n        _y = y[idx]\n        _x = x[:, idx]\n        min_error = np.inf\n        min_p = 0\n        for _p in np.linspace(0, 1, 10000):\n            error = np.abs((_x &gt; _p).mean() - _y)\n            if error ",
          "rawMarkdown": "<pre>def fit_test_th(x,y):\n    p = []\n    for idx in tqdm(range(len(y))):\n        _y = y[idx]\n        _x = x[:, idx]\n        min_error = np.inf\n        min_p = 0\n        for _p in np.linspace(0, 1, 10000):\n            error = np.abs((_x &gt; _p).mean() - _y)\n            if error &lt; min_error:\n                min_error = error\n                min_p = _p\n            elif error == min_error and (np.abs(_p - 0.5) &lt; np.abs(min_p - 0.5)):\n                min_error = error\n                min_p = _p\n        p.append(min_p)\n    p = np.array(p)\n    return p\n\noptimized_thresholds = fit_test_th(test_preds, kaggle_class_ratios)\n</pre>",
          "votes": 1
        }
      ]
    },
    {
      "id": 507888,
      "postDate": "2019-04-05T11:00:44.693Z",
      "rawMarkdown": "",
      "isDeleted": true,
      "replies": [
        {
          "id": 509025,
          "postDate": "2019-04-07T08:14:09.493Z",
          "content": "<p>Hi, just get mean and std of dataset and apply it to the images and then forward to the network, we don't need apply the normalization twice.</p>",
          "rawMarkdown": "Hi, just get mean and std of dataset and apply it to the images and then forward to the network, we don't need apply the normalization twice."
        },
        {
          "id": 509071,
          "postDate": "2019-04-07T09:29:12.577Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 510578,
          "postDate": "2019-04-09T08:45:35.273Z",
          "content": "<p>We don't need use above code before feed images into our models,  as we have fine-tuned the model.</p>",
          "rawMarkdown": "We don't need use above code before feed images into our models,  as we have fine-tuned the model."
        },
        {
          "id": 510597,
          "postDate": "2019-04-09T09:11:33.680Z",
          "rawMarkdown": "",
          "isDeleted": true
        }
      ]
    },
    {
      "id": 504999,
      "postDate": "2019-04-01T12:45:53.480Z",
      "rawMarkdown": "",
      "isDeleted": true,
      "replies": [
        {
          "id": 505255,
          "postDate": "2019-04-01T19:19:43.257Z",
          "content": "<p>Hi, I refered to the implementation here, <a href=\"https://github.com/ronghuaiyang/arcface-pytorch/blob/master/models/metrics.py\">https://github.com/ronghuaiyang/arcface-pytorch/blob/master/models/metrics.py</a>, and I found the result was good, so I used it.\nI also noticed the paper did not explain the not easy_margin branch of the code,I did not find the explanation on the internet, as I am very busy in recently months, I am sorry that I can not give you the answer now. Perhaps I will try to understand it when I am not so busy. If you can contact the author of the ARCFACE and find the reason behind it, it will be helpful if you share it to us.</p>",
          "rawMarkdown": "Hi, I refered to the implementation here, https://github.com/ronghuaiyang/arcface-pytorch/blob/master/models/metrics.py, and I found the result was good, so I used it.\nI also noticed the paper did not explain the not easy_margin branch of the code,I did not find the explanation on the internet, as I am very busy in recently months, I am sorry that I can not give you the answer now. Perhaps I will try to understand it when I am not so busy. If you can contact the author of the ARCFACE and find the reason behind it, it will be helpful if you share it to us."
        },
        {
          "id": 505661,
          "postDate": "2019-04-02T11:18:49.993Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 509075,
          "postDate": "2019-04-07T09:32:14.943Z",
          "rawMarkdown": "",
          "isDeleted": true
        }
      ]
    },
    {
      "id": 477622,
      "postDate": "2019-02-25T01:37:32.563Z",
      "rawMarkdown": "",
      "votes": 1,
      "isDeleted": true
    },
    {
      "id": 476949,
      "postDate": "2019-02-23T14:03:22.290Z",
      "rawMarkdown": "",
      "votes": 1,
      "isDeleted": true,
      "replies": [
        {
          "id": 476974,
          "postDate": "2019-02-23T15:18:39.563Z",
          "content": "<p>From pretrained model on imagenet, not HPA data. </p>",
          "rawMarkdown": "From pretrained model on imagenet, not HPA data. ",
          "votes": 1
        },
        {
          "id": 477253,
          "postDate": "2019-02-24T08:04:30.200Z",
          "rawMarkdown": "",
          "votes": 3,
          "isDeleted": true
        },
        {
          "id": 477374,
          "postDate": "2019-02-24T12:48:14.047Z",
          "content": "<p>Yes,exactly.</p>",
          "rawMarkdown": "Yes,exactly."
        }
      ]
    },
    {
      "id": 465121,
      "postDate": "2019-02-02T11:24:29.937Z",
      "rawMarkdown": "",
      "votes": 1,
      "isDeleted": true
    },
    {
      "id": 461921,
      "postDate": "2019-01-27T09:57:36.797Z",
      "rawMarkdown": "",
      "votes": 1,
      "isDeleted": true
    },
    {
      "id": 461668,
      "postDate": "2019-01-26T17:14:27.237Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 461466,
      "postDate": "2019-01-26T06:10:26.953Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 460344,
      "postDate": "2019-01-23T14:02:49.553Z",
      "rawMarkdown": "",
      "votes": 1,
      "isDeleted": true
    },
    {
      "id": 459681,
      "postDate": "2019-01-22T06:59:18.063Z",
      "rawMarkdown": "",
      "votes": 1,
      "isDeleted": true
    },
    {
      "id": 459515,
      "postDate": "2019-01-21T22:32:53.887Z",
      "rawMarkdown": "",
      "votes": 1,
      "isDeleted": true
    },
    {
      "id": 2095233,
      "postDate": "2023-01-11T08:49:20Z",
      "content": "<p>Thank you for the notebook very useful.</p>",
      "rawMarkdown": "Thank you for the notebook very useful.",
      "votes": 1
    },
    {
      "id": 1576976,
      "postDate": "2021-11-09T16:13:58.707Z",
      "content": "<p>thank you for sharing, very useful</p>",
      "rawMarkdown": "thank you for sharing, very useful",
      "votes": 1
    },
    {
      "id": 731549,
      "postDate": "2020-01-28T19:22:08.777Z",
      "content": "<p>thanks a lot......</p>",
      "rawMarkdown": "thanks a lot......",
      "votes": 1
    },
    {
      "id": 458755,
      "postDate": "2019-01-20T12:51:26.587Z",
      "content": "<p>Thank you for your writeup!</p>",
      "rawMarkdown": "Thank you for your writeup!",
      "votes": 3
    },
    {
      "id": 531134,
      "postDate": "2019-05-14T11:10:39.907Z",
      "content": "<p>Thanks, it's amazing work !</p>",
      "rawMarkdown": "Thanks, it's amazing work !",
      "votes": 1
    },
    {
      "id": 475826,
      "postDate": "2019-02-21T08:46:23.440Z",
      "content": "<p>Thanks for sharing and congrats!</p>",
      "rawMarkdown": "Thanks for sharing and congrats!",
      "votes": 1
    },
    {
      "id": 469147,
      "postDate": "2019-02-10T15:33:34.473Z",
      "content": "<p>Nice! Thank you! :)</p>",
      "rawMarkdown": "Nice! Thank you! :)",
      "votes": 1
    },
    {
      "id": 468958,
      "postDate": "2019-02-10T05:39:18.463Z",
      "content": "<p>thanks for sharing ! </p>",
      "rawMarkdown": "thanks for sharing ! ",
      "votes": 1
    },
    {
      "id": 468774,
      "postDate": "2019-02-09T16:18:29.650Z",
      "content": "<p>Thanks for sharing!</p>",
      "rawMarkdown": "Thanks for sharing!",
      "votes": 1
    },
    {
      "id": 466685,
      "postDate": "2019-02-05T20:10:08.217Z",
      "content": "<p>Thanks for sharing !</p>",
      "rawMarkdown": "Thanks for sharing !",
      "votes": 1
    },
    {
      "id": 464618,
      "postDate": "2019-02-01T06:54:31.947Z",
      "content": "<p>Thanks for sharing!</p>",
      "rawMarkdown": "Thanks for sharing!",
      "votes": 1
    },
    {
      "id": 464428,
      "postDate": "2019-01-31T21:18:56.893Z",
      "content": "<p>Thanks for sharing !</p>",
      "rawMarkdown": "Thanks for sharing !",
      "votes": 1
    },
    {
      "id": 464340,
      "postDate": "2019-01-31T16:45:16.877Z",
      "content": "<p>Nice, thanks for sharing</p>",
      "rawMarkdown": "Nice, thanks for sharing",
      "votes": 1
    },
    {
      "id": 463867,
      "postDate": "2019-01-30T19:25:23.817Z",
      "content": "<p>Nice! Thanks!</p>",
      "rawMarkdown": "Nice! Thanks!",
      "votes": 1
    },
    {
      "id": 462948,
      "postDate": "2019-01-29T06:29:29.863Z",
      "content": "<p>Thanks for sharing!</p>",
      "rawMarkdown": "Thanks for sharing!",
      "votes": 1
    },
    {
      "id": 462606,
      "postDate": "2019-01-28T15:21:47.710Z",
      "content": "<p>thanks for sharing :) </p>",
      "rawMarkdown": "thanks for sharing :) ",
      "votes": 1
    },
    {
      "id": 462405,
      "postDate": "2019-01-28T08:52:51.127Z",
      "content": "<p>Very helpful piece. Thanks </p>",
      "rawMarkdown": "Very helpful piece. Thanks ",
      "votes": 1
    },
    {
      "id": 461798,
      "postDate": "2019-01-27T02:52:02.503Z",
      "content": "<p>Thanks. arigatou.</p>",
      "rawMarkdown": "Thanks. arigatou.",
      "votes": 1
    },
    {
      "id": 461674,
      "postDate": "2019-01-26T17:31:21.290Z",
      "content": "<p>Thank you, Excellent work! </p>",
      "rawMarkdown": "Thank you, Excellent work! ",
      "votes": 1
    },
    {
      "id": 461607,
      "postDate": "2019-01-26T13:55:41.613Z",
      "content": "<p>Thanks for sharing!</p>",
      "rawMarkdown": "Thanks for sharing!",
      "votes": 1
    },
    {
      "id": 461251,
      "postDate": "2019-01-25T16:19:50.190Z",
      "content": "<p>Thanks for the share! :)</p>",
      "rawMarkdown": "Thanks for the share! :)",
      "votes": 1
    },
    {
      "id": 461192,
      "postDate": "2019-01-25T14:03:31.710Z",
      "content": "<p>Thanks. Great work!</p>",
      "rawMarkdown": "Thanks. Great work!",
      "votes": 1
    },
    {
      "id": 461084,
      "postDate": "2019-01-25T07:08:52.363Z",
      "content": "<p>Thanks for sharing!</p>",
      "rawMarkdown": "Thanks for sharing!",
      "votes": 1
    },
    {
      "id": 460916,
      "postDate": "2019-01-24T17:45:19.047Z",
      "content": "<p>Thank you, great work!</p>",
      "rawMarkdown": "Thank you, great work!",
      "votes": 1
    },
    {
      "id": 460696,
      "postDate": "2019-01-24T08:57:32.033Z",
      "content": "<p>thanks</p>",
      "rawMarkdown": "thanks",
      "votes": 1
    },
    {
      "id": 460525,
      "postDate": "2019-01-23T22:16:38.267Z",
      "content": "<p>Thanks for the report!</p>",
      "rawMarkdown": "Thanks for the report!",
      "votes": 1
    },
    {
      "id": 460014,
      "postDate": "2019-01-22T20:15:53.677Z",
      "content": "<p>Thanks for sharing</p>",
      "rawMarkdown": "Thanks for sharing",
      "votes": 1
    },
    {
      "id": 459607,
      "postDate": "2019-01-22T04:23:03.243Z",
      "content": "<p>Thanks for sharing!!</p>",
      "rawMarkdown": "Thanks for sharing!!",
      "votes": 1
    },
    {
      "id": 459573,
      "postDate": "2019-01-22T02:36:12.237Z",
      "content": "<p>Thanks for sharing your amazing work!</p>",
      "rawMarkdown": "Thanks for sharing your amazing work!",
      "votes": 1
    },
    {
      "id": 459266,
      "postDate": "2019-01-21T13:27:18.103Z",
      "content": "<p>Great work!! Thanks for sharing!</p>",
      "rawMarkdown": "Great work!! Thanks for sharing!",
      "votes": 1
    },
    {
      "id": 459125,
      "postDate": "2019-01-21T08:30:59.003Z",
      "content": "<p>congrats. thank you for sharing</p>",
      "rawMarkdown": "congrats. thank you for sharing",
      "votes": 1
    },
    {
      "id": 458652,
      "postDate": "2019-01-20T07:16:24.893Z",
      "content": "<p>Thank you for sharing , Great work</p>",
      "rawMarkdown": "Thank you for sharing , Great work",
      "votes": 1
    },
    {
      "id": 458596,
      "postDate": "2019-01-20T02:47:31.300Z",
      "content": "<p>Thank you for sharing your solution!</p>",
      "rawMarkdown": "Thank you for sharing your solution!",
      "votes": 1
    },
    {
      "id": 458592,
      "postDate": "2019-01-20T02:19:42.720Z",
      "content": "<p>Great writeup! Thanks a lot.</p>",
      "rawMarkdown": "Great writeup! Thanks a lot.",
      "votes": 1
    },
    {
      "id": 3163085,
      "postDate": "2025-03-30T09:29:00.087Z",
      "content": "<p>Thanks, for this valuable knowledge.</p>",
      "rawMarkdown": "Thanks, for this valuable knowledge."
    },
    {
      "id": 1883129,
      "postDate": "2022-08-03T15:50:20.433Z",
      "content": "<p>thank you for sharing, very useful</p>",
      "rawMarkdown": "thank you for sharing, very useful"
    },
    {
      "id": 1201790,
      "postDate": "2021-02-15T16:59:25.487Z",
      "content": "<p>Thanks,<br>\nthis is informative </p>",
      "rawMarkdown": "Thanks,\nthis is informative "
    },
    {
      "id": 1197050,
      "postDate": "2021-02-11T22:04:29.353Z",
      "content": "<p>Cool stuff! Thanks a lot!</p>",
      "rawMarkdown": "Cool stuff! Thanks a lot!"
    },
    {
      "id": 1041566,
      "postDate": "2020-10-07T20:14:00.917Z",
      "content": "<p>Thank you for your work!</p>",
      "rawMarkdown": "Thank you for your work!"
    },
    {
      "id": 620235,
      "postDate": "2019-09-07T07:27:19.590Z",
      "content": "<p>Great work! Thanks for sharing!</p>",
      "rawMarkdown": "Great work! Thanks for sharing!"
    },
    {
      "id": 584512,
      "postDate": "2019-07-26T05:24:04.717Z",
      "content": "<p>Thanks, good work. </p>",
      "rawMarkdown": "Thanks, good work. "
    },
    {
      "id": 507663,
      "postDate": "2019-04-05T03:50:01.807Z",
      "content": "<p>Thanks for sharing this. </p>",
      "rawMarkdown": "Thanks for sharing this. "
    },
    {
      "id": 462089,
      "postDate": "2019-01-27T16:33:06.763Z",
      "content": "<p>Great work! Thanks very much</p>",
      "rawMarkdown": "Great work! Thanks very much",
      "votes": 1,
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 459759,
      "author_name": "CPMP",
      "author_url": "",
      "post_date": "2019-01-22T10:06:31.650000",
      "content": "<p>Thanks for sharing, this shows that a rather simple, but well thought solution overcomes more complex ensembles.  </p>\n\n<blockquote>\n  <p>I feel kaggle competitions are becoming harder and harder.</p>\n</blockquote>\n\n<p>I guess many of us can relate to this!</p>",
      "votes": 17,
      "replies": []
    },
    {
      "id": 538844,
      "author_name": "Bhavesh Kamble",
      "author_url": "",
      "post_date": "2019-05-29T07:14:57.777000",
      "content": "<p>Congratulations on currently being first on Kaggle, your work is inspiring an entire Generation. Keep up the good work 💯 </p>",
      "votes": 4,
      "replies": []
    },
    {
      "id": 458547,
      "author_name": "Tim H",
      "author_url": "",
      "post_date": "2019-01-19T22:32:19.530000",
      "content": "<p>Congratulations not only on the impressive result but on having the courage to try a new technique and then find a way to have it work so well! </p>\n\n<p>Appreciating that you are very busy, I wonder if you could take a minute to post a link towards any useful article you found to get started with understanding the metric learning approach?</p>",
      "votes": 5,
      "replies": [
        {
          "id": 458904,
          "author_name": "bestfitting",
          "author_url": "",
          "post_date": "2019-01-20T19:25:37.107000",
          "content": "<p>Hi,Tim,thank you!\nAndrew Ng's Deep Learning  Course on Coursera introduces Siamese network and Triplet Loss,I remember it's Part 4.2-4.5,it's a good start,although these can not ensure a good position in a competition related.\nSince you are interested in the metric learning,I invite you to the Whale identification challenge,you will find some kernels useful <a href=\"https://www.kaggle.com/c/humpback-whale-identification/kernels\">https://www.kaggle.com/c/humpback-whale-identification/kernels</a>. As I am busy recently,I did not read them carefully,but most upvoted ones are always useful.\nWhale competition is a suitable competition with not so many images,I think you can  get a very good understanding of  metric learning after a month and use it in a lot of scenarios.<br></p>",
          "votes": 16,
          "replies": []
        },
        {
          "id": 458978,
          "author_name": "Tim H",
          "author_url": "",
          "post_date": "2019-01-21T00:00:28.233000",
          "content": "<p>Thank you. You've refreshed my memory on Andrew Ng's excellent course.  </p>\n\n<p>I am just starting to look at the earthquake prediction challenge but might take your advice and look at the whale competition as well.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 468346,
          "author_name": "William Green",
          "author_url": "",
          "post_date": "2019-02-08T17:51:56.180000",
          "content": "<p><a href=\"/bestfitting\">@bestfitting</a> Is it possible that you can share your data generator for metric learning? </p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 820135,
      "author_name": "Sushrut Shitoot",
      "author_url": "",
      "post_date": "2020-04-25T07:09:20.013000",
      "content": "<p>Thanks. This is a very helpful piece with good learning material for beginners.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 792253,
      "author_name": "Prawachan Dhungana",
      "author_url": "",
      "post_date": "2020-03-31T02:59:46.177000",
      "content": "<p>Really amazing</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 539913,
      "author_name": "DimitreOliveira",
      "author_url": "",
      "post_date": "2019-05-30T17:42:27.343000",
      "content": "<p>Excellent report, would be very helpful if top solution got reports with this quality, congrats!</p>",
      "votes": 3,
      "replies": []
    },
    {
      "id": 508855,
      "author_name": "Peiyuan Liao",
      "author_url": "",
      "post_date": "2019-04-06T22:09:52.123000",
      "content": "<p>Hi Bestfitting, how did you do lovasz loss on label predictions instead of mask predictions? Thanks!</p>",
      "votes": 3,
      "replies": [
        {
          "id": 509028,
          "author_name": "bestfitting",
          "author_url": "",
          "post_date": "2019-04-07T08:17:35.797000",
          "content": "<p>I used lovasz loss to let the network balance the precision and recall.Since we use sigmoid and binary classification on every pixel on mask prediction tasks, we can treat 28 labels as 28 pixels and then we can use lovasz loss on it. </p>",
          "votes": 9,
          "replies": []
        },
        {
          "id": 510937,
          "author_name": "Peiyuan Liao",
          "author_url": "",
          "post_date": "2019-04-09T16:13:39.530000",
          "content": "<p>Thanks, it's amazing how this can work too!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 459954,
      "author_name": "Blonde",
      "author_url": "",
      "post_date": "2019-01-22T17:35:02.670000",
      "content": "<p>Congratulations! Thank you for writing your solution. If I may ask you a few questions:</p>\n\n<ol>\n<li><p>I did not use oversample -- it did not improve the score or you did not go for it as the score was good enough?</p></li>\n<li><p>For metric learning:  did you use siamese or triple-net (like anchor-positive-negative) for this set?</p></li>\n<li><p><code>So I set a threshold and replace the labels with found sample’s. Fortunately, the threshold is not sensitive to the threshold.</code> -- This one I did not quite understand... could you please add more comments about setting threshold, and what you mean by threshold is not sensitive to the threshold?</p></li>\n</ol>\n\n<p>I am a newbie, sorry if some questions are stupid :)))</p>",
      "votes": 3,
      "replies": [
        {
          "id": 459980,
          "author_name": "bestfitting",
          "author_url": "",
          "post_date": "2019-01-22T18:46:10.803000",
          "content": "<p>1.According to my experiences, oversample by adding samples will change the probabilities of some classes, but will not change the model's capability a lot, the real problem is not the probabilities of a class in this competition, the problem is the order of them instead.But,I must say, I did not do experiments to verify it.  Perhaps I will use oversample in other competitions, for example, there is only one image of many categories in whale competition.And, oversample is time consuming.Competition is a series of decision in limited time and resources, we must try to select most promising methods.\n2.To keep whale challenge not be disturbed by my post,I think you can understand I can not say too much, there are so many clever kagglers here, it's unfair to those leading teams.(Perhaps I had said too much already)\n3.I must decide which samples be replaced, so I should set a distance, to say,0.35, if the distance&lt;0.35, then I replace the labels with found sample in V18. If I set the the threshold to 0.3, the score on LB does not change too much, we can say, it's not sensitive to the threshold.As I did not try to overfit to public LB when select the thresholds of CNN model, so I can say, my solution is not sensitive to thresholds in a whole.</p>",
          "votes": 7,
          "replies": []
        },
        {
          "id": 460113,
          "author_name": "yunhai",
          "author_url": "",
          "post_date": "2019-01-23T02:48:07.673000",
          "content": "<p>i am so  proud of you <a href=\"/bestfitting\">@bestfitting</a>, learned too much from your open solution. Thanks .</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 483206,
          "author_name": "old-ufo",
          "author_url": "",
          "post_date": "2019-03-04T10:08:12.597000",
          "content": "<p>Hi, <a href=\"/bestfitting\">@bestfitting</a>, whales now are over. Would you mind to give full details now, please?</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 483217,
          "author_name": "Moshel",
          "author_url": "",
          "post_date": "2019-03-04T10:25:36.800000",
          "content": "<p>Please please... </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 483419,
          "author_name": "bestfitting",
          "author_url": "",
          "post_date": "2019-03-04T15:35:52.343000",
          "content": "<p>Hi oldufo,moshel,\nThe quickest way to get details of my metric learning is read the <a href=\"https://www.kaggle.com/c/humpback-whale-identification/discussion/82484\">3rd place solution </a> from <a href=\"/pudae81\">@pudae81</a> of Whale competition, I am happy to find that it is quite similar to mine, but I missed the flip whale tricks.  I have been very busy with my everyday job recently,   I just used the same model structure, hyper-parameters, training  methods...in both competitions（This is not an excuse, I may not find those good tricks either, even if I had a lot of time) , I also found that many others' solutions are very good, I suggest you refer to those beautiful ones, when I have time, I will learn and experiment some of their great ideas, for example,  <a href=\"https://www.kaggle.com/c/humpback-whale-identification/discussion/82366\">The first place solution</a> from <a href=\"/qiaojian\">@qiaojian</a> is very creative on make full use of the data and design on loss function.</p>",
          "votes": 4,
          "replies": []
        }
      ]
    },
    {
      "id": 459542,
      "author_name": "Shai",
      "author_url": "",
      "post_date": "2019-01-22T00:37:11.080000",
      "content": "<p>Congratulations on your win and thanks for sharing the solution. It's simple and elegant. Surely knowledge is more valuable than competition skills, and you have proved it many times. </p>",
      "votes": 3,
      "replies": []
    },
    {
      "id": 458586,
      "author_name": "Guanshuo Xu",
      "author_url": "",
      "post_date": "2019-01-20T01:47:05.757000",
      "content": "<p>Congratulations! This is a large margin win.\nI'v started working on the Whale competition too and hope to catch up with you.</p>",
      "votes": 3,
      "replies": []
    },
    {
      "id": 459151,
      "author_name": "Serigne ",
      "author_url": "",
      "post_date": "2019-01-21T09:30:46.737000",
      "content": "<p>Congrats Bestfitting for your consistent winning while being solo in many of competitions. Truly inspirational. </p>\n\n<p>And I praise your philosophy : learn and try to push things forward by testing new and efficient approaches, instead of solely competing for winning. </p>",
      "votes": 4,
      "replies": []
    },
    {
      "id": 458919,
      "author_name": "Karthik Chowdary Tsaliki",
      "author_url": "",
      "post_date": "2019-01-20T20:04:59.113000",
      "content": "<p><strong>if we compete only for win,we may loss,if we compete for learning and providing useful solution to the host,nothing to loss.</strong> I have not edited this but these are great words put together. Congratulations!!! </p>",
      "votes": 4,
      "replies": []
    },
    {
      "id": 474197,
      "author_name": "Sudheer Kangala",
      "author_url": "",
      "post_date": "2019-02-19T04:10:36.100000",
      "content": "<p>This is inspirational to many</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 471694,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-02-14T19:03:01.797000",
      "content": "<p>Thanks for the great writeup of an impressive solution! If you don't mind sharing, roughly  how many hours did you spend on this competition?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 472761,
          "author_name": "bestfitting",
          "author_url": "",
          "post_date": "2019-02-16T16:18:43.207000",
          "content": "<p>I usually spend more time after I entered a competition,then do all kinds of experiments on server as automatically as possible,and then work hard in the last week of the competition,so my GPU server work all the time ,and I can finish other jobs or go out to run at the same time,and  I think if we want to get top 10, we all want to have as much time as possible :)  </p>",
          "votes": 3,
          "replies": []
        }
      ]
    },
    {
      "id": 470744,
      "author_name": "Karan Jakhar",
      "author_url": "",
      "post_date": "2019-02-13T13:45:20.670000",
      "content": "<p>Great work, Thanks for sharing <a href=\"/bestfitting\">@bestfitting</a></p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 466124,
      "author_name": "PKPD",
      "author_url": "",
      "post_date": "2019-02-04T18:11:49.873000",
      "content": "<p>This is so amazing and many thanks for sharing.  Could you let me know whether you will be interested in consulting/mentoring? Please send me a message if you do.  Thanks again!!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 465962,
      "author_name": "Kun-Lin Lee",
      "author_url": "",
      "post_date": "2019-02-04T12:14:41.663000",
      "content": "<p>Thank you for sharing this clear but enough detail solution.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 465833,
      "author_name": "N!K8",
      "author_url": "",
      "post_date": "2019-02-04T05:17:15.987000",
      "content": "<p>Amazing read!!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 464438,
      "author_name": "Sergey Korolev",
      "author_url": "",
      "post_date": "2019-01-31T21:51:43.220000",
      "content": "<p>Thank you for the approach! It really minds me.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 464174,
      "author_name": "Hashi",
      "author_url": "",
      "post_date": "2019-01-31T09:47:36.213000",
      "content": "<p>Nice</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 463982,
      "author_name": "WinterMaster",
      "author_url": "",
      "post_date": "2019-01-31T02:08:18.190000",
      "content": "<p>Wonderful!!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 463290,
      "author_name": "Laura Fink",
      "author_url": "",
      "post_date": "2019-01-29T18:45:22.340000",
      "content": "<p>Congratulations and thank your for sharing your approach!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 463247,
      "author_name": "Aditya  Chandak",
      "author_url": "",
      "post_date": "2019-01-29T17:07:49.480000",
      "content": "<p>erudite! _/_</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 463131,
      "author_name": "Jaideep",
      "author_url": "",
      "post_date": "2019-01-29T13:38:05.290000",
      "content": "<p>hi best you are indeed the best..\nmay i request you  you to let me know how u download the tiff images from gcp  ,if you can post the script would be great. <a href=\"https://console.cloud.google.com/storage/browser/kaggle-human-protein-atlas\">https://console.cloud.google.com/storage/browser/kaggle-human-protein-atlas</a></p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 463037,
      "author_name": "Rohit Phadke",
      "author_url": "",
      "post_date": "2019-01-29T09:42:29.563000",
      "content": "<p>Thanks for sharing your experience with us!!!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 462711,
      "author_name": "Carlos Nebulous",
      "author_url": "",
      "post_date": "2019-01-28T18:48:33.807000",
      "content": "<p>cool! :D</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 462692,
      "author_name": "Flavio Bravin",
      "author_url": "",
      "post_date": "2019-01-28T18:17:31.517000",
      "content": "<p>Amazing! Tnx for sharing!!!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 462683,
      "author_name": "Hamish",
      "author_url": "",
      "post_date": "2019-01-28T18:13:37.857000",
      "content": "<p>Congratulations and thank you for writing this - as someone newish to kaggle and ML competitions it's great to see what people doing well are doing. Even if you may not realise it, I learnt a lot from this and have plenty to go away and read!</p>\n\n<p>Also, thank you for the words at the end - it's good to know everyone finds it hard!! :)</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 462595,
      "author_name": "Sammed Kagi",
      "author_url": "",
      "post_date": "2019-01-28T15:09:58.640000",
      "content": "<p>Nice</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 462421,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-28T09:17:49.357000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 462316,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-28T05:06:29.037000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 462129,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-27T18:31:25.383000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 462034,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-27T14:24:16.980000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 462005,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-27T12:48:35.050000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 461797,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-27T02:48:37.460000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 461657,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-26T16:41:31.117000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 461548,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-26T10:13:00.017000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 461426,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-26T01:44:22.957000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 461392,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-25T22:32:29.417000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 461075,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-25T06:56:11.387000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 460794,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-24T12:43:06.987000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 460729,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-24T10:06:29.860000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 460716,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-24T09:48:24.747000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 460582,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-24T02:44:54.827000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 460380,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-23T15:30:40.347000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 460323,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-23T13:12:02.323000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 460322,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-23T13:11:30.607000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 460320,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-23T13:09:05.950000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 460248,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-23T09:34:26.843000",
      "content": "",
      "votes": 1,
      "replies": [
        {
          "id": 460491,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-01-23T20:39:56.217000",
          "content": "",
          "votes": 3,
          "replies": []
        }
      ]
    },
    {
      "id": 460145,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-23T04:46:39.597000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 460139,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-23T04:23:48.537000",
      "content": "",
      "votes": 1,
      "replies": [
        {
          "id": 460494,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-01-23T20:48:42.767000",
          "content": "",
          "votes": 11,
          "replies": []
        },
        {
          "id": 460657,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-01-24T07:08:16.993000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 459862,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-22T14:04:30.517000",
      "content": "",
      "votes": 1,
      "replies": [
        {
          "id": 459971,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-01-22T18:15:47.037000",
          "content": "",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 459764,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-22T10:22:59.523000",
      "content": "",
      "votes": 1,
      "replies": [
        {
          "id": 459973,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-01-22T18:20:39.823000",
          "content": "",
          "votes": 2,
          "replies": []
        },
        {
          "id": 460758,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-01-24T11:25:35.443000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 460860,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-01-24T15:00:41.807000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 459703,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-22T07:55:30.520000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 459668,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-22T06:42:42.433000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 459289,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-21T14:04:15.793000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 459246,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-21T12:51:25.337000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 459108,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-21T07:37:26.433000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 459091,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-21T06:40:31",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 458887,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-20T18:23:11.680000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 458825,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-20T14:53:22.190000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 458792,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-20T13:58:09.300000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 458597,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-20T02:49:09.387000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 458560,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-19T23:35:02.410000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 458541,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-19T22:20:29.380000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 458533,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-19T21:30:05.400000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 524144,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-04-28T04:13:07.283000",
      "content": "",
      "votes": 2,
      "replies": []
    },
    {
      "id": 486393,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-03-08T17:56:23.203000",
      "content": "",
      "votes": 2,
      "replies": []
    },
    {
      "id": 484869,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-03-06T15:42:25.607000",
      "content": "",
      "votes": 2,
      "replies": [
        {
          "id": 485181,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-03-07T03:22:59.580000",
          "content": "",
          "votes": 10,
          "replies": []
        }
      ]
    },
    {
      "id": 478033,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-02-25T16:26:22.520000",
      "content": "",
      "votes": 2,
      "replies": []
    },
    {
      "id": 474899,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-02-20T00:46:43.713000",
      "content": "",
      "votes": 2,
      "replies": [
        {
          "id": 475031,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-02-20T06:34:55.307000",
          "content": "",
          "votes": 3,
          "replies": []
        },
        {
          "id": 475047,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-02-20T06:50:28.180000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 476189,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-02-21T18:23:43.300000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 476402,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-02-22T04:43:47.927000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 476496,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-02-22T08:44:44.217000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 476567,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-02-22T10:49:20.117000",
          "content": "",
          "votes": 2,
          "replies": []
        }
      ]
    },
    {
      "id": 470628,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-02-13T09:25:40.863000",
      "content": "",
      "votes": 2,
      "replies": []
    },
    {
      "id": 465709,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-02-03T20:36:54.800000",
      "content": "",
      "votes": 2,
      "replies": [
        {
          "id": 465903,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-02-04T09:44:13.093000",
          "content": "",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 465516,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-02-03T10:34:26.057000",
      "content": "",
      "votes": 2,
      "replies": []
    },
    {
      "id": 465232,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-02-02T17:09:42.910000",
      "content": "",
      "votes": 2,
      "replies": [
        {
          "id": 465904,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-02-04T09:49:49.770000",
          "content": "",
          "votes": 2,
          "replies": []
        },
        {
          "id": 467396,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-02-07T02:40:23.683000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 467599,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-02-07T11:57:43.027000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 467910,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-02-08T00:07:36.363000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 462548,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-28T13:38:08.280000",
      "content": "",
      "votes": 2,
      "replies": []
    },
    {
      "id": 462287,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-28T03:49:35.410000",
      "content": "",
      "votes": 2,
      "replies": []
    },
    {
      "id": 462218,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-27T22:23:16.250000",
      "content": "",
      "votes": 2,
      "replies": []
    },
    {
      "id": 458959,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-20T22:28:56.313000",
      "content": "",
      "votes": 2,
      "replies": []
    },
    {
      "id": 458750,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-20T12:38:15.480000",
      "content": "",
      "votes": 2,
      "replies": []
    },
    {
      "id": 458630,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-20T05:11:10.797000",
      "content": "",
      "votes": 2,
      "replies": []
    },
    {
      "id": 458610,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-20T03:31:56.603000",
      "content": "",
      "votes": 2,
      "replies": []
    },
    {
      "id": 592537,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-08-05T12:57:29.330000",
      "content": "",
      "votes": -2,
      "replies": []
    },
    {
      "id": 2562544,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-12-15T14:04:14.190000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2241693,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-05-01T18:02:46.873000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2238665,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-04-28T17:56:25.897000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1910181,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-23T08:25:56.857000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1367632,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-06-28T01:16:21.030000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 1368926,
          "author_name": "",
          "author_url": "",
          "post_date": "2021-06-29T03:10:04.807000",
          "content": "",
          "votes": 1,
          "replies": [
            {
              "id": 1398556,
              "author_name": "",
              "author_url": "",
              "post_date": "2021-07-24T09:26:11.267000",
              "content": "",
              "votes": 0,
              "replies": []
            }
          ]
        },
        {
          "id": 1398612,
          "author_name": "",
          "author_url": "",
          "post_date": "2021-07-24T10:29:17.897000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1398638,
          "author_name": "",
          "author_url": "",
          "post_date": "2021-07-24T10:59:30.643000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1398699,
          "author_name": "",
          "author_url": "",
          "post_date": "2021-07-24T12:09:09.253000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1399541,
          "author_name": "",
          "author_url": "",
          "post_date": "2021-07-25T12:26:50.780000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1330670,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-06-01T03:40:56.650000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1330668,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-06-01T03:40:44.843000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1316943,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-05-21T03:43:42.740000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1201902,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-02-15T18:19:59.523000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1200453,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-02-14T17:18:56.280000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 964060,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-08-09T14:59:09.060000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 1013877,
          "author_name": "",
          "author_url": "",
          "post_date": "2020-09-17T03:24:08.687000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 919055,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-07-07T17:23:11.233000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 896340,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-06-22T05:06:49.850000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 863943,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-05-27T16:56:28.410000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 741340,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-02-10T14:02:37.317000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 676029,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-18T22:58:35.167000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 691496,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-12-10T07:51:57.043000",
          "content": "",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 632983,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-09-24T09:33:50.123000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 589339,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-07-31T19:11:50.150000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 560973,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-06-26T02:09:04.477000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 491113,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-03-15T08:02:27.763000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 494881,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-03-20T10:54:02.333000",
          "content": "",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 490869,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-03-14T23:46:14.727000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 494433,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-03-19T20:31:10.357000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 494583,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-03-20T02:47:52.637000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 494671,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-03-20T05:24:01.430000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 494678,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-03-20T05:39:51.680000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 494778,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-03-20T08:55:54.290000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 505430,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-04-02T02:19:02.437000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 509650,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-04-08T05:00:48.843000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 510577,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-04-09T08:43:15.927000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 461807,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-27T03:21:08.397000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 462058,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-01-27T15:15:10.447000",
          "content": "",
          "votes": 6,
          "replies": []
        },
        {
          "id": 462185,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-01-27T20:33:10.613000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 463063,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-01-29T10:40:18.230000",
          "content": "",
          "votes": 2,
          "replies": []
        },
        {
          "id": 463135,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-01-29T13:43:19.400000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 463315,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-01-29T19:43:30.167000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 463648,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-01-30T11:15:39.467000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 465906,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-02-04T09:51:35.937000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 469669,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-02-11T16:28:35.453000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 469699,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-02-11T17:29:21.803000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 486633,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-03-09T06:20:22.700000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 486638,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-03-09T06:30:03.403000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 487053,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-03-10T02:40:17.393000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 487122,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-03-10T07:11:30.817000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 487163,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-03-10T08:38:24.137000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 487898,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-03-11T16:09:44.853000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1297783,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-05-08T10:01:13.497000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 820208,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-04-25T08:32:07.637000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 551905,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-06-13T09:12:56.900000",
      "content": "",
      "votes": 4,
      "replies": []
    },
    {
      "id": 531051,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-05-14T07:41:08.600000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 539189,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-05-29T16:54:23.153000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 527869,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-05-06T13:43:02.120000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 517369,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-04-16T00:35:31.237000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 523162,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-04-25T17:00:33.440000",
          "content": "",
          "votes": 2,
          "replies": []
        },
        {
          "id": 524763,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-04-29T13:33:18.367000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 524879,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-04-29T17:29:04.333000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 524978,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-04-29T22:38:54.190000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 509134,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-04-07T11:33:46.603000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 510575,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-04-09T08:41:08.023000",
          "content": "",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 507888,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-04-05T11:00:44.693000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 509025,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-04-07T08:14:09.493000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 509071,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-04-07T09:29:12.577000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 510578,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-04-09T08:45:35.273000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 510597,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-04-09T09:11:33.680000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 504999,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-04-01T12:45:53.480000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 505255,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-04-01T19:19:43.257000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 505661,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-04-02T11:18:49.993000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 509075,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-04-07T09:32:14.943000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 477622,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-02-25T01:37:32.563000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 476949,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-02-23T14:03:22.290000",
      "content": "",
      "votes": 1,
      "replies": [
        {
          "id": 476974,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-02-23T15:18:39.563000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 477253,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-02-24T08:04:30.200000",
          "content": "",
          "votes": 3,
          "replies": []
        },
        {
          "id": 477374,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-02-24T12:48:14.047000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 465121,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-02-02T11:24:29.937000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 461921,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-27T09:57:36.797000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 461668,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-26T17:14:27.237000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 461466,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-26T06:10:26.953000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 460344,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-23T14:02:49.553000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 459681,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-22T06:59:18.063000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 459515,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-21T22:32:53.887000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 2095233,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-01-11T08:49:20",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1576976,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-11-09T16:13:58.707000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 731549,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-01-28T19:22:08.777000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 458755,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-20T12:51:26.587000",
      "content": "",
      "votes": 3,
      "replies": []
    },
    {
      "id": 531134,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-05-14T11:10:39.907000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 475826,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-02-21T08:46:23.440000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 469147,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-02-10T15:33:34.473000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 468958,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-02-10T05:39:18.463000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 468774,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-02-09T16:18:29.650000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 466685,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-02-05T20:10:08.217000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 464618,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-02-01T06:54:31.947000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 464428,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-31T21:18:56.893000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 464340,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-31T16:45:16.877000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 463867,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-30T19:25:23.817000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 462948,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-29T06:29:29.863000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 462606,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-28T15:21:47.710000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 462405,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-28T08:52:51.127000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 461798,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-27T02:52:02.503000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 461674,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-26T17:31:21.290000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 461607,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-26T13:55:41.613000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 461251,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-25T16:19:50.190000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 461192,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-25T14:03:31.710000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 461084,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-25T07:08:52.363000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 460916,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-24T17:45:19.047000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 460696,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-24T08:57:32.033000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 460525,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-23T22:16:38.267000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 460014,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-22T20:15:53.677000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 459607,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-22T04:23:03.243000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 459573,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-22T02:36:12.237000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 459266,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-21T13:27:18.103000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 459125,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-21T08:30:59.003000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 458652,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-20T07:16:24.893000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 458596,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-20T02:47:31.300000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 458592,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-20T02:19:42.720000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 3163085,
      "author_name": "",
      "author_url": "",
      "post_date": "2025-03-30T09:29:00.087000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1883129,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-03T15:50:20.433000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1201790,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-02-15T16:59:25.487000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1197050,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-02-11T22:04:29.353000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1041566,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-10-07T20:14:00.917000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 620235,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-09-07T07:27:19.590000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 584512,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-07-26T05:24:04.717000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 507663,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-04-05T03:50:01.807000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 462089,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-01-27T16:33:06.763000",
      "content": "",
      "votes": 1,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "458525": "Congrats to all the winners, and thanks to the host and kaggle hosted such an interesting competetion.<br>\nI am sorry for late share, I have worked hard to prepare it in recent days,tried to verify my solution and to make sure it’s reproducible,stable,efficient as well as interpretative.\n\n**Overview**\n![enter image description here][1]\n**Challenges:**<br>\n*Extreme Imbalance,rare classes hard to train and predict but play an important role in the score.*<br>\n*Data distribution is not consistent in train set,test set,and HPA v18 external data.*<br>\n*The images are with high quality,but we must find a balance between model efficiency and accuracy.*<br>\n\n**Validation for CNNs:**<br>\nI split the val set according to https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/67819 great thanks to @trentb\n\nI found Focal Loss of the whole val set is a relative good metric to the model capability, F1 is not a good metric as it’s sensitive to the threshold and the threshold is depend on the distribution of the train and val set.\n\nI tried to evaluate the capability of a model by set the ratio of each class to the same as train set. I did so because I thought I should not adjust the thresholds according to the public LB,but if I set the ratio of the prediction stable,and,if the model is stronger,the score will improve. That’s to say,I used public LB as another validation set.\n\n**Training Time Augmentations:**<br>\nRotate 90,flip and randomly crop 512x512 patches from 768x768 images(or crop 1024x1024 patches from 1536x1536 images)\n\n\n**Data Pre-Processing:**\nRemove about 6000 duplicates samples from v18 external data, using hash method which been used to find test set leak.\n\nCalculate mean and std using train+test,and used them before feeding images to the model.\n\n**Model training:**<br>\n**Optimizer**:Adam<br>\n**Scheduler**:<pre>lr = 30e-5\nif epoch &gt; 25:\n    lr = 15e-5\nif epoch &gt; 30:\n    lr = 7.5e-5\nif epoch &gt; 35:\n    lr = 3e-5\nif epoch &gt; 40:\n    lr = 1e-5\n</pre>\n**Loss Functions**:FocalLoss+Lovasz,I did not use macro F1 soft loss, because the batch size is small and some classes are rare, I think it’s not suitable for this competition.I used lovasz loss function because I thought although the IOU and F1 are not the same,but it can balance the Recall and Precision to some extend.\n\n**I did not use oversample.**<br>\n**Model structure:**\nMy best model is a densenet121 model, which is very simple,the head of the model is almost same as public kernel https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb by @iafoss.\n<pre>  (1): AdaptiveConcatPool2d(\n    (ap): AdaptiveAvgPool2d(output_size=(1, 1))\n    (mp): AdaptiveMaxPool2d(output_size=(1, 1))\n  )\n  (2): Flatten()\n  (3): BatchNorm1d(2048, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n  (4): Dropout(p=0.5)\n  (5): Linear(in_features=2048, out_features=1024, bias=True)\n  (6): ReLU()\n  (7): BatchNorm1d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)\n  (8): Dropout(p=0.5)\n  (9): Linear(in_features=1024, out_features=28, bias=True)\n</pre>\nI tried all kinds of network structure according to the Multi-Label classification papers, the results were not improved instead of their beautiful structures and theory behind them.:) <br>\n**Prediction time augmentations:**\nI predicted the test set by using best focal loss epoch with 4 seeds to random crop 512x512 patches from 768x768 images, and got the max probs from the predictions. \n\n**Post-processing:**\nAt the final stage of the competition, I decided to generate two submissions:\n1.The first one was keep the ratio of the labels to the public test set,since we did not know the ratio of the rare classes,I set them to the ratio of the train set.\n2.The second one was keep the ratio of the labels to the average ratio of train set and public test set.\n\nWhy? Although I tried to add or reduce the count of rare classes by 2-5 samples,the public LB can improve, but this was a dangerous way.I just only used it to   evaluate the possible shakeup.\n<hr>\nMetric Learning:\nI took part in the landmark recognition challenge in May 2018,https://www.kaggle.com/c/landmark-recognition-challenge,and I had planed to use metric learning in that competition,but time was limited after I finished the TalkingData competition. But I read many  papers related,and did many experiments after that. \n\nWhen I analyzed the predictions of my models,I wanted to find the nearest samples to compare,I first used the features from CNN model,I found they are not so good,so I decided to try Metric Learning.\n\nI found it’s very hard to train in this competition,it took me a lot of time but the result was not so good,and I found the same algorithm can work very well in Whale identification competition,but I did not give up and finally found a good model in last two days.\n\nBy using the model,I could find the nearest sample on validation set,**the top1 accuracy &gt;0.9**\nThese are the demo:<br>\nCorrect sample with single Label\n![][2]\nCorrect sample multiple labels\n![][3]\nCorrect sample with rare label:Lipid droplets\n![][4]\nCorrect sample with rare label:Rods &amp; rings\n![][5]\nMissed a label\n![][6]\nIncorrectly add a label\n![][7]\n\nSince the top1 accuracy&gt;0.9,I thought I could just use the metric learning result to set the labels of test set. But I found that the test set is a little different to V18, and some of samples can not find nearest neighbor in train set and V18. So I set a threshold and replace the labels with found sample’s. Fortunately,the threshold is not sensitive to the threshold. Replacing 1000 samples in test set is almost the same score as replacing 1300 samples. By doing so, my score can improve 0.03+,which was a huge improvement in this competition.\n\nI think my method is important not only improve the score,it can help HPA and their users in following way:<br>\n*1.When someone want to label or learn to label an image or check the quality, he can get the nearest images for referring to.<br>\n2.We can cluster the images by the metric and find the label noises and then improve the quality of the labels.<br>\n3.We can explain why the model is good by visualizing the predictions.<br>*\n\n**Ensemble:**\nTo keep the solution simple,I don't discuss the ensemble here, a single model or even a single fold + metric learning result is good enough to get the first place.\n\n**The scores on LB:**\n![][8]\n<br>\nI am sorry I can not describe the details of this part now, as I mentioned before,the whale identification competition is still on-going. \n\n\n**Introspection**:\nBefore I entered this competition,I never expected I can find a way out,it’s very hard to build a stable CV and the score is sensitive to the distribution of rare classes.A gold medal is my max expectation.<br>\nI feel kaggle competitions are becoming harder and harder.In all honesty,there are no secrets but hard work.I treat every competition as a force to push me forward.I force myself not to learn and use too much competition skills but knowledge to solve real problems.<br>\nIt’s quite lucky I found a relatively good solution in this competition as I failed to find a Reinforcement Learning algorithm in Track ML, and failed to finish a good CNN-RNN model in Quick Draw competition in time,but anyway,if we compete only for win,we may loss,if we compete for learning and providing useful solution to the host,nothing to loss.\n\n**Update,Metric Learning Part:**\n\nSorry for late update!\n\nAs I noticed that the sample with same antibody-id have almost same labels, so I thought I may treat the antibody-id as face id, and use face-recognition algorithms on HPA v18 dataset.\n\nWhen training, I used V18 data antibody IDs to split the samples,keep a sample in validation set,and put the other samples with same ID in train set.I used top1-acc as validation metric.\n\n**Metric Learning Model:**\nNetwork:resnet50\nAugmentations:Rotate 90,flip\nLoss Functions:ArcFaceLoss\nOptimizer:Adam\nScheduler:lr = 10e-5, 50 epochs.\n\n**Model details:**\n\n<pre>class ArcFaceLoss(nn.modules.Module):\n    def __init__(self,s=30.0,m=0.5):\n        super(ArcFaceLoss, self).__init__()\n        self.classify_loss = nn.CrossEntropyLoss()\n        self.s = s\n        self.easy_margin = False\n        self.cos_m = math.cos(m)\n        self.sin_m = math.sin(m)\n        self.th = math.cos(math.pi - m)\n        self.mm = math.sin(math.pi - m) * m\n\n    def forward(self, logits, labels, epoch=0):\n        cosine = logits\n        sine = torch.sqrt(1.0 - torch.pow(cosine, 2))\n        phi = cosine * self.cos_m - sine * self.sin_m\n        if self.easy_margin:\n            phi = torch.where(cosine &gt; 0, phi, cosine)\n        else:\n            phi = torch.where(cosine &gt; self.th, phi, cosine - self.mm)\n\n        one_hot = torch.zeros(cosine.size(), device='cuda')\n        one_hot.scatter_(1, labels.view(-1, 1).long(), 1)\n        # -------------torch.where(out_i = {x_i if condition_i else y_i) -------------\n        output = (one_hot * phi) + ((1.0 - one_hot) * cosine)\n        output *= self.s\n        loss1 = self.classify_loss(output, labels)\n        loss2 = self.classify_loss(cosine, labels)\n        gamma=1\n        loss=(loss1+gamma*loss2)/(1+gamma)\n        return loss\n\nclass ArcMarginProduct(nn.Module):\n    r\"\"\"Implement of large margin arc distance: :\n        Args:\n            in_features: size of each input sample\n            out_features: size of each output sample\n            s: norm of input feature\n            m: margin\n            cos(theta + m)\n        \"\"\"\n    def __init__(self, in_features, out_features):\n        super(ArcMarginProduct, self).__init__()\n        self.weight = Parameter(torch.FloatTensor(out_features, in_features))\n        # nn.init.xavier_uniform_(self.weight)\n        self.reset_parameters()\n\n    def reset_parameters(self):\n        stdv = 1. / math.sqrt(self.weight.size(1))\n        self.weight.data.uniform_(-stdv, stdv)\n\n    def forward(self, features):\n        cosine = F.linear(F.normalize(features), F.normalize(self.weight.cuda()))\n        return cosine\n\n def __init__(self,....\n \t... ...\n\tself.avgpool = nn.AdaptiveAvgPool2d(1)\n\tself.arc_margin_product=ArcMarginProduct(512, num_classes)\n\tself.bn1 = nn.BatchNorm1d(1024 * self.EX)\n\tself.fc1 = nn.Linear(1024 * self.EX, 512 * self.EX)\n\tself.bn2 = nn.BatchNorm1d(512 * self.EX)\n\tself.relu = nn.ReLU(inplace=True)\n\tself.fc2 = nn.Linear(512 * self.EX, 512)\n\tself.bn3 = nn.BatchNorm1d(512)\n\ndef forward(self, x):\n\t... ...\n\tx = torch.cat((nn.AdaptiveAvgPool2d(1)(e5), nn.AdaptiveMaxPool2d(1)(e5)), dim=1)\n\tx = x.view(x.size(0), -1)\n\tx = self.bn1(x)\n\tx = F.dropout(x, p=0.25)\n\tx = self.fc1(x)\n\tx = self.relu(x)\n\tx = self.bn2(x)\n\tx = F.dropout(x, p=0.5)\n\n\tx = x.view(x.size(0), -1)\n\n\tx = self.fc2(x)\n\tfeature = self.bn3(x)\n\n\tcosine=self.arc_margin_product(feature)\n\tif self.extract_feature:\n\t    return cosine, feature\n\telse:\n\t    return cosine\n</pre>\n\nPlease refer to the paper:\nArcFace: Additive Angular Margin Loss for Deep Face Recognition \nhttps://arxiv.org/pdf/1801.07698v1.pdf\nDeep Face Recognition: A Survey    \nhttps://arxiv.org/pdf/1804.06655.pdf\n\nAs I was very busy after this competition(and will be for a little long time),I used almost the same model finsihed the Whale competition and the winners' models are very good, so I think I need not write a summary of that competition. I the person re-idenfication related papers and solutions are good choice to Whale competition.\n\nThanks for your patience! \n\n\n  [1]: https://bestfitting.github.io/kaggle/protein/images/001_pipeline.png\n[2]:https://bestfitting.github.io/kaggle/protein/images/002_Sample%20with%20single%20Label.jpg\n[3]:https://bestfitting.github.io/kaggle/protein/images/003_Sampe%20with%20multi%20labels.jpg\n[4]:https://bestfitting.github.io/kaggle/protein/images/004_Rare%20Label_Lipid%20droplets.jpg\n[5]:https://bestfitting.github.io/kaggle/protein/images/005_Rare%20Label_Rods%20%26%20rings.jpg\n[6]:https://bestfitting.github.io/kaggle/protein/images/006_Missed%20a%20label.jpg\n[7]:https://bestfitting.github.io/kaggle/protein/images/007_incorrectly%20add%20a%20label.jpg\n[8]: https://bestfitting.github.io/kaggle/protein/images/008_scores.png\n",
    "459759": "Thanks for sharing, this shows that a rather simple, but well thought solution overcomes more complex ensembles.  \n\n&gt; I feel kaggle competitions are becoming harder and harder.\n\nI guess many of us can relate to this!",
    "538844": "Congratulations on currently being first on Kaggle, your work is inspiring an entire Generation. Keep up the good work 💯 ",
    "458547": "Congratulations not only on the impressive result but on having the courage to try a new technique and then find a way to have it work so well! \n\nAppreciating that you are very busy, I wonder if you could take a minute to post a link towards any useful article you found to get started with understanding the metric learning approach?",
    "820135": "Thanks. This is a very helpful piece with good learning material for beginners.",
    "792253": "Really amazing",
    "539913": "Excellent report, would be very helpful if top solution got reports with this quality, congrats!",
    "508855": "Hi Bestfitting, how did you do lovasz loss on label predictions instead of mask predictions? Thanks!",
    "459954": "Congratulations! Thank you for writing your solution. If I may ask you a few questions:\n\n1. I did not use oversample -- it did not improve the score or you did not go for it as the score was good enough?\n\n2. For metric learning:  did you use siamese or triple-net (like anchor-positive-negative) for this set?\n\n3. ```So I set a threshold and replace the labels with found sample’s. Fortunately, the threshold is not sensitive to the threshold.``` -- This one I did not quite understand... could you please add more comments about setting threshold, and what you mean by threshold is not sensitive to the threshold?\n\nI am a newbie, sorry if some questions are stupid :)))",
    "459542": "Congratulations on your win and thanks for sharing the solution. It's simple and elegant. Surely knowledge is more valuable than competition skills, and you have proved it many times. ",
    "458586": "Congratulations! This is a large margin win.\nI'v started working on the Whale competition too and hope to catch up with you.",
    "459151": "Congrats Bestfitting for your consistent winning while being solo in many of competitions. Truly inspirational. \n\nAnd I praise your philosophy : learn and try to push things forward by testing new and efficient approaches, instead of solely competing for winning. ",
    "458919": "**if we compete only for win,we may loss,if we compete for learning and providing useful solution to the host,nothing to loss.** I have not edited this but these are great words put together. Congratulations!!! ",
    "474197": "This is inspirational to many",
    "471694": "Thanks for the great writeup of an impressive solution! If you don't mind sharing, roughly  how many hours did you spend on this competition?",
    "470744": "Great work, Thanks for sharing @bestfitting",
    "466124": "This is so amazing and many thanks for sharing.  Could you let me know whether you will be interested in consulting/mentoring? Please send me a message if you do.  Thanks again!!",
    "465962": "Thank you for sharing this clear but enough detail solution.",
    "465833": "Amazing read!!",
    "464438": "Thank you for the approach! It really minds me.",
    "464174": "Nice",
    "463982": "Wonderful!!",
    "463290": "Congratulations and thank your for sharing your approach!",
    "463247": "erudite! _/\\_",
    "463131": "hi best you are indeed the best..\nmay i request you  you to let me know how u download the tiff images from gcp  ,if you can post the script would be great. https://console.cloud.google.com/storage/browser/kaggle-human-protein-atlas\n",
    "463037": "Thanks for sharing your experience with us!!!",
    "462711": "cool! :D",
    "462692": "Amazing! Tnx for sharing!!!",
    "462683": "Congratulations and thank you for writing this - as someone newish to kaggle and ML competitions it's great to see what people doing well are doing. Even if you may not realise it, I learnt a lot from this and have plenty to go away and read!\n\nAlso, thank you for the words at the end - it's good to know everyone finds it hard!! :)",
    "462595": "Nice",
    "462421": "it's so good",
    "462316": "Impressive. Thanks for sharing such a good solution! kudos! ",
    "462129": "Congrats. Thanks for sharing this wonderful information.",
    "462034": "Great work!",
    "462005": "Great work!",
    "461797": "Awesome! Thx for ur sharing!",
    "461657": "Great work!!!!",
    "461548": "Congrats on the win! You're not only winning one competition after another, you are doing this consistently by large margins over other top Kagglers. Truly exceptional",
    "461426": "cool!",
    "461392": "Great Work!! ",
    "461075": "great",
    "460794": "amazing read!",
    "460729": "Great!",
    "460716": "I am really intrigued by the metric learning. Are you going to release some more details on the implementation after the humpback comp is over? ",
    "460582": "Really impressed by:\n\n&gt; if we compete only for win,we may loss,if we compete for learning and\n&gt; providing useful solution to the host,nothing to loss\n\nyour metric learning pipeline is also a great idea, you deserve the best. \n",
    "460380": "Great work! I learn a lot from it! Thank you very much!",
    "460323": "nice work!",
    "460322": "great and impressed work!",
    "460320": "nice work! ",
    "460248": "Thanks for sharing. For the first stage CNN models (before metric learning), how did you choose a threshold for the test predictions?",
    "460145": "Magnific! :)\nThanks for share for us your approach.\nCongratulations!!",
    "460139": "Hey Bestfitting,\n\nAny particular reason as for why DenseNet outperforms ResNet34 or InceptionResNet50 for that matter? I spent the entirety of the competition fine-tuning the aftermentioned networks. Needless to say, it was way off the charts. \n\nCould you tell me why d you choose the DenseNet? Also, for the sake of future competitions, how do I choose which model to train using transfer learning, what's the gist for model selection?\n\nThanks for sharing your solution and yes, congratulations!",
    "459862": "Thanks for sharing!!!\nHow to find nearest samples between test and val?",
    "459764": "Thanks for sharing! Did you used pretrained models (especially for your lr schedule)",
    "459703": "Great work! I learn a lot from it! Thank you very much!",
    "459668": "Great works!! Quite impressive",
    "459289": "Congratulations...",
    "459246": "Congratulations! ",
    "459108": "Congratulation for your success, bestfitting! Thanks for sharing.",
    "459091": "Sir\n Congratulations and thank you for sharing.\n",
    "458887": "I am in awe. \n\nThank you for these excellent insights. \n\nAnd thank you for not forgetting that despite all the effort and work expended here to improve machine learning, this is really all about human learning. \n\nLet’s keep improving together!",
    "458825": "Great Work !!!",
    "458792": "Congratulations bestfitting for your amazing work, it's incredible all you did in such a short period of time. It's great to learn from you.",
    "458597": "Congrats and thanks for the motivation. Wish to see your solution after whale detection finished : )",
    "458560": "Congratulations and thank you for sharing.",
    "458541": "Thank you for sharing your solution, and apologies for bringing up your name in the other horrible santa discussion. I hope you understand (unlike some of the people there) it was a counterexample.\n\n\nLooking forward to the metric learning!",
    "458533": "\"if we compete for learning and providing useful solution to the host,nothing to loss.\"\nI agree with you.",
    "524144": "Awesome! Congrats! I learned a lot from you and big thanks for your generous write-up.",
    "486393": "Greate!",
    "484869": "Congratulations @bestfitting , How much time you will spend after entering a competition?",
    "478033": "thnx",
    "474899": "Great write up!!\nThanks..\n\nDid you use gradient accumulation for the large image sizes?\nIf yes, how did you handle the Batch Normalization for small batch sizes. I think gradient accumulation would be better with a custom BN, like group normalization or instance normalization especially for extremely low batch sizes.\n\nHere is an interesting blog post + paper on group normalization as an alternative to BN:\nhttps://medium.com/syncedreview/facebook-ai-proposes-group-normalization-alternative-to-batch-normalization-fb0699bffae7\n\nhttp://openaccess.thecvf.com/content_ECCV_2018/papers/Yuxin_Wu_Group_Normalization_ECCV_2018_paper.pdf",
    "470628": "can u share your kernel if u don't mind ????",
    "465709": "Thanks for sharing! I didn't participate this competition but I am here for some inspirations. I am confused about the \"Post_Processing\" part after stage 1. You said you kept the ratio of each label to the public test set for one of your submissions. But how do you know the ratio for each label in the public test set before setting the threshold?",
    "465516": "Amazing job!!! Congratulations and many thanks to share it :-)",
    "465232": "Congrats @bestfitting !\n\nThanks a lot for sharing your solution.\n\nThere were classes in the dataset, like Cytokinetic Bridges, which appeared in a very localized way, and only once or twice per image.\n\nHow did you avoid that these regions of interest (bridges, etc.) were not taken off from the images by the random crops?\n\nI can figure out, that the max(probs) in TTA was enough to solve this problem to perform predictions... but didn't it make worse the training of such a unbalanced dataset?",
    "462548": "Great Work",
    "462287": "Brilliant , and I admire you humbleness above all.\n\"It’s quite lucky I found a relatively good solution in this competition\"\n",
    "462218": "Nice man, nice!",
    "458959": "Congrats on the win! You're not only winning one competition after another, you are doing this consistently by large margins over other top Kagglers. Truly exceptional",
    "458750": "Congratulations!",
    "458630": "This was amazing, Looking Forward to the metric learning.",
    "458610": "Congratulations on the win! This is such an elegant solution, and you are truly the best of the best.",
    "592537": "why don't have angone use tensorflow.slim to solve this classification problem?\nI am a newbie, sorry if some questions are stupid :)))",
    "2562544": " The concept that simpler organisms can be more fit is often related to evolutionary biology. In some cases, simpler organisms may have advantages in terms of energy efficiency, adaptability, and reproductive strategies, allowing them to thrive in certain environments\n\nThe parallel between using neural networks in biology and the phenomenon of simple organisms thriving is captivating. In the intricate landscape of cell image classification, the elegance of simple neural network models mirrors the adaptability and efficiency seen in less complex life forms. Just as nature often favors simplicity for survival, these streamlined models prove to be formidable predictors in deciphering the intricacies of biological data. It's a testament to the notion that, in both artificial and natural realms, simplicity can wield a surprising and powerful influence, unlocking insights into the complexities of life on both micro and macro scales.\n",
    "2241693": "coolio. Lots of amazing ideas, love it.",
    "2238665": "Thanks for sharing the detail approach.got to learn about several useful ideas.",
    "1910181": "thankyou sir",
    "1367632": "Hi @bestfitting,\nI know, I know, this is old but I have run into a similar problem in a project and when trying to implement the metric learning, I realised its a tad complicated with multilabel. The whale competition is multiclass so perfect for contrastive or arcface loss but this competition was multi-label, so how did you define the distances/contrast? I found that if you define every combination of labels as class, the network is a bit perplexed by the overlap. Did you use triplet or only a pair?",
    "1330670": "great work",
    "1330668": "great work!",
    "1316943": "Hi @bestfitting , Thanks for this write up\n\nI was wondering if your work process or results of this project would have been better if you had more GPU's on your system ?",
    "1201902": "@bestfitting Amazing work. its clean work especially code part.",
    "1200453": "Real Stuff thanks for sharing this material.",
    "964060": "the data is greater than 17GB . how do i unzip it? (windows is showing about 10 hours)",
    "919055": "Hi @bestfitting can you please share your implementation?",
    "896340": "Congratulations!\n\n",
    "863943": "Great Thanks a lot for valuable information.",
    "741340": "Hi @bestfitting, your work is nice and thank you for sharing. I'm new to this field and I feel a bit confused about why there is no method using traditional machine learning techniques like SVM for feature selection, since I read some papers regarding protein subcellular localization prediction which use SVM. ",
    "676029": "Hi @bestfitting\nCongratulations on your win.\nI was wondering how many crops you did per image? And why not resize instead of crop?\nI was also wondering about what research papers you tried that didn't actually work.\nYou said you split your validation set using stratification but I thought that stratification was for building train and test sets.\nThanks ",
    "632983": "Good solution!",
    "589339": "amazed!",
    "560973": "wonderful job!",
    "491113": "Thank you for sharing your ideas!\n\nHow did you get antibody-IDs for samples?",
    "490869": "@bestfitting, another question about the head... I have never seen something like the AdaptiveConcatPool2d part that concats max and avg (might be that I am just too newbie). Is it to let the model figure out by itself which one (or part of) the pooling systems to use?\nI know you are busy, no rush. Just curious",
    "461807": "I am trying to use focal loss but its seems to be converging really really slowly. I have 4.4 after 5 epochs. wat did you use as gamma and alpha? (I used 2 and 0.25)",
    "1297783": "",
    "820208": "",
    "551905": "",
    "531051": "",
    "527869": "",
    "517369": "",
    "509134": "",
    "507888": "",
    "504999": "",
    "477622": "",
    "476949": "",
    "465121": "",
    "461921": "",
    "461668": "",
    "461466": "",
    "460344": "",
    "459681": "",
    "459515": "",
    "2095233": "Thank you for the notebook very useful.",
    "1576976": "thank you for sharing, very useful",
    "731549": "thanks a lot......",
    "458755": "Thank you for your writeup!",
    "531134": "Thanks, it's amazing work !",
    "475826": "Thanks for sharing and congrats!",
    "469147": "Nice! Thank you! :)",
    "468958": "thanks for sharing ! ",
    "468774": "Thanks for sharing!",
    "466685": "Thanks for sharing !",
    "464618": "Thanks for sharing!",
    "464428": "Thanks for sharing !",
    "464340": "Nice, thanks for sharing",
    "463867": "Nice! Thanks!",
    "462948": "Thanks for sharing!",
    "462606": "thanks for sharing :) ",
    "462405": "Very helpful piece. Thanks ",
    "461798": "Thanks. arigatou.",
    "461674": "Thank you, Excellent work! ",
    "461607": "Thanks for sharing!",
    "461251": "Thanks for the share! :)",
    "461192": "Thanks. Great work!",
    "461084": "Thanks for sharing!",
    "460916": "Thank you, great work!",
    "460696": "thanks",
    "460525": "Thanks for the report!",
    "460014": "Thanks for sharing",
    "459607": "Thanks for sharing!!",
    "459573": "Thanks for sharing your amazing work!",
    "459266": "Great work!! Thanks for sharing!",
    "459125": "congrats. thank you for sharing",
    "458652": "Thank you for sharing , Great work",
    "458596": "Thank you for sharing your solution!",
    "458592": "Great writeup! Thanks a lot.",
    "3163085": "Thanks, for this valuable knowledge.",
    "1883129": "thank you for sharing, very useful",
    "1201790": "Thanks,\nthis is informative ",
    "1197050": "Cool stuff! Thanks a lot!",
    "1041566": "Thank you for your work!",
    "620235": "Great work! Thanks for sharing!",
    "584512": "Thanks, good work. ",
    "507663": "Thanks for sharing this. ",
    "462089": "Great work! Thanks very much"
  }
}