{
  "id": 400381,
  "title": "Dropping \"The Z\"",
  "url": "/competitions/asl-signs/discussion/400381",
  "author_name": "",
  "post_date": "2023-04-08T05:49:17.229040Z",
  "votes": 2,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Has anyone experimented with excluding the Z values from the MediaPipe model's predictions to see how it affects the model's performance, as the data description mentions that the model may not be fully trained to predict depth and suggests ignoring the Z values? </p>\n<p>I tried and failed to drop z! :)</p>",
  "messages": [
    {
      "id": "2214060",
      "postDate": "04/08/2023 05:49:17",
      "content": "<p>Has anyone experimented with excluding the Z values from the MediaPipe model's predictions to see how it affects the model's performance, as the data description mentions that the model may not be fully trained to predict depth and suggests ignoring the Z values? </p>\n<p>I tried and failed to drop z! :)</p>",
      "rawMarkdown": "Has anyone experimented with excluding the Z values from the MediaPipe model's predictions to see how it affects the model's performance, as the data description mentions that the model may not be fully trained to predict depth and suggests ignoring the Z values? \n\nI tried and failed to drop z! :)",
      "votes": null
    },
    {
      "id": "2217001",
      "postDate": "04/10/2023 14:22:58",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/ahsuna123\" target=\"_blank\">@ahsuna123</a>, you could create a keras layer subclass to remove the z-axis from the tensor's input. Note that you would need to call it in your model pipeline:</p>\n<pre><code> (tf.keras.layers.Layer):\n     ():\n        ().__init__(**kwargs)\n\n     ():\n         inputs[:, : , :-]\n\nremoved_z_tensor = RemoveZ()(inputs)\n</code></pre>\n<p>This would work if your input is of shape (num_frames, 543, 3), otherwise you can implement another algorithm that uses the logic.<br>\nHope it helps!</p>",
      "rawMarkdown": "Hi @ahsuna123, you could create a keras layer subclass to remove the z-axis from the tensor's input. Note that you would need to call it in your model pipeline:\n\n```python\nclass RemoveZ(tf.keras.layers.Layer):\n    def __init__(self, **kwargs):\n        super().__init__(**kwargs)\n        \n    def call(self, inputs):\n        return inputs[:, : , :-1]\n\nremoved_z_tensor = RemoveZ()(inputs)\n```\n\nThis would work if your input is of shape (num_frames, 543, 3), otherwise you can implement another algorithm that uses the logic.\nHope it helps!",
      "votes": null
    },
    {
      "id": "2217605",
      "postDate": "04/11/2023 03:34:13",
      "content": "<p>Ohh I see. Makes sense. Thank you for helping :)</p>",
      "rawMarkdown": "Ohh I see. Makes sense. Thank you for helping :)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2217001,
      "author_name": "josephzahar",
      "author_url": "",
      "post_date": "04/10/2023 14:22:58",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/ahsuna123\" target=\"_blank\">@ahsuna123</a>, you could create a keras layer subclass to remove the z-axis from the tensor's input. Note that you would need to call it in your model pipeline:</p>\n<pre><code> (tf.keras.layers.Layer):\n     ():\n        ().__init__(**kwargs)\n\n     ():\n         inputs[:, : , :-]\n\nremoved_z_tensor = RemoveZ()(inputs)\n</code></pre>\n<p>This would work if your input is of shape (num_frames, 543, 3), otherwise you can implement another algorithm that uses the logic.<br>\nHope it helps!</p>",
      "votes": null,
      "replies": [
        {
          "id": 2217605,
          "author_name": "ahsuna123",
          "author_url": "",
          "post_date": "04/11/2023 03:34:13",
          "content": "<p>Ohh I see. Makes sense. Thank you for helping :)</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2214060": "Has anyone experimented with excluding the Z values from the MediaPipe model's predictions to see how it affects the model's performance, as the data description mentions that the model may not be fully trained to predict depth and suggests ignoring the Z values? \n\nI tried and failed to drop z! :)",
    "2217001": "Hi @ahsuna123, you could create a keras layer subclass to remove the z-axis from the tensor's input. Note that you would need to call it in your model pipeline:\n\n```python\nclass RemoveZ(tf.keras.layers.Layer):\n    def __init__(self, **kwargs):\n        super().__init__(**kwargs)\n        \n    def call(self, inputs):\n        return inputs[:, : , :-1]\n\nremoved_z_tensor = RemoveZ()(inputs)\n```\n\nThis would work if your input is of shape (num_frames, 543, 3), otherwise you can implement another algorithm that uses the logic.\nHope it helps!",
    "2217605": "Ohh I see. Makes sense. Thank you for helping :)"
  },
  "source": "meta"
}