{
  "id": 188330,
  "title": "Did anyone try non-ML methods?",
  "url": "/competitions/lyft-motion-prediction-autonomous-vehicles/discussion/188330",
  "author_name": "Vladimir Iglovikov",
  "post_date": "2020-10-02T18:36:46.478000",
  "votes": 22,
  "comment_count": 9,
  "views": 0,
  "content": "<p>What I like about this problem is that it is unclear what is the most promising approach.</p>\n<p>It is not even obvious that Machine Learning is the way to go.</p>\n<p>Just curious, did anyone try Kalman Filters for this problem?</p>\n<p>P.S. Good free online intro book about Kalman Filters: <a href=\"https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python\" target=\"_blank\">https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python</a></p>",
  "messages": [
    {
      "id": 1035487,
      "postDate": "2020-10-02T18:36:46.480Z",
      "content": "<p>What I like about this problem is that it is unclear what is the most promising approach.</p>\n<p>It is not even obvious that Machine Learning is the way to go.</p>\n<p>Just curious, did anyone try Kalman Filters for this problem?</p>\n<p>P.S. Good free online intro book about Kalman Filters: <a href=\"https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python\" target=\"_blank\">https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python</a></p>",
      "rawMarkdown": "What I like about this problem is that it is unclear what is the most promising approach.\n\nIt is not even obvious that Machine Learning is the way to go.\n\nJust curious, did anyone try Kalman Filters for this problem?\n\nP.S. Good free online intro book about Kalman Filters: [https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python](https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python)",
      "votes": 22
    },
    {
      "id": 1035643,
      "postDate": "2020-10-02T23:02:32.787Z",
      "content": "<p>Yes, Kalman to around NLL 300. <br>\nI might use it to smooth the trajectories from the NN (post-process results) but without lane knowledge Kalman filters seem to be inferior to NNs</p>",
      "rawMarkdown": "Yes, Kalman to around NLL 300. \nI might use it to smooth the trajectories from the NN (post-process results) but without lane knowledge Kalman filters seem to be inferior to NNs",
      "votes": 7
    },
    {
      "id": 1035503,
      "postDate": "2020-10-02T18:46:07.617Z",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/iglovikov\" target=\"_blank\">@iglovikov</a> , I tried <a href=\"https://www.kaggle.com/zaharch/kalman-filter-baseline\" target=\"_blank\">Kalman filter here</a>, but not a competitive score. I noticed that NNs do predict stops and starts at traffic lights, while Kalman can not do this by design. May be it can be used as an auxiliary calculation though. For example as a starting trajectory which NN is supposed to refine (I haven't tried it). </p>",
      "rawMarkdown": "Hi @iglovikov , I tried [Kalman filter here](https://www.kaggle.com/zaharch/kalman-filter-baseline), but not a competitive score. I noticed that NNs do predict stops and starts at traffic lights, while Kalman can not do this by design. May be it can be used as an auxiliary calculation though. For example as a starting trajectory which NN is supposed to refine (I haven't tried it). ",
      "votes": 7,
      "replies": [
        {
          "id": 1035972,
          "postDate": "2020-10-03T09:49:53.527Z",
          "content": "<p>Yeah I think situational awareness is a big factor (obviously). <br>\nThe Kalman filter does OK on agents that are standing still or moving uniformly (actually a pretty large subset of the data), but of course fails on anything that needs to be aware of the road/other agents.   </p>\n<p>Treating agents like objects moving in a vacuum is only going to get us so far.   </p>\n<p>But I have a suspicion there might be a place for Kalman filters in this competition. <br>\nKalman filters are great at smoothing out noisy data, so can probable be used to smooth out histories and/or predicted trajectories. </p>",
          "rawMarkdown": "Yeah I think situational awareness is a big factor (obviously). \nThe Kalman filter does OK on agents that are standing still or moving uniformly (actually a pretty large subset of the data), but of course fails on anything that needs to be aware of the road/other agents.   \n\nTreating agents like objects moving in a vacuum is only going to get us so far.   \n\nBut I have a suspicion there might be a place for Kalman filters in this competition. \nKalman filters are great at smoothing out noisy data, so can probable be used to smooth out histories and/or predicted trajectories. ",
          "votes": 4
        },
        {
          "id": 1036634,
          "postDate": "2020-10-04T05:22:50.453Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 1036640,
          "postDate": "2020-10-04T05:27:30.623Z",
          "rawMarkdown": "",
          "isDeleted": true
        }
      ]
    },
    {
      "id": 1038092,
      "postDate": "2020-10-05T14:40:18.620Z",
      "content": "<p>What I plan on doing, if I ever get around to it, is use a constant velocity Kalman filter as the vehicle model with a RNN trained to provide acceleration through the control vector.   The goal there was to improve processing performance/training time since I have a weak computer.  My hope is that this seems to mimic how people drive:  your goal is typically to acheive a constant velocity - either stopped at a light or chugging along at the speed limit.  To acheive this you (or the NN) provides accleration through gas/brake based on the environment.  Over a short period of time, if you don't provide break or gas (and the ground is relatively flat) your car is fairly constant velocity.</p>\n<p>What I haven't decided is what inputs to provide.  I guess you could use the CNN with the rasterization approach to decide the control vector input, but that doesn't help with processing performance.   Instead, I was hoping to provide relative position/state information for all vehicles within a radius or some pattern (cone in front of vehicle, closest vehicle in front/beside, etc).</p>",
      "rawMarkdown": "What I plan on doing, if I ever get around to it, is use a constant velocity Kalman filter as the vehicle model with a RNN trained to provide acceleration through the control vector.   The goal there was to improve processing performance/training time since I have a weak computer.  My hope is that this seems to mimic how people drive:  your goal is typically to acheive a constant velocity - either stopped at a light or chugging along at the speed limit.  To acheive this you (or the NN) provides accleration through gas/brake based on the environment.  Over a short period of time, if you don't provide break or gas (and the ground is relatively flat) your car is fairly constant velocity.\n\nWhat I haven't decided is what inputs to provide.  I guess you could use the CNN with the rasterization approach to decide the control vector input, but that doesn't help with processing performance.   Instead, I was hoping to provide relative position/state information for all vehicles within a radius or some pattern (cone in front of vehicle, closest vehicle in front/beside, etc).",
      "votes": 1
    },
    {
      "id": 1039133,
      "postDate": "2020-10-06T11:03:05.093Z",
      "content": "<p>Thanks <a href=\"https://www.kaggle.com/iglovikov\" target=\"_blank\">@iglovikov</a> , never heard of Kalman Filters before (shame on me) but it sounds very interesting. And the book is fantastic. I am going to dive deep into the book. Hope I could finish the book before the competition ends, LOL.</p>",
      "rawMarkdown": "Thanks @iglovikov , never heard of Kalman Filters before (shame on me) but it sounds very interesting. And the book is fantastic. I am going to dive deep into the book. Hope I could finish the book before the competition ends, LOL.",
      "votes": 2
    },
    {
      "id": 1037368,
      "postDate": "2020-10-04T23:16:23.843Z",
      "content": "<p>I think my current approach is looking like an unlabeled classifier with 50 learnt classes, it will probably have to rely on pattern matching for its performance. There is room for a bit of regression on top, which would make them less static</p>",
      "rawMarkdown": "I think my current approach is looking like an unlabeled classifier with 50 learnt classes, it will probably have to rely on pattern matching for its performance. There is room for a bit of regression on top, which would make them less static",
      "votes": 2
    },
    {
      "id": 1117147,
      "postDate": "2020-12-17T19:02:42.163Z",
      "content": "<p>Kalman filter could help improve prediction. Speaking in a broad sense and assuming that we have images for each instant of time, I also assume that the receivers are capable of perceiving images fast enough. Now if we are able to establish a general relationship of the variation of the information of an image in an instant of time with respect to another we will be able to find the temporal relations of the images, that is, we will be able to define a dynamics of the images within the range visual of the image receptors. For example, if we move at a certain speed and the images remain constant, everything that the shutter is capable of receiving moves at the same speed. So, the variation from one image to another depends on the speed of the vehicle. If we increase the speed the variation from one image to another should increase if we get closer to an object and decrease if we move away. With the ability to detect 3D objects, we will know how we approach and how we move away from each detected object. For example, if the variation of an image from one instant to another of a 3D object grows, that is, that the pixels it occupies in the image is greater, we will know that there is an object and that that object approaches us depending on how the image increases. . If this relationship could be defined as a dynamic of the images, we could apply the Kalman filter for each 3d object detected. Of all this I am not absolutely certain that I may be wrong.</p>",
      "rawMarkdown": "Kalman filter could help improve prediction. Speaking in a broad sense and assuming that we have images for each instant of time, I also assume that the receivers are capable of perceiving images fast enough. Now if we are able to establish a general relationship of the variation of the information of an image in an instant of time with respect to another we will be able to find the temporal relations of the images, that is, we will be able to define a dynamics of the images within the range visual of the image receptors. For example, if we move at a certain speed and the images remain constant, everything that the shutter is capable of receiving moves at the same speed. So, the variation from one image to another depends on the speed of the vehicle. If we increase the speed the variation from one image to another should increase if we get closer to an object and decrease if we move away. With the ability to detect 3D objects, we will know how we approach and how we move away from each detected object. For example, if the variation of an image from one instant to another of a 3D object grows, that is, that the pixels it occupies in the image is greater, we will know that there is an object and that that object approaches us depending on how the image increases. . If this relationship could be defined as a dynamic of the images, we could apply the Kalman filter for each 3d object detected. Of all this I am not absolutely certain that I may be wrong."
    }
  ],
  "comments": [
    {
      "id": 1035643,
      "author_name": "Pascal Pfeiffer",
      "author_url": "",
      "post_date": "2020-10-02T23:02:32.787000",
      "content": "<p>Yes, Kalman to around NLL 300. <br>\nI might use it to smooth the trajectories from the NN (post-process results) but without lane knowledge Kalman filters seem to be inferior to NNs</p>",
      "votes": 7,
      "replies": []
    },
    {
      "id": 1035503,
      "author_name": "nosound",
      "author_url": "",
      "post_date": "2020-10-02T18:46:07.617000",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/iglovikov\" target=\"_blank\">@iglovikov</a> , I tried <a href=\"https://www.kaggle.com/zaharch/kalman-filter-baseline\" target=\"_blank\">Kalman filter here</a>, but not a competitive score. I noticed that NNs do predict stops and starts at traffic lights, while Kalman can not do this by design. May be it can be used as an auxiliary calculation though. For example as a starting trajectory which NN is supposed to refine (I haven't tried it). </p>",
      "votes": 7,
      "replies": [
        {
          "id": 1035972,
          "author_name": "fnands",
          "author_url": "",
          "post_date": "2020-10-03T09:49:53.527000",
          "content": "<p>Yeah I think situational awareness is a big factor (obviously). <br>\nThe Kalman filter does OK on agents that are standing still or moving uniformly (actually a pretty large subset of the data), but of course fails on anything that needs to be aware of the road/other agents.   </p>\n<p>Treating agents like objects moving in a vacuum is only going to get us so far.   </p>\n<p>But I have a suspicion there might be a place for Kalman filters in this competition. <br>\nKalman filters are great at smoothing out noisy data, so can probable be used to smooth out histories and/or predicted trajectories. </p>",
          "votes": 4,
          "replies": []
        },
        {
          "id": 1036634,
          "author_name": "",
          "author_url": "",
          "post_date": "2020-10-04T05:22:50.453000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1036640,
          "author_name": "",
          "author_url": "",
          "post_date": "2020-10-04T05:27:30.623000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1038092,
      "author_name": "Floid",
      "author_url": "",
      "post_date": "2020-10-05T14:40:18.620000",
      "content": "<p>What I plan on doing, if I ever get around to it, is use a constant velocity Kalman filter as the vehicle model with a RNN trained to provide acceleration through the control vector.   The goal there was to improve processing performance/training time since I have a weak computer.  My hope is that this seems to mimic how people drive:  your goal is typically to acheive a constant velocity - either stopped at a light or chugging along at the speed limit.  To acheive this you (or the NN) provides accleration through gas/brake based on the environment.  Over a short period of time, if you don't provide break or gas (and the ground is relatively flat) your car is fairly constant velocity.</p>\n<p>What I haven't decided is what inputs to provide.  I guess you could use the CNN with the rasterization approach to decide the control vector input, but that doesn't help with processing performance.   Instead, I was hoping to provide relative position/state information for all vehicles within a radius or some pattern (cone in front of vehicle, closest vehicle in front/beside, etc).</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1039133,
      "author_name": "Frank Pan",
      "author_url": "",
      "post_date": "2020-10-06T11:03:05.093000",
      "content": "<p>Thanks <a href=\"https://www.kaggle.com/iglovikov\" target=\"_blank\">@iglovikov</a> , never heard of Kalman Filters before (shame on me) but it sounds very interesting. And the book is fantastic. I am going to dive deep into the book. Hope I could finish the book before the competition ends, LOL.</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 1037368,
      "author_name": "n3n7i",
      "author_url": "",
      "post_date": "2020-10-04T23:16:23.843000",
      "content": "<p>I think my current approach is looking like an unlabeled classifier with 50 learnt classes, it will probably have to rely on pattern matching for its performance. There is room for a bit of regression on top, which would make them less static</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 1117147,
      "author_name": "José Nicolás Piña León",
      "author_url": "",
      "post_date": "2020-12-17T19:02:42.163000",
      "content": "<p>Kalman filter could help improve prediction. Speaking in a broad sense and assuming that we have images for each instant of time, I also assume that the receivers are capable of perceiving images fast enough. Now if we are able to establish a general relationship of the variation of the information of an image in an instant of time with respect to another we will be able to find the temporal relations of the images, that is, we will be able to define a dynamics of the images within the range visual of the image receptors. For example, if we move at a certain speed and the images remain constant, everything that the shutter is capable of receiving moves at the same speed. So, the variation from one image to another depends on the speed of the vehicle. If we increase the speed the variation from one image to another should increase if we get closer to an object and decrease if we move away. With the ability to detect 3D objects, we will know how we approach and how we move away from each detected object. For example, if the variation of an image from one instant to another of a 3D object grows, that is, that the pixels it occupies in the image is greater, we will know that there is an object and that that object approaches us depending on how the image increases. . If this relationship could be defined as a dynamic of the images, we could apply the Kalman filter for each 3d object detected. Of all this I am not absolutely certain that I may be wrong.</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1035487": "What I like about this problem is that it is unclear what is the most promising approach.\n\nIt is not even obvious that Machine Learning is the way to go.\n\nJust curious, did anyone try Kalman Filters for this problem?\n\nP.S. Good free online intro book about Kalman Filters: [https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python](https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python)",
    "1035643": "Yes, Kalman to around NLL 300. \nI might use it to smooth the trajectories from the NN (post-process results) but without lane knowledge Kalman filters seem to be inferior to NNs",
    "1035503": "Hi @iglovikov , I tried [Kalman filter here](https://www.kaggle.com/zaharch/kalman-filter-baseline), but not a competitive score. I noticed that NNs do predict stops and starts at traffic lights, while Kalman can not do this by design. May be it can be used as an auxiliary calculation though. For example as a starting trajectory which NN is supposed to refine (I haven't tried it). ",
    "1038092": "What I plan on doing, if I ever get around to it, is use a constant velocity Kalman filter as the vehicle model with a RNN trained to provide acceleration through the control vector.   The goal there was to improve processing performance/training time since I have a weak computer.  My hope is that this seems to mimic how people drive:  your goal is typically to acheive a constant velocity - either stopped at a light or chugging along at the speed limit.  To acheive this you (or the NN) provides accleration through gas/brake based on the environment.  Over a short period of time, if you don't provide break or gas (and the ground is relatively flat) your car is fairly constant velocity.\n\nWhat I haven't decided is what inputs to provide.  I guess you could use the CNN with the rasterization approach to decide the control vector input, but that doesn't help with processing performance.   Instead, I was hoping to provide relative position/state information for all vehicles within a radius or some pattern (cone in front of vehicle, closest vehicle in front/beside, etc).",
    "1039133": "Thanks @iglovikov , never heard of Kalman Filters before (shame on me) but it sounds very interesting. And the book is fantastic. I am going to dive deep into the book. Hope I could finish the book before the competition ends, LOL.",
    "1037368": "I think my current approach is looking like an unlabeled classifier with 50 learnt classes, it will probably have to rely on pattern matching for its performance. There is room for a bit of regression on top, which would make them less static",
    "1117147": "Kalman filter could help improve prediction. Speaking in a broad sense and assuming that we have images for each instant of time, I also assume that the receivers are capable of perceiving images fast enough. Now if we are able to establish a general relationship of the variation of the information of an image in an instant of time with respect to another we will be able to find the temporal relations of the images, that is, we will be able to define a dynamics of the images within the range visual of the image receptors. For example, if we move at a certain speed and the images remain constant, everything that the shutter is capable of receiving moves at the same speed. So, the variation from one image to another depends on the speed of the vehicle. If we increase the speed the variation from one image to another should increase if we get closer to an object and decrease if we move away. With the ability to detect 3D objects, we will know how we approach and how we move away from each detected object. For example, if the variation of an image from one instant to another of a 3D object grows, that is, that the pixels it occupies in the image is greater, we will know that there is an object and that that object approaches us depending on how the image increases. . If this relationship could be defined as a dynamic of the images, we could apply the Kalman filter for each 3d object detected. Of all this I am not absolutely certain that I may be wrong."
  }
}