{
  "id": 664120,
  "title": "19th place - 4 Body Parts Invariant Features with WaveNet + GRU",
  "url": "/competitions/MABe-mouse-behavior-detection/discussion/664120",
  "author_name": "Amit Aharoni",
  "post_date": "2025-12-22T16:05:14.451000",
  "votes": 9,
  "comment_count": 0,
  "views": 0,
  "content": "<p>Since the beginning we felt like the way to solve this problem is using deep learning models even though there were barely any deep learning solutions or discussions in the forum.</p>\n<p>Our solution consists of a K-Fold ensemble of a deep learning model per lab, where the model is a combination of WaveNet and GRU.</p>\n<h3>For each lab and fold we trained:</h3>\n<ul>\n<li>One model for single actions and one model for actions of pairs (using a window size of 64 frames). The model consists of x3 WaveNet blocks --&gt; x3 GRU Blocks --&gt; MLP (code below)</li>\n<li>We kept only 4 body parts - left ear, right ear, nose (called head in some of the labs) and tail.</li>\n<li>The models were trained using invariant features to prevent overfitting on coordinates data.</li>\n<li>We used a simple gaussian noise augmentation, up sampling on minority classes, and hard negative mining.</li>\n</ul>\n<h3>Post Processing</h3>\n<p>We combined neighboring actions of the same mice/pair</p>\n<h3>Inference</h3>\n<p>Predict using sliding windows approach with stride=2</p>\n<h3>Ensemble</h3>\n<p>The final solution was a mean ensemble of K-Fold with K=5 and K=3 (8 models in total).</p>\n<h3>What didn't work</h3>\n<ul>\n<li>More body parts</li>\n<li>Per action modeling</li>\n<li>More features (orientation, location relative to center, etc…)</li>\n</ul>\n<h3>Notes</h3>\n<p>We joined a bit late to the competition, and wanted to try out a \"general\" model that is not trained per lab but we didnt have enough time to try it. In hindsight it was a mistake</p>\n<p>Github link to code - <a href=\"https://github.com/amita1996/MABe-Kaggle-Challenge\" target=\"_blank\">https://github.com/amita1996/MABe-Kaggle-Challenge</a></p>\n<p>Hopefully the writeup is clear, feel free to ask questions</p>",
  "messages": [
    {
      "id": 3380551,
      "postDate": "2025-12-22T16:05:14.450Z",
      "content": "<p>Since the beginning we felt like the way to solve this problem is using deep learning models even though there were barely any deep learning solutions or discussions in the forum.</p>\n<p>Our solution consists of a K-Fold ensemble of a deep learning model per lab, where the model is a combination of WaveNet and GRU.</p>\n<h3>For each lab and fold we trained:</h3>\n<ul>\n<li>One model for single actions and one model for actions of pairs (using a window size of 64 frames). The model consists of x3 WaveNet blocks --&gt; x3 GRU Blocks --&gt; MLP (code below)</li>\n<li>We kept only 4 body parts - left ear, right ear, nose (called head in some of the labs) and tail.</li>\n<li>The models were trained using invariant features to prevent overfitting on coordinates data.</li>\n<li>We used a simple gaussian noise augmentation, up sampling on minority classes, and hard negative mining.</li>\n</ul>\n<h3>Post Processing</h3>\n<p>We combined neighboring actions of the same mice/pair</p>\n<h3>Inference</h3>\n<p>Predict using sliding windows approach with stride=2</p>\n<h3>Ensemble</h3>\n<p>The final solution was a mean ensemble of K-Fold with K=5 and K=3 (8 models in total).</p>\n<h3>What didn't work</h3>\n<ul>\n<li>More body parts</li>\n<li>Per action modeling</li>\n<li>More features (orientation, location relative to center, etc…)</li>\n</ul>\n<h3>Notes</h3>\n<p>We joined a bit late to the competition, and wanted to try out a \"general\" model that is not trained per lab but we didnt have enough time to try it. In hindsight it was a mistake</p>\n<p>Github link to code - <a href=\"https://github.com/amita1996/MABe-Kaggle-Challenge\" target=\"_blank\">https://github.com/amita1996/MABe-Kaggle-Challenge</a></p>\n<p>Hopefully the writeup is clear, feel free to ask questions</p>",
      "rawMarkdown": "Since the beginning we felt like the way to solve this problem is using deep learning models even though there were barely any deep learning solutions or discussions in the forum.\n\nOur solution consists of a K-Fold ensemble of a deep learning model per lab, where the model is a combination of WaveNet and GRU.\n\n### For each lab and fold we trained:\n\n- One model for single actions and one model for actions of pairs (using a window size of 64 frames). The model consists of x3 WaveNet blocks --> x3 GRU Blocks --> MLP (code below)\n- We kept only 4 body parts - left ear, right ear, nose (called head in some of the labs) and tail.\n- The models were trained using invariant features to prevent overfitting on coordinates data.\n- We used a simple gaussian noise augmentation, up sampling on minority classes, and hard negative mining.\n\n### Post Processing\nWe combined neighboring actions of the same mice/pair\n\n### Inference\nPredict using sliding windows approach with stride=2\n\n### Ensemble\nThe final solution was a mean ensemble of K-Fold with K=5 and K=3 (8 models in total).\n\n\n### What didn't work\n- More body parts\n- Per action modeling\n- More features (orientation, location relative to center, etc...)\n\n\n### Notes\nWe joined a bit late to the competition, and wanted to try out a \"general\" model that is not trained per lab but we didnt have enough time to try it. In hindsight it was a mistake\n\n\nGithub link to code - https://github.com/amita1996/MABe-Kaggle-Challenge\n\nHopefully the writeup is clear, feel free to ask questions",
      "votes": 9
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "3380551": "Since the beginning we felt like the way to solve this problem is using deep learning models even though there were barely any deep learning solutions or discussions in the forum.\n\nOur solution consists of a K-Fold ensemble of a deep learning model per lab, where the model is a combination of WaveNet and GRU.\n\n### For each lab and fold we trained:\n\n- One model for single actions and one model for actions of pairs (using a window size of 64 frames). The model consists of x3 WaveNet blocks --> x3 GRU Blocks --> MLP (code below)\n- We kept only 4 body parts - left ear, right ear, nose (called head in some of the labs) and tail.\n- The models were trained using invariant features to prevent overfitting on coordinates data.\n- We used a simple gaussian noise augmentation, up sampling on minority classes, and hard negative mining.\n\n### Post Processing\nWe combined neighboring actions of the same mice/pair\n\n### Inference\nPredict using sliding windows approach with stride=2\n\n### Ensemble\nThe final solution was a mean ensemble of K-Fold with K=5 and K=3 (8 models in total).\n\n\n### What didn't work\n- More body parts\n- Per action modeling\n- More features (orientation, location relative to center, etc...)\n\n\n### Notes\nWe joined a bit late to the competition, and wanted to try out a \"general\" model that is not trained per lab but we didnt have enough time to try it. In hindsight it was a mistake\n\n\nGithub link to code - https://github.com/amita1996/MABe-Kaggle-Challenge\n\nHopefully the writeup is clear, feel free to ask questions"
  }
}