{
  "id": 79384,
  "title": "here are the tricks ....",
  "url": "/competitions/humpback-whale-identification/discussion/79384",
  "author_name": "",
  "post_date": "2019-02-03T12:24:01.855931100Z",
  "votes": 67,
  "comment_count": 41,
  "views": 0,
  "content": "<p>here is the first one ...\n bookmark this thread ... more tricks to come!</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/465542/11158/shear_trick.png\" alt=\"enter image description here\"></p>\n\n<p>the tail is more or less planar. Either do shear augmentation, etc ... or use deep keypoint matching or deep unwarping/grid/flow (advance spatial transformer net) to transform to normalized frontal view</p>",
  "messages": [
    {
      "id": "465542",
      "postDate": "02/03/2019 12:24:01",
      "content": "<p>here is the first one ...\n bookmark this thread ... more tricks to come!</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/465542/11158/shear_trick.png\" alt=\"enter image description here\"></p>\n\n<p>the tail is more or less planar. Either do shear augmentation, etc ... or use deep keypoint matching or deep unwarping/grid/flow (advance spatial transformer net) to transform to normalized frontal view</p>",
      "rawMarkdown": "here is the first one ...\n bookmark this thread ... more tricks to come!\n\n  ![enter image description here][1]\n\n\nthe tail is more or less planar. Either do shear augmentation, etc ... or use deep keypoint matching or deep unwarping/grid/flow (advance spatial transformer net) to transform to normalized frontal view\n\n\n  [1]: https://storage.googleapis.com/kaggle-forum-message-attachments/465542/11158/shear_trick.png",
      "votes": null
    },
    {
      "id": "465559",
      "postDate": "02/03/2019 13:31:05",
      "content": "<p>Thanks for the great tip &lt;3</p>",
      "rawMarkdown": "Thanks for the great tip &lt;3",
      "votes": null
    },
    {
      "id": "465577",
      "postDate": "02/03/2019 14:17:11",
      "content": "<p>i am surprised that the network can get this difficult image correct. Then i realize that there are actually train images of similar pose. Hence if you have the same pose train images, identification results won't be too bad.</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/465577/11161/Slide5.png\" alt=\"enter image description here\"></p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/465577/11159/Slide6.png\" alt=\"enter image description here\"></p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/465577/11160/Slide7.png\" alt=\"enter image description here\"></p>\n\n<p>other works:</p>\n\n<p>Deep Deformation Network for Object Landmark Localization - NEC paper\n<a href=\"https://arxiv.org/pdf/1605.01014\">https://arxiv.org/pdf/1605.01014</a></p>\n\n<p><img src=\"https://www.groundai.com/media/arxiv_projects/81824/sbn_ptn.png.344x181_q75_crop.jpg\" alt=\"enter image description here\">\n  <img src=\"http://www.nec-labs.com/uploads/images/Department-Images/MediaAnalytics/warpnet_1.jpg\" alt=\"enter image description here\"></p>",
      "rawMarkdown": "i am surprised that the network can get this difficult image correct. Then i realize that there are actually train images of similar pose. Hence if you have the same pose train images, identification results won't be too bad.\n\n\n  ![enter image description here][1]\n\n  ![enter image description here][2]\n\n  ![enter image description here][3]\n\n\nother works:\n\n\nDeep Deformation Network for Object Landmark Localization - NEC paper\nhttps://arxiv.org/pdf/1605.01014\n\n\n  ![enter image description here][4]\n  ![enter image description here][5]\n\n\n  [1]: https://storage.googleapis.com/kaggle-forum-message-attachments/465577/11161/Slide5.png\n  [2]: https://storage.googleapis.com/kaggle-forum-message-attachments/465577/11159/Slide6.png\n  [3]: https://storage.googleapis.com/kaggle-forum-message-attachments/465577/11160/Slide7.png\n  [4]: https://www.groundai.com/media/arxiv_projects/81824/sbn_ptn.png.344x181_q75_crop.jpg\n  [5]: http://www.nec-labs.com/uploads/images/Department-Images/MediaAnalytics/warpnet_1.jpg",
      "votes": null
    },
    {
      "id": "465659",
      "postDate": "02/03/2019 17:58:37",
      "content": "<p>Great ideas heng!!</p>\n\n<p>Pose normalization/Face Frontalisation was exactly what I had in mind when I created my keypoint dataset. Hope you or others can use it!</p>",
      "rawMarkdown": "Great ideas heng!!\n\nPose normalization/Face Frontalisation was exactly what I had in mind when I created my keypoint dataset. Hope you or others can use it!",
      "votes": null
    },
    {
      "id": "465700",
      "postDate": "02/03/2019 20:01:52",
      "content": "<p>Thanks Heng!!</p>",
      "rawMarkdown": "Thanks Heng!!",
      "votes": null
    },
    {
      "id": "465708",
      "postDate": "02/03/2019 20:35:21",
      "content": "<p>We missed you Heng! Glad that you've joined the comp. </p>\n\n<p>I remember you very well from the self driving car course days in 2017. I remember when you've modified the simulator and put checkerboard on the road to check the image distortion of the camera... It was amazing!!!  </p>\n\n<p>Unfortunately, after few weeks we've missed you from the course. It seems that you was hooked with kaggling instead!!! You have even dropped your job I think, to self-study DL. Big respect to you Heng! Especially for the scientific tips and for the altruistic spirit of sharing knowledge and for your enthusiasm in Deep Learning and Science.</p>",
      "rawMarkdown": "We missed you Heng! Glad that you've joined the comp. \n\nI remember you very well from the self driving car course days in 2017. I remember when you've modified the simulator and put checkerboard on the road to check the image distortion of the camera... It was amazing!!!  \n\nUnfortunately, after few weeks we've missed you from the course. It seems that you was hooked with kaggling instead!!! You have even dropped your job I think, to self-study DL. Big respect to you Heng! Especially for the scientific tips and for the altruistic spirit of sharing knowledge and for your enthusiasm in Deep Learning and Science.",
      "votes": null
    },
    {
      "id": "465819",
      "postDate": "02/04/2019 04:40:09",
      "content": "<p>contrast trick\n  <img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/465819/11166/contrast_trick.png\" alt=\"enter image description here\"></p>",
      "rawMarkdown": "contrast trick\n  ![enter image description here][1]\n\n\n  [1]: https://storage.googleapis.com/kaggle-forum-message-attachments/465819/11166/contrast_trick.png",
      "votes": null
    },
    {
      "id": "465898",
      "postDate": "02/04/2019 09:41:55",
      "content": "<p>So, basically trick is to use default fast.ai augmentation, because it already does all of these)))</p>",
      "rawMarkdown": "So, basically trick is to use default fast.ai augmentation, because it already does all of these)))",
      "votes": null
    },
    {
      "id": "465916",
      "postDate": "02/04/2019 10:22:21",
      "content": "<p>new whale or not? My observation:</p>\n\n<hr>\n\n<p><strong>* updated *</strong></p>\n\n<p>the below is not true, please ignore!!!! </p>\n\n<p>id with one train image can have multiple test image. </p>\n\n<hr>\n\n<ul>\n<li><p>most new-whale images are frontal, i.e. if the test image is non-frontal, it is less likely to be new-whale</p></li>\n<li><p>there are some id with single train image (i.e. single sample class). it is likely that there should be at least one test image with the same id, else the single train image should be labelled as new_whale (because it only appears once and only one in both train+test images)? i.e. num of unique ids in test should be also 5005</p></li>\n<li><p>say i have a id-A with 10 train images, and id-B with only 1 train images. It is more likely that number of id-A test image &gt;  number of id-B test image. Hence if there is only one train image, it is very likely that there is only one test image.</p></li>\n</ul>\n\n<p>This means that you roughly know \"how many ids are present in the test\". This is become an assignment problem.\n(you can see the kaggle google doodle challenge)</p>\n\n<p>This mean that, say if an id-X has only highest rank=5 in all test images. You can reassign and promote it to rank-1 in some images. Hence some kind of assignment algorithm helps.</p>",
      "rawMarkdown": "new whale or not? My observation:\n\n---\n*** updated ***\n\nthe below is not true, please ignore!!!! \n\nid with one train image can have multiple test image. \n\n----\n- most new-whale images are frontal, i.e. if the test image is non-frontal, it is less likely to be new-whale\n\n- there are some id with single train image (i.e. single sample class). it is likely that there should be at least one test image with the same id, else the single train image should be labelled as new_whale (because it only appears once and only one in both train+test images)? i.e. num of unique ids in test should be also 5005\n\n- say i have a id-A with 10 train images, and id-B with only 1 train images. It is more likely that number of id-A test image &gt;  number of id-B test image. Hence if there is only one train image, it is very likely that there is only one test image.\n\nThis means that you roughly know \"how many ids are present in the test\". This is become an assignment problem.\n(you can see the kaggle google doodle challenge)\n\nThis mean that, say if an id-X has only highest rank=5 in all test images. You can reassign and promote it to rank-1 in some images. Hence some kind of assignment algorithm helps.",
      "votes": null
    },
    {
      "id": "465918",
      "postDate": "02/04/2019 10:25:04",
      "content": "<p>I think the idea of Heng is not especially to augment image with contrast changes but maybe directly give a contrast enhanced image as input.</p>\n\n<p>By default, fast.ai is also flipping images ; which I do not think is a desirable augmentation in this case.</p>",
      "rawMarkdown": "I think the idea of Heng is not especially to augment image with contrast changes but maybe directly give a contrast enhanced image as input.\n\nBy default, fast.ai is also flipping images ; which I do not think is a desirable augmentation in this case.",
      "votes": null
    },
    {
      "id": "465948",
      "postDate": "02/04/2019 11:23:13",
      "content": "<p>Very interesting observation, thanks Heng! </p>\n\n<p>I have tried to do re-ranking following this paper <a href=\"https://arxiv.org/pdf/1701.08398.pdf\">https://arxiv.org/pdf/1701.08398.pdf</a> but without success, maybe I'm not applying it correctly. Has anyone tried that approach or similar?</p>",
      "rawMarkdown": "Very interesting observation, thanks Heng! \n\nI have tried to do re-ranking following this paper https://arxiv.org/pdf/1701.08398.pdf but without success, maybe I'm not applying it correctly. Has anyone tried that approach or similar?",
      "votes": null
    },
    {
      "id": "465951",
      "postDate": "02/04/2019 11:38:11",
      "content": "<p>Okay, get_transforms(do_flip=False) fast.ai augmentation :)</p>",
      "rawMarkdown": "Okay, get_transforms(do_flip=False) fast.ai augmentation :)",
      "votes": null
    },
    {
      "id": "465972",
      "postDate": "02/04/2019 12:52:12",
      "content": "<p>large image or high resolution information matters. Sometimes, the only confirmatory evidence is only visible at high resolution. try to use full resolution information (e.g. patches, etc)</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/465972/11168/large_image.png\" alt=\"enter image description here\"></p>",
      "rawMarkdown": "large image or high resolution information matters. Sometimes, the only confirmatory evidence is only visible at high resolution. try to use full resolution information (e.g. patches, etc)\n\n  ![enter image description here][1]\n\n\n  [1]: https://storage.googleapis.com/kaggle-forum-message-attachments/465972/11168/large_image.png",
      "votes": null
    },
    {
      "id": "465991",
      "postDate": "02/04/2019 13:36:51",
      "content": "<p>some isolated cases: how the text can helps:</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/465991/11169/text.png\" alt=\"enter image description here\"></p>",
      "rawMarkdown": "some isolated cases: how the text can helps:\n\n  ![enter image description here][1]\n\n\n  [1]: https://storage.googleapis.com/kaggle-forum-message-attachments/465991/11169/text.png",
      "votes": null
    },
    {
      "id": "466046",
      "postDate": "02/04/2019 15:26:58",
      "content": "<p>Thanks for the great idea. Text help is interesting! \nAnd I agree your observation that single train class image may be exist at least one.</p>",
      "rawMarkdown": "Thanks for the great idea. Text help is interesting! \nAnd I agree your observation that single train class image may be exist at least one.",
      "votes": null
    },
    {
      "id": "466449",
      "postDate": "02/05/2019 12:02:26",
      "content": "<p>after reading this :<a href=\"https://www.kaggle.com/c/humpback-whale-identification/discussion/75352\">https://www.kaggle.com/c/humpback-whale-identification/discussion/75352</a></p>\n\n<p>so some id may not have test  image after all. The only way that it will  not affect private score results is that there are no such problem in the private test set ... ?</p>",
      "rawMarkdown": "after reading this :https://www.kaggle.com/c/humpback-whale-identification/discussion/75352\n\nso some id may not have test  image after all. The only way that it will  not affect private score results is that there are no such problem in the private test set ... ?",
      "votes": null
    },
    {
      "id": "466453",
      "postDate": "02/05/2019 12:06:16",
      "content": "<p>some augmentation:</p>\n\n<ul>\n<li><p>add noise : water splash</p></li>\n<li><p>erosion/dilation : wear and tear of  barnacles</p></li>\n<li><p>rotation, scale, shear, perspective warp .... </p></li>\n<li><p>illumination transform for under/over exposure </p></li>\n<li><p>blur/motion blur / small resolution</p></li>\n<li><p>occlusion (part of fluke in water)</p></li>\n<li><p>underwater! (especially for the white whale fluke)</p></li>\n</ul>",
      "rawMarkdown": "some augmentation:\n\n- add noise : water splash\n\n- erosion/dilation : wear and tear of  barnacles\n\n- rotation, scale, shear, perspective warp .... \n\n- illumination transform for under/over exposure \n\n- blur/motion blur / small resolution\n\n- occlusion (part of fluke in water)\n\n- underwater! (especially for the white whale fluke)",
      "votes": null
    },
    {
      "id": "467727",
      "postDate": "02/07/2019 16:18:41",
      "content": "<p>a better transform augmentation</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/467727/11200/Presentation1-aligned.png\" alt=\"enter image description here\"></p>",
      "rawMarkdown": "a better transform augmentation\n\n\n  ![enter image description here][1]\n\n\n  [1]: https://storage.googleapis.com/kaggle-forum-message-attachments/467727/11200/Presentation1-aligned.png",
      "votes": null
    },
    {
      "id": "467731",
      "postDate": "02/07/2019 16:20:54",
      "content": "<p>Miguel, I have tried the same re-ranking approach when my model scored approx. 0.75 on public score, at that time I saw no effect. As re-ranking efficiency very much depends on the quality of initial ranking, I'd like to give the re-ranking a try later on again. I'll let you know if it improves public LB</p>",
      "rawMarkdown": "Miguel, I have tried the same re-ranking approach when my model scored approx. 0.75 on public score, at that time I saw no effect. As re-ranking efficiency very much depends on the quality of initial ranking, I'd like to give the re-ranking a try later on again. I'll let you know if it improves public LB",
      "votes": null
    },
    {
      "id": "468372",
      "postDate": "02/08/2019 19:21:10",
      "content": "<p>correct augmentation is important. you can see the improvement in your validation (and lb) results if you do it correctly. this is what you can do:</p>\n\n<ol>\n<li><p>select an id with several train images of different view point. select one/two view point for training and the rest of validation.</p></li>\n<li><p>you can simply train a one class classifier to quickly experiment with augmentation:</p></li>\n</ol>\n\n<p>train : pos = one or two image , neg = 70% of new whales\nvalidation : pos = remaining  different view point,  neg = remaining 30% of new whales</p>\n\n<p>you can do it several time for different id or/and same id  but of different viewpoint in train and validation</p>\n\n<p>adjust your augmentation until you can get good score!</p>",
      "rawMarkdown": "correct augmentation is important. you can see the improvement in your validation (and lb) results if you do it correctly. this is what you can do:\n\n1. select an id with several train images of different view point. select one/two view point for training and the rest of validation.\n\n2. you can simply train a one class classifier to quickly experiment with augmentation:\n\ntrain : pos = one or two image , neg = 70% of new whales\nvalidation : pos = remaining  different view point,  neg = remaining 30% of new whales\n\nyou can do it several time for different id or/and same id  but of different viewpoint in train and validation\n\nadjust your augmentation until you can get good score!",
      "votes": null
    },
    {
      "id": "468416",
      "postDate": "02/08/2019 20:51:52",
      "content": "<p>Has anyone been able to find a good implementation of WarpNet?</p>",
      "rawMarkdown": "Has anyone been able to find a good implementation of WarpNet?",
      "votes": null
    },
    {
      "id": "468725",
      "postDate": "02/09/2019 14:57:14",
      "content": "<p>same training id may have both front and back  of fluke.\nThis actually confuses some model during training?</p>\n\n<p>This explain why when i analyse the prediction results, there are some obvious error like predicting a a \"black id\" for a \"white fluke\"</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/468725/11226/fontal_back.png\" alt=\"enter image description here\"></p>",
      "rawMarkdown": "same training id may have both front and back  of fluke.\nThis actually confuses some model during training?\n\nThis explain why when i analyse the prediction results, there are some obvious error like predicting a a \"black id\" for a \"white fluke\"\n\n\n  ![enter image description here][1]\n\n\n  [1]: https://storage.googleapis.com/kaggle-forum-message-attachments/468725/11226/fontal_back.png",
      "votes": null
    },
    {
      "id": "468737",
      "postDate": "02/09/2019 15:14:46",
      "content": "<p>It seems that black flukes are back side, and white flukes are stomach side. I think number of training ids which include both side are not many, so I give up to handle this problem.</p>",
      "rawMarkdown": "It seems that black flukes are back side, and white flukes are stomach side. I think number of training ids which include both side are not many, so I give up to handle this problem.",
      "votes": null
    },
    {
      "id": "468836",
      "postDate": "02/09/2019 19:48:24",
      "content": "<p>I have tried to label such cases, but gave upas well</p>",
      "rawMarkdown": "I have tried to label such cases, but gave upas well",
      "votes": null
    },
    {
      "id": "470528",
      "postDate": "02/13/2019 05:50:44",
      "content": "<p>some important baseline (based on my experiments):</p>\n\n<ul>\n<li>shakeup limit : +/- 0.03. This is due to the proportion of new whales in private and public LB set. I estimate the ratio of new whales in private is going to be slightly less.</li>\n</ul>\n\n<p>try to get whale id in test correct (i.e. improve your detection rate, a little over false accept rate of new whale). If you can get more whale identified, you are more likely to win.</p>\n\n<p>how to estimate shakeup?</p>\n\n<ul>\n<li>from you detection score, you have definitely have a set of predicted labels that is 100% correct. visual inspection can further confirm it. with a set of \"known label\" for test  image, you can start probing the server. by flipping \"known label\" to \"new whale\", you have the theoretical decrease in LB verus the probed decrease in LB. And you can estimate the shakeup and ratio of new whale in private and public</li>\n</ul>",
      "rawMarkdown": "some important baseline (based on my experiments):\n\n- shakeup limit : +/- 0.03. This is due to the proportion of new whales in private and public LB set. I estimate the ratio of new whales in private is going to be slightly less.\n\ntry to get whale id in test correct (i.e. improve your detection rate, a little over false accept rate of new whale). If you can get more whale identified, you are more likely to win.\n\nhow to estimate shakeup?\n\n- from you detection score, you have definitely have a set of predicted labels that is 100% correct. visual inspection can further confirm it. with a set of \"known label\" for test  image, you can start probing the server. by flipping \"known label\" to \"new whale\", you have the theoretical decrease in LB verus the probed decrease in LB. And you can estimate the shakeup and ratio of new whale in private and public",
      "votes": null
    },
    {
      "id": "470571",
      "postDate": "02/13/2019 07:35:10",
      "content": "<p>flip new whale images to create more train images of new whale!</p>",
      "rawMarkdown": "flip new whale images to create more train images of new whale!",
      "votes": null
    },
    {
      "id": "471438",
      "postDate": "02/14/2019 13:13:08",
      "content": "<p>seem that someone forget to unscramble the data? </p>\n\n<p>or maybe just coincidence</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/471438/11304/same_pose.png\" alt=\"enter image description here\"></p>\n\n<p>(same id folder)</p>\n\n<p>more example of same id images sorted by filename\n  <img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/471438/11305/sorted2.png\" alt=\"enter image description here\"></p>",
      "rawMarkdown": "seem that someone forget to unscramble the data? \n\nor maybe just coincidence\n\n  ![enter image description here][1]\n\n (same id folder)\n\n\nmore example of same id images sorted by filename\n  ![enter image description here][2]\n\n\n  [1]: https://storage.googleapis.com/kaggle-forum-message-attachments/471438/11304/same_pose.png\n  [2]: https://storage.googleapis.com/kaggle-forum-message-attachments/471438/11305/sorted2.png",
      "votes": null
    },
    {
      "id": "471456",
      "postDate": "02/14/2019 13:47:41",
      "content": "<p>wow! leak?</p>",
      "rawMarkdown": "wow! leak?",
      "votes": null
    },
    {
      "id": "471464",
      "postDate": "02/14/2019 14:04:47",
      "content": "<p>it don't happens all the time. but sorted arrangement is clearly not random i think</p>",
      "rawMarkdown": "it don't happens all the time. but sorted arrangement is clearly not random i think",
      "votes": null
    },
    {
      "id": "471471",
      "postDate": "02/14/2019 14:09:51",
      "content": "<p>Have you tried to make a submission?</p>",
      "rawMarkdown": "Have you tried to make a submission?",
      "votes": null
    },
    {
      "id": "471491",
      "postDate": "02/14/2019 14:34:26",
      "content": "<p>Heng, I can't reproduce your order of ImageId. How do you sort the picture exactly ?</p>",
      "rawMarkdown": "Heng, I can't reproduce your order of ImageId. How do you sort the picture exactly ?",
      "votes": null
    },
    {
      "id": "471499",
      "postDate": "02/14/2019 14:48:45",
      "content": "<p>i use image viewer \"xnview\". It seems that it sort by 0,1,2,3,4 ...a,b,c ...z</p>",
      "rawMarkdown": "i use image viewer \"xnview\". It seems that it sort by 0,1,2,3,4 ...a,b,c ...z",
      "votes": null
    },
    {
      "id": "471502",
      "postDate": "02/14/2019 14:53:42",
      "content": "<p>this gives me a new idea of metric learning, maybe it can be a new paper:</p>\n\n<p>1) learn embedded for the pose too (e.g. using triple loss)</p>\n\n<p>2) in test inference phase, try to match the pose first to retrieve top e.g. 100 neighbors. Then match appearances for the these retrieved similarly pose neighbors. </p>",
      "rawMarkdown": "this gives me a new idea of metric learning, maybe it can be a new paper:\n\n1) learn embedded for the pose too (e.g. using triple loss)\n\n2) in test inference phase, try to match the pose first to retrieve top e.g. 100 neighbors. Then match appearances for the these retrieved similarly pose neighbors.",
      "votes": null
    },
    {
      "id": "471630",
      "postDate": "02/14/2019 17:28:02",
      "content": "<p>But what is desired is pose-invariance which is opposite to what you are proposing.</p>",
      "rawMarkdown": "But what is desired is pose-invariance which is opposite to what you are proposing.",
      "votes": null
    },
    {
      "id": "471937",
      "postDate": "02/15/2019 05:43:26",
      "content": "<p>image size ... go to large image size, see also</p>\n\n<p><a href=\"https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/78109\">https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/78109</a></p>\n\n<p><a href=\"https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/77320\">https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/77320</a></p>",
      "rawMarkdown": "image size ... go to large image size, see also\n\nhttps://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/78109\n\nhttps://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/77320",
      "votes": null
    },
    {
      "id": "472070",
      "postDate": "02/15/2019 09:38:14",
      "content": "<p>We are already not invaraint - that is why we are using bounding boxes. Pose detector might be trained same way</p>",
      "rawMarkdown": "We are already not invaraint - that is why we are using bounding boxes. Pose detector might be trained same way",
      "votes": null
    },
    {
      "id": "472791",
      "postDate": "02/16/2019 17:13:02",
      "content": "<p><a href=\"https://www.scu.edu.au/marine-ecology-research-centre/document-downloads/\">https://www.scu.edu.au/marine-ecology-research-centre/document-downloads/</a></p>\n\n<p>Fluke Matcher</p>\n\n<p><img src=\"https://www.scu.edu.au/media/scueduau/research-centres/marine-ecology-research-centre/viewec8f.jpg\" alt=\"enter image description here\"></p>\n\n<p><a href=\"https://www.scu.edu.au/marine-ecology-research-centre/whales-and-dolphins/whale-and-dolphin-research/fluke-matcher/\">https://www.scu.edu.au/marine-ecology-research-centre/whales-and-dolphins/whale-and-dolphin-research/fluke-matcher/</a></p>",
      "rawMarkdown": "https://www.scu.edu.au/marine-ecology-research-centre/document-downloads/\n\nFluke Matcher\n\n  ![enter image description here][1]\n\nhttps://www.scu.edu.au/marine-ecology-research-centre/whales-and-dolphins/whale-and-dolphin-research/fluke-matcher/\n\n\n  [1]: https://www.scu.edu.au/media/scueduau/research-centres/marine-ecology-research-centre/viewec8f.jpg",
      "votes": null
    },
    {
      "id": "473263",
      "postDate": "02/17/2019 17:20:00",
      "content": "<p><a href=\"/hengck23\">@hengck23</a> I got your idea, indeed, you are proposing something for pose invariance.\nMaybe proper feature extractor + unsupervised clustering can play some role here. </p>",
      "rawMarkdown": "hengck23 I got your idea, indeed, you are proposing something for pose invariance.\nMaybe proper feature extractor + unsupervised clustering can play some role here.",
      "votes": null
    },
    {
      "id": "474598",
      "postDate": "02/19/2019 15:53:32",
      "content": "<p>here is  the probing test:</p>\n\n<p>1) submit top-1 (e.g each submitted id is same for 5 times). Get LB score = score1</p>\n\n<p>2)submit top-1 to top 5. Get LB score = score2.</p>\n\n<p>3) optional: submit top6 to top10.. Get LB score = score3</p>\n\n<p>subtraction \"score1-score2\" gives you the estimate how much your score can improve if you re-rank correctly, It also tell you how many of your predictions is within top-5 prediction.</p>\n\n<p>similarly, comparing score1 and score3 can tell you what is within top-10.</p>",
      "rawMarkdown": "here is  the probing test:\n\n1) submit top-1 (e.g each submitted id is same for 5 times). Get LB score = score1\n\n2)submit top-1 to top 5. Get LB score = score2.\n\n3) optional: submit top6 to top10.. Get LB score = score3\n\nsubtraction \"score1-score2\" gives you the estimate how much your score can improve if you re-rank correctly, It also tell you how many of your predictions is within top-5 prediction.\n\nsimilarly, comparing score1 and score3 can tell you what is within top-10.",
      "votes": null
    },
    {
      "id": "475252",
      "postDate": "02/20/2019 14:02:17",
      "content": "<p>how to create more distractor (new whale)  train samples</p>\n\n<ul>\n<li><p>flip the new-whale</p></li>\n<li><p>flip the id-whale (assume the pattern are not symmetrical. one once flip, it becomes a new identity) </p></li>\n<li><p>even flip test images can be considered as new-whale!</p></li>\n</ul>",
      "rawMarkdown": "how to create more distractor (new whale)  train samples\n\n-  flip the new-whale\n\n- flip the id-whale (assume the pattern are not symmetrical. one once flip, it becomes a new identity) \n\n- even flip test images can be considered as new-whale!",
      "votes": null
    },
    {
      "id": "475686",
      "postDate": "02/21/2019 04:18:17",
      "content": "<p>i note that:</p>\n\n<ol>\n<li><p>as my public LB score increase, the no. of train whale id without test image top-1 identified decreases.</p></li>\n<li><p>you should have note that a typical validation results for classification model is like e.g.: top1=80%, top5=95%, top10=99% ... Hence the true solution is actually within your top-k classification solution.  Classification results is a good way to create difficult triplets too.  In fact a cascade solution is possible:</p></li>\n</ol>\n\n<p>input --&gt;  [ prediction with top30 accuracy =100%] --&gt;  [ prediction with top10 accuracy =100%] --&gt;  [ prediction with top5 accuracy =100%] --&gt; ...</p>",
      "rawMarkdown": "i note that:\n\n1. as my public LB score increase, the no. of train whale id without test image top-1 identified decreases.\n\n2. you should have note that a typical validation results for classification model is like e.g.: top1=80%, top5=95%, top10=99% ... Hence the true solution is actually within your top-k classification solution.  Classification results is a good way to create difficult triplets too.  In fact a cascade solution is possible:\n\ninput --&gt;  [ prediction with top30 accuracy =100%] --&gt;  [ prediction with top10 accuracy =100%] --&gt;  [ prediction with top5 accuracy =100%] --&gt; ...",
      "votes": null
    },
    {
      "id": "475869",
      "postDate": "02/21/2019 10:08:40",
      "content": "<p>for me, i already \"probe my results\".\nI can estimate how many top-1 results are correct,  how many test whales are within top-5, etc</p>\n\n<p>My current LB score is 0.928, with the following:</p>\n\n<ul>\n<li><p>id_whale top-1 occurrence       = 5564  (70% of 7960 test samples)</p></li>\n<li><p>new_whale top-1 occurrence   = 2396  (30% of 7960 test samples)</p></li>\n<li><p>zero test occurrence id   = 1145  (14% of 5004 ids)</p></li>\n</ul>\n\n<p>my strategy is to assign about 300 new whales  to the zero occurrence id.</p>\n\n<p>\"A script for balancing predictions which helps in achieving high results on Kaggle\"\n - <a href=\"https://github.com/ruslangrimov/predictions_balancing\">https://github.com/ruslangrimov/predictions_balancing</a></p>\n\n<p>The graph below estimate how many new whales it should be and how many of train whale id do not have test images.</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/475869/11367/plot.png\" alt=\"enter image description here\"></p>",
      "rawMarkdown": "for me, i already \"probe my results\".\nI can estimate how many top-1 results are correct,  how many test whales are within top-5, etc\n\n\nMy current LB score is 0.928, with the following:\n\n  - id_whale top-1 occurrence       = 5564  (70% of 7960 test samples)\n\n  - new_whale top-1 occurrence   = 2396  (30% of 7960 test samples)\n\n  - zero test occurrence id   = 1145  (14% of 5004 ids)\n \n\nmy strategy is to assign about 300 new whales  to the zero occurrence id.\n\n\"A script for balancing predictions which helps in achieving high results on Kaggle\"\n - https://github.com/ruslangrimov/predictions_balancing\n\n\n\n\nThe graph below estimate how many new whales it should be and how many of train whale id do not have test images.\n\n  ![enter image description here][1]\n\n\n  [1]: https://storage.googleapis.com/kaggle-forum-message-attachments/475869/11367/plot.png",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 465559,
      "author_name": "lamhoangtung",
      "author_url": "",
      "post_date": "02/03/2019 13:31:05",
      "content": "<p>Thanks for the great tip &lt;3</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 465577,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "02/03/2019 14:17:11",
      "content": "<p>i am surprised that the network can get this difficult image correct. Then i realize that there are actually train images of similar pose. Hence if you have the same pose train images, identification results won't be too bad.</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/465577/11161/Slide5.png\" alt=\"enter image description here\"></p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/465577/11159/Slide6.png\" alt=\"enter image description here\"></p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/465577/11160/Slide7.png\" alt=\"enter image description here\"></p>\n\n<p>other works:</p>\n\n<p>Deep Deformation Network for Object Landmark Localization - NEC paper\n<a href=\"https://arxiv.org/pdf/1605.01014\">https://arxiv.org/pdf/1605.01014</a></p>\n\n<p><img src=\"https://www.groundai.com/media/arxiv_projects/81824/sbn_ptn.png.344x181_q75_crop.jpg\" alt=\"enter image description here\">\n  <img src=\"http://www.nec-labs.com/uploads/images/Department-Images/MediaAnalytics/warpnet_1.jpg\" alt=\"enter image description here\"></p>",
      "votes": null,
      "replies": [
        {
          "id": 465659,
          "author_name": "oewyn000",
          "author_url": "",
          "post_date": "02/03/2019 17:58:37",
          "content": "<p>Great ideas heng!!</p>\n\n<p>Pose normalization/Face Frontalisation was exactly what I had in mind when I created my keypoint dataset. Hope you or others can use it!</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 468416,
          "author_name": "interneuron",
          "author_url": "",
          "post_date": "02/08/2019 20:51:52",
          "content": "<p>Has anyone been able to find a good implementation of WarpNet?</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 465700,
      "author_name": "interneuron",
      "author_url": "",
      "post_date": "02/03/2019 20:01:52",
      "content": "<p>Thanks Heng!!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 465708,
      "author_name": "hwasiti",
      "author_url": "",
      "post_date": "02/03/2019 20:35:21",
      "content": "<p>We missed you Heng! Glad that you've joined the comp. </p>\n\n<p>I remember you very well from the self driving car course days in 2017. I remember when you've modified the simulator and put checkerboard on the road to check the image distortion of the camera... It was amazing!!!  </p>\n\n<p>Unfortunately, after few weeks we've missed you from the course. It seems that you was hooked with kaggling instead!!! You have even dropped your job I think, to self-study DL. Big respect to you Heng! Especially for the scientific tips and for the altruistic spirit of sharing knowledge and for your enthusiasm in Deep Learning and Science.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 465819,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "02/04/2019 04:40:09",
      "content": "<p>contrast trick\n  <img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/465819/11166/contrast_trick.png\" alt=\"enter image description here\"></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 465898,
      "author_name": "oldufo",
      "author_url": "",
      "post_date": "02/04/2019 09:41:55",
      "content": "<p>So, basically trick is to use default fast.ai augmentation, because it already does all of these)))</p>",
      "votes": null,
      "replies": [
        {
          "id": 465918,
          "author_name": "jeandebleau",
          "author_url": "",
          "post_date": "02/04/2019 10:25:04",
          "content": "<p>I think the idea of Heng is not especially to augment image with contrast changes but maybe directly give a contrast enhanced image as input.</p>\n\n<p>By default, fast.ai is also flipping images ; which I do not think is a desirable augmentation in this case.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 465951,
          "author_name": "oldufo",
          "author_url": "",
          "post_date": "02/04/2019 11:38:11",
          "content": "<p>Okay, get_transforms(do_flip=False) fast.ai augmentation :)</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 466453,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "02/05/2019 12:06:16",
          "content": "<p>some augmentation:</p>\n\n<ul>\n<li><p>add noise : water splash</p></li>\n<li><p>erosion/dilation : wear and tear of  barnacles</p></li>\n<li><p>rotation, scale, shear, perspective warp .... </p></li>\n<li><p>illumination transform for under/over exposure </p></li>\n<li><p>blur/motion blur / small resolution</p></li>\n<li><p>occlusion (part of fluke in water)</p></li>\n<li><p>underwater! (especially for the white whale fluke)</p></li>\n</ul>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 465916,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "02/04/2019 10:22:21",
      "content": "<p>new whale or not? My observation:</p>\n\n<hr>\n\n<p><strong>* updated *</strong></p>\n\n<p>the below is not true, please ignore!!!! </p>\n\n<p>id with one train image can have multiple test image. </p>\n\n<hr>\n\n<ul>\n<li><p>most new-whale images are frontal, i.e. if the test image is non-frontal, it is less likely to be new-whale</p></li>\n<li><p>there are some id with single train image (i.e. single sample class). it is likely that there should be at least one test image with the same id, else the single train image should be labelled as new_whale (because it only appears once and only one in both train+test images)? i.e. num of unique ids in test should be also 5005</p></li>\n<li><p>say i have a id-A with 10 train images, and id-B with only 1 train images. It is more likely that number of id-A test image &gt;  number of id-B test image. Hence if there is only one train image, it is very likely that there is only one test image.</p></li>\n</ul>\n\n<p>This means that you roughly know \"how many ids are present in the test\". This is become an assignment problem.\n(you can see the kaggle google doodle challenge)</p>\n\n<p>This mean that, say if an id-X has only highest rank=5 in all test images. You can reassign and promote it to rank-1 in some images. Hence some kind of assignment algorithm helps.</p>",
      "votes": null,
      "replies": [
        {
          "id": 465948,
          "author_name": "mnpinto",
          "author_url": "",
          "post_date": "02/04/2019 11:23:13",
          "content": "<p>Very interesting observation, thanks Heng! </p>\n\n<p>I have tried to do re-ranking following this paper <a href=\"https://arxiv.org/pdf/1701.08398.pdf\">https://arxiv.org/pdf/1701.08398.pdf</a> but without success, maybe I'm not applying it correctly. Has anyone tried that approach or similar?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 466449,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "02/05/2019 12:02:26",
          "content": "<p>after reading this :<a href=\"https://www.kaggle.com/c/humpback-whale-identification/discussion/75352\">https://www.kaggle.com/c/humpback-whale-identification/discussion/75352</a></p>\n\n<p>so some id may not have test  image after all. The only way that it will  not affect private score results is that there are no such problem in the private test set ... ?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 467731,
          "author_name": "samusram",
          "author_url": "",
          "post_date": "02/07/2019 16:20:54",
          "content": "<p>Miguel, I have tried the same re-ranking approach when my model scored approx. 0.75 on public score, at that time I saw no effect. As re-ranking efficiency very much depends on the quality of initial ranking, I'd like to give the re-ranking a try later on again. I'll let you know if it improves public LB</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 474598,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "02/19/2019 15:53:32",
          "content": "<p>here is  the probing test:</p>\n\n<p>1) submit top-1 (e.g each submitted id is same for 5 times). Get LB score = score1</p>\n\n<p>2)submit top-1 to top 5. Get LB score = score2.</p>\n\n<p>3) optional: submit top6 to top10.. Get LB score = score3</p>\n\n<p>subtraction \"score1-score2\" gives you the estimate how much your score can improve if you re-rank correctly, It also tell you how many of your predictions is within top-5 prediction.</p>\n\n<p>similarly, comparing score1 and score3 can tell you what is within top-10.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 465972,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "02/04/2019 12:52:12",
      "content": "<p>large image or high resolution information matters. Sometimes, the only confirmatory evidence is only visible at high resolution. try to use full resolution information (e.g. patches, etc)</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/465972/11168/large_image.png\" alt=\"enter image description here\"></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 465991,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "02/04/2019 13:36:51",
      "content": "<p>some isolated cases: how the text can helps:</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/465991/11169/text.png\" alt=\"enter image description here\"></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 466046,
      "author_name": "shunichiuehara",
      "author_url": "",
      "post_date": "02/04/2019 15:26:58",
      "content": "<p>Thanks for the great idea. Text help is interesting! \nAnd I agree your observation that single train class image may be exist at least one.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 467727,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "02/07/2019 16:18:41",
      "content": "<p>a better transform augmentation</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/467727/11200/Presentation1-aligned.png\" alt=\"enter image description here\"></p>",
      "votes": null,
      "replies": [
        {
          "id": 468372,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "02/08/2019 19:21:10",
          "content": "<p>correct augmentation is important. you can see the improvement in your validation (and lb) results if you do it correctly. this is what you can do:</p>\n\n<ol>\n<li><p>select an id with several train images of different view point. select one/two view point for training and the rest of validation.</p></li>\n<li><p>you can simply train a one class classifier to quickly experiment with augmentation:</p></li>\n</ol>\n\n<p>train : pos = one or two image , neg = 70% of new whales\nvalidation : pos = remaining  different view point,  neg = remaining 30% of new whales</p>\n\n<p>you can do it several time for different id or/and same id  but of different viewpoint in train and validation</p>\n\n<p>adjust your augmentation until you can get good score!</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 468725,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "02/09/2019 14:57:14",
      "content": "<p>same training id may have both front and back  of fluke.\nThis actually confuses some model during training?</p>\n\n<p>This explain why when i analyse the prediction results, there are some obvious error like predicting a a \"black id\" for a \"white fluke\"</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/468725/11226/fontal_back.png\" alt=\"enter image description here\"></p>",
      "votes": null,
      "replies": [
        {
          "id": 468737,
          "author_name": "toshik",
          "author_url": "",
          "post_date": "02/09/2019 15:14:46",
          "content": "<p>It seems that black flukes are back side, and white flukes are stomach side. I think number of training ids which include both side are not many, so I give up to handle this problem.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 468836,
          "author_name": "oldufo",
          "author_url": "",
          "post_date": "02/09/2019 19:48:24",
          "content": "<p>I have tried to label such cases, but gave upas well</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 470528,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "02/13/2019 05:50:44",
      "content": "<p>some important baseline (based on my experiments):</p>\n\n<ul>\n<li>shakeup limit : +/- 0.03. This is due to the proportion of new whales in private and public LB set. I estimate the ratio of new whales in private is going to be slightly less.</li>\n</ul>\n\n<p>try to get whale id in test correct (i.e. improve your detection rate, a little over false accept rate of new whale). If you can get more whale identified, you are more likely to win.</p>\n\n<p>how to estimate shakeup?</p>\n\n<ul>\n<li>from you detection score, you have definitely have a set of predicted labels that is 100% correct. visual inspection can further confirm it. with a set of \"known label\" for test  image, you can start probing the server. by flipping \"known label\" to \"new whale\", you have the theoretical decrease in LB verus the probed decrease in LB. And you can estimate the shakeup and ratio of new whale in private and public</li>\n</ul>",
      "votes": null,
      "replies": []
    },
    {
      "id": 470571,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "02/13/2019 07:35:10",
      "content": "<p>flip new whale images to create more train images of new whale!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 471438,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "02/14/2019 13:13:08",
      "content": "<p>seem that someone forget to unscramble the data? </p>\n\n<p>or maybe just coincidence</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/471438/11304/same_pose.png\" alt=\"enter image description here\"></p>\n\n<p>(same id folder)</p>\n\n<p>more example of same id images sorted by filename\n  <img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/471438/11305/sorted2.png\" alt=\"enter image description here\"></p>",
      "votes": null,
      "replies": [
        {
          "id": 471456,
          "author_name": "wowfattie",
          "author_url": "",
          "post_date": "02/14/2019 13:47:41",
          "content": "<p>wow! leak?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 471464,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "02/14/2019 14:04:47",
          "content": "<p>it don't happens all the time. but sorted arrangement is clearly not random i think</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 471471,
          "author_name": "alexanderliao",
          "author_url": "",
          "post_date": "02/14/2019 14:09:51",
          "content": "<p>Have you tried to make a submission?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 471502,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "02/14/2019 14:53:42",
          "content": "<p>this gives me a new idea of metric learning, maybe it can be a new paper:</p>\n\n<p>1) learn embedded for the pose too (e.g. using triple loss)</p>\n\n<p>2) in test inference phase, try to match the pose first to retrieve top e.g. 100 neighbors. Then match appearances for the these retrieved similarly pose neighbors. </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 471630,
          "author_name": "wowfattie",
          "author_url": "",
          "post_date": "02/14/2019 17:28:02",
          "content": "<p>But what is desired is pose-invariance which is opposite to what you are proposing.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 472070,
          "author_name": "oldufo",
          "author_url": "",
          "post_date": "02/15/2019 09:38:14",
          "content": "<p>We are already not invaraint - that is why we are using bounding boxes. Pose detector might be trained same way</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 473263,
          "author_name": "wowfattie",
          "author_url": "",
          "post_date": "02/17/2019 17:20:00",
          "content": "<p><a href=\"/hengck23\">@hengck23</a> I got your idea, indeed, you are proposing something for pose invariance.\nMaybe proper feature extractor + unsupervised clustering can play some role here. </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 471491,
      "author_name": "chabir",
      "author_url": "",
      "post_date": "02/14/2019 14:34:26",
      "content": "<p>Heng, I can't reproduce your order of ImageId. How do you sort the picture exactly ?</p>",
      "votes": null,
      "replies": [
        {
          "id": 471499,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "02/14/2019 14:48:45",
          "content": "<p>i use image viewer \"xnview\". It seems that it sort by 0,1,2,3,4 ...a,b,c ...z</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 471937,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "02/15/2019 05:43:26",
      "content": "<p>image size ... go to large image size, see also</p>\n\n<p><a href=\"https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/78109\">https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/78109</a></p>\n\n<p><a href=\"https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/77320\">https://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/77320</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 472791,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "02/16/2019 17:13:02",
      "content": "<p><a href=\"https://www.scu.edu.au/marine-ecology-research-centre/document-downloads/\">https://www.scu.edu.au/marine-ecology-research-centre/document-downloads/</a></p>\n\n<p>Fluke Matcher</p>\n\n<p><img src=\"https://www.scu.edu.au/media/scueduau/research-centres/marine-ecology-research-centre/viewec8f.jpg\" alt=\"enter image description here\"></p>\n\n<p><a href=\"https://www.scu.edu.au/marine-ecology-research-centre/whales-and-dolphins/whale-and-dolphin-research/fluke-matcher/\">https://www.scu.edu.au/marine-ecology-research-centre/whales-and-dolphins/whale-and-dolphin-research/fluke-matcher/</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 475252,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "02/20/2019 14:02:17",
      "content": "<p>how to create more distractor (new whale)  train samples</p>\n\n<ul>\n<li><p>flip the new-whale</p></li>\n<li><p>flip the id-whale (assume the pattern are not symmetrical. one once flip, it becomes a new identity) </p></li>\n<li><p>even flip test images can be considered as new-whale!</p></li>\n</ul>",
      "votes": null,
      "replies": []
    },
    {
      "id": 475686,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "02/21/2019 04:18:17",
      "content": "<p>i note that:</p>\n\n<ol>\n<li><p>as my public LB score increase, the no. of train whale id without test image top-1 identified decreases.</p></li>\n<li><p>you should have note that a typical validation results for classification model is like e.g.: top1=80%, top5=95%, top10=99% ... Hence the true solution is actually within your top-k classification solution.  Classification results is a good way to create difficult triplets too.  In fact a cascade solution is possible:</p></li>\n</ol>\n\n<p>input --&gt;  [ prediction with top30 accuracy =100%] --&gt;  [ prediction with top10 accuracy =100%] --&gt;  [ prediction with top5 accuracy =100%] --&gt; ...</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 475869,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "02/21/2019 10:08:40",
      "content": "<p>for me, i already \"probe my results\".\nI can estimate how many top-1 results are correct,  how many test whales are within top-5, etc</p>\n\n<p>My current LB score is 0.928, with the following:</p>\n\n<ul>\n<li><p>id_whale top-1 occurrence       = 5564  (70% of 7960 test samples)</p></li>\n<li><p>new_whale top-1 occurrence   = 2396  (30% of 7960 test samples)</p></li>\n<li><p>zero test occurrence id   = 1145  (14% of 5004 ids)</p></li>\n</ul>\n\n<p>my strategy is to assign about 300 new whales  to the zero occurrence id.</p>\n\n<p>\"A script for balancing predictions which helps in achieving high results on Kaggle\"\n - <a href=\"https://github.com/ruslangrimov/predictions_balancing\">https://github.com/ruslangrimov/predictions_balancing</a></p>\n\n<p>The graph below estimate how many new whales it should be and how many of train whale id do not have test images.</p>\n\n<p><img src=\"https://storage.googleapis.com/kaggle-forum-message-attachments/475869/11367/plot.png\" alt=\"enter image description here\"></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "465542": "here is the first one ...\n bookmark this thread ... more tricks to come!\n\n  ![enter image description here][1]\n\n\nthe tail is more or less planar. Either do shear augmentation, etc ... or use deep keypoint matching or deep unwarping/grid/flow (advance spatial transformer net) to transform to normalized frontal view\n\n\n  [1]: https://storage.googleapis.com/kaggle-forum-message-attachments/465542/11158/shear_trick.png",
    "465559": "Thanks for the great tip &lt;3",
    "465577": "i am surprised that the network can get this difficult image correct. Then i realize that there are actually train images of similar pose. Hence if you have the same pose train images, identification results won't be too bad.\n\n\n  ![enter image description here][1]\n\n  ![enter image description here][2]\n\n  ![enter image description here][3]\n\n\nother works:\n\n\nDeep Deformation Network for Object Landmark Localization - NEC paper\nhttps://arxiv.org/pdf/1605.01014\n\n\n  ![enter image description here][4]\n  ![enter image description here][5]\n\n\n  [1]: https://storage.googleapis.com/kaggle-forum-message-attachments/465577/11161/Slide5.png\n  [2]: https://storage.googleapis.com/kaggle-forum-message-attachments/465577/11159/Slide6.png\n  [3]: https://storage.googleapis.com/kaggle-forum-message-attachments/465577/11160/Slide7.png\n  [4]: https://www.groundai.com/media/arxiv_projects/81824/sbn_ptn.png.344x181_q75_crop.jpg\n  [5]: http://www.nec-labs.com/uploads/images/Department-Images/MediaAnalytics/warpnet_1.jpg",
    "465659": "Great ideas heng!!\n\nPose normalization/Face Frontalisation was exactly what I had in mind when I created my keypoint dataset. Hope you or others can use it!",
    "465700": "Thanks Heng!!",
    "465708": "We missed you Heng! Glad that you've joined the comp. \n\nI remember you very well from the self driving car course days in 2017. I remember when you've modified the simulator and put checkerboard on the road to check the image distortion of the camera... It was amazing!!!  \n\nUnfortunately, after few weeks we've missed you from the course. It seems that you was hooked with kaggling instead!!! You have even dropped your job I think, to self-study DL. Big respect to you Heng! Especially for the scientific tips and for the altruistic spirit of sharing knowledge and for your enthusiasm in Deep Learning and Science.",
    "465819": "contrast trick\n  ![enter image description here][1]\n\n\n  [1]: https://storage.googleapis.com/kaggle-forum-message-attachments/465819/11166/contrast_trick.png",
    "465898": "So, basically trick is to use default fast.ai augmentation, because it already does all of these)))",
    "465916": "new whale or not? My observation:\n\n---\n*** updated ***\n\nthe below is not true, please ignore!!!! \n\nid with one train image can have multiple test image. \n\n----\n- most new-whale images are frontal, i.e. if the test image is non-frontal, it is less likely to be new-whale\n\n- there are some id with single train image (i.e. single sample class). it is likely that there should be at least one test image with the same id, else the single train image should be labelled as new_whale (because it only appears once and only one in both train+test images)? i.e. num of unique ids in test should be also 5005\n\n- say i have a id-A with 10 train images, and id-B with only 1 train images. It is more likely that number of id-A test image &gt;  number of id-B test image. Hence if there is only one train image, it is very likely that there is only one test image.\n\nThis means that you roughly know \"how many ids are present in the test\". This is become an assignment problem.\n(you can see the kaggle google doodle challenge)\n\nThis mean that, say if an id-X has only highest rank=5 in all test images. You can reassign and promote it to rank-1 in some images. Hence some kind of assignment algorithm helps.",
    "465918": "I think the idea of Heng is not especially to augment image with contrast changes but maybe directly give a contrast enhanced image as input.\n\nBy default, fast.ai is also flipping images ; which I do not think is a desirable augmentation in this case.",
    "465948": "Very interesting observation, thanks Heng! \n\nI have tried to do re-ranking following this paper https://arxiv.org/pdf/1701.08398.pdf but without success, maybe I'm not applying it correctly. Has anyone tried that approach or similar?",
    "465951": "Okay, get_transforms(do_flip=False) fast.ai augmentation :)",
    "465972": "large image or high resolution information matters. Sometimes, the only confirmatory evidence is only visible at high resolution. try to use full resolution information (e.g. patches, etc)\n\n  ![enter image description here][1]\n\n\n  [1]: https://storage.googleapis.com/kaggle-forum-message-attachments/465972/11168/large_image.png",
    "465991": "some isolated cases: how the text can helps:\n\n  ![enter image description here][1]\n\n\n  [1]: https://storage.googleapis.com/kaggle-forum-message-attachments/465991/11169/text.png",
    "466046": "Thanks for the great idea. Text help is interesting! \nAnd I agree your observation that single train class image may be exist at least one.",
    "466449": "after reading this :https://www.kaggle.com/c/humpback-whale-identification/discussion/75352\n\nso some id may not have test  image after all. The only way that it will  not affect private score results is that there are no such problem in the private test set ... ?",
    "466453": "some augmentation:\n\n- add noise : water splash\n\n- erosion/dilation : wear and tear of  barnacles\n\n- rotation, scale, shear, perspective warp .... \n\n- illumination transform for under/over exposure \n\n- blur/motion blur / small resolution\n\n- occlusion (part of fluke in water)\n\n- underwater! (especially for the white whale fluke)",
    "467727": "a better transform augmentation\n\n\n  ![enter image description here][1]\n\n\n  [1]: https://storage.googleapis.com/kaggle-forum-message-attachments/467727/11200/Presentation1-aligned.png",
    "467731": "Miguel, I have tried the same re-ranking approach when my model scored approx. 0.75 on public score, at that time I saw no effect. As re-ranking efficiency very much depends on the quality of initial ranking, I'd like to give the re-ranking a try later on again. I'll let you know if it improves public LB",
    "468372": "correct augmentation is important. you can see the improvement in your validation (and lb) results if you do it correctly. this is what you can do:\n\n1. select an id with several train images of different view point. select one/two view point for training and the rest of validation.\n\n2. you can simply train a one class classifier to quickly experiment with augmentation:\n\ntrain : pos = one or two image , neg = 70% of new whales\nvalidation : pos = remaining  different view point,  neg = remaining 30% of new whales\n\nyou can do it several time for different id or/and same id  but of different viewpoint in train and validation\n\nadjust your augmentation until you can get good score!",
    "468416": "Has anyone been able to find a good implementation of WarpNet?",
    "468725": "same training id may have both front and back  of fluke.\nThis actually confuses some model during training?\n\nThis explain why when i analyse the prediction results, there are some obvious error like predicting a a \"black id\" for a \"white fluke\"\n\n\n  ![enter image description here][1]\n\n\n  [1]: https://storage.googleapis.com/kaggle-forum-message-attachments/468725/11226/fontal_back.png",
    "468737": "It seems that black flukes are back side, and white flukes are stomach side. I think number of training ids which include both side are not many, so I give up to handle this problem.",
    "468836": "I have tried to label such cases, but gave upas well",
    "470528": "some important baseline (based on my experiments):\n\n- shakeup limit : +/- 0.03. This is due to the proportion of new whales in private and public LB set. I estimate the ratio of new whales in private is going to be slightly less.\n\ntry to get whale id in test correct (i.e. improve your detection rate, a little over false accept rate of new whale). If you can get more whale identified, you are more likely to win.\n\nhow to estimate shakeup?\n\n- from you detection score, you have definitely have a set of predicted labels that is 100% correct. visual inspection can further confirm it. with a set of \"known label\" for test  image, you can start probing the server. by flipping \"known label\" to \"new whale\", you have the theoretical decrease in LB verus the probed decrease in LB. And you can estimate the shakeup and ratio of new whale in private and public",
    "470571": "flip new whale images to create more train images of new whale!",
    "471438": "seem that someone forget to unscramble the data? \n\nor maybe just coincidence\n\n  ![enter image description here][1]\n\n (same id folder)\n\n\nmore example of same id images sorted by filename\n  ![enter image description here][2]\n\n\n  [1]: https://storage.googleapis.com/kaggle-forum-message-attachments/471438/11304/same_pose.png\n  [2]: https://storage.googleapis.com/kaggle-forum-message-attachments/471438/11305/sorted2.png",
    "471456": "wow! leak?",
    "471464": "it don't happens all the time. but sorted arrangement is clearly not random i think",
    "471471": "Have you tried to make a submission?",
    "471491": "Heng, I can't reproduce your order of ImageId. How do you sort the picture exactly ?",
    "471499": "i use image viewer \"xnview\". It seems that it sort by 0,1,2,3,4 ...a,b,c ...z",
    "471502": "this gives me a new idea of metric learning, maybe it can be a new paper:\n\n1) learn embedded for the pose too (e.g. using triple loss)\n\n2) in test inference phase, try to match the pose first to retrieve top e.g. 100 neighbors. Then match appearances for the these retrieved similarly pose neighbors.",
    "471630": "But what is desired is pose-invariance which is opposite to what you are proposing.",
    "471937": "image size ... go to large image size, see also\n\nhttps://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/78109\n\nhttps://www.kaggle.com/c/human-protein-atlas-image-classification/discussion/77320",
    "472070": "We are already not invaraint - that is why we are using bounding boxes. Pose detector might be trained same way",
    "472791": "https://www.scu.edu.au/marine-ecology-research-centre/document-downloads/\n\nFluke Matcher\n\n  ![enter image description here][1]\n\nhttps://www.scu.edu.au/marine-ecology-research-centre/whales-and-dolphins/whale-and-dolphin-research/fluke-matcher/\n\n\n  [1]: https://www.scu.edu.au/media/scueduau/research-centres/marine-ecology-research-centre/viewec8f.jpg",
    "473263": "hengck23 I got your idea, indeed, you are proposing something for pose invariance.\nMaybe proper feature extractor + unsupervised clustering can play some role here.",
    "474598": "here is  the probing test:\n\n1) submit top-1 (e.g each submitted id is same for 5 times). Get LB score = score1\n\n2)submit top-1 to top 5. Get LB score = score2.\n\n3) optional: submit top6 to top10.. Get LB score = score3\n\nsubtraction \"score1-score2\" gives you the estimate how much your score can improve if you re-rank correctly, It also tell you how many of your predictions is within top-5 prediction.\n\nsimilarly, comparing score1 and score3 can tell you what is within top-10.",
    "475252": "how to create more distractor (new whale)  train samples\n\n-  flip the new-whale\n\n- flip the id-whale (assume the pattern are not symmetrical. one once flip, it becomes a new identity) \n\n- even flip test images can be considered as new-whale!",
    "475686": "i note that:\n\n1. as my public LB score increase, the no. of train whale id without test image top-1 identified decreases.\n\n2. you should have note that a typical validation results for classification model is like e.g.: top1=80%, top5=95%, top10=99% ... Hence the true solution is actually within your top-k classification solution.  Classification results is a good way to create difficult triplets too.  In fact a cascade solution is possible:\n\ninput --&gt;  [ prediction with top30 accuracy =100%] --&gt;  [ prediction with top10 accuracy =100%] --&gt;  [ prediction with top5 accuracy =100%] --&gt; ...",
    "475869": "for me, i already \"probe my results\".\nI can estimate how many top-1 results are correct,  how many test whales are within top-5, etc\n\n\nMy current LB score is 0.928, with the following:\n\n  - id_whale top-1 occurrence       = 5564  (70% of 7960 test samples)\n\n  - new_whale top-1 occurrence   = 2396  (30% of 7960 test samples)\n\n  - zero test occurrence id   = 1145  (14% of 5004 ids)\n \n\nmy strategy is to assign about 300 new whales  to the zero occurrence id.\n\n\"A script for balancing predictions which helps in achieving high results on Kaggle\"\n - https://github.com/ruslangrimov/predictions_balancing\n\n\n\n\nThe graph below estimate how many new whales it should be and how many of train whale id do not have test images.\n\n  ![enter image description here][1]\n\n\n  [1]: https://storage.googleapis.com/kaggle-forum-message-attachments/475869/11367/plot.png"
  },
  "source": "meta"
}