{
  "id": 82352,
  "title": "7th place Pure Magic thanks Radek solution: classification",
  "url": "/competitions/humpback-whale-identification/discussion/82352",
  "author_name": "old-ufo",
  "post_date": "2019-03-01T00:13:17.619000",
  "votes": 82,
  "comment_count": 36,
  "views": 0,
  "content": "<p><a href=\"https://medium.com/@ducha.aiki/thanks-radek-7th-place-solution-to-hwi-2019-competition-738624e4c885\">https://medium.com/@ducha.aiki/thanks-radek-7th-place-solution-to-hwi-2019-competition-738624e4c885</a></p>\n\n<p>Cleaned-up version of the code is here <a href=\"https://github.com/ducha-aiki/whale-identification-2018\">https://github.com/ducha-aiki/whale-identification-2018</a></p>\n\n<p>Metric learning part by <a href=\"/geneva\">@geneva</a> and <a href=\"/igorkrashenyi\">@igorkrashenyi</a>  : <a href=\"https://medium.com/&lt;a href=\">@anastasiya</a>.mishchuk/thanks-radek-7th-place-solution-to-hwi-2019-competition-metric-learning-story-c94b74a3eaa2\"&gt;https://medium.com/<a href=\"/anastasiya\">@anastasiya</a>.mishchuk/thanks-radek-7th-place-solution-to-hwi-2019-competition-metric-learning-story-c94b74a3eaa2 Congrats to winners!</p>",
  "messages": [
    {
      "id": 480975,
      "postDate": "2019-03-01T00:13:17.620Z",
      "content": "<p><a href=\"https://medium.com/@ducha.aiki/thanks-radek-7th-place-solution-to-hwi-2019-competition-738624e4c885\">https://medium.com/@ducha.aiki/thanks-radek-7th-place-solution-to-hwi-2019-competition-738624e4c885</a></p>\n\n<p>Cleaned-up version of the code is here <a href=\"https://github.com/ducha-aiki/whale-identification-2018\">https://github.com/ducha-aiki/whale-identification-2018</a></p>\n\n<p>Metric learning part by <a href=\"/geneva\">@geneva</a> and <a href=\"/igorkrashenyi\">@igorkrashenyi</a>  : <a href=\"https://medium.com/&lt;a href=\">@anastasiya</a>.mishchuk/thanks-radek-7th-place-solution-to-hwi-2019-competition-metric-learning-story-c94b74a3eaa2\"&gt;https://medium.com/<a href=\"/anastasiya\">@anastasiya</a>.mishchuk/thanks-radek-7th-place-solution-to-hwi-2019-competition-metric-learning-story-c94b74a3eaa2 Congrats to winners!</p>",
      "rawMarkdown": "https://medium.com/@ducha.aiki/thanks-radek-7th-place-solution-to-hwi-2019-competition-738624e4c885\n\nCleaned-up version of the code is here https://github.com/ducha-aiki/whale-identification-2018\n\nMetric learning part by @geneva and @igorkrashenyi  : https://medium.com/@anastasiya.mishchuk/thanks-radek-7th-place-solution-to-hwi-2019-competition-metric-learning-story-c94b74a3eaa2 Congrats to winners!\n",
      "votes": 81
    },
    {
      "id": 480979,
      "postDate": "2019-03-01T00:16:23.863Z",
      "content": "<p>Thanks a lot for this solution! Congrats on your gold medal! :-)</p>",
      "rawMarkdown": "Thanks a lot for this solution! Congrats on your gold medal! :-)\n",
      "votes": 13
    },
    {
      "id": 481265,
      "postDate": "2019-03-01T07:51:06.530Z",
      "content": "<p>Thank you for sharing your solutions! :-). Would you mind if you can share your source code solutions?</p>",
      "rawMarkdown": "Thank you for sharing your solutions! :-). Would you mind if you can share your source code solutions?",
      "votes": 12
    },
    {
      "id": 481529,
      "postDate": "2019-03-01T14:14:18.710Z",
      "content": "<p>Congrats! And excellent write-up.</p>\n\n<p>Gotta admit, I was surprised by the VGG-16 result being better than ResNet-50. Just goes to show there is still much to learn about deep learning.</p>",
      "rawMarkdown": "Congrats! And excellent write-up.\n\nGotta admit, I was surprised by the VGG-16 result being better than ResNet-50. Just goes to show there is still much to learn about deep learning.",
      "votes": 3
    },
    {
      "id": 481194,
      "postDate": "2019-03-01T06:18:15.203Z",
      "content": "<p>Hey @old-ufo</p>\n\n<p>If it is possible, we would love to see your code for such an interesting ideas implemented in fastai.. Perhaps droping a link too in the fastai forum  for your medium blog post would be inspiring for other folks there... </p>\n\n<p>As <a href=\"/alexandrecc\">@alexandrecc</a>  well put <a href=\"https://hackernoon.com/interview-with-radiologist-fast-ai-fellow-and-kaggle-expert-dr-alexandre-cadrin-chenevert-94145d446da8\">phrase describing his emotions</a> toward the fastai community (which I feel exactly, once I see any fastai mate here in kaggle):</p>\n\n<p><em>It is fascinating to see how the fast.ai students are tightly bound together. We are like a big international family.  - Dr. Alexandre Cadrin-Chenevert</em></p>",
      "rawMarkdown": "Hey @old-ufo\n\nIf it is possible, we would love to see your code for such an interesting ideas implemented in fastai.. Perhaps droping a link too in the fastai forum  for your medium blog post would be inspiring for other folks there... \n\nAs @alexandrecc  well put [phrase describing his emotions][1] toward the fastai community (which I feel exactly, once I see any fastai mate here in kaggle):\n\n*It is fascinating to see how the fast.ai students are tightly bound together. We are like a big international family.  - Dr. Alexandre Cadrin-Chenevert*\n\n\n  [1]: https://hackernoon.com/interview-with-radiologist-fast-ai-fellow-and-kaggle-expert-dr-alexandre-cadrin-chenevert-94145d446da8",
      "votes": 3,
      "replies": [
        {
          "id": 481316,
          "postDate": "2019-03-01T08:52:41.887Z",
          "content": "<p>I am not fast.ai student, but I admire community there :) I will put some code online soon.</p>",
          "rawMarkdown": "I am not fast.ai student, but I admire community there :) I will put some code online soon.",
          "votes": 2
        },
        {
          "id": 481328,
          "postDate": "2019-03-01T09:12:32.800Z",
          "content": "<p>Thank you very much @old-ufo! :-)</p>",
          "rawMarkdown": "Thank you very much @old-ufo! :-)",
          "votes": 12
        },
        {
          "id": 481753,
          "postDate": "2019-03-01T19:57:51.493Z",
          "content": "<p>Hey, wassup, brother ! </p>",
          "rawMarkdown": "Hey, wassup, brother ! ",
          "votes": 1
        }
      ]
    },
    {
      "id": 481006,
      "postDate": "2019-03-01T00:55:49.490Z",
      "content": "<p>Thanks for the great write-up..\nI wished if you could put for each decision you chose, why did you think to try that?</p>\n\n<p>One of the key things when I read, if I want to get better, is to understand the thinking process.. There are hundreds of choices and no way to try even a small chunk of them... So what made you to think choosing center loss,  temperature scaling, adding 1-NN distance classifier,  EnsembleNet-like 4 heads, changing backbone to VGG16-BN   ...etc ?</p>",
      "rawMarkdown": "Thanks for the great write-up..\nI wished if you could put for each decision you chose, why did you think to try that?\n\nOne of the key things when I read, if I want to get better, is to understand the thinking process.. There are hundreds of choices and no way to try even a small chunk of them... So what made you to think choosing center loss,  temperature scaling, adding 1-NN distance classifier,  EnsembleNet-like 4 heads, changing backbone to VGG16-BN   ...etc ?",
      "votes": 3,
      "replies": [
        {
          "id": 481033,
          "postDate": "2019-03-01T01:35:16.807Z",
          "content": "<p>I selected those, which are easy to implement AND give nice results in publications/competitions. For example, Center loss is very popular in metric learning and couple lines of codes. \nTemperature scaling is one coefficient, again you can code it in 5 minutes.  <a href=\"/martinpiotte\">@martinpiotte</a> solution was too hard to implement fast - so I postponed it until classification stop help me. \nVGG16 was advice from friend of mine, actually :)</p>",
          "rawMarkdown": "I selected those, which are easy to implement AND give nice results in publications/competitions. For example, Center loss is very popular in metric learning and couple lines of codes. \nTemperature scaling is one coefficient, again you can code it in 5 minutes.  @martinpiotte solution was too hard to implement fast - so I postponed it until classification stop help me. \nVGG16 was advice from friend of mine, actually :)",
          "votes": 4
        }
      ]
    },
    {
      "id": 481668,
      "postDate": "2019-03-01T17:42:44.367Z",
      "content": "<p>I uploaded minimalistic == clean version of the code: <a href=\"https://github.com/ducha-aiki/whale-identification-2018\">https://github.com/ducha-aiki/whale-identification-2018</a></p>",
      "rawMarkdown": "I uploaded minimalistic == clean version of the code: https://github.com/ducha-aiki/whale-identification-2018",
      "votes": 1,
      "replies": [
        {
          "id": 482841,
          "postDate": "2019-03-03T18:16:00.837Z",
          "content": "<p>Did you test which performance on LB this code achieves?</p>",
          "rawMarkdown": "Did you test which performance on LB this code achieves?"
        },
        {
          "id": 482903,
          "postDate": "2019-03-03T20:15:50.327Z",
          "content": "<p>\"Change backbone to VGG16-BN — 0.942 lb\nChange pooling to constant GeM(3.74) pooling — 0.944 lb.\nThis is the best results I was able to get from ImageNet-pretrained single network.\"</p>\n\n<p>This is this network</p>",
          "rawMarkdown": "\"Change backbone to VGG16-BN — 0.942 lb\nChange pooling to constant GeM(3.74) pooling — 0.944 lb.\nThis is the best results I was able to get from ImageNet-pretrained single network.\"\n\nThis is this network",
          "votes": 1
        }
      ]
    },
    {
      "id": 481261,
      "postDate": "2019-03-01T07:47:46.700Z",
      "content": "<p>Congratulations <a href=\"/oldufo\">@oldufo</a> and thanks for sharing your blog. I hope I can learn a lot from your blog.</p>",
      "rawMarkdown": "Congratulations @oldufo and thanks for sharing your blog. I hope I can learn a lot from your blog.",
      "votes": 1
    },
    {
      "id": 481022,
      "postDate": "2019-03-01T01:12:51.447Z",
      "content": "<p>Just went through the write up it is truly awesome.. Thanks for the detailed write up..</p>",
      "rawMarkdown": "Just went through the write up it is truly awesome.. Thanks for the detailed write up..",
      "votes": 1
    },
    {
      "id": 480993,
      "postDate": "2019-03-01T00:26:43.613Z",
      "content": "<p>Great work! Thanks for the detailed write-up.</p>",
      "rawMarkdown": "Great work! Thanks for the detailed write-up.",
      "votes": 1,
      "replies": [
        {
          "id": 480997,
          "postDate": "2019-03-01T00:36:34.637Z",
          "content": "<p>You are welcome. I like when people share their solutions - so I have to share mine to be fair :)</p>",
          "rawMarkdown": "You are welcome. I like when people share their solutions - so I have to share mine to be fair :)",
          "votes": 2
        },
        {
          "id": 480998,
          "postDate": "2019-03-01T00:42:41.743Z",
          "content": "<p>You are absolutely right. My solution is pretty lame compared to you top-10 beasts, but you have inspired me to post it anyway. Congrats on the great work!</p>",
          "rawMarkdown": "You are absolutely right. My solution is pretty lame compared to you top-10 beasts, but you have inspired me to post it anyway. Congrats on the great work!",
          "votes": 1
        },
        {
          "id": 481193,
          "postDate": "2019-03-01T06:16:30.093Z",
          "rawMarkdown": "",
          "isDeleted": true
        }
      ]
    },
    {
      "id": 481879,
      "postDate": "2019-03-02T01:48:57.520Z",
      "content": "<p>Congratulations and thanks for the write-up!</p>\n\n<p>How did you combine the result of the 1-NN with the one of the network? I don't completely understand how this works:</p>\n\n<p>&gt; New whale is reperesented by another threshold, as well as nearest image from “new_whale” class</p>\n\n<p>Thanks</p>",
      "rawMarkdown": "Congratulations and thanks for the write-up!\n\nHow did you combine the result of the 1-NN with the one of the network? I don't completely understand how this works:\n\n&gt; New whale is reperesented by another threshold, as well as nearest image from “new_whale” class\n\nThanks",
      "votes": 2,
      "replies": [
        {
          "id": 482048,
          "postDate": "2019-03-02T08:45:16.863Z",
          "content": "<p>I calculate descriptors for all images. Descriptors are just l2 normalized activations of pre-last layer.\nFor each test (and val) image I calculate distance to all train + all new_whale images.</p>\n\n<p>This gives val x train distance matrix.\n Then pick minimum distance among images of the each class as a representative. This gives me val_size x 5005 matrix. \nThen I convert distance to similarity.\nI can directly do weighted sum on this sim and preds from classifier. \nIn addition I clone similarity matrix and replace column 5004 with constant which gives the best results on val - and add it to weighted sum </p>\n\n<p>You may better look at the code:</p>\n\n<p><a href=\"https://github.com/ducha-aiki/whale-identification-2018/blob/master/train_VGG16.py#L133\">https://github.com/ducha-aiki/whale-identification-2018/blob/master/train_VGG16.py#L133</a></p>",
          "rawMarkdown": "I calculate descriptors for all images. Descriptors are just l2 normalized activations of pre-last layer.\nFor each test (and val) image I calculate distance to all train + all new_whale images.\n\nThis gives val x train distance matrix.\n Then pick minimum distance among images of the each class as a representative. This gives me val_size x 5005 matrix. \nThen I convert distance to similarity.\nI can directly do weighted sum on this sim and preds from classifier. \nIn addition I clone similarity matrix and replace column 5004 with constant which gives the best results on val - and add it to weighted sum \n\nYou may better look at the code:\n\nhttps://github.com/ducha-aiki/whale-identification-2018/blob/master/train_VGG16.py#L133"
        }
      ]
    },
    {
      "id": 481371,
      "postDate": "2019-03-01T10:13:17.317Z",
      "content": "<p>Very big congrats! :D</p>\n\n<p>Just wanted to say the write up is great - would serve as a great reference for anyone working on something similar to this competition!</p>",
      "rawMarkdown": "Very big congrats! :D\n\nJust wanted to say the write up is great - would serve as a great reference for anyone working on something similar to this competition!",
      "votes": 2
    },
    {
      "id": 481023,
      "postDate": "2019-03-01T01:14:58.070Z",
      "content": "<p>Congratulations! You guys really deserved it :)</p>\n\n<p>Btw, I was reading your AffNet paper and its really nice! If you don't mind I would like to ask you something.. I'm inexperienced in image retrieval but I know that query expansion, diffusion and dba is used a lot. However, why it does not work for recognition?  </p>",
      "rawMarkdown": "Congratulations! You guys really deserved it :)\n\nBtw, I was reading your AffNet paper and its really nice! If you don't mind I would like to ask you something.. I'm inexperienced in image retrieval but I know that query expansion, diffusion and dba is used a lot. However, why it does not work for recognition?  ",
      "votes": 2,
      "replies": [
        {
          "id": 481036,
          "postDate": "2019-03-01T01:42:19.517Z",
          "content": "<p>Thanks! \nWell, query expansion, diffusion improves mAP. So if and only if you have good top-1 or top-2, you can use them to get other, more difficult images from the database. In this competition it doesn`t matter, because you need to get the first one correct. </p>",
          "rawMarkdown": "Thanks! \nWell, query expansion, diffusion improves mAP. So if and only if you have good top-1 or top-2, you can use them to get other, more difficult images from the database. In this competition it doesn`t matter, because you need to get the first one correct. ",
          "votes": 2
        }
      ]
    },
    {
      "id": 483700,
      "postDate": "2019-03-05T02:06:23.867Z",
      "content": "<p>Congratulations and thanks for the write-up!\nbut the <a href=\"https://medium.com/&lt;a href=\">@anastasiya</a>.mishchuk/thanks-radek-7th-place-solution-to-hwi-2019-competition-metric-learning-story-c94b74a3eaa2\"&gt;https://medium.com/<a href=\"/anastasiya\">@anastasiya</a>.mishchuk/thanks-radek-7th-place-solution-to-hwi-2019-competition-metric-learning-story-c94b74a3eaa2  is not available，is it everything all right with you?</p>",
      "rawMarkdown": "Congratulations and thanks for the write-up!\nbut the https://medium.com/@anastasiya.mishchuk/thanks-radek-7th-place-solution-to-hwi-2019-competition-metric-learning-story-c94b74a3eaa2  is not available，is it everything all right with you?",
      "replies": [
        {
          "id": 483833,
          "postDate": "2019-03-05T08:21:36.710Z",
          "content": "<p>It is available</p>",
          "rawMarkdown": "It is available"
        }
      ]
    },
    {
      "id": 494370,
      "postDate": "2019-03-19T19:06:34.317Z",
      "content": "<p><a href=\"/oldufo\">@oldufo</a>\nAwesome! I trying to run your solution to another problem. Can you explain to me  <code>PCBRingHead2</code>  architecture? I read your code but I can understand it! Especially, I don't understand <code>num_clf</code> parameter in <code>PCBRingHead2</code>? </p>\n\n<p>Thank you very much!</p>",
      "rawMarkdown": "@oldufo\nAwesome! I trying to run your solution to another problem. Can you explain to me  `PCBRingHead2`  architecture? I read your code but I can understand it! Especially, I don't understand `num_clf` parameter in `PCBRingHead2`? \n\nThank you very much!",
      "replies": [
        {
          "id": 495703,
          "postDate": "2019-03-21T12:43:47.253Z",
          "content": "<p>It corresponds to number of vertical stripes.\nIf 'num_clf' = 1, then it is just global classifier. If ==2 , then there are two heads: one for left part of image and one for the right and so on.  See splits of red just before green part on image below. But on these image they are horizonal, while I used vertical</p>\n\n<p></p>",
          "rawMarkdown": "It corresponds to number of vertical stripes.\nIf 'num_clf' = 1, then it is just global classifier. If ==2 , then there are two heads: one for left part of image and one for the right and so on.  See splits of red just before green part on image below. But on these image they are horizonal, while I used vertical\n\n![EnsembleNet architecture](https://cdn-images-1.medium.com/max/720/1*uBITGz9AzIU89bA7KY9iSA.png)",
          "votes": 1
        },
        {
          "id": 495769,
          "postDate": "2019-03-21T14:37:28.083Z",
          "content": "<p>Sorry, another question: this figure describe <code>PCBRingHead2</code>?</p>",
          "rawMarkdown": "Sorry, another question: this figure describe `PCBRingHead2`?"
        },
        {
          "id": 496135,
          "postDate": "2019-03-21T23:25:47.987Z",
          "content": "<p>This figure is describing architecture, which is inspired my PCBRingHead2. I am too lazy to dray anything, if can find smth similar enough. \nPCB in the name  is artifact  from my previous experiments with PCB architecture\n<a href=\"https://arxiv.org/pdf/1711.09349.pdf\">https://arxiv.org/pdf/1711.09349.pdf</a>\n<img src=\"http://cmp.felk.cvut.cz/~mishkdmy/aux/pcb.png\" alt=\"PCB architecture\"></p>",
          "rawMarkdown": "This figure is describing architecture, which is inspired my PCBRingHead2. I am too lazy to dray anything, if can find smth similar enough. \nPCB in the name  is artifact  from my previous experiments with PCB architecture\nhttps://arxiv.org/pdf/1711.09349.pdf\n![PCB architecture](http://cmp.felk.cvut.cz/~mishkdmy/aux/pcb.png)",
          "votes": 1
        },
        {
          "id": 496361,
          "postDate": "2019-03-22T04:30:03.510Z",
          "content": "<p>Awesome! Thanks!</p>",
          "rawMarkdown": "Awesome! Thanks!"
        },
        {
          "id": 519126,
          "postDate": "2019-04-18T12:09:10.607Z",
          "content": "<p>What is the full name of PCB?</p>",
          "rawMarkdown": "What is the full name of PCB?"
        },
        {
          "id": 519204,
          "postDate": "2019-04-18T14:41:22.993Z",
          "content": "<p>Link to that paper is actually in my comment above - <a href=\"https://arxiv.org/pdf/1711.09349.pdf\">https://arxiv.org/pdf/1711.09349.pdf</a></p>",
          "rawMarkdown": "Link to that paper is actually in my comment above - https://arxiv.org/pdf/1711.09349.pdf"
        }
      ]
    },
    {
      "id": 481293,
      "postDate": "2019-03-01T08:16:20.483Z",
      "content": "<p>Congrats <a href=\"/oldufo\">@oldufo</a> and team. Thanks for sharing your solution overview.</p>",
      "rawMarkdown": "Congrats @oldufo and team. Thanks for sharing your solution overview."
    },
    {
      "id": 481166,
      "postDate": "2019-03-01T05:30:14.197Z",
      "content": "<p>Congrats!!!</p>",
      "rawMarkdown": "Congrats!!!"
    },
    {
      "id": 481057,
      "postDate": "2019-03-01T02:24:08.990Z",
      "content": "<p>Awesome! Congratulations! </p>",
      "rawMarkdown": "Awesome! Congratulations! "
    },
    {
      "id": 481370,
      "postDate": "2019-03-01T10:12:03.373Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 480979,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-03-01T00:16:23.863000",
      "content": "<p>Thanks a lot for this solution! Congrats on your gold medal! :-)</p>",
      "votes": 13,
      "replies": []
    },
    {
      "id": 481265,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-03-01T07:51:06.530000",
      "content": "<p>Thank you for sharing your solutions! :-). Would you mind if you can share your source code solutions?</p>",
      "votes": 12,
      "replies": []
    },
    {
      "id": 481529,
      "author_name": "Walter Wiggins",
      "author_url": "",
      "post_date": "2019-03-01T14:14:18.710000",
      "content": "<p>Congrats! And excellent write-up.</p>\n\n<p>Gotta admit, I was surprised by the VGG-16 result being better than ResNet-50. Just goes to show there is still much to learn about deep learning.</p>",
      "votes": 3,
      "replies": []
    },
    {
      "id": 481194,
      "author_name": "Haider Alwasiti",
      "author_url": "",
      "post_date": "2019-03-01T06:18:15.203000",
      "content": "<p>Hey @old-ufo</p>\n\n<p>If it is possible, we would love to see your code for such an interesting ideas implemented in fastai.. Perhaps droping a link too in the fastai forum  for your medium blog post would be inspiring for other folks there... </p>\n\n<p>As <a href=\"/alexandrecc\">@alexandrecc</a>  well put <a href=\"https://hackernoon.com/interview-with-radiologist-fast-ai-fellow-and-kaggle-expert-dr-alexandre-cadrin-chenevert-94145d446da8\">phrase describing his emotions</a> toward the fastai community (which I feel exactly, once I see any fastai mate here in kaggle):</p>\n\n<p><em>It is fascinating to see how the fast.ai students are tightly bound together. We are like a big international family.  - Dr. Alexandre Cadrin-Chenevert</em></p>",
      "votes": 3,
      "replies": [
        {
          "id": 481316,
          "author_name": "old-ufo",
          "author_url": "",
          "post_date": "2019-03-01T08:52:41.887000",
          "content": "<p>I am not fast.ai student, but I admire community there :) I will put some code online soon.</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 481328,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-03-01T09:12:32.800000",
          "content": "<p>Thank you very much @old-ufo! :-)</p>",
          "votes": 12,
          "replies": []
        },
        {
          "id": 481753,
          "author_name": "Alexandre Cadrin-Chênevert",
          "author_url": "",
          "post_date": "2019-03-01T19:57:51.493000",
          "content": "<p>Hey, wassup, brother ! </p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 481006,
      "author_name": "Haider Alwasiti",
      "author_url": "",
      "post_date": "2019-03-01T00:55:49.490000",
      "content": "<p>Thanks for the great write-up..\nI wished if you could put for each decision you chose, why did you think to try that?</p>\n\n<p>One of the key things when I read, if I want to get better, is to understand the thinking process.. There are hundreds of choices and no way to try even a small chunk of them... So what made you to think choosing center loss,  temperature scaling, adding 1-NN distance classifier,  EnsembleNet-like 4 heads, changing backbone to VGG16-BN   ...etc ?</p>",
      "votes": 3,
      "replies": [
        {
          "id": 481033,
          "author_name": "old-ufo",
          "author_url": "",
          "post_date": "2019-03-01T01:35:16.807000",
          "content": "<p>I selected those, which are easy to implement AND give nice results in publications/competitions. For example, Center loss is very popular in metric learning and couple lines of codes. \nTemperature scaling is one coefficient, again you can code it in 5 minutes.  <a href=\"/martinpiotte\">@martinpiotte</a> solution was too hard to implement fast - so I postponed it until classification stop help me. \nVGG16 was advice from friend of mine, actually :)</p>",
          "votes": 4,
          "replies": []
        }
      ]
    },
    {
      "id": 481668,
      "author_name": "old-ufo",
      "author_url": "",
      "post_date": "2019-03-01T17:42:44.367000",
      "content": "<p>I uploaded minimalistic == clean version of the code: <a href=\"https://github.com/ducha-aiki/whale-identification-2018\">https://github.com/ducha-aiki/whale-identification-2018</a></p>",
      "votes": 1,
      "replies": [
        {
          "id": 482841,
          "author_name": "Artem.Sanakoev",
          "author_url": "",
          "post_date": "2019-03-03T18:16:00.837000",
          "content": "<p>Did you test which performance on LB this code achieves?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 482903,
          "author_name": "old-ufo",
          "author_url": "",
          "post_date": "2019-03-03T20:15:50.327000",
          "content": "<p>\"Change backbone to VGG16-BN — 0.942 lb\nChange pooling to constant GeM(3.74) pooling — 0.944 lb.\nThis is the best results I was able to get from ImageNet-pretrained single network.\"</p>\n\n<p>This is this network</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 481261,
      "author_name": "Karthik Chowdary Tsaliki",
      "author_url": "",
      "post_date": "2019-03-01T07:47:46.700000",
      "content": "<p>Congratulations <a href=\"/oldufo\">@oldufo</a> and thanks for sharing your blog. I hope I can learn a lot from your blog.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 481022,
      "author_name": "Vishy",
      "author_url": "",
      "post_date": "2019-03-01T01:12:51.447000",
      "content": "<p>Just went through the write up it is truly awesome.. Thanks for the detailed write up..</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 480993,
      "author_name": "interneuron",
      "author_url": "",
      "post_date": "2019-03-01T00:26:43.613000",
      "content": "<p>Great work! Thanks for the detailed write-up.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 480997,
          "author_name": "old-ufo",
          "author_url": "",
          "post_date": "2019-03-01T00:36:34.637000",
          "content": "<p>You are welcome. I like when people share their solutions - so I have to share mine to be fair :)</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 480998,
          "author_name": "interneuron",
          "author_url": "",
          "post_date": "2019-03-01T00:42:41.743000",
          "content": "<p>You are absolutely right. My solution is pretty lame compared to you top-10 beasts, but you have inspired me to post it anyway. Congrats on the great work!</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 481193,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-03-01T06:16:30.093000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 481879,
      "author_name": "FranciscoRubinCapalbo",
      "author_url": "",
      "post_date": "2019-03-02T01:48:57.520000",
      "content": "<p>Congratulations and thanks for the write-up!</p>\n\n<p>How did you combine the result of the 1-NN with the one of the network? I don't completely understand how this works:</p>\n\n<p>&gt; New whale is reperesented by another threshold, as well as nearest image from “new_whale” class</p>\n\n<p>Thanks</p>",
      "votes": 2,
      "replies": [
        {
          "id": 482048,
          "author_name": "old-ufo",
          "author_url": "",
          "post_date": "2019-03-02T08:45:16.863000",
          "content": "<p>I calculate descriptors for all images. Descriptors are just l2 normalized activations of pre-last layer.\nFor each test (and val) image I calculate distance to all train + all new_whale images.</p>\n\n<p>This gives val x train distance matrix.\n Then pick minimum distance among images of the each class as a representative. This gives me val_size x 5005 matrix. \nThen I convert distance to similarity.\nI can directly do weighted sum on this sim and preds from classifier. \nIn addition I clone similarity matrix and replace column 5004 with constant which gives the best results on val - and add it to weighted sum </p>\n\n<p>You may better look at the code:</p>\n\n<p><a href=\"https://github.com/ducha-aiki/whale-identification-2018/blob/master/train_VGG16.py#L133\">https://github.com/ducha-aiki/whale-identification-2018/blob/master/train_VGG16.py#L133</a></p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 481371,
      "author_name": "Radek Osmulski",
      "author_url": "",
      "post_date": "2019-03-01T10:13:17.317000",
      "content": "<p>Very big congrats! :D</p>\n\n<p>Just wanted to say the write up is great - would serve as a great reference for anyone working on something similar to this competition!</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 481023,
      "author_name": "Eduardo Rocha de Andrade",
      "author_url": "",
      "post_date": "2019-03-01T01:14:58.070000",
      "content": "<p>Congratulations! You guys really deserved it :)</p>\n\n<p>Btw, I was reading your AffNet paper and its really nice! If you don't mind I would like to ask you something.. I'm inexperienced in image retrieval but I know that query expansion, diffusion and dba is used a lot. However, why it does not work for recognition?  </p>",
      "votes": 2,
      "replies": [
        {
          "id": 481036,
          "author_name": "old-ufo",
          "author_url": "",
          "post_date": "2019-03-01T01:42:19.517000",
          "content": "<p>Thanks! \nWell, query expansion, diffusion improves mAP. So if and only if you have good top-1 or top-2, you can use them to get other, more difficult images from the database. In this competition it doesn`t matter, because you need to get the first one correct. </p>",
          "votes": 2,
          "replies": []
        }
      ]
    },
    {
      "id": 483700,
      "author_name": "Jason Dong",
      "author_url": "",
      "post_date": "2019-03-05T02:06:23.867000",
      "content": "<p>Congratulations and thanks for the write-up!\nbut the <a href=\"https://medium.com/&lt;a href=\">@anastasiya</a>.mishchuk/thanks-radek-7th-place-solution-to-hwi-2019-competition-metric-learning-story-c94b74a3eaa2\"&gt;https://medium.com/<a href=\"/anastasiya\">@anastasiya</a>.mishchuk/thanks-radek-7th-place-solution-to-hwi-2019-competition-metric-learning-story-c94b74a3eaa2  is not available，is it everything all right with you?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 483833,
          "author_name": "old-ufo",
          "author_url": "",
          "post_date": "2019-03-05T08:21:36.710000",
          "content": "<p>It is available</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 494370,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-03-19T19:06:34.317000",
      "content": "<p><a href=\"/oldufo\">@oldufo</a>\nAwesome! I trying to run your solution to another problem. Can you explain to me  <code>PCBRingHead2</code>  architecture? I read your code but I can understand it! Especially, I don't understand <code>num_clf</code> parameter in <code>PCBRingHead2</code>? </p>\n\n<p>Thank you very much!</p>",
      "votes": 0,
      "replies": [
        {
          "id": 495703,
          "author_name": "old-ufo",
          "author_url": "",
          "post_date": "2019-03-21T12:43:47.253000",
          "content": "<p>It corresponds to number of vertical stripes.\nIf 'num_clf' = 1, then it is just global classifier. If ==2 , then there are two heads: one for left part of image and one for the right and so on.  See splits of red just before green part on image below. But on these image they are horizonal, while I used vertical</p>\n\n<p></p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 495769,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-03-21T14:37:28.083000",
          "content": "<p>Sorry, another question: this figure describe <code>PCBRingHead2</code>?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 496135,
          "author_name": "old-ufo",
          "author_url": "",
          "post_date": "2019-03-21T23:25:47.987000",
          "content": "<p>This figure is describing architecture, which is inspired my PCBRingHead2. I am too lazy to dray anything, if can find smth similar enough. \nPCB in the name  is artifact  from my previous experiments with PCB architecture\n<a href=\"https://arxiv.org/pdf/1711.09349.pdf\">https://arxiv.org/pdf/1711.09349.pdf</a>\n<img src=\"http://cmp.felk.cvut.cz/~mishkdmy/aux/pcb.png\" alt=\"PCB architecture\"></p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 496361,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-03-22T04:30:03.510000",
          "content": "<p>Awesome! Thanks!</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 519126,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-04-18T12:09:10.607000",
          "content": "<p>What is the full name of PCB?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 519204,
          "author_name": "old-ufo",
          "author_url": "",
          "post_date": "2019-04-18T14:41:22.993000",
          "content": "<p>Link to that paper is actually in my comment above - <a href=\"https://arxiv.org/pdf/1711.09349.pdf\">https://arxiv.org/pdf/1711.09349.pdf</a></p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 481293,
      "author_name": "YaGana Sheriff-Hussaini",
      "author_url": "",
      "post_date": "2019-03-01T08:16:20.483000",
      "content": "<p>Congrats <a href=\"/oldufo\">@oldufo</a> and team. Thanks for sharing your solution overview.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 481166,
      "author_name": "Thuong Dinh",
      "author_url": "",
      "post_date": "2019-03-01T05:30:14.197000",
      "content": "<p>Congrats!!!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 481057,
      "author_name": "Jun Liu",
      "author_url": "",
      "post_date": "2019-03-01T02:24:08.990000",
      "content": "<p>Awesome! Congratulations! </p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 481370,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-03-01T10:12:03.373000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "480975": "https://medium.com/@ducha.aiki/thanks-radek-7th-place-solution-to-hwi-2019-competition-738624e4c885\n\nCleaned-up version of the code is here https://github.com/ducha-aiki/whale-identification-2018\n\nMetric learning part by @geneva and @igorkrashenyi  : https://medium.com/@anastasiya.mishchuk/thanks-radek-7th-place-solution-to-hwi-2019-competition-metric-learning-story-c94b74a3eaa2 Congrats to winners!\n",
    "480979": "Thanks a lot for this solution! Congrats on your gold medal! :-)\n",
    "481265": "Thank you for sharing your solutions! :-). Would you mind if you can share your source code solutions?",
    "481529": "Congrats! And excellent write-up.\n\nGotta admit, I was surprised by the VGG-16 result being better than ResNet-50. Just goes to show there is still much to learn about deep learning.",
    "481194": "Hey @old-ufo\n\nIf it is possible, we would love to see your code for such an interesting ideas implemented in fastai.. Perhaps droping a link too in the fastai forum  for your medium blog post would be inspiring for other folks there... \n\nAs @alexandrecc  well put [phrase describing his emotions][1] toward the fastai community (which I feel exactly, once I see any fastai mate here in kaggle):\n\n*It is fascinating to see how the fast.ai students are tightly bound together. We are like a big international family.  - Dr. Alexandre Cadrin-Chenevert*\n\n\n  [1]: https://hackernoon.com/interview-with-radiologist-fast-ai-fellow-and-kaggle-expert-dr-alexandre-cadrin-chenevert-94145d446da8",
    "481006": "Thanks for the great write-up..\nI wished if you could put for each decision you chose, why did you think to try that?\n\nOne of the key things when I read, if I want to get better, is to understand the thinking process.. There are hundreds of choices and no way to try even a small chunk of them... So what made you to think choosing center loss,  temperature scaling, adding 1-NN distance classifier,  EnsembleNet-like 4 heads, changing backbone to VGG16-BN   ...etc ?",
    "481668": "I uploaded minimalistic == clean version of the code: https://github.com/ducha-aiki/whale-identification-2018",
    "481261": "Congratulations @oldufo and thanks for sharing your blog. I hope I can learn a lot from your blog.",
    "481022": "Just went through the write up it is truly awesome.. Thanks for the detailed write up..",
    "480993": "Great work! Thanks for the detailed write-up.",
    "481879": "Congratulations and thanks for the write-up!\n\nHow did you combine the result of the 1-NN with the one of the network? I don't completely understand how this works:\n\n&gt; New whale is reperesented by another threshold, as well as nearest image from “new_whale” class\n\nThanks",
    "481371": "Very big congrats! :D\n\nJust wanted to say the write up is great - would serve as a great reference for anyone working on something similar to this competition!",
    "481023": "Congratulations! You guys really deserved it :)\n\nBtw, I was reading your AffNet paper and its really nice! If you don't mind I would like to ask you something.. I'm inexperienced in image retrieval but I know that query expansion, diffusion and dba is used a lot. However, why it does not work for recognition?  ",
    "483700": "Congratulations and thanks for the write-up!\nbut the https://medium.com/@anastasiya.mishchuk/thanks-radek-7th-place-solution-to-hwi-2019-competition-metric-learning-story-c94b74a3eaa2  is not available，is it everything all right with you?",
    "494370": "@oldufo\nAwesome! I trying to run your solution to another problem. Can you explain to me  `PCBRingHead2`  architecture? I read your code but I can understand it! Especially, I don't understand `num_clf` parameter in `PCBRingHead2`? \n\nThank you very much!",
    "481293": "Congrats @oldufo and team. Thanks for sharing your solution overview.",
    "481166": "Congrats!!!",
    "481057": "Awesome! Congratulations! ",
    "481370": ""
  }
}