{
  "id": 319594,
  "title": "5th Place Solution",
  "url": "/competitions/ultra-mnist/writeups/l-h-u-tr-ng-5th-place-solution",
  "author_name": "",
  "post_date": "2022-04-18T05:29:39.148426200Z",
  "votes": 8,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Hi everyone!<br>\nFirst of all, I would like to say <strong>Congratulations</strong> to the winners <a href=\"https://www.kaggle.com/marvin42\" target=\"_blank\">@marvin42</a> <a href=\"https://www.kaggle.com/haqishen\" target=\"_blank\">@haqishen</a> and my former colleague <a href=\"https://www.kaggle.com/namtran1118\" target=\"_blank\">@namtran1118</a>.</p>\n<p>And here is my solution to UltraMNIST problem.</p>\n<p><strong>What I did:</strong></p>\n<ul>\n<li>Synthesize a dataset from MNIST as similar as possible to UltraMNIST dataset.</li>\n<li>Crop digits from synthesized dataset to make a classification dataset.</li>\n<li>Train a detector (YOLOL) and a classifier (MobileNetV2) on the two above datasets.</li>\n<li>Run detection on Ultra MNIST training dataset to make a pseudo-labels.</li>\n<li>Fine-tune models on this dataset.</li>\n</ul>\n<p><strong>How I make a prediction:</strong></p>\n<ol>\n<li>Run trained detector on overlapping crops of the input (1x1, 4x4, 6x6).</li>\n<li>Find contours on binarised and inv-binarised input to find all small digit \"proposals\".</li>\n<li>Run trained classifier to reconfirm predictions of the detector and to label \"proposals\".</li>\n<li>Combine all predictions and do some post-processes.</li>\n</ol>\n<p>Hope my sharing useful somehow! Thanks!</p>",
  "messages": [
    {
      "id": "1758831",
      "postDate": "04/18/2022 05:29:39",
      "content": "<p>Hi everyone!<br>\nFirst of all, I would like to say <strong>Congratulations</strong> to the winners <a href=\"https://www.kaggle.com/marvin42\" target=\"_blank\">@marvin42</a> <a href=\"https://www.kaggle.com/haqishen\" target=\"_blank\">@haqishen</a> and my former colleague <a href=\"https://www.kaggle.com/namtran1118\" target=\"_blank\">@namtran1118</a>.</p>\n<p>And here is my solution to UltraMNIST problem.</p>\n<p><strong>What I did:</strong></p>\n<ul>\n<li>Synthesize a dataset from MNIST as similar as possible to UltraMNIST dataset.</li>\n<li>Crop digits from synthesized dataset to make a classification dataset.</li>\n<li>Train a detector (YOLOL) and a classifier (MobileNetV2) on the two above datasets.</li>\n<li>Run detection on Ultra MNIST training dataset to make a pseudo-labels.</li>\n<li>Fine-tune models on this dataset.</li>\n</ul>\n<p><strong>How I make a prediction:</strong></p>\n<ol>\n<li>Run trained detector on overlapping crops of the input (1x1, 4x4, 6x6).</li>\n<li>Find contours on binarised and inv-binarised input to find all small digit \"proposals\".</li>\n<li>Run trained classifier to reconfirm predictions of the detector and to label \"proposals\".</li>\n<li>Combine all predictions and do some post-processes.</li>\n</ol>\n<p>Hope my sharing useful somehow! Thanks!</p>",
      "rawMarkdown": "Hi everyone!\nFirst of all, I would like to say **Congratulations** to the winners @marvin42 @haqishen and my former colleague @namtran1118.\n\nAnd here is my solution to UltraMNIST problem.\n\n**What I did:**\n- Synthesize a dataset from MNIST as similar as possible to UltraMNIST dataset.\n- Crop digits from synthesized dataset to make a classification dataset.\n- Train a detector (YOLOL) and a classifier (MobileNetV2) on the two above datasets.\n- Run detection on Ultra MNIST training dataset to make a pseudo-labels.\n- Fine-tune models on this dataset.\n\n**How I make a prediction:**\n1. Run trained detector on overlapping crops of the input (1x1, 4x4, 6x6).\n2. Find contours on binarised and inv-binarised input to find all small digit \"proposals\".\n3. Run trained classifier to reconfirm predictions of the detector and to label \"proposals\".\n4. Combine all predictions and do some post-processes.\n\nHope my sharing useful somehow! Thanks!",
      "votes": null
    },
    {
      "id": "1760485",
      "postDate": "04/19/2022 10:22:53",
      "content": "<p>Congratulations Lê Hữu Trọng thanks for sharing solution strategy …</p>",
      "rawMarkdown": "Congratulations Lê Hữu Trọng thanks for sharing solution strategy ...",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1760485,
      "author_name": "vidiqlogy",
      "author_url": "",
      "post_date": "04/19/2022 10:22:53",
      "content": "<p>Congratulations Lê Hữu Trọng thanks for sharing solution strategy …</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1758831": "Hi everyone!\nFirst of all, I would like to say **Congratulations** to the winners @marvin42 @haqishen and my former colleague @namtran1118.\n\nAnd here is my solution to UltraMNIST problem.\n\n**What I did:**\n- Synthesize a dataset from MNIST as similar as possible to UltraMNIST dataset.\n- Crop digits from synthesized dataset to make a classification dataset.\n- Train a detector (YOLOL) and a classifier (MobileNetV2) on the two above datasets.\n- Run detection on Ultra MNIST training dataset to make a pseudo-labels.\n- Fine-tune models on this dataset.\n\n**How I make a prediction:**\n1. Run trained detector on overlapping crops of the input (1x1, 4x4, 6x6).\n2. Find contours on binarised and inv-binarised input to find all small digit \"proposals\".\n3. Run trained classifier to reconfirm predictions of the detector and to label \"proposals\".\n4. Combine all predictions and do some post-processes.\n\nHope my sharing useful somehow! Thanks!",
    "1760485": "Congratulations Lê Hữu Trọng thanks for sharing solution strategy ..."
  },
  "source": "meta"
}