{
  "id": 319043,
  "title": "4th Place Approach",
  "url": "/competitions/ultra-mnist/writeups/mighty-rains-4th-place-approach",
  "author_name": "",
  "post_date": "2022-04-15T06:55:17Z",
  "votes": 16,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I used the same age-old approach.</p>\n<p>TL:DR; Train an object detector to predict digits and submit the sum.</p>\n<p>Generated some 80k checkerboard patterns (as closely resembling to the UltraMNIST's background as I could) and embedded MNIST digits (since usage of MNIST was allowed), and trained a yolov5 on the dataset. Running predictions on the UltraMNIST's test gave around LB 0.88, I think.</p>\n<p>Using this model, I generated pseudo-labels for MNIST digit locations on the UltraMNIST's train and test dataset, further trained the same yolov5 on the pseudo-labels for a few more epochs. This boosted the score finally to LB 0.98, after a few iterations and some optimizations here and there. I couldn't train multiple models and the score is from a single model only.<br>\nCV always correlated with LB.</p>\n<p>Trained on 1000x1000 chips, and inferred on overlapping/pyramidal grids of similar sizes. I got major boost when I inferred on smaller chips. I couldn't figure out how else I was supposed to find 14x14 digits embedded in a 4000x4000 image, lol. (I really want to know how the winners did it)<br>\nI guess the whole point of the competition was to avoid the use of those grids 😑 and come up with better solutions.<br>\n<img src=\"https://i.imgur.com/lvBJwhK.jpeg\" alt=\"\"></p>\n<p>What I couldn't do in time was to make a digit/no-digit classifier to help reduce some FP. I had several FPs for the <code>1</code> digit. </p>",
  "messages": [
    {
      "id": "1755997",
      "postDate": "04/15/2022 06:21:40",
      "content": "<p>I used the same age-old approach.</p>\n<p>TL:DR; Train an object detector to predict digits and submit the sum.</p>\n<p>Generated some 80k checkerboard patterns (as closely resembling to the UltraMNIST's background as I could) and embedded MNIST digits (since usage of MNIST was allowed), and trained a yolov5 on the dataset. Running predictions on the UltraMNIST's test gave around LB 0.88, I think.</p>\n<p>Using this model, I generated pseudo-labels for MNIST digit locations on the UltraMNIST's train and test dataset, further trained the same yolov5 on the pseudo-labels for a few more epochs. This boosted the score finally to LB 0.98, after a few iterations and some optimizations here and there. I couldn't train multiple models and the score is from a single model only.<br>\nCV always correlated with LB.</p>\n<p>Trained on 1000x1000 chips, and inferred on overlapping/pyramidal grids of similar sizes. I got major boost when I inferred on smaller chips. I couldn't figure out how else I was supposed to find 14x14 digits embedded in a 4000x4000 image, lol. (I really want to know how the winners did it)<br>\nI guess the whole point of the competition was to avoid the use of those grids 😑 and come up with better solutions.<br>\n<img src=\"https://i.imgur.com/lvBJwhK.jpeg\" alt=\"\"></p>\n<p>What I couldn't do in time was to make a digit/no-digit classifier to help reduce some FP. I had several FPs for the <code>1</code> digit. </p>",
      "rawMarkdown": "I used the same age-old approach.\n\nTL:DR; Train an object detector to predict digits and submit the sum.\n\nGenerated some 80k checkerboard patterns (as closely resembling to the UltraMNIST's background as I could) and embedded MNIST digits (since usage of MNIST was allowed), and trained a yolov5 on the dataset. Running predictions on the UltraMNIST's test gave around LB 0.88, I think.\n\nUsing this model, I generated pseudo-labels for MNIST digit locations on the UltraMNIST's train and test dataset, further trained the same yolov5 on the pseudo-labels for a few more epochs. This boosted the score finally to LB 0.98, after a few iterations and some optimizations here and there. I couldn't train multiple models and the score is from a single model only.\nCV always correlated with LB.\n\nTrained on 1000x1000 chips, and inferred on overlapping/pyramidal grids of similar sizes. I got major boost when I inferred on smaller chips. I couldn't figure out how else I was supposed to find 14x14 digits embedded in a 4000x4000 image, lol. (I really want to know how the winners did it)\nI guess the whole point of the competition was to avoid the use of those grids 😑 and come up with better solutions.\n![](https://i.imgur.com/lvBJwhK.jpeg)\n\nWhat I couldn't do in time was to make a digit/no-digit classifier to help reduce some FP. I had several FPs for the `1` digit.",
      "votes": null
    },
    {
      "id": "1756457",
      "postDate": "04/15/2022 14:34:07",
      "content": "<p>Thanks <a href=\"https://www.kaggle.com/mightyrains\" target=\"_blank\">@mightyrains</a> for the effort that you have put. In compliance with the rules of the GPU track, your solution seems fantastic. We might also like to use details on your method in the supplementary material of our paper and we would be acknowledging you for the same. I hope that is fine with you. If yes, then we might reach you with more questions regarding the same in the near future.</p>",
      "rawMarkdown": "Thanks @mightyrains for the effort that you have put. In compliance with the rules of the GPU track, your solution seems fantastic. We might also like to use details on your method in the supplementary material of our paper and we would be acknowledging you for the same. I hope that is fine with you. If yes, then we might reach you with more questions regarding the same in the near future.",
      "votes": null
    },
    {
      "id": "1756651",
      "postDate": "04/15/2022 18:10:38",
      "content": "<p>Yeah, sure, will wait for your email 🤘</p>",
      "rawMarkdown": "Yeah, sure, will wait for your email 🤘",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1756457,
      "author_name": "dkgupta90",
      "author_url": "",
      "post_date": "04/15/2022 14:34:07",
      "content": "<p>Thanks <a href=\"https://www.kaggle.com/mightyrains\" target=\"_blank\">@mightyrains</a> for the effort that you have put. In compliance with the rules of the GPU track, your solution seems fantastic. We might also like to use details on your method in the supplementary material of our paper and we would be acknowledging you for the same. I hope that is fine with you. If yes, then we might reach you with more questions regarding the same in the near future.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1756651,
          "author_name": "mightyrains",
          "author_url": "",
          "post_date": "04/15/2022 18:10:38",
          "content": "<p>Yeah, sure, will wait for your email 🤘</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1755997": "I used the same age-old approach.\n\nTL:DR; Train an object detector to predict digits and submit the sum.\n\nGenerated some 80k checkerboard patterns (as closely resembling to the UltraMNIST's background as I could) and embedded MNIST digits (since usage of MNIST was allowed), and trained a yolov5 on the dataset. Running predictions on the UltraMNIST's test gave around LB 0.88, I think.\n\nUsing this model, I generated pseudo-labels for MNIST digit locations on the UltraMNIST's train and test dataset, further trained the same yolov5 on the pseudo-labels for a few more epochs. This boosted the score finally to LB 0.98, after a few iterations and some optimizations here and there. I couldn't train multiple models and the score is from a single model only.\nCV always correlated with LB.\n\nTrained on 1000x1000 chips, and inferred on overlapping/pyramidal grids of similar sizes. I got major boost when I inferred on smaller chips. I couldn't figure out how else I was supposed to find 14x14 digits embedded in a 4000x4000 image, lol. (I really want to know how the winners did it)\nI guess the whole point of the competition was to avoid the use of those grids 😑 and come up with better solutions.\n![](https://i.imgur.com/lvBJwhK.jpeg)\n\nWhat I couldn't do in time was to make a digit/no-digit classifier to help reduce some FP. I had several FPs for the `1` digit.",
    "1756457": "Thanks @mightyrains for the effort that you have put. In compliance with the rules of the GPU track, your solution seems fantastic. We might also like to use details on your method in the supplementary material of our paper and we would be acknowledging you for the same. I hope that is fine with you. If yes, then we might reach you with more questions regarding the same in the near future.",
    "1756651": "Yeah, sure, will wait for your email 🤘"
  },
  "source": "meta"
}