{
  "id": 126761,
  "title": "Flipping properties of Bengali characters?",
  "url": "/competitions/bengaliai-cv19/discussion/126761",
  "author_name": "",
  "post_date": "2020-01-20T03:03:46.558264800Z",
  "votes": 13,
  "comment_count": 13,
  "views": 0,
  "content": "<pre><code>Hi! Been looking at the class map and found that the graphemes and diacritics as shown in the class map do not possess horizontal or vertical flipping invariance (like the number 8 does), which means that like in the humpback whale challenge, we might flip the characters and treat them as new labels for supervision. However, I also found that the images are wildly different from a mere putting-together of the corresponding class map labels.\nNeed domain knowledge from those who know Bengali: do the graphemes and diacritics possess flipping invariance when used in compound characters?\n</code></pre>",
  "messages": [
    {
      "id": "723432",
      "postDate": "01/20/2020 03:03:46",
      "content": "<pre><code>Hi! Been looking at the class map and found that the graphemes and diacritics as shown in the class map do not possess horizontal or vertical flipping invariance (like the number 8 does), which means that like in the humpback whale challenge, we might flip the characters and treat them as new labels for supervision. However, I also found that the images are wildly different from a mere putting-together of the corresponding class map labels.\nNeed domain knowledge from those who know Bengali: do the graphemes and diacritics possess flipping invariance when used in compound characters?\n</code></pre>",
      "rawMarkdown": "Hi! Been looking at the class map and found that the graphemes and diacritics as shown in the class map do not possess horizontal or vertical flipping invariance (like the number 8 does), which means that like in the humpback whale challenge, we might flip the characters and treat them as new labels for supervision. However, I also found that the images are wildly different from a mere putting-together of the corresponding class map labels.\n    Need domain knowledge from those who know Bengali: do the graphemes and diacritics possess flipping invariance when used in compound characters?",
      "votes": null
    },
    {
      "id": "723581",
      "postDate": "01/20/2020 07:26:14",
      "content": "<p>No, they don't possess flipping invariance. Very few of them might but it is not possible to capitalize on this characteristic.</p>",
      "rawMarkdown": "No, they don't possess flipping invariance. Very few of them might but it is not possible to capitalize on this characteristic.",
      "votes": null
    },
    {
      "id": "723685",
      "postDate": "01/20/2020 10:30:08",
      "content": "<p>Thanks! My experimental results suggest so, too. Have to look to other methods</p>",
      "rawMarkdown": "Thanks! My experimental results suggest so, too. Have to look to other methods",
      "votes": null
    },
    {
      "id": "723895",
      "postDate": "01/20/2020 15:26:11",
      "content": "<p>Off the top of my head you can horizontally and vertically flip only Grapheme_root =1  i.e ঃ\nAnd you can horizontally flip  only consonant_diacritic =1 i.e. ঁ .\nBut wont help much I guess :) </p>",
      "rawMarkdown": "Off the top of my head you can horizontally and vertically flip only Grapheme_root =1  i.e ঃ\nAnd you can horizontally flip  only consonant_diacritic =1 i.e. ঁ .\nBut wont help much I guess :)",
      "votes": null
    },
    {
      "id": "729143",
      "postDate": "01/25/2020 19:47:59",
      "content": "<blockquote>\n  <p>we might flip the characters and treat them as new labels for supervision</p>\n</blockquote>\n\n<p>Hunchback is a re-id problem. What will you do if your inference-predictions contain categories that you made up?</p>",
      "rawMarkdown": "&gt; we might flip the characters and treat them as new labels for supervision\n\nHunchback is a re-id problem. What will you do if your inference-predictions contain categories that you made up?",
      "votes": null
    },
    {
      "id": "729280",
      "postDate": "01/26/2020 00:57:13",
      "content": "<p>For me, I am thinking about mapping them back to the original roots and diacritics :) But you are right in pointing that out. </p>",
      "rawMarkdown": "For me, I am thinking about mapping them back to the original roots and diacritics :) But you are right in pointing that out.",
      "votes": null
    },
    {
      "id": "729339",
      "postDate": "01/26/2020 03:58:30",
      "content": "<p>It makes more sense to assign new labels, and maybe you can make predictions as\n```\noriginal_labels = [...]\nlabels_you_created = [...]</p>\n\n<p>probability = ... from model output\ntrue_label = argmax(probability[original_labels])\n```\ntaking the max probability of labels that actually make sense.</p>\n\n<p>Basically, it teaches the model \"Hay, if you flip certain root, you should not recognize this with full certainty.\" (maybe prevents overfitting hazy images?) IDK</p>\n\n<p>(Edit: Yes. Mapping back will help, but only images with such identities)</p>",
      "rawMarkdown": "It makes more sense to assign new labels, and maybe you can make predictions as\n```\noriginal_labels = [...]\nlabels_you_created = [...]\n\nprobability = ... from model output\ntrue_label = argmax(probability[original_labels])\n```\ntaking the max probability of labels that actually make sense.\n\nBasically, it teaches the model \"Hay, if you flip certain root, you should not recognize this with full certainty.\" (maybe prevents overfitting hazy images?) IDK\n\n(Edit: Yes. Mapping back will help, but only images with such identities)",
      "votes": null
    },
    {
      "id": "729997",
      "postDate": "01/27/2020 00:33:01",
      "content": "<p><a href=\"/kokecacao\">@kokecacao</a> Thank you very much for your patience and advice! I am going back to the experiments right now :) Hoping for good results. Good luck!</p>",
      "rawMarkdown": "kokecacao Thank you very much for your patience and advice! I am going back to the experiments right now :) Hoping for good results. Good luck!",
      "votes": null
    },
    {
      "id": "744800",
      "postDate": "02/13/2020 06:43:14",
      "content": "<p>Flipping as new classes actually works on this dataset.</p>\n\n<p>Here's my experiment result:</p>\n\n<p>```\nbaseline, trained for 60 epochs\ncv 0.998485</p>\n\n<p>random hflip and random vflip (4x classes), pretrained for 120 epochs (at this time, cv=0.997864 for original classes), then finetuned on original classes for 20 epochs\ncv 0.998676\n```</p>\n\n<p>Obviously, the disadvantage is that the training time gets ~2.5x longer. But one can use this trick at the end of the competition to get a final boost.</p>",
      "rawMarkdown": "Flipping as new classes actually works on this dataset.\n\nHere's my experiment result:\n\n```\nbaseline, trained for 60 epochs\ncv 0.998485\n \nrandom hflip and random vflip (4x classes), pretrained for 120 epochs (at this time, cv=0.997864 for original classes), then finetuned on original classes for 20 epochs\ncv 0.998676\n```\n\nObviously, the disadvantage is that the training time gets ~2.5x longer. But one can use this trick at the end of the competition to get a final boost.",
      "votes": null
    },
    {
      "id": "757137",
      "postDate": "02/26/2020 13:22:19",
      "content": "<p><a href=\"/haqishen\">@haqishen</a> Good to know! Thanks for sharing. Oh, and it is really magic how you got high .998CV with with the configuration. Looking up :P</p>",
      "rawMarkdown": "haqishen Good to know! Thanks for sharing. Oh, and it is really magic how you got high .998CV with with the configuration. Looking up :P",
      "votes": null
    },
    {
      "id": "757205",
      "postDate": "02/26/2020 14:31:16",
      "content": "<p>I think everyone who reached LB0.99 have a cv score higher than 0.998 ;)</p>",
      "rawMarkdown": "I think everyone who reached LB0.99 have a cv score higher than 0.998 ;)",
      "votes": null
    },
    {
      "id": "757241",
      "postDate": "02/26/2020 14:58:59",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F113660%2F30ddf7fe1b0ca74524842c9fdcee6caa%2FSelection_055.png?generation=1582729137122933&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F113660%2F30ddf7fe1b0ca74524842c9fdcee6caa%2FSelection_055.png?generation=1582729137122933&amp;alt=media)",
      "votes": null
    },
    {
      "id": "757634",
      "postDate": "02/27/2020 01:08:22",
      "content": "<p>I think so too but quite impressive that you can reach 0.998 in only 60 epochs. Thanks for sharing the idea.</p>",
      "rawMarkdown": "I think so too but quite impressive that you can reach 0.998 in only 60 epochs. Thanks for sharing the idea.",
      "votes": null
    },
    {
      "id": "757716",
      "postDate": "02/27/2020 03:35:25",
      "content": "<p>That is absolutely crazy. Now struggling to improve single model</p>",
      "rawMarkdown": "That is absolutely crazy. Now struggling to improve single model",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 723581,
      "author_name": "zaber666",
      "author_url": "",
      "post_date": "01/20/2020 07:26:14",
      "content": "<p>No, they don't possess flipping invariance. Very few of them might but it is not possible to capitalize on this characteristic.</p>",
      "votes": null,
      "replies": [
        {
          "id": 723685,
          "author_name": "roguekk007",
          "author_url": "",
          "post_date": "01/20/2020 10:30:08",
          "content": "<p>Thanks! My experimental results suggest so, too. Have to look to other methods</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 723895,
      "author_name": "phoenix9032",
      "author_url": "",
      "post_date": "01/20/2020 15:26:11",
      "content": "<p>Off the top of my head you can horizontally and vertically flip only Grapheme_root =1  i.e ঃ\nAnd you can horizontally flip  only consonant_diacritic =1 i.e. ঁ .\nBut wont help much I guess :) </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 729143,
      "author_name": "kokecacao",
      "author_url": "",
      "post_date": "01/25/2020 19:47:59",
      "content": "<blockquote>\n  <p>we might flip the characters and treat them as new labels for supervision</p>\n</blockquote>\n\n<p>Hunchback is a re-id problem. What will you do if your inference-predictions contain categories that you made up?</p>",
      "votes": null,
      "replies": [
        {
          "id": 729280,
          "author_name": "roguekk007",
          "author_url": "",
          "post_date": "01/26/2020 00:57:13",
          "content": "<p>For me, I am thinking about mapping them back to the original roots and diacritics :) But you are right in pointing that out. </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 729339,
          "author_name": "kokecacao",
          "author_url": "",
          "post_date": "01/26/2020 03:58:30",
          "content": "<p>It makes more sense to assign new labels, and maybe you can make predictions as\n```\noriginal_labels = [...]\nlabels_you_created = [...]</p>\n\n<p>probability = ... from model output\ntrue_label = argmax(probability[original_labels])\n```\ntaking the max probability of labels that actually make sense.</p>\n\n<p>Basically, it teaches the model \"Hay, if you flip certain root, you should not recognize this with full certainty.\" (maybe prevents overfitting hazy images?) IDK</p>\n\n<p>(Edit: Yes. Mapping back will help, but only images with such identities)</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 729997,
          "author_name": "roguekk007",
          "author_url": "",
          "post_date": "01/27/2020 00:33:01",
          "content": "<p><a href=\"/kokecacao\">@kokecacao</a> Thank you very much for your patience and advice! I am going back to the experiments right now :) Hoping for good results. Good luck!</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 744800,
      "author_name": "haqishen",
      "author_url": "",
      "post_date": "02/13/2020 06:43:14",
      "content": "<p>Flipping as new classes actually works on this dataset.</p>\n\n<p>Here's my experiment result:</p>\n\n<p>```\nbaseline, trained for 60 epochs\ncv 0.998485</p>\n\n<p>random hflip and random vflip (4x classes), pretrained for 120 epochs (at this time, cv=0.997864 for original classes), then finetuned on original classes for 20 epochs\ncv 0.998676\n```</p>\n\n<p>Obviously, the disadvantage is that the training time gets ~2.5x longer. But one can use this trick at the end of the competition to get a final boost.</p>",
      "votes": null,
      "replies": [
        {
          "id": 757137,
          "author_name": "roguekk007",
          "author_url": "",
          "post_date": "02/26/2020 13:22:19",
          "content": "<p><a href=\"/haqishen\">@haqishen</a> Good to know! Thanks for sharing. Oh, and it is really magic how you got high .998CV with with the configuration. Looking up :P</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 757205,
          "author_name": "haqishen",
          "author_url": "",
          "post_date": "02/26/2020 14:31:16",
          "content": "<p>I think everyone who reached LB0.99 have a cv score higher than 0.998 ;)</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 757634,
          "author_name": "ccchang801023",
          "author_url": "",
          "post_date": "02/27/2020 01:08:22",
          "content": "<p>I think so too but quite impressive that you can reach 0.998 in only 60 epochs. Thanks for sharing the idea.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 757716,
          "author_name": "roguekk007",
          "author_url": "",
          "post_date": "02/27/2020 03:35:25",
          "content": "<p>That is absolutely crazy. Now struggling to improve single model</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 757241,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "02/26/2020 14:58:59",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F113660%2F30ddf7fe1b0ca74524842c9fdcee6caa%2FSelection_055.png?generation=1582729137122933&amp;alt=media\" alt=\"\"></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "723432": "Hi! Been looking at the class map and found that the graphemes and diacritics as shown in the class map do not possess horizontal or vertical flipping invariance (like the number 8 does), which means that like in the humpback whale challenge, we might flip the characters and treat them as new labels for supervision. However, I also found that the images are wildly different from a mere putting-together of the corresponding class map labels.\n    Need domain knowledge from those who know Bengali: do the graphemes and diacritics possess flipping invariance when used in compound characters?",
    "723581": "No, they don't possess flipping invariance. Very few of them might but it is not possible to capitalize on this characteristic.",
    "723685": "Thanks! My experimental results suggest so, too. Have to look to other methods",
    "723895": "Off the top of my head you can horizontally and vertically flip only Grapheme_root =1  i.e ঃ\nAnd you can horizontally flip  only consonant_diacritic =1 i.e. ঁ .\nBut wont help much I guess :)",
    "729143": "&gt; we might flip the characters and treat them as new labels for supervision\n\nHunchback is a re-id problem. What will you do if your inference-predictions contain categories that you made up?",
    "729280": "For me, I am thinking about mapping them back to the original roots and diacritics :) But you are right in pointing that out.",
    "729339": "It makes more sense to assign new labels, and maybe you can make predictions as\n```\noriginal_labels = [...]\nlabels_you_created = [...]\n\nprobability = ... from model output\ntrue_label = argmax(probability[original_labels])\n```\ntaking the max probability of labels that actually make sense.\n\nBasically, it teaches the model \"Hay, if you flip certain root, you should not recognize this with full certainty.\" (maybe prevents overfitting hazy images?) IDK\n\n(Edit: Yes. Mapping back will help, but only images with such identities)",
    "729997": "kokecacao Thank you very much for your patience and advice! I am going back to the experiments right now :) Hoping for good results. Good luck!",
    "744800": "Flipping as new classes actually works on this dataset.\n\nHere's my experiment result:\n\n```\nbaseline, trained for 60 epochs\ncv 0.998485\n \nrandom hflip and random vflip (4x classes), pretrained for 120 epochs (at this time, cv=0.997864 for original classes), then finetuned on original classes for 20 epochs\ncv 0.998676\n```\n\nObviously, the disadvantage is that the training time gets ~2.5x longer. But one can use this trick at the end of the competition to get a final boost.",
    "757137": "haqishen Good to know! Thanks for sharing. Oh, and it is really magic how you got high .998CV with with the configuration. Looking up :P",
    "757205": "I think everyone who reached LB0.99 have a cv score higher than 0.998 ;)",
    "757241": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F113660%2F30ddf7fe1b0ca74524842c9fdcee6caa%2FSelection_055.png?generation=1582729137122933&amp;alt=media)",
    "757634": "I think so too but quite impressive that you can reach 0.998 in only 60 epochs. Thanks for sharing the idea.",
    "757716": "That is absolutely crazy. Now struggling to improve single model"
  },
  "source": "meta"
}