{
  "id": 74402,
  "title": "What we've known so far...",
  "url": "/competitions/humpback-whale-identification/discussion/74402",
  "author_name": "Khoi Nguyen",
  "post_date": "2018-12-12T00:18:23.582000",
  "votes": 72,
  "comment_count": 66,
  "views": 0,
  "content": "<p>I'll sum up what I've tried and am going to try in this thread, please share your findings if you can.</p>\n\n<p>What I've tried:</p>\n\n<ul>\n<li><p>Classification with 5005 classes: not recommended, too easily overfit to class 0.</p></li>\n<li><p><a href=\"https://www.kaggle.com/suicaokhoailang/faster-and-better-resnet50-without-class-0-0-598\">Removing class 0</a>: Kinda worked, however a new problem arose which is how and where to insert the <strong>new_whale</strong> into your submission. Using a threshold worked ok so far, but it seems like it's just mimicking the ratio of <strong>new_whale</strong> on the public test set which is a bad thing.</p></li>\n<li><p><a href=\"https://www.kaggle.com/suicaokhoailang/resnet50-bounding-boxes-0-628-lb\">Using bounding boxes</a> increased the score by a 0.0x so there's no reason not to use it.</p></li>\n<li><p>Ensembling helped, with 3-4 models it can give ~0.1 boost in score, <a href=\"https://www.kaggle.com/suicaokhoailang/ensembling-with-averaged-probabilities-0-701-lb\">using probabilities</a> worked a bit better than <a href=\"https://www.kaggle.com/matthewa313/ensembling-algorithm-for-average-precision-metric\">ranking</a> alone, but not by much. Gave diminished returns beyond 5 models in my experience.</p></li>\n<li><p>Increasing image size helped, gave diminished returns beyond 384x384, not really sure about the number.</p></li>\n</ul>\n\n<p>What I'll try:</p>\n\n<ul>\n<li><p>Better way to choose the <strong>new_whale</strong> threshold, see how far I can get with that approach.</p></li>\n<li><p>Metrics learning, starting with <a href=\"/martinpiotte\">@martinpiotte</a> 's solution.</p></li>\n<li><p>A different loss functions: Triplet loss, Magnet loss yadda yadda</p></li>\n</ul>\n\n<p><strong>Update 1</strong></p>\n\n<p>Martin's solution is ported here: <a href=\"https://www.kaggle.com/suicaokhoailang/martin-piotte-s-siamese-baseline\">https://www.kaggle.com/suicaokhoailang/martin-piotte-s-siamese-baseline</a> . Very promising indeed.</p>\n\n<p><strong>Update 2</strong></p>\n\n<p>A few clues about high scoring solutions:</p>\n\n<ul>\n<li><p>The currently #1 solution used metrics learning: <a href=\"https://www.kaggle.com/c/humpback-whale-identification/discussion/74402#443160\">https://www.kaggle.com/c/humpback-whale-identification/discussion/74402#443160</a></p></li>\n<li><p>My 0.898 submission was from a single siamese. </p></li>\n<li><p>Classification is much better than I thought it would be, able to get 0.9+ LB: <a href=\"https://www.kaggle.com/c/humpback-whale-identification/discussion/75846#452220\">https://www.kaggle.com/c/humpback-whale-identification/discussion/75846#452220</a></p></li>\n</ul>\n\n<p>Also, another approach on whether to include <strong>new_whale</strong> in your predictions using nearest neighbors: <a href=\"https://www.kaggle.com/iafoss/similarity-resnext50-0-602-lb\">https://www.kaggle.com/iafoss/similarity-resnext50-0-602-lb</a></p>",
  "messages": [
    {
      "id": 437446,
      "postDate": "2018-12-12T00:18:23.583Z",
      "content": "<p>I'll sum up what I've tried and am going to try in this thread, please share your findings if you can.</p>\n\n<p>What I've tried:</p>\n\n<ul>\n<li><p>Classification with 5005 classes: not recommended, too easily overfit to class 0.</p></li>\n<li><p><a href=\"https://www.kaggle.com/suicaokhoailang/faster-and-better-resnet50-without-class-0-0-598\">Removing class 0</a>: Kinda worked, however a new problem arose which is how and where to insert the <strong>new_whale</strong> into your submission. Using a threshold worked ok so far, but it seems like it's just mimicking the ratio of <strong>new_whale</strong> on the public test set which is a bad thing.</p></li>\n<li><p><a href=\"https://www.kaggle.com/suicaokhoailang/resnet50-bounding-boxes-0-628-lb\">Using bounding boxes</a> increased the score by a 0.0x so there's no reason not to use it.</p></li>\n<li><p>Ensembling helped, with 3-4 models it can give ~0.1 boost in score, <a href=\"https://www.kaggle.com/suicaokhoailang/ensembling-with-averaged-probabilities-0-701-lb\">using probabilities</a> worked a bit better than <a href=\"https://www.kaggle.com/matthewa313/ensembling-algorithm-for-average-precision-metric\">ranking</a> alone, but not by much. Gave diminished returns beyond 5 models in my experience.</p></li>\n<li><p>Increasing image size helped, gave diminished returns beyond 384x384, not really sure about the number.</p></li>\n</ul>\n\n<p>What I'll try:</p>\n\n<ul>\n<li><p>Better way to choose the <strong>new_whale</strong> threshold, see how far I can get with that approach.</p></li>\n<li><p>Metrics learning, starting with <a href=\"/martinpiotte\">@martinpiotte</a> 's solution.</p></li>\n<li><p>A different loss functions: Triplet loss, Magnet loss yadda yadda</p></li>\n</ul>\n\n<p><strong>Update 1</strong></p>\n\n<p>Martin's solution is ported here: <a href=\"https://www.kaggle.com/suicaokhoailang/martin-piotte-s-siamese-baseline\">https://www.kaggle.com/suicaokhoailang/martin-piotte-s-siamese-baseline</a> . Very promising indeed.</p>\n\n<p><strong>Update 2</strong></p>\n\n<p>A few clues about high scoring solutions:</p>\n\n<ul>\n<li><p>The currently #1 solution used metrics learning: <a href=\"https://www.kaggle.com/c/humpback-whale-identification/discussion/74402#443160\">https://www.kaggle.com/c/humpback-whale-identification/discussion/74402#443160</a></p></li>\n<li><p>My 0.898 submission was from a single siamese. </p></li>\n<li><p>Classification is much better than I thought it would be, able to get 0.9+ LB: <a href=\"https://www.kaggle.com/c/humpback-whale-identification/discussion/75846#452220\">https://www.kaggle.com/c/humpback-whale-identification/discussion/75846#452220</a></p></li>\n</ul>\n\n<p>Also, another approach on whether to include <strong>new_whale</strong> in your predictions using nearest neighbors: <a href=\"https://www.kaggle.com/iafoss/similarity-resnext50-0-602-lb\">https://www.kaggle.com/iafoss/similarity-resnext50-0-602-lb</a></p>",
      "rawMarkdown": "I'll sum up what I've tried and am going to try in this thread, please share your findings if you can.\n\nWhat I've tried:\n\n- Classification with 5005 classes: not recommended, too easily overfit to class 0.\n\n- [Removing class 0][1]: Kinda worked, however a new problem arose which is how and where to insert the **new_whale** into your submission. Using a threshold worked ok so far, but it seems like it's just mimicking the ratio of **new_whale** on the public test set which is a bad thing.\n\n- [Using bounding boxes][2] increased the score by a 0.0x so there's no reason not to use it.\n\n- Ensembling helped, with 3-4 models it can give ~0.1 boost in score, [using probabilities][3] worked a bit better than [ranking][4] alone, but not by much. Gave diminished returns beyond 5 models in my experience.\n\n- Increasing image size helped, gave diminished returns beyond 384x384, not really sure about the number.\n\nWhat I'll try:\n\n- Better way to choose the **new_whale** threshold, see how far I can get with that approach.\n\n- Metrics learning, starting with @martinpiotte 's solution.\n\n- A different loss functions: Triplet loss, Magnet loss yadda yadda\n\n**Update 1**\n\nMartin's solution is ported here: https://www.kaggle.com/suicaokhoailang/martin-piotte-s-siamese-baseline . Very promising indeed.\n\n\n**Update 2**\n\nA few clues about high scoring solutions:\n\n- The currently #1 solution used metrics learning: https://www.kaggle.com/c/humpback-whale-identification/discussion/74402#443160\n\n- My 0.898 submission was from a single siamese. \n\n- Classification is much better than I thought it would be, able to get 0.9+ LB: https://www.kaggle.com/c/humpback-whale-identification/discussion/75846#452220\n\nAlso, another approach on whether to include **new_whale** in your predictions using nearest neighbors: https://www.kaggle.com/iafoss/similarity-resnext50-0-602-lb\n\n  [1]: https://www.kaggle.com/suicaokhoailang/faster-and-better-resnet50-without-class-0-0-598\n  [2]: https://www.kaggle.com/suicaokhoailang/resnet50-bounding-boxes-0-628-lb\n  [3]: https://www.kaggle.com/suicaokhoailang/ensembling-with-averaged-probabilities-0-701-lb\n  [4]: https://www.kaggle.com/matthewa313/ensembling-algorithm-for-average-precision-metric",
      "votes": 72
    },
    {
      "id": 453223,
      "postDate": "2019-01-09T21:45:38.893Z",
      "content": "<p>I hope you guys do <em>whale</em> in the competition!</p>",
      "rawMarkdown": "I hope you guys do *whale* in the competition!",
      "votes": 12
    },
    {
      "id": 463464,
      "postDate": "2019-01-30T03:12:26.267Z",
      "content": "<p>Update 3 : ）\nSome labelled data are shared by participants:\n- all training images' masks, labelled and predicted images are mixed ( <a href=\"https://www.kaggle.com/c/humpback-whale-identification/discussion/78453\">https://www.kaggle.com/c/humpback-whale-identification/discussion/78453</a> )\n- 1000 annotated fluke key points ( <a href=\"https://www.kaggle.com/c/humpback-whale-identification/discussion/78699\">https://www.kaggle.com/c/humpback-whale-identification/discussion/78699</a> )\n- 450 fluke masks ( <a href=\"https://www.kaggle.com/c/humpback-whale-identification/discussion/78257\">https://www.kaggle.com/c/humpback-whale-identification/discussion/78257</a> )</p>",
      "rawMarkdown": "Update 3 : ）\nSome labelled data are shared by participants:\n- all training images' masks, labelled and predicted images are mixed ( https://www.kaggle.com/c/humpback-whale-identification/discussion/78453 )\n- 1000 annotated fluke key points ( https://www.kaggle.com/c/humpback-whale-identification/discussion/78699 )\n- 450 fluke masks ( https://www.kaggle.com/c/humpback-whale-identification/discussion/78257 )",
      "votes": 6,
      "replies": [
        {
          "id": 464712,
          "postDate": "2019-02-01T10:43:22.860Z",
          "content": "<p>Just to be sure, all these three links are annotations on the very same images of this competition, right? Or are these new images?</p>",
          "rawMarkdown": "Just to be sure, all these three links are annotations on the very same images of this competition, right? Or are these new images?"
        }
      ]
    },
    {
      "id": 444476,
      "postDate": "2018-12-24T04:55:53.243Z",
      "content": "<p>I am working with  <a href=\"/martinpiotte\">@martinpiotte</a> 's solution. I've modified the lap to go with an imperfect answer instead of an exact answer. I ran 225 epochs at an hour per epoch with the initial implementation. Toady I changed the lap.lapjv to lapjv.lapjv and segmented the data into 6 segments running each in it's own thread. With these changes I am now running at 7-8 minutes per epoch.</p>",
      "rawMarkdown": "I am working with  @martinpiotte 's solution. I've modified the lap to go with an imperfect answer instead of an exact answer. I ran 225 epochs at an hour per epoch with the initial implementation. Toady I changed the lap.lapjv to lapjv.lapjv and segmented the data into 6 segments running each in it's own thread. With these changes I am now running at 7-8 minutes per epoch.",
      "votes": 3,
      "replies": [
        {
          "id": 444533,
          "postDate": "2018-12-24T07:49:50.463Z",
          "content": "<p>Thanks for sharing Brian, I'm looking forward to seeing more of your findings in this competition. How is Atlas going?</p>",
          "rawMarkdown": "Thanks for sharing Brian, I'm looking forward to seeing more of your findings in this competition. How is Atlas going?"
        },
        {
          "id": 444864,
          "postDate": "2018-12-25T02:31:49.020Z",
          "content": "<p>I had to pause on things for a while, work took priority and I had no time left. Then I caught the flu. Finally getting back to things,I've got a model running now that hopefully I can get trained before things end.</p>\n\n<p>After making the changes to the LAP yesterday things are looking good. In about 5 hours or so it will have completed the full 400 epochs in the original solution.  Interestingly there is some gap in my local vs public LB. My .784 public score was .993 locally</p>",
          "rawMarkdown": "I had to pause on things for a while, work took priority and I had no time left. Then I caught the flu. Finally getting back to things,I've got a model running now that hopefully I can get trained before things end.\n\nAfter making the changes to the LAP yesterday things are looking good. In about 5 hours or so it will have completed the full 400 epochs in the original solution.  Interestingly there is some gap in my local vs public LB. My .784 public score was .993 locally"
        },
        {
          "id": 444951,
          "postDate": "2018-12-25T07:50:38.683Z",
          "content": "<p>Funny, I caught a flu too, guess that's a global thing.</p>\n\n<p>Where did you get that <code>lapjv</code> package? I tried <code>pip install lapjv</code> but seems like its output format is different and not compatible with Martin's <code>lap</code>.</p>",
          "rawMarkdown": "Funny, I caught a flu too, guess that's a global thing.\n\nWhere did you get that `lapjv` package? I tried `pip install lapjv` but seems like its output format is different and not compatible with Martin's `lap`."
        },
        {
          "id": 444954,
          "postDate": "2018-12-25T07:59:36.873Z",
          "content": "<p>I never used to get sick, now with kids in school I get sick every year!</p>\n\n<p>I am using 1.3.1 from:\n<a href=\"https://pypi.org/project/lapjv/\">https://pypi.org/project/lapjv/</a></p>\n\n<p>Importing as follows:</p>\n\n<pre>from lapjv import lapjv\n</pre>\n\n<p>In the generator here is how I do it multithreaded:</p>\n\n<pre>            num_threads = 6\n            tmp   = num_threads*[None]\n            threads   = []\n            thread_input   = num_threads*[None]\n            thread_idx = 0\n            batch = score.shape[0] // (num_threads-1)\n            for start in range(0, score.shape[0], batch):\n                end = min(score.shape[0], start + batch)\n                thread_input[thread_idx]  = self.score[start:end, start:end]\n                thread_idx += 1\n\n            def worker(data_idx):\n                x,_,_ = lapjv(thread_input[data_idx]) \n                tmp[data_idx] = x\n\n            print(\"Start worker threads\")\n            for i in range(num_threads):\n                t = threading.Thread(target=worker, args=(i,), daemon=True)\n                t.start()\n                threads.append(t)\n            for t in threads:\n                if t is not None:\n                    t.join()\n            x = np.concatenate(tmp)\n            print(\"LAP completed\")\n</pre>\n\n<p>Basically lap.lapjv would return <em>,</em>,x, and lapjv.lapjv returns the x first.</p>",
          "rawMarkdown": "I never used to get sick, now with kids in school I get sick every year!\n\nI am using 1.3.1 from:\nhttps://pypi.org/project/lapjv/\n\nImporting as follows:\n<pre>from lapjv import lapjv\n</pre>\n\nIn the generator here is how I do it multithreaded:\n<pre>            num_threads = 6\n            tmp   = num_threads*[None]\n            threads   = []\n            thread_input   = num_threads*[None]\n            thread_idx = 0\n            batch = score.shape[0] // (num_threads-1)\n            for start in range(0, score.shape[0], batch):\n                end = min(score.shape[0], start + batch)\n                thread_input[thread_idx]  = self.score[start:end, start:end]\n                thread_idx += 1\n                \n            def worker(data_idx):\n                x,_,_ = lapjv(thread_input[data_idx]) \n                tmp[data_idx] = x\n\n            print(\"Start worker threads\")\n            for i in range(num_threads):\n                t = threading.Thread(target=worker, args=(i,), daemon=True)\n                t.start()\n                threads.append(t)\n            for t in threads:\n                if t is not None:\n                    t.join()\n            x = np.concatenate(tmp)\n            print(\"LAP completed\")\n</pre>\n\nBasically lap.lapjv would return _,_,x, and lapjv.lapjv returns the x first.\n\n",
          "votes": 7
        },
        {
          "id": 445049,
          "postDate": "2018-12-25T13:18:53.013Z",
          "content": "<p>Thanks, I'll try it out. Btw what is your hardware specs? My 1080Ti also only needs 7-8 minutes per epoch with the original implementation.</p>",
          "rawMarkdown": "Thanks, I'll try it out. Btw what is your hardware specs? My 1080Ti also only needs 7-8 minutes per epoch with the original implementation."
        },
        {
          "id": 445204,
          "postDate": "2018-12-26T00:01:33.323Z",
          "content": "<p>Running this one on a RTX 2080, at the same time running HPA on a Titan X maxwell give epochs in the 7-10 minute range. If I am only running this one on the RTX it will get down to 6 minutes.</p>",
          "rawMarkdown": "Running this one on a RTX 2080, at the same time running HPA on a Titan X maxwell give epochs in the 7-10 minute range. If I am only running this one on the RTX it will get down to 6 minutes."
        },
        {
          "id": 445842,
          "postDate": "2018-12-27T05:36:49.083Z",
          "content": "<p>Noob question - what does <code>lapjv</code> do (I can see it's some sort of solver), and how should it be used with this dataset?</p>",
          "rawMarkdown": "Noob question - what does `lapjv` do (I can see it's some sort of solver), and how should it be used with this dataset?"
        },
        {
          "id": 446930,
          "postDate": "2018-12-28T22:11:12.967Z",
          "content": "<p>From my understanding, It is how the whales and non whales are matched up. It takes the two sets and returns the best matches. I am still trying to fully understand this myself. From my standpoint, I just found a faster way to do it than the original.</p>",
          "rawMarkdown": "From my understanding, It is how the whales and non whales are matched up. It takes the two sets and returns the best matches. I am still trying to fully understand this myself. From my standpoint, I just found a faster way to do it than the original.",
          "votes": 2
        },
        {
          "id": 447551,
          "postDate": "2018-12-30T03:50:20.063Z",
          "content": "<p>@Brian Does your approach affect LB score compared to the original? I just switched to what you suggested and the training accuracy suddenly jumped up.</p>",
          "rawMarkdown": "@Brian Does your approach affect LB score compared to the original? I just switched to what you suggested and the training accuracy suddenly jumped up."
        },
        {
          "id": 448047,
          "postDate": "2018-12-31T06:05:58.303Z",
          "content": "<p>I switched midway through my training. I didn't notice much of a jump but I do have high local LB than public. 0.985 local resulted in 0.862 on the public.</p>",
          "rawMarkdown": "I switched midway through my training. I didn't notice much of a jump but I do have high local LB than public. 0.985 local resulted in 0.862 on the public."
        },
        {
          "id": 448049,
          "postDate": "2018-12-31T06:15:29.307Z",
          "content": "<p>The model is very unstable for me, jumping between 0.76 and 0.84 LB, yes local is always much higher than LB also. </p>",
          "rawMarkdown": "The model is very unstable for me, jumping between 0.76 and 0.84 LB, yes local is always much higher than LB also. ",
          "votes": 1
        },
        {
          "id": 451295,
          "postDate": "2019-01-06T19:36:12.840Z",
          "content": "<p>The kaggle community is so sweet. Hope you get better, Brian.</p>",
          "rawMarkdown": "The kaggle community is so sweet. Hope you get better, Brian."
        },
        {
          "id": 451535,
          "postDate": "2019-01-07T08:36:37.103Z",
          "content": "<p>@Brain I am trying to understand 'lapjv'. I got a question here. The lap.lapjv() would return cost,x,y and lapjv() returns x,y,cost which means your code is using 'x' and Martin's code is using 'y'. Is there any difference between using x and y?</p>",
          "rawMarkdown": "@Brain I am trying to understand 'lapjv'. I got a question here. The lap.lapjv() would return cost,x,y and lapjv() returns x,y,cost which means your code is using 'x' and Martin's code is using 'y'. Is there any difference between using x and y?"
        },
        {
          "id": 455039,
          "postDate": "2019-01-12T20:03:31.457Z",
          "content": "<p>Thanks @XiokangWang. What a rough month December was. January meant back to work and I finally have some time to work on this again.</p>\n\n<p><a href=\"/philipgao1\">@philipgao1</a>, That is a good catch, looks like I made a mistake. My intention was to use X there not Y. The input matrix X and Y are the same in most cases so I assume that is why it still works using Y. My background is in programming and I am using these competitions to learn the math for ML tasks.</p>\n\n<p>Edit:\nLooking at the example here: <a href=\"https://github.com/src-d/lapjv\">https://github.com/src-d/lapjv</a></p>\n\n<p>To me that looks like it is returning y, x, cost as column is typically referred to as X. The documentation with lapjv.lapjv is pretty sparse.</p>",
          "rawMarkdown": "Thanks @XiokangWang. What a rough month December was. January meant back to work and I finally have some time to work on this again.\n\n@philipgao1, That is a good catch, looks like I made a mistake. My intention was to use X there not Y. The input matrix X and Y are the same in most cases so I assume that is why it still works using Y. My background is in programming and I am using these competitions to learn the math for ML tasks.\n\nEdit:\nLooking at the example here: https://github.com/src-d/lapjv\n\nTo me that looks like it is returning y, x, cost as column is typically referred to as X. The documentation with lapjv.lapjv is pretty sparse.",
          "votes": 2
        },
        {
          "id": 456787,
          "postDate": "2019-01-16T14:49:12.513Z",
          "content": "<p>For me too its very inestable, could you share if you did it more stable and how?</p>",
          "rawMarkdown": "For me too its very inestable, could you share if you did it more stable and how?"
        },
        {
          "id": 462076,
          "postDate": "2019-01-27T16:03:24.540Z",
          "content": "<p>@brian is the multithread solution the same you would get with no multithreading? I mean from a threoretical point of view.  I bet it's not, but I am not 100% sure...</p>",
          "rawMarkdown": "@brian is the multithread solution the same you would get with no multithreading? I mean from a threoretical point of view.  I bet it's not, but I am not 100% sure...",
          "votes": 1
        },
        {
          "id": 463925,
          "postDate": "2019-01-30T22:53:56.240Z",
          "content": "<p>It is not the same, the more threads/split the worse it is. The original matches the entire set against itself, with the threads it is matching only within the subset that each thread processes.</p>",
          "rawMarkdown": "It is not the same, the more threads/split the worse it is. The original matches the entire set against itself, with the threads it is matching only within the subset that each thread processes.",
          "votes": 2
        },
        {
          "id": 464060,
          "postDate": "2019-01-31T06:11:50.933Z",
          "content": "<p>Thanks!</p>",
          "rawMarkdown": "Thanks!"
        },
        {
          "id": 475782,
          "postDate": "2019-02-21T07:38:29.100Z",
          "content": "<p>Hi Brian, regarding on multi-threading that speeds up the training cycle, the code above must be implemented in \"on_epoch_end\" function under TrainingData generator? Am I correct? Thanks again! :-)</p>",
          "rawMarkdown": "Hi Brian, regarding on multi-threading that speeds up the training cycle, the code above must be implemented in \"on_epoch_end\" function under TrainingData generator? Am I correct? Thanks again! :-)",
          "votes": 11
        }
      ]
    },
    {
      "id": 441738,
      "postDate": "2018-12-19T01:49:08.093Z",
      "content": "<p>Thanks for sharing.\nI found that using grayscale(num_output_channels=3) can increase the score, but not sure if it is universal</p>",
      "rawMarkdown": "Thanks for sharing.\nI found that using grayscale(num_output_channels=3) can increase the score, but not sure if it is universal",
      "votes": 1,
      "replies": [
        {
          "id": 441805,
          "postDate": "2018-12-19T05:09:15.427Z",
          "content": "<p>Do you mean you converted RGB to \"grayscale RGB\"?</p>",
          "rawMarkdown": "Do you mean you converted RGB to \"grayscale RGB\"?"
        },
        {
          "id": 442121,
          "postDate": "2018-12-19T14:05:21.563Z",
          "content": "<p>yes, just convert image to grayscale(r = g = b)</p>",
          "rawMarkdown": "yes, just convert image to grayscale(r = g = b)"
        },
        {
          "id": 442260,
          "postDate": "2018-12-19T17:37:43.353Z",
          "content": "<p>Interesting, I may try that, thanks for sharing.</p>",
          "rawMarkdown": "Interesting, I may try that, thanks for sharing."
        },
        {
          "id": 442383,
          "postDate": "2018-12-19T22:17:01.097Z",
          "content": "<p>Probably more like this:\n0.2989 * R + 0.5870 * G + 0.1140 * B, or more like R+G+B / 3 since computers care more about dynamic range than perceptual lightness. You don't want to reduce the blue signal just because it looks better to a human.</p>",
          "rawMarkdown": "Probably more like this:\n0.2989 * R + 0.5870 * G + 0.1140 * B, or more like R+G+B / 3 since computers care more about dynamic range than perceptual lightness. You don't want to reduce the blue signal just because it looks better to a human."
        },
        {
          "id": 443093,
          "postDate": "2018-12-21T02:16:30.810Z",
          "content": "<p>I have tried grayscale(numoutputchannels=3) method, and the score decreased 0.116. So maybe it's not a universal method.</p>",
          "rawMarkdown": "I have tried grayscale(numoutputchannels=3) method, and the score decreased 0.116. So maybe it's not a universal method.",
          "votes": 9
        },
        {
          "id": 443100,
          "postDate": "2018-12-21T02:34:51.037Z",
          "content": "<p>Thanks for sharing <a href=\"/luyang2018\">@luyang2018</a>, may I ask which method are you pursuing? I guess to break the 0.9 it must be metrics learning.</p>",
          "rawMarkdown": "Thanks for sharing @luyang2018, may I ask which method are you pursuing? I guess to break the 0.9 it must be metrics learning.",
          "votes": 2
        },
        {
          "id": 443160,
          "postDate": "2018-12-21T05:36:57.383Z",
          "content": "<p>Yes, metrics learning.</p>",
          "rawMarkdown": "Yes, metrics learning.",
          "votes": 5
        },
        {
          "id": 457368,
          "postDate": "2019-01-17T09:38:14.953Z",
          "content": "<p>RGB-vs-grayscale is an interesting issue. For me, RGB alone or with random grayscale(numoutputchannels=3) doesn`t work. Looking forward to read  <a href=\"/luyang2018\">@luyang2018</a> solution when competition finish :)</p>",
          "rawMarkdown": "RGB-vs-grayscale is an interesting issue. For me, RGB alone or with random grayscale(numoutputchannels=3) doesn`t work. Looking forward to read  @luyang2018 solution when competition finish :)",
          "votes": 1
        },
        {
          "id": 467376,
          "postDate": "2019-02-07T01:30:33.507Z",
          "content": "<p>Hey, if you don't mind. Could you share you answer on this point: Is Gray better than RGB in you solution?</p>",
          "rawMarkdown": "Hey, if you don't mind. Could you share you answer on this point: Is Gray better than RGB in you solution?",
          "votes": 1
        }
      ]
    },
    {
      "id": 437663,
      "postDate": "2018-12-12T09:38:47.267Z",
      "content": "<p>Hi there, I am new to this competition (okay, yah, not that new, toke me a couple of days to get initial submission done). My hunch feeling is on how to exclude/ insert the new_whale data.\nHave anyone tried test/ identify the new whale data and then re-train with all dataset?</p>",
      "rawMarkdown": "Hi there, I am new to this competition (okay, yah, not that new, toke me a couple of days to get initial submission done). My hunch feeling is on how to exclude/ insert the new_whale data.\nHave anyone tried test/ identify the new whale data and then re-train with all dataset?",
      "votes": 1,
      "replies": [
        {
          "id": 437829,
          "postDate": "2018-12-12T15:21:57.107Z",
          "content": "<p>Errors would quickly introduce bias into the training set. Maybe only for high confidence thresholds?</p>",
          "rawMarkdown": "Errors would quickly introduce bias into the training set. Maybe only for high confidence thresholds?"
        }
      ]
    },
    {
      "id": 437506,
      "postDate": "2018-12-12T03:47:57.320Z",
      "content": "<p>Thanks for sharing.</p>\n\n<p>One more question: do you believe only classification model would perform better than 0.8? I notice that the 1st place at present got above 0.9, and I guess maybe we could try other methods(e.g. detection or others) to get there.</p>",
      "rawMarkdown": "Thanks for sharing.\n\nOne more question: do you believe only classification model would perform better than 0.8? I notice that the 1st place at present got above 0.9, and I guess maybe we could try other methods(e.g. detection or others) to get there.",
      "votes": 1,
      "replies": [
        {
          "id": 437508,
          "postDate": "2018-12-12T03:53:34.307Z",
          "content": "<p>With ensemble: absolutely, i'm not sure a single classification model can do that though.</p>",
          "rawMarkdown": "With ensemble: absolutely, i'm not sure a single classification model can do that though.",
          "votes": 1
        },
        {
          "id": 437580,
          "postDate": "2018-12-12T06:36:04.290Z",
          "content": "<p>Thanks for your reply.</p>",
          "rawMarkdown": "Thanks for your reply."
        }
      ]
    },
    {
      "id": 463713,
      "postDate": "2019-01-30T13:20:14.740Z",
      "content": "<p>Hello, how are you get score above 0.9?</p>",
      "rawMarkdown": "Hello, how are you get score above 0.9?",
      "replies": [
        {
          "id": 463763,
          "postDate": "2019-01-30T15:12:17.023Z",
          "content": "<p>I dont know too.. I get LB 0.611 without new whales and with them 0.82.... Whats yous score without new whales, could you share it? I think choose the new whales its a important key here</p>",
          "rawMarkdown": "I dont know too.. I get LB 0.611 without new whales and with them 0.82.... Whats yous score without new whales, could you share it? I think choose the new whales its a important key here"
        },
        {
          "id": 463775,
          "postDate": "2019-01-30T15:47:54.990Z",
          "content": "<p>0.640 without new whales. Yes, i think so also.</p>",
          "rawMarkdown": "0.640 without new whales. Yes, i think so also."
        }
      ]
    },
    {
      "id": 460568,
      "postDate": "2019-01-24T01:22:13.333Z",
      "content": "<p>In the martinpiotte's solution, he compute a derangement of its pictures. What is the point of this operation?</p>",
      "rawMarkdown": "In the martinpiotte's solution, he compute a derangement of its pictures. What is the point of this operation?",
      "replies": [
        {
          "id": 460980,
          "postDate": "2019-01-24T23:17:17.787Z",
          "content": "<p>Do you mean the data augmentation by image transformation ? It prevents overfitting.</p>",
          "rawMarkdown": "Do you mean the data augmentation by image transformation ? It prevents overfitting."
        },
        {
          "id": 462410,
          "postDate": "2019-01-28T09:03:10.357Z",
          "content": "<p>Not really, it is when he talks about his training set creation:\n \"Half the examples used during training are for pair of images. For each whale of the training set, compute a derangement of its pictures. Use the original order as picture A, and the derangment as picture B. This creates a random number of matching image pairs, with each image taken exactly two times.\"\nWhy shuffle pixels from picture A give us a random number of matching image pairs, with each image taken exactly two times. </p>",
          "rawMarkdown": "Not really, it is when he talks about his training set creation:\n \"Half the examples used during training are for pair of images. For each whale of the training set, compute a derangement of its pictures. Use the original order as picture A, and the derangment as picture B. This creates a random number of matching image pairs, with each image taken exactly two times.\"\nWhy shuffle pixels from picture A give us a random number of matching image pairs, with each image taken exactly two times. ",
          "votes": 1
        }
      ]
    },
    {
      "id": 453575,
      "postDate": "2019-01-10T12:07:23.590Z",
      "content": "<p>Hi :\nAre you using martinpiotte's solution as baseline and modifying it or justing implement your own code?</p>",
      "rawMarkdown": "Hi :\nAre you using martinpiotte's solution as baseline and modifying it or justing implement your own code?"
    },
    {
      "id": 450750,
      "postDate": "2019-01-05T17:02:14.730Z",
      "content": "<p>Do you think we should remove class 0 when we try metrics learning as well ? Metrics learnings don't tend to overfit compared with classification. I am investing the way to use new_whales effectively.</p>",
      "rawMarkdown": "Do you think we should remove class 0 when we try metrics learning as well ? Metrics learnings don't tend to overfit compared with classification. I am investing the way to use new_whales effectively."
    },
    {
      "id": 446766,
      "postDate": "2018-12-28T16:57:03.350Z",
      "content": "<p>Hi Khoi, am I correct that you have been using just the submission csvs for the ensembling?  </p>\n\n<p>I tried ensembling with the full model predictions and that seems to score considerably better (0.727 vs 0.71 for my not-so-finetuned ensemble)?</p>",
      "rawMarkdown": "Hi Khoi, am I correct that you have been using just the submission csvs for the ensembling?  \n\nI tried ensembling with the full model predictions and that seems to score considerably better (0.727 vs 0.71 for my not-so-finetuned ensemble)?",
      "replies": [
        {
          "id": 447085,
          "postDate": "2018-12-29T05:42:51.250Z",
          "content": "<p>I used both.</p>\n\n<blockquote>\n  <p>Ensembling helped, with 3-4 models it can give ~0.1 boost in score, using probabilities worked a bit better than ranking alone, but not by much. Gave diminished returns beyond 5 models in my experience.</p>\n</blockquote>",
          "rawMarkdown": "I used both.\n\n&gt; Ensembling helped, with 3-4 models it can give ~0.1 boost in score, using probabilities worked a bit better than ranking alone, but not by much. Gave diminished returns beyond 5 models in my experience."
        },
        {
          "id": 452991,
          "postDate": "2019-01-09T13:05:27.003Z",
          "content": "<p>I saw that your LB score is 0.898 so... You have 4 models with around 0.800 score on LB and ensembling them using probabilities or just csv your score increased so much?</p>",
          "rawMarkdown": "I saw that your LB score is 0.898 so... You have 4 models with around 0.800 score on LB and ensembling them using probabilities or just csv your score increased so much?"
        },
        {
          "id": 453001,
          "postDate": "2019-01-09T13:35:40.177Z",
          "content": "<p>That score was from a single model, ensembling gives diminished returns as the scores go up so I dont think it will boost mine as much as when I was in the 0.7 range.</p>",
          "rawMarkdown": "That score was from a single model, ensembling gives diminished returns as the scores go up so I dont think it will boost mine as much as when I was in the 0.7 range."
        },
        {
          "id": 453040,
          "postDate": "2019-01-09T15:13:13.163Z",
          "content": "<p>Ah okey. I was able to get 0.83 with siamese, black and white and 384x384 images... Is this your approach or could you share something :)</p>",
          "rawMarkdown": "Ah okey. I was able to get 0.83 with siamese, black and white and 384x384 images... Is this your approach or could you share something :)"
        },
        {
          "id": 455051,
          "postDate": "2019-01-12T20:25:12.193Z",
          "content": "<p>I am getting 0.86 with black and white, 384x384. From the same model output, choosing where to put new_whale results in a range of scores from 0.73 to 0.86</p>",
          "rawMarkdown": "I am getting 0.86 with black and white, 384x384. From the same model output, choosing where to put new_whale results in a range of scores from 0.73 to 0.86",
          "votes": 4
        },
        {
          "id": 455263,
          "postDate": "2019-01-13T12:31:40.923Z",
          "content": "<p>Thanks! Could you share your LB without putting on the result 'new_whales'</p>",
          "rawMarkdown": "Thanks! Could you share your LB without putting on the result 'new_whales'"
        },
        {
          "id": 458948,
          "postDate": "2019-01-20T21:36:18.867Z",
          "content": "<p>Once the model I'm training now is ready I'll post a result without new whale. I suspect it will be quite low.</p>",
          "rawMarkdown": "Once the model I'm training now is ready I'll post a result without new whale. I suspect it will be quite low.",
          "votes": 1
        },
        {
          "id": 460677,
          "postDate": "2019-01-24T08:24:21.833Z",
          "content": "<p>And then? :D</p>",
          "rawMarkdown": "And then? :D"
        }
      ]
    },
    {
      "id": 442276,
      "postDate": "2018-12-19T18:14:30.693Z",
      "content": "<p>Are people holding out a portion of the training dataset for validation when training their models? or are people training the models on the entire training dataset and evaluating it's fit after submitted to the competition for scoring?</p>",
      "rawMarkdown": "Are people holding out a portion of the training dataset for validation when training their models? or are people training the models on the entire training dataset and evaluating it's fit after submitted to the competition for scoring?"
    },
    {
      "id": 439590,
      "postDate": "2018-12-15T21:13:59.607Z",
      "content": "<p>Excellent thread.  I was wondering how you landed on 384x384 specifically?</p>",
      "rawMarkdown": "Excellent thread.  I was wondering how you landed on 384x384 specifically?"
    },
    {
      "id": 438701,
      "postDate": "2018-12-14T03:33:02.270Z",
      "content": "<p>and how about the focal loss to solve the unbalance label？</p>",
      "rawMarkdown": "and how about the focal loss to solve the unbalance label？",
      "replies": [
        {
          "id": 438782,
          "postDate": "2018-12-14T07:19:10.933Z",
          "content": "<p>I'll try this later and see how it goes</p>",
          "rawMarkdown": "I'll try this later and see how it goes"
        },
        {
          "id": 439284,
          "postDate": "2018-12-15T04:54:08.127Z",
          "content": "<p>Apparently no changes in score..</p>",
          "rawMarkdown": "Apparently no changes in score..",
          "votes": 6
        }
      ]
    },
    {
      "id": 438670,
      "postDate": "2018-12-14T02:13:54.033Z",
      "content": "<p>How are you dealing with image size? Are you \"Squashing\" everything so each image is a square, or are you maintaining each specific image's aspect ratio </p>",
      "rawMarkdown": "How are you dealing with image size? Are you \"Squashing\" everything so each image is a square, or are you maintaining each specific image's aspect ratio ",
      "replies": [
        {
          "id": 439285,
          "postDate": "2018-12-15T04:54:31.143Z",
          "content": "<p>Yes I'm squashing everything to a square.</p>",
          "rawMarkdown": "Yes I'm squashing everything to a square."
        },
        {
          "id": 439831,
          "postDate": "2018-12-16T13:46:36.917Z",
          "content": "<p>I keep the aspect ratio and pad images into square ones</p>",
          "rawMarkdown": "I keep the aspect ratio and pad images into square ones"
        },
        {
          "id": 439861,
          "postDate": "2018-12-16T14:38:15.163Z",
          "content": "<p>I am also new to the field of machine learning. But i thought about this too. I would also rather go with keeping the aspect ratio, also not produce new images by mirroring or so</p>",
          "rawMarkdown": "I am also new to the field of machine learning. But i thought about this too. I would also rather go with keeping the aspect ratio, also not produce new images by mirroring or so"
        }
      ]
    },
    {
      "id": 440105,
      "postDate": "2018-12-17T03:38:56.787Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 439340,
      "postDate": "2018-12-15T07:42:57.527Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 453223,
      "author_name": "Michael Tam",
      "author_url": "",
      "post_date": "2019-01-09T21:45:38.893000",
      "content": "<p>I hope you guys do <em>whale</em> in the competition!</p>",
      "votes": 12,
      "replies": []
    },
    {
      "id": 463464,
      "author_name": "Yiheng Wang",
      "author_url": "",
      "post_date": "2019-01-30T03:12:26.267000",
      "content": "<p>Update 3 : ）\nSome labelled data are shared by participants:\n- all training images' masks, labelled and predicted images are mixed ( <a href=\"https://www.kaggle.com/c/humpback-whale-identification/discussion/78453\">https://www.kaggle.com/c/humpback-whale-identification/discussion/78453</a> )\n- 1000 annotated fluke key points ( <a href=\"https://www.kaggle.com/c/humpback-whale-identification/discussion/78699\">https://www.kaggle.com/c/humpback-whale-identification/discussion/78699</a> )\n- 450 fluke masks ( <a href=\"https://www.kaggle.com/c/humpback-whale-identification/discussion/78257\">https://www.kaggle.com/c/humpback-whale-identification/discussion/78257</a> )</p>",
      "votes": 6,
      "replies": [
        {
          "id": 464712,
          "author_name": "Eduardo Rocha de Andrade",
          "author_url": "",
          "post_date": "2019-02-01T10:43:22.860000",
          "content": "<p>Just to be sure, all these three links are annotations on the very same images of this competition, right? Or are these new images?</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 444476,
      "author_name": "Brian",
      "author_url": "",
      "post_date": "2018-12-24T04:55:53.243000",
      "content": "<p>I am working with  <a href=\"/martinpiotte\">@martinpiotte</a> 's solution. I've modified the lap to go with an imperfect answer instead of an exact answer. I ran 225 epochs at an hour per epoch with the initial implementation. Toady I changed the lap.lapjv to lapjv.lapjv and segmented the data into 6 segments running each in it's own thread. With these changes I am now running at 7-8 minutes per epoch.</p>",
      "votes": 3,
      "replies": [
        {
          "id": 444533,
          "author_name": "Khoi Nguyen",
          "author_url": "",
          "post_date": "2018-12-24T07:49:50.463000",
          "content": "<p>Thanks for sharing Brian, I'm looking forward to seeing more of your findings in this competition. How is Atlas going?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 444864,
          "author_name": "Brian",
          "author_url": "",
          "post_date": "2018-12-25T02:31:49.020000",
          "content": "<p>I had to pause on things for a while, work took priority and I had no time left. Then I caught the flu. Finally getting back to things,I've got a model running now that hopefully I can get trained before things end.</p>\n\n<p>After making the changes to the LAP yesterday things are looking good. In about 5 hours or so it will have completed the full 400 epochs in the original solution.  Interestingly there is some gap in my local vs public LB. My .784 public score was .993 locally</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 444951,
          "author_name": "Khoi Nguyen",
          "author_url": "",
          "post_date": "2018-12-25T07:50:38.683000",
          "content": "<p>Funny, I caught a flu too, guess that's a global thing.</p>\n\n<p>Where did you get that <code>lapjv</code> package? I tried <code>pip install lapjv</code> but seems like its output format is different and not compatible with Martin's <code>lap</code>.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 444954,
          "author_name": "Brian",
          "author_url": "",
          "post_date": "2018-12-25T07:59:36.873000",
          "content": "<p>I never used to get sick, now with kids in school I get sick every year!</p>\n\n<p>I am using 1.3.1 from:\n<a href=\"https://pypi.org/project/lapjv/\">https://pypi.org/project/lapjv/</a></p>\n\n<p>Importing as follows:</p>\n\n<pre>from lapjv import lapjv\n</pre>\n\n<p>In the generator here is how I do it multithreaded:</p>\n\n<pre>            num_threads = 6\n            tmp   = num_threads*[None]\n            threads   = []\n            thread_input   = num_threads*[None]\n            thread_idx = 0\n            batch = score.shape[0] // (num_threads-1)\n            for start in range(0, score.shape[0], batch):\n                end = min(score.shape[0], start + batch)\n                thread_input[thread_idx]  = self.score[start:end, start:end]\n                thread_idx += 1\n\n            def worker(data_idx):\n                x,_,_ = lapjv(thread_input[data_idx]) \n                tmp[data_idx] = x\n\n            print(\"Start worker threads\")\n            for i in range(num_threads):\n                t = threading.Thread(target=worker, args=(i,), daemon=True)\n                t.start()\n                threads.append(t)\n            for t in threads:\n                if t is not None:\n                    t.join()\n            x = np.concatenate(tmp)\n            print(\"LAP completed\")\n</pre>\n\n<p>Basically lap.lapjv would return <em>,</em>,x, and lapjv.lapjv returns the x first.</p>",
          "votes": 7,
          "replies": []
        },
        {
          "id": 445049,
          "author_name": "Khoi Nguyen",
          "author_url": "",
          "post_date": "2018-12-25T13:18:53.013000",
          "content": "<p>Thanks, I'll try it out. Btw what is your hardware specs? My 1080Ti also only needs 7-8 minutes per epoch with the original implementation.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 445204,
          "author_name": "Brian",
          "author_url": "",
          "post_date": "2018-12-26T00:01:33.323000",
          "content": "<p>Running this one on a RTX 2080, at the same time running HPA on a Titan X maxwell give epochs in the 7-10 minute range. If I am only running this one on the RTX it will get down to 6 minutes.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 445842,
          "author_name": "datasaurus",
          "author_url": "",
          "post_date": "2018-12-27T05:36:49.083000",
          "content": "<p>Noob question - what does <code>lapjv</code> do (I can see it's some sort of solver), and how should it be used with this dataset?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 446930,
          "author_name": "Brian",
          "author_url": "",
          "post_date": "2018-12-28T22:11:12.967000",
          "content": "<p>From my understanding, It is how the whales and non whales are matched up. It takes the two sets and returns the best matches. I am still trying to fully understand this myself. From my standpoint, I just found a faster way to do it than the original.</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 447551,
          "author_name": "Khoi Nguyen",
          "author_url": "",
          "post_date": "2018-12-30T03:50:20.063000",
          "content": "<p>@Brian Does your approach affect LB score compared to the original? I just switched to what you suggested and the training accuracy suddenly jumped up.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 448047,
          "author_name": "Brian",
          "author_url": "",
          "post_date": "2018-12-31T06:05:58.303000",
          "content": "<p>I switched midway through my training. I didn't notice much of a jump but I do have high local LB than public. 0.985 local resulted in 0.862 on the public.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 448049,
          "author_name": "Khoi Nguyen",
          "author_url": "",
          "post_date": "2018-12-31T06:15:29.307000",
          "content": "<p>The model is very unstable for me, jumping between 0.76 and 0.84 LB, yes local is always much higher than LB also. </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 451295,
          "author_name": "XiaokangWang",
          "author_url": "",
          "post_date": "2019-01-06T19:36:12.840000",
          "content": "<p>The kaggle community is so sweet. Hope you get better, Brian.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 451535,
          "author_name": "Philip Gao",
          "author_url": "",
          "post_date": "2019-01-07T08:36:37.103000",
          "content": "<p>@Brain I am trying to understand 'lapjv'. I got a question here. The lap.lapjv() would return cost,x,y and lapjv() returns x,y,cost which means your code is using 'x' and Martin's code is using 'y'. Is there any difference between using x and y?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 455039,
          "author_name": "Brian",
          "author_url": "",
          "post_date": "2019-01-12T20:03:31.457000",
          "content": "<p>Thanks @XiokangWang. What a rough month December was. January meant back to work and I finally have some time to work on this again.</p>\n\n<p><a href=\"/philipgao1\">@philipgao1</a>, That is a good catch, looks like I made a mistake. My intention was to use X there not Y. The input matrix X and Y are the same in most cases so I assume that is why it still works using Y. My background is in programming and I am using these competitions to learn the math for ML tasks.</p>\n\n<p>Edit:\nLooking at the example here: <a href=\"https://github.com/src-d/lapjv\">https://github.com/src-d/lapjv</a></p>\n\n<p>To me that looks like it is returning y, x, cost as column is typically referred to as X. The documentation with lapjv.lapjv is pretty sparse.</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 456787,
          "author_name": "Mario Parreño Lara",
          "author_url": "",
          "post_date": "2019-01-16T14:49:12.513000",
          "content": "<p>For me too its very inestable, could you share if you did it more stable and how?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 462076,
          "author_name": "bluetrain",
          "author_url": "",
          "post_date": "2019-01-27T16:03:24.540000",
          "content": "<p>@brian is the multithread solution the same you would get with no multithreading? I mean from a threoretical point of view.  I bet it's not, but I am not 100% sure...</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 463925,
          "author_name": "Brian",
          "author_url": "",
          "post_date": "2019-01-30T22:53:56.240000",
          "content": "<p>It is not the same, the more threads/split the worse it is. The original matches the entire set against itself, with the threads it is matching only within the subset that each thread processes.</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 464060,
          "author_name": "bluetrain",
          "author_url": "",
          "post_date": "2019-01-31T06:11:50.933000",
          "content": "<p>Thanks!</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 475782,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-02-21T07:38:29.100000",
          "content": "<p>Hi Brian, regarding on multi-threading that speeds up the training cycle, the code above must be implemented in \"on_epoch_end\" function under TrainingData generator? Am I correct? Thanks again! :-)</p>",
          "votes": 11,
          "replies": []
        }
      ]
    },
    {
      "id": 441738,
      "author_name": "HiYellowC",
      "author_url": "",
      "post_date": "2018-12-19T01:49:08.093000",
      "content": "<p>Thanks for sharing.\nI found that using grayscale(num_output_channels=3) can increase the score, but not sure if it is universal</p>",
      "votes": 1,
      "replies": [
        {
          "id": 441805,
          "author_name": "Simeon Trieu",
          "author_url": "",
          "post_date": "2018-12-19T05:09:15.427000",
          "content": "<p>Do you mean you converted RGB to \"grayscale RGB\"?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 442121,
          "author_name": "HiYellowC",
          "author_url": "",
          "post_date": "2018-12-19T14:05:21.563000",
          "content": "<p>yes, just convert image to grayscale(r = g = b)</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 442260,
          "author_name": "Khoi Nguyen",
          "author_url": "",
          "post_date": "2018-12-19T17:37:43.353000",
          "content": "<p>Interesting, I may try that, thanks for sharing.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 442383,
          "author_name": "Simeon Trieu",
          "author_url": "",
          "post_date": "2018-12-19T22:17:01.097000",
          "content": "<p>Probably more like this:\n0.2989 * R + 0.5870 * G + 0.1140 * B, or more like R+G+B / 3 since computers care more about dynamic range than perceptual lightness. You don't want to reduce the blue signal just because it looks better to a human.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 443093,
          "author_name": "Lu Yang",
          "author_url": "",
          "post_date": "2018-12-21T02:16:30.810000",
          "content": "<p>I have tried grayscale(numoutputchannels=3) method, and the score decreased 0.116. So maybe it's not a universal method.</p>",
          "votes": 9,
          "replies": []
        },
        {
          "id": 443100,
          "author_name": "Khoi Nguyen",
          "author_url": "",
          "post_date": "2018-12-21T02:34:51.037000",
          "content": "<p>Thanks for sharing <a href=\"/luyang2018\">@luyang2018</a>, may I ask which method are you pursuing? I guess to break the 0.9 it must be metrics learning.</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 443160,
          "author_name": "Lu Yang",
          "author_url": "",
          "post_date": "2018-12-21T05:36:57.383000",
          "content": "<p>Yes, metrics learning.</p>",
          "votes": 5,
          "replies": []
        },
        {
          "id": 457368,
          "author_name": "old-ufo",
          "author_url": "",
          "post_date": "2019-01-17T09:38:14.953000",
          "content": "<p>RGB-vs-grayscale is an interesting issue. For me, RGB alone or with random grayscale(numoutputchannels=3) doesn`t work. Looking forward to read  <a href=\"/luyang2018\">@luyang2018</a> solution when competition finish :)</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 467376,
          "author_name": "Gary",
          "author_url": "",
          "post_date": "2019-02-07T01:30:33.507000",
          "content": "<p>Hey, if you don't mind. Could you share you answer on this point: Is Gray better than RGB in you solution?</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 437663,
      "author_name": "wklin8",
      "author_url": "",
      "post_date": "2018-12-12T09:38:47.267000",
      "content": "<p>Hi there, I am new to this competition (okay, yah, not that new, toke me a couple of days to get initial submission done). My hunch feeling is on how to exclude/ insert the new_whale data.\nHave anyone tried test/ identify the new whale data and then re-train with all dataset?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 437829,
          "author_name": "Simeon Trieu",
          "author_url": "",
          "post_date": "2018-12-12T15:21:57.107000",
          "content": "<p>Errors would quickly introduce bias into the training set. Maybe only for high confidence thresholds?</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 437506,
      "author_name": "Tommy Jiang",
      "author_url": "",
      "post_date": "2018-12-12T03:47:57.320000",
      "content": "<p>Thanks for sharing.</p>\n\n<p>One more question: do you believe only classification model would perform better than 0.8? I notice that the 1st place at present got above 0.9, and I guess maybe we could try other methods(e.g. detection or others) to get there.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 437508,
          "author_name": "Khoi Nguyen",
          "author_url": "",
          "post_date": "2018-12-12T03:53:34.307000",
          "content": "<p>With ensemble: absolutely, i'm not sure a single classification model can do that though.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 437580,
          "author_name": "Tommy Jiang",
          "author_url": "",
          "post_date": "2018-12-12T06:36:04.290000",
          "content": "<p>Thanks for your reply.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 463713,
      "author_name": "NullPoint",
      "author_url": "",
      "post_date": "2019-01-30T13:20:14.740000",
      "content": "<p>Hello, how are you get score above 0.9?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 463763,
          "author_name": "Mario Parreño Lara",
          "author_url": "",
          "post_date": "2019-01-30T15:12:17.023000",
          "content": "<p>I dont know too.. I get LB 0.611 without new whales and with them 0.82.... Whats yous score without new whales, could you share it? I think choose the new whales its a important key here</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 463775,
          "author_name": "NullPoint",
          "author_url": "",
          "post_date": "2019-01-30T15:47:54.990000",
          "content": "<p>0.640 without new whales. Yes, i think so also.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 460568,
      "author_name": "Enamor",
      "author_url": "",
      "post_date": "2019-01-24T01:22:13.333000",
      "content": "<p>In the martinpiotte's solution, he compute a derangement of its pictures. What is the point of this operation?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 460980,
          "author_name": "toshi_k",
          "author_url": "",
          "post_date": "2019-01-24T23:17:17.787000",
          "content": "<p>Do you mean the data augmentation by image transformation ? It prevents overfitting.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 462410,
          "author_name": "Enamor",
          "author_url": "",
          "post_date": "2019-01-28T09:03:10.357000",
          "content": "<p>Not really, it is when he talks about his training set creation:\n \"Half the examples used during training are for pair of images. For each whale of the training set, compute a derangement of its pictures. Use the original order as picture A, and the derangment as picture B. This creates a random number of matching image pairs, with each image taken exactly two times.\"\nWhy shuffle pixels from picture A give us a random number of matching image pairs, with each image taken exactly two times. </p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 453575,
      "author_name": "TsungHan",
      "author_url": "",
      "post_date": "2019-01-10T12:07:23.590000",
      "content": "<p>Hi :\nAre you using martinpiotte's solution as baseline and modifying it or justing implement your own code?</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 450750,
      "author_name": "toshi_k",
      "author_url": "",
      "post_date": "2019-01-05T17:02:14.730000",
      "content": "<p>Do you think we should remove class 0 when we try metrics learning as well ? Metrics learnings don't tend to overfit compared with classification. I am investing the way to use new_whales effectively.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 446766,
      "author_name": "PieterBlomme",
      "author_url": "",
      "post_date": "2018-12-28T16:57:03.350000",
      "content": "<p>Hi Khoi, am I correct that you have been using just the submission csvs for the ensembling?  </p>\n\n<p>I tried ensembling with the full model predictions and that seems to score considerably better (0.727 vs 0.71 for my not-so-finetuned ensemble)?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 447085,
          "author_name": "Khoi Nguyen",
          "author_url": "",
          "post_date": "2018-12-29T05:42:51.250000",
          "content": "<p>I used both.</p>\n\n<blockquote>\n  <p>Ensembling helped, with 3-4 models it can give ~0.1 boost in score, using probabilities worked a bit better than ranking alone, but not by much. Gave diminished returns beyond 5 models in my experience.</p>\n</blockquote>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 452991,
          "author_name": "Mario Parreño Lara",
          "author_url": "",
          "post_date": "2019-01-09T13:05:27.003000",
          "content": "<p>I saw that your LB score is 0.898 so... You have 4 models with around 0.800 score on LB and ensembling them using probabilities or just csv your score increased so much?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 453001,
          "author_name": "Khoi Nguyen",
          "author_url": "",
          "post_date": "2019-01-09T13:35:40.177000",
          "content": "<p>That score was from a single model, ensembling gives diminished returns as the scores go up so I dont think it will boost mine as much as when I was in the 0.7 range.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 453040,
          "author_name": "Mario Parreño Lara",
          "author_url": "",
          "post_date": "2019-01-09T15:13:13.163000",
          "content": "<p>Ah okey. I was able to get 0.83 with siamese, black and white and 384x384 images... Is this your approach or could you share something :)</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 455051,
          "author_name": "Brian",
          "author_url": "",
          "post_date": "2019-01-12T20:25:12.193000",
          "content": "<p>I am getting 0.86 with black and white, 384x384. From the same model output, choosing where to put new_whale results in a range of scores from 0.73 to 0.86</p>",
          "votes": 4,
          "replies": []
        },
        {
          "id": 455263,
          "author_name": "Mario Parreño Lara",
          "author_url": "",
          "post_date": "2019-01-13T12:31:40.923000",
          "content": "<p>Thanks! Could you share your LB without putting on the result 'new_whales'</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 458948,
          "author_name": "Brian",
          "author_url": "",
          "post_date": "2019-01-20T21:36:18.867000",
          "content": "<p>Once the model I'm training now is ready I'll post a result without new whale. I suspect it will be quite low.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 460677,
          "author_name": "Mario Parreño Lara",
          "author_url": "",
          "post_date": "2019-01-24T08:24:21.833000",
          "content": "<p>And then? :D</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 442276,
      "author_name": "Zak Raicik",
      "author_url": "",
      "post_date": "2018-12-19T18:14:30.693000",
      "content": "<p>Are people holding out a portion of the training dataset for validation when training their models? or are people training the models on the entire training dataset and evaluating it's fit after submitted to the competition for scoring?</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 439590,
      "author_name": "Matthew Anderson",
      "author_url": "",
      "post_date": "2018-12-15T21:13:59.607000",
      "content": "<p>Excellent thread.  I was wondering how you landed on 384x384 specifically?</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 438701,
      "author_name": "ShawnTung",
      "author_url": "",
      "post_date": "2018-12-14T03:33:02.270000",
      "content": "<p>and how about the focal loss to solve the unbalance label？</p>",
      "votes": 0,
      "replies": [
        {
          "id": 438782,
          "author_name": "Khoi Nguyen",
          "author_url": "",
          "post_date": "2018-12-14T07:19:10.933000",
          "content": "<p>I'll try this later and see how it goes</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 439284,
          "author_name": "Khoi Nguyen",
          "author_url": "",
          "post_date": "2018-12-15T04:54:08.127000",
          "content": "<p>Apparently no changes in score..</p>",
          "votes": 6,
          "replies": []
        }
      ]
    },
    {
      "id": 438670,
      "author_name": "Zak Raicik",
      "author_url": "",
      "post_date": "2018-12-14T02:13:54.033000",
      "content": "<p>How are you dealing with image size? Are you \"Squashing\" everything so each image is a square, or are you maintaining each specific image's aspect ratio </p>",
      "votes": 0,
      "replies": [
        {
          "id": 439285,
          "author_name": "Khoi Nguyen",
          "author_url": "",
          "post_date": "2018-12-15T04:54:31.143000",
          "content": "<p>Yes I'm squashing everything to a square.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 439831,
          "author_name": "youchaoqin",
          "author_url": "",
          "post_date": "2018-12-16T13:46:36.917000",
          "content": "<p>I keep the aspect ratio and pad images into square ones</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 439861,
          "author_name": "Markus Degen",
          "author_url": "",
          "post_date": "2018-12-16T14:38:15.163000",
          "content": "<p>I am also new to the field of machine learning. But i thought about this too. I would also rather go with keeping the aspect ratio, also not produce new images by mirroring or so</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 440105,
      "author_name": "",
      "author_url": "",
      "post_date": "2018-12-17T03:38:56.787000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 439340,
      "author_name": "",
      "author_url": "",
      "post_date": "2018-12-15T07:42:57.527000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "437446": "I'll sum up what I've tried and am going to try in this thread, please share your findings if you can.\n\nWhat I've tried:\n\n- Classification with 5005 classes: not recommended, too easily overfit to class 0.\n\n- [Removing class 0][1]: Kinda worked, however a new problem arose which is how and where to insert the **new_whale** into your submission. Using a threshold worked ok so far, but it seems like it's just mimicking the ratio of **new_whale** on the public test set which is a bad thing.\n\n- [Using bounding boxes][2] increased the score by a 0.0x so there's no reason not to use it.\n\n- Ensembling helped, with 3-4 models it can give ~0.1 boost in score, [using probabilities][3] worked a bit better than [ranking][4] alone, but not by much. Gave diminished returns beyond 5 models in my experience.\n\n- Increasing image size helped, gave diminished returns beyond 384x384, not really sure about the number.\n\nWhat I'll try:\n\n- Better way to choose the **new_whale** threshold, see how far I can get with that approach.\n\n- Metrics learning, starting with @martinpiotte 's solution.\n\n- A different loss functions: Triplet loss, Magnet loss yadda yadda\n\n**Update 1**\n\nMartin's solution is ported here: https://www.kaggle.com/suicaokhoailang/martin-piotte-s-siamese-baseline . Very promising indeed.\n\n\n**Update 2**\n\nA few clues about high scoring solutions:\n\n- The currently #1 solution used metrics learning: https://www.kaggle.com/c/humpback-whale-identification/discussion/74402#443160\n\n- My 0.898 submission was from a single siamese. \n\n- Classification is much better than I thought it would be, able to get 0.9+ LB: https://www.kaggle.com/c/humpback-whale-identification/discussion/75846#452220\n\nAlso, another approach on whether to include **new_whale** in your predictions using nearest neighbors: https://www.kaggle.com/iafoss/similarity-resnext50-0-602-lb\n\n  [1]: https://www.kaggle.com/suicaokhoailang/faster-and-better-resnet50-without-class-0-0-598\n  [2]: https://www.kaggle.com/suicaokhoailang/resnet50-bounding-boxes-0-628-lb\n  [3]: https://www.kaggle.com/suicaokhoailang/ensembling-with-averaged-probabilities-0-701-lb\n  [4]: https://www.kaggle.com/matthewa313/ensembling-algorithm-for-average-precision-metric",
    "453223": "I hope you guys do *whale* in the competition!",
    "463464": "Update 3 : ）\nSome labelled data are shared by participants:\n- all training images' masks, labelled and predicted images are mixed ( https://www.kaggle.com/c/humpback-whale-identification/discussion/78453 )\n- 1000 annotated fluke key points ( https://www.kaggle.com/c/humpback-whale-identification/discussion/78699 )\n- 450 fluke masks ( https://www.kaggle.com/c/humpback-whale-identification/discussion/78257 )",
    "444476": "I am working with  @martinpiotte 's solution. I've modified the lap to go with an imperfect answer instead of an exact answer. I ran 225 epochs at an hour per epoch with the initial implementation. Toady I changed the lap.lapjv to lapjv.lapjv and segmented the data into 6 segments running each in it's own thread. With these changes I am now running at 7-8 minutes per epoch.",
    "441738": "Thanks for sharing.\nI found that using grayscale(num_output_channels=3) can increase the score, but not sure if it is universal",
    "437663": "Hi there, I am new to this competition (okay, yah, not that new, toke me a couple of days to get initial submission done). My hunch feeling is on how to exclude/ insert the new_whale data.\nHave anyone tried test/ identify the new whale data and then re-train with all dataset?",
    "437506": "Thanks for sharing.\n\nOne more question: do you believe only classification model would perform better than 0.8? I notice that the 1st place at present got above 0.9, and I guess maybe we could try other methods(e.g. detection or others) to get there.",
    "463713": "Hello, how are you get score above 0.9?",
    "460568": "In the martinpiotte's solution, he compute a derangement of its pictures. What is the point of this operation?",
    "453575": "Hi :\nAre you using martinpiotte's solution as baseline and modifying it or justing implement your own code?",
    "450750": "Do you think we should remove class 0 when we try metrics learning as well ? Metrics learnings don't tend to overfit compared with classification. I am investing the way to use new_whales effectively.",
    "446766": "Hi Khoi, am I correct that you have been using just the submission csvs for the ensembling?  \n\nI tried ensembling with the full model predictions and that seems to score considerably better (0.727 vs 0.71 for my not-so-finetuned ensemble)?",
    "442276": "Are people holding out a portion of the training dataset for validation when training their models? or are people training the models on the entire training dataset and evaluating it's fit after submitted to the competition for scoring?",
    "439590": "Excellent thread.  I was wondering how you landed on 384x384 specifically?",
    "438701": "and how about the focal loss to solve the unbalance label？",
    "438670": "How are you dealing with image size? Are you \"Squashing\" everything so each image is a square, or are you maintaining each specific image's aspect ratio ",
    "440105": "",
    "439340": ""
  }
}