{
  "id": 178323,
  "title": "Image and raster size selection",
  "url": "/competitions/lyft-motion-prediction-autonomous-vehicles/discussion/178323",
  "author_name": "Peter",
  "post_date": "2020-08-29T14:40:32.905000",
  "votes": 94,
  "comment_count": 44,
  "views": 0,
  "content": "<p>There are two important configuration options we should carefully select.</p>\n<ul>\n<li><code>raster_size</code> The rasterized image final size in pixels (eg: [300, 300]</li>\n<li><code>pixel_size</code> Raster's spatial resolution [meters per pixel]: the size in real-world one pixel corresponds to.</li>\n</ul>\n<h3>Raster sizes</h3>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F3b0e8f27b2fab2d056e8dff5f5dacbad%2Fdifferent_raster_sizes.png?generation=1598710965429449&amp;alt=media\" alt=\"\"><br>\n<em><code>pixel_size = [0.5, 0.5]</code></em></p>\n<p>As you can see in the image, if you increase the raster size (pixel size is constant), the model (ego/agent) will \"see\" more areas surrounding.</p>\n<ul>\n<li>More area behind/ahead</li>\n<li>Slower rendering, because of the more information (agents, roads, etc.)</li>\n</ul>\n<p><strong>What is a good raster size?</strong><br>\nI think it depends on the vehicle's velocity. </p>\n<table>\n<thead>\n<tr>\n<th>km/h</th>\n<th>m/s</th>\n<th>Distance in 5 sec</th>\n<th>In pixels</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>0.28</td>\n<td>1.39</td>\n<td>2.78</td>\n</tr>\n<tr>\n<td>5</td>\n<td>1.39</td>\n<td>6.94</td>\n<td>13.89</td>\n</tr>\n<tr>\n<td>10</td>\n<td>2.78</td>\n<td>13.89</td>\n<td>27.78</td>\n</tr>\n<tr>\n<td>15</td>\n<td>4.17</td>\n<td>20.83</td>\n<td>41.67</td>\n</tr>\n<tr>\n<td>20</td>\n<td>5.56</td>\n<td>27.78</td>\n<td>55.56</td>\n</tr>\n<tr>\n<td>25</td>\n<td>6.94</td>\n<td>34.72</td>\n<td>69.44</td>\n</tr>\n<tr>\n<td>30</td>\n<td>8.33</td>\n<td>41.67</td>\n<td>83.33</td>\n</tr>\n<tr>\n<td>35</td>\n<td>9.72</td>\n<td>48.61</td>\n<td>97.22</td>\n</tr>\n<tr>\n<td>40</td>\n<td>11.11</td>\n<td>55.56</td>\n<td>111.11</td>\n</tr>\n<tr>\n<td>50</td>\n<td>13.89</td>\n<td>69.44</td>\n<td>138.89</td>\n</tr>\n<tr>\n<td>60</td>\n<td>16.67</td>\n<td>83.33</td>\n<td>166.67</td>\n</tr>\n</tbody>\n</table>\n<p><em>I used constant <code>pixel_size = [0.5, 0.5]</code> for these calculations.</em></p>\n<p>The question is, what is the average velocity. In the image below, you can see the average speeds. (I assume that the unit is meter/seconds). I exclude everything with less than 1 m/s. Based on this information, we can select the size of the image.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F8518e5091477c01133bcb1f636c200af%2Fvelocities.png?generation=1598711375111984&amp;alt=media\" alt=\"\"></p>\n<ul>\n<li>Pick your maximum speed. For example 20 m/s</li>\n<li>Calculate the maximum distance in 5 seconds. (100 meters)</li>\n<li>Divide it by the size of the pixels (100 / 0.5 = 200)</li>\n<li>Because the ego is at <code>raster_size * 0.25</code> pixels from the left side of the image, we have to add some space. The final size is <code>200/0.75 = 267</code></li>\n</ul>\n<h3>Pixel sizes</h3>\n<p>The other parameter is the size of the pixels. What is one pixel in terms of world-meters? In the default settings, it is 1px = 0.5m<br>\nIn the image below, you can see the differences between different pixel sizes. (The size of the images is 300x300px). Because for example, the pedestrians are less the half meter (from the above view); they are not visible in the first 2-3 images. So we have to select a higher resolution (lower pixel_size). Somewhere between 0.1 and 0.25.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F043c846e85cd2963099b0bef759e6dbf%2Fdifferent_pixel_sizes.png?generation=1598711489251202&amp;alt=media\" alt=\"\"></p>\n<p>If we use a different pixel size, we have to recalculate the image size as well. Recalculate the example above with <code>pixel_size=0.2</code>:</p>\n<ul>\n<li>20 m/s</li>\n<li>100 meters in 5 seconds</li>\n<li>100/0.2 = 500</li>\n<li>final image size: 500/0.75 = 667px</li>\n</ul>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F47b83af93978fbaee9a89c2f87dfe76c%2Fraster_test_667_02.png?generation=1598711708763131&amp;alt=media\" alt=\"\"></p>\n<h3>Problems</h3>\n<p>As we increase the image_size and the resolution (decreasing the pixel size), the rasterizer has to work more. It is already a bottleneck, so we have to balance between the model performance and training time.</p>\n<p>I have one trick, though: The ego is always \"moving\" along the x-axis, so we need the 667px width, but we don't need that much height.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F97e2b600eba5e926b8f6a6b07ce538e6%2Fraster_test_667h_02.png?generation=1598711842889402&amp;alt=media\" alt=\"\"></p>\n<p>Unfortunately, there is a bug in the l5kit. They initialize the box image in (w, h) format, and (h, w) format in the semantic map. The sam-box rasterizer can not concatenate them. We can wait for a fix, or you can implement your own sem-box rasterizer and fix it.</p>",
  "messages": [
    {
      "id": 990345,
      "postDate": "2020-08-29T14:40:32.907Z",
      "content": "<p>There are two important configuration options we should carefully select.</p>\n<ul>\n<li><code>raster_size</code> The rasterized image final size in pixels (eg: [300, 300]</li>\n<li><code>pixel_size</code> Raster's spatial resolution [meters per pixel]: the size in real-world one pixel corresponds to.</li>\n</ul>\n<h3>Raster sizes</h3>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F3b0e8f27b2fab2d056e8dff5f5dacbad%2Fdifferent_raster_sizes.png?generation=1598710965429449&amp;alt=media\" alt=\"\"><br>\n<em><code>pixel_size = [0.5, 0.5]</code></em></p>\n<p>As you can see in the image, if you increase the raster size (pixel size is constant), the model (ego/agent) will \"see\" more areas surrounding.</p>\n<ul>\n<li>More area behind/ahead</li>\n<li>Slower rendering, because of the more information (agents, roads, etc.)</li>\n</ul>\n<p><strong>What is a good raster size?</strong><br>\nI think it depends on the vehicle's velocity. </p>\n<table>\n<thead>\n<tr>\n<th>km/h</th>\n<th>m/s</th>\n<th>Distance in 5 sec</th>\n<th>In pixels</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>0.28</td>\n<td>1.39</td>\n<td>2.78</td>\n</tr>\n<tr>\n<td>5</td>\n<td>1.39</td>\n<td>6.94</td>\n<td>13.89</td>\n</tr>\n<tr>\n<td>10</td>\n<td>2.78</td>\n<td>13.89</td>\n<td>27.78</td>\n</tr>\n<tr>\n<td>15</td>\n<td>4.17</td>\n<td>20.83</td>\n<td>41.67</td>\n</tr>\n<tr>\n<td>20</td>\n<td>5.56</td>\n<td>27.78</td>\n<td>55.56</td>\n</tr>\n<tr>\n<td>25</td>\n<td>6.94</td>\n<td>34.72</td>\n<td>69.44</td>\n</tr>\n<tr>\n<td>30</td>\n<td>8.33</td>\n<td>41.67</td>\n<td>83.33</td>\n</tr>\n<tr>\n<td>35</td>\n<td>9.72</td>\n<td>48.61</td>\n<td>97.22</td>\n</tr>\n<tr>\n<td>40</td>\n<td>11.11</td>\n<td>55.56</td>\n<td>111.11</td>\n</tr>\n<tr>\n<td>50</td>\n<td>13.89</td>\n<td>69.44</td>\n<td>138.89</td>\n</tr>\n<tr>\n<td>60</td>\n<td>16.67</td>\n<td>83.33</td>\n<td>166.67</td>\n</tr>\n</tbody>\n</table>\n<p><em>I used constant <code>pixel_size = [0.5, 0.5]</code> for these calculations.</em></p>\n<p>The question is, what is the average velocity. In the image below, you can see the average speeds. (I assume that the unit is meter/seconds). I exclude everything with less than 1 m/s. Based on this information, we can select the size of the image.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F8518e5091477c01133bcb1f636c200af%2Fvelocities.png?generation=1598711375111984&amp;alt=media\" alt=\"\"></p>\n<ul>\n<li>Pick your maximum speed. For example 20 m/s</li>\n<li>Calculate the maximum distance in 5 seconds. (100 meters)</li>\n<li>Divide it by the size of the pixels (100 / 0.5 = 200)</li>\n<li>Because the ego is at <code>raster_size * 0.25</code> pixels from the left side of the image, we have to add some space. The final size is <code>200/0.75 = 267</code></li>\n</ul>\n<h3>Pixel sizes</h3>\n<p>The other parameter is the size of the pixels. What is one pixel in terms of world-meters? In the default settings, it is 1px = 0.5m<br>\nIn the image below, you can see the differences between different pixel sizes. (The size of the images is 300x300px). Because for example, the pedestrians are less the half meter (from the above view); they are not visible in the first 2-3 images. So we have to select a higher resolution (lower pixel_size). Somewhere between 0.1 and 0.25.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F043c846e85cd2963099b0bef759e6dbf%2Fdifferent_pixel_sizes.png?generation=1598711489251202&amp;alt=media\" alt=\"\"></p>\n<p>If we use a different pixel size, we have to recalculate the image size as well. Recalculate the example above with <code>pixel_size=0.2</code>:</p>\n<ul>\n<li>20 m/s</li>\n<li>100 meters in 5 seconds</li>\n<li>100/0.2 = 500</li>\n<li>final image size: 500/0.75 = 667px</li>\n</ul>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F47b83af93978fbaee9a89c2f87dfe76c%2Fraster_test_667_02.png?generation=1598711708763131&amp;alt=media\" alt=\"\"></p>\n<h3>Problems</h3>\n<p>As we increase the image_size and the resolution (decreasing the pixel size), the rasterizer has to work more. It is already a bottleneck, so we have to balance between the model performance and training time.</p>\n<p>I have one trick, though: The ego is always \"moving\" along the x-axis, so we need the 667px width, but we don't need that much height.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F97e2b600eba5e926b8f6a6b07ce538e6%2Fraster_test_667h_02.png?generation=1598711842889402&amp;alt=media\" alt=\"\"></p>\n<p>Unfortunately, there is a bug in the l5kit. They initialize the box image in (w, h) format, and (h, w) format in the semantic map. The sam-box rasterizer can not concatenate them. We can wait for a fix, or you can implement your own sem-box rasterizer and fix it.</p>",
      "rawMarkdown": "There are two important configuration options we should carefully select.\n\n- `raster_size` The rasterized image final size in pixels (eg: [300, 300]\n- `pixel_size` Raster's spatial resolution [meters per pixel]: the size in real-world one pixel corresponds to.\n\n\n### Raster sizes\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F3b0e8f27b2fab2d056e8dff5f5dacbad%2Fdifferent_raster_sizes.png?generation=1598710965429449&alt=media)\n*`pixel_size = [0.5, 0.5]`*\n\nAs you can see in the image, if you increase the raster size (pixel size is constant), the model (ego/agent) will \"see\" more areas surrounding.\n\n- More area behind/ahead\n- Slower rendering, because of the more information (agents, roads, etc.)\n\n**What is a good raster size?**\nI think it depends on the vehicle's velocity. \n\n| km/h | m/s   | Distance in 5 sec | In pixels |\n| ---- | ----- | ----------------- | --------- |\n| 1    | 0.28  | 1.39              | 2.78      |\n| 5    | 1.39  | 6.94              | 13.89     |\n| 10   | 2.78  | 13.89             | 27.78     |\n| 15   | 4.17  | 20.83             | 41.67     |\n| 20   | 5.56  | 27.78             | 55.56     |\n| 25   | 6.94  | 34.72             | 69.44     |\n| 30   | 8.33  | 41.67             | 83.33     |\n| 35   | 9.72  | 48.61             | 97.22     |\n| 40   | 11.11 | 55.56             | 111.11    |\n| 50   | 13.89 | 69.44             | 138.89    |\n| 60   | 16.67 | 83.33             | 166.67    |\n\n*I used constant `pixel_size = [0.5, 0.5]` for these calculations.*\n\nThe question is, what is the average velocity. In the image below, you can see the average speeds. (I assume that the unit is meter/seconds). I exclude everything with less than 1 m/s. Based on this information, we can select the size of the image.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F8518e5091477c01133bcb1f636c200af%2Fvelocities.png?generation=1598711375111984&alt=media)\n\n- Pick your maximum speed. For example 20 m/s\n- Calculate the maximum distance in 5 seconds. (100 meters)\n- Divide it by the size of the pixels (100 / 0.5 = 200)\n- Because the ego is at `raster_size * 0.25` pixels from the left side of the image, we have to add some space. The final size is `200/0.75 = 267`\n\n### Pixel sizes\nThe other parameter is the size of the pixels. What is one pixel in terms of world-meters? In the default settings, it is 1px = 0.5m\nIn the image below, you can see the differences between different pixel sizes. (The size of the images is 300x300px). Because for example, the pedestrians are less the half meter (from the above view); they are not visible in the first 2-3 images. So we have to select a higher resolution (lower pixel_size). Somewhere between 0.1 and 0.25.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F043c846e85cd2963099b0bef759e6dbf%2Fdifferent_pixel_sizes.png?generation=1598711489251202&alt=media)\n\nIf we use a different pixel size, we have to recalculate the image size as well. Recalculate the example above with `pixel_size=0.2`:\n- 20 m/s\n- 100 meters in 5 seconds\n- 100/0.2 = 500\n- final image size: 500/0.75 = 667px\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F47b83af93978fbaee9a89c2f87dfe76c%2Fraster_test_667_02.png?generation=1598711708763131&alt=media)\n\n### Problems\nAs we increase the image_size and the resolution (decreasing the pixel size), the rasterizer has to work more. It is already a bottleneck, so we have to balance between the model performance and training time.\n\nI have one trick, though: The ego is always \"moving\" along the x-axis, so we need the 667px width, but we don't need that much height.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F97e2b600eba5e926b8f6a6b07ce538e6%2Fraster_test_667h_02.png?generation=1598711842889402&alt=media)\n\nUnfortunately, there is a bug in the l5kit. They initialize the box image in (w, h) format, and (h, w) format in the semantic map. The sam-box rasterizer can not concatenate them. We can wait for a fix, or you can implement your own sem-box rasterizer and fix it.",
      "votes": 94
    },
    {
      "id": 1068154,
      "postDate": "2020-11-03T06:02:26.167Z",
      "content": "<p>Thanks for your insights <a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a>! I tried making the width 667px and height much smaller.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2000147%2F1bd6b1aa9ab05afc76fbbe65830f7bef%2FScreen%20Shot%202020-11-03%20at%2011.23.03%20AM.png?generation=1604383215502519&amp;alt=media\" alt=\"\"></p>\n<p>However I am getting a tilted image with lots of blank space -<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2000147%2Fe2444da3965764b36601fef5d3d00d03%2FScreen%20Shot%202020-11-03%20at%2011.21.49%20AM.png?generation=1604383257448310&amp;alt=media\" alt=\"\"></p>\n<p>Although, this one looks fine - <br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2000147%2F8ecf277b337cafa93f953008bac4eec6%2FScreen%20Shot%202020-11-03%20at%2011.31.10%20AM.png?generation=1604383305411280&amp;alt=media\" alt=\"\"></p>\n<p>Any idea why the first image has empty space and why it's tilted?</p>",
      "rawMarkdown": "Thanks for your insights @pestipeti! I tried making the width 667px and height much smaller.\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2000147%2F1bd6b1aa9ab05afc76fbbe65830f7bef%2FScreen%20Shot%202020-11-03%20at%2011.23.03%20AM.png?generation=1604383215502519&alt=media)\n\nHowever I am getting a tilted image with lots of blank space -\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2000147%2Fe2444da3965764b36601fef5d3d00d03%2FScreen%20Shot%202020-11-03%20at%2011.21.49%20AM.png?generation=1604383257448310&alt=media)\n\nAlthough, this one looks fine - \n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2000147%2F8ecf277b337cafa93f953008bac4eec6%2FScreen%20Shot%202020-11-03%20at%2011.31.10%20AM.png?generation=1604383305411280&alt=media)\n\nAny idea why the first image has empty space and why it's tilted?",
      "votes": 3,
      "replies": [
        {
          "id": 1068276,
          "postDate": "2020-11-03T08:21:48.740Z",
          "content": "<p>this is completly normal. As you can see the ego vehicle in this frame is turning left and each image is drawn with the ego vehicle facing in the x direction. </p>",
          "rawMarkdown": "this is completly normal. As you can see the ego vehicle in this frame is turning left and each image is drawn with the ego vehicle facing in the x direction. ",
          "votes": 2
        },
        {
          "id": 1079778,
          "postDate": "2020-11-16T13:14:09.280Z",
          "content": "<p><a href=\"https://www.kaggle.com/arpitrf\" target=\"_blank\">@arpitrf</a> <a href=\"https://www.kaggle.com/ilu000\" target=\"_blank\">@ilu000</a> Did it work for you? Increasing pixel size, increasing image size and changing width and height relation?</p>",
          "rawMarkdown": "@arpitrf @ilu000 Did it work for you? Increasing pixel size, increasing image size and changing width and height relation?"
        }
      ]
    },
    {
      "id": 990636,
      "postDate": "2020-08-29T18:48:41.227Z",
      "content": "<p>Great analysis. Important to remember that we are predicting trajectories of other agents, and they can move much faster, or slower. We do have the agent's type, specifically there are these 4 types:</p>\n<pre><code>['PERCEPTION_LABEL_UNKNOWN', 'PERCEPTION_LABEL_CAR', 'PERCEPTION_LABEL_CYCLIST', 'PERCEPTION_LABEL_PEDESTRIAN']\n</code></pre>\n<p>maybe the parameters that you discuss should depend on the agent type.</p>",
      "rawMarkdown": "Great analysis. Important to remember that we are predicting trajectories of other agents, and they can move much faster, or slower. We do have the agent's type, specifically there are these 4 types:\n```\n['PERCEPTION_LABEL_UNKNOWN', 'PERCEPTION_LABEL_CAR', 'PERCEPTION_LABEL_CYCLIST', 'PERCEPTION_LABEL_PEDESTRIAN']\n```\nmaybe the parameters that you discuss should depend on the agent type.",
      "votes": 3,
      "replies": [
        {
          "id": 991009,
          "postDate": "2020-08-30T03:57:11.890Z",
          "content": "<p>I agree with you. I think It will be much better if done for individual agents depending on their velocity. Great analysis this though!</p>",
          "rawMarkdown": "I agree with you. I think It will be much better if done for individual agents depending on their velocity. Great analysis this though!",
          "votes": 1
        }
      ]
    },
    {
      "id": 991531,
      "postDate": "2020-08-30T13:28:51.147Z",
      "content": "<p>Congrats on GM. Did you just turn GM I think?</p>",
      "rawMarkdown": "Congrats on GM. Did you just turn GM I think?",
      "votes": 4,
      "replies": [
        {
          "id": 991552,
          "postDate": "2020-08-30T13:39:54.753Z",
          "content": "<p>Yes, thank you!</p>",
          "rawMarkdown": "Yes, thank you!",
          "votes": 8
        }
      ]
    },
    {
      "id": 1063610,
      "postDate": "2020-10-29T05:40:51.833Z",
      "content": "<p>Hi,</p>\n<p>Thanks <a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> for your wonderful insight. Might be little late, but just a thought to finding the raster size. Is it possible that we transform the target position to the ego vehicle coordinate system (as in raster images) and find the distribution of the size in x and y direction?<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3481038%2F486bc798f7e857dd03fcc9a82612b1cf%2FIMG_20201029_105435.jpg?generation=1603950009616270&amp;alt=media\" alt=\"transformation \"></p>\n<p>But for doing this transformation, we need the ego vehicle coordinate and yaw angle in the world coordinates (present in centroid and yaw keys of egodataset) and world coordinates of the agent target position (in Agentdataset). Is there any mapping already available (we can iterate over timestamps and ids, still is there a easier solution?)  which instances of Agent dataset map to those in ego dataset? Or I am missing something important? </p>",
      "rawMarkdown": "Hi,\n\nThanks @pestipeti for your wonderful insight. Might be little late, but just a thought to finding the raster size. Is it possible that we transform the target position to the ego vehicle coordinate system (as in raster images) and find the distribution of the size in x and y direction?\n![transformation ](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3481038%2F486bc798f7e857dd03fcc9a82612b1cf%2FIMG_20201029_105435.jpg?generation=1603950009616270&alt=media)\n\nBut for doing this transformation, we need the ego vehicle coordinate and yaw angle in the world coordinates (present in centroid and yaw keys of egodataset) and world coordinates of the agent target position (in Agentdataset). Is there any mapping already available (we can iterate over timestamps and ids, still is there a easier solution?)  which instances of Agent dataset map to those in ego dataset? Or I am missing something important? ",
      "votes": 1
    },
    {
      "id": 996078,
      "postDate": "2020-09-03T04:59:43.163Z",
      "content": "<p>Congratulations on become a gradmaster <a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> 👏!</p>",
      "rawMarkdown": "Congratulations on become a gradmaster @pestipeti 👏!",
      "votes": 1
    },
    {
      "id": 1088784,
      "postDate": "2020-11-24T00:13:11.290Z",
      "content": "<p>One idea is that you don't need to increase the pixels per meter to see all the pedestrians. You can actually just modify the extents of those agents to certain minimum values in the rasterizer so that it can always show at least a dot on the image for smaller agents.</p>",
      "rawMarkdown": "One idea is that you don't need to increase the pixels per meter to see all the pedestrians. You can actually just modify the extents of those agents to certain minimum values in the rasterizer so that it can always show at least a dot on the image for smaller agents.",
      "votes": 2,
      "replies": [
        {
          "id": 1089217,
          "postDate": "2020-11-24T09:53:21.837Z",
          "content": "<p>It's like having a bunch of dudes like Maui <img src=\"https://i.guim.co.uk/img/media/e5fc4c57289d36edb62b0e75a8cd828b2e13c488/0_1_722_433/master/722.jpg?width=700&amp;quality=85&amp;auto=format&amp;fit=max&amp;s=755d147cc6aa13821569f6e8c6f6456d\" alt=\"Maui\"> </p>",
          "rawMarkdown": "It's like having a bunch of dudes like Maui ![Maui](https://i.guim.co.uk/img/media/e5fc4c57289d36edb62b0e75a8cd828b2e13c488/0_1_722_433/master/722.jpg?width=700&quality=85&auto=format&fit=max&s=755d147cc6aa13821569f6e8c6f6456d) ",
          "votes": 1
        },
        {
          "id": 1090020,
          "postDate": "2020-11-25T01:51:16.490Z",
          "content": "<p>haha, right!</p>",
          "rawMarkdown": "haha, right!"
        }
      ]
    },
    {
      "id": 994286,
      "postDate": "2020-09-01T13:56:38.127Z",
      "content": "<p>Wow thanks for sharing the \"GrandMaster way\" 😏😃</p>",
      "rawMarkdown": "Wow thanks for sharing the \"GrandMaster way\" 😏😃",
      "votes": 2
    },
    {
      "id": 993237,
      "postDate": "2020-08-31T18:40:12.673Z",
      "content": "<p>Congrats on becoming GM.</p>",
      "rawMarkdown": "Congrats on becoming GM.",
      "votes": 2
    },
    {
      "id": 993188,
      "postDate": "2020-08-31T18:02:39.597Z",
      "content": "<p>Nice write up </p>",
      "rawMarkdown": "Nice write up ",
      "votes": 2
    },
    {
      "id": 992687,
      "postDate": "2020-08-31T10:55:15.620Z",
      "content": "<p>Great post. Thanks for all the help in this comp and congrats on becoming GM 👍</p>",
      "rawMarkdown": "Great post. Thanks for all the help in this comp and congrats on becoming GM 👍",
      "votes": 2
    },
    {
      "id": 991167,
      "postDate": "2020-08-30T07:32:55.637Z",
      "content": "<blockquote>\n  <p>The question is, what is the average velocity. In the image below, you can see the average speeds. (I assume that the unit is meter/seconds). I exclude everything with less than 1 m/s. Based on this information, we can select the size of the image.?</p>\n</blockquote>\n<p>I am being unable to wrap my head around how are you calculating the velocity of these vehicles? I would be really thankful if you could elaborate this one. </p>",
      "rawMarkdown": ">The question is, what is the average velocity. In the image below, you can see the average speeds. (I assume that the unit is meter/seconds). I exclude everything with less than 1 m/s. Based on this information, we can select the size of the image.?\n\n I am being unable to wrap my head around how are you calculating the velocity of these vehicles? I would be really thankful if you could elaborate this one. ",
      "votes": 2,
      "replies": [
        {
          "id": 991176,
          "postDate": "2020-08-30T07:46:59.427Z",
          "content": "<p>They are in the dataset, but l5kit don't return them by default, I modified it a little.</p>",
          "rawMarkdown": "They are in the dataset, but l5kit don't return them by default, I modified it a little.",
          "votes": 2
        },
        {
          "id": 991221,
          "postDate": "2020-08-30T08:38:04.960Z",
          "content": "<p>Yes found it thanks <a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> </p>\n<p>For others if confused they can find it in the agents dataset</p>\n<pre><code>AGENT_DTYPE = [\n    (\"centroid\", np.float64, (2,)),\n    (\"extent\", np.float32, (3,)),\n    (\"yaw\", np.float32),\n    (\"velocity\", np.float32, (2,)),\n    (\"track_id\", np.uint64),\n    (\"label_probabilities\", np.float32, (len(LABELS),)),\n]\n</code></pre>\n<p>Just few out of context questions</p>\n<ol>\n<li>Are you training your models on kaggle kernels?</li>\n<li>The full training data is also hosted here <a href=\"https://www.kaggle.com/philculliton/lyft-full-training-set\" target=\"_blank\">https://www.kaggle.com/philculliton/lyft-full-training-set</a> but I am being unable to use it because the semantic and aerial maps are not included which are required for rasterization. Can you share some ideas on how to make use of it?</li>\n</ol>",
          "rawMarkdown": "Yes found it thanks @pestipeti \n\nFor others if confused they can find it in the agents dataset\n\n```\nAGENT_DTYPE = [\n    (\"centroid\", np.float64, (2,)),\n    (\"extent\", np.float32, (3,)),\n    (\"yaw\", np.float32),\n    (\"velocity\", np.float32, (2,)),\n    (\"track_id\", np.uint64),\n    (\"label_probabilities\", np.float32, (len(LABELS),)),\n]\n```\n\nJust few out of context questions\n1. Are you training your models on kaggle kernels?\n2. The full training data is also hosted here https://www.kaggle.com/philculliton/lyft-full-training-set but I am being unable to use it because the semantic and aerial maps are not included which are required for rasterization. Can you share some ideas on how to make use of it?",
          "votes": 2
        },
        {
          "id": 991346,
          "postDate": "2020-08-30T10:38:13.643Z",
          "content": "<p><a href=\"https://www.kaggle.com/rhtsingh\" target=\"_blank\">@rhtsingh</a> </p>\n<p>1, No. I use my local computer<br>\n2, I haven't tried it yet. Try to copy (or symlink) the train_full.zarr into the scenes folder (where we have the train.zarr, test.zarr, etc)</p>",
          "rawMarkdown": "@rhtsingh \n\n1, No. I use my local computer\n2, I haven't tried it yet. Try to copy (or symlink) the train_full.zarr into the scenes folder (where we have the train.zarr, test.zarr, etc)"
        },
        {
          "id": 991380,
          "postDate": "2020-08-30T11:17:10.553Z",
          "content": "<p>I tried something like this, </p>\n<ol>\n<li>Added the lyft-full training dataset.</li>\n<li>Set DIR_INPUT = '../input'</li>\n<li>Two other dir variable DIR_COMP and DIR_EXTERNAL</li>\n<li>Then for sematic map I specify  <strong>f'{DIR_COMP}/semantic_map/semantic_map.pb'</strong></li>\n<li>For full training data I specify <strong>f'{DIR_EXTERNAL}/train_full.zarr'</strong></li>\n</ol>\n<p>But during rasterization, it takes forever to run and uses all cpu memory giving oom and a kernel crash.</p>\n<p>Below is my config,</p>\n<pre><code>DIR_INPUT = '../input/'\nDIR_COMP = 'lyft-motion-prediction-autonomous-vehicles'\nDIR_EXTERNAL = 'lyft-full-training-set'\nDEBUG=False\n\ncfg = {\n    'format_version':4,\n    'model_params':{\n        'model_architecture':'resnet18',\n        'history_num_frames':15,\n        'history_step_size':1,\n        'history_delta_time':0.1,\n        'future_num_frames':50,\n        'future_step_size':1,\n        'future_delta_time':0.1\n    },\n    'raster_params':{\n        'raster_size':[331,331],\n        'pixel_size':[0.5,0.5],\n        'ego_center':[0.25,0.25],\n        'map_type':'py_semantic',\n        'satellite_map_key': f'{DIR_COMP}/aerial_map/aerial_map.png',\n        'semantic_map_key': f'{DIR_COMP}/semantic_map/semantic_map.pb',\n        'dataset_meta_key': 'meta.json',\n        'filter_agents_threshold': 0.5\n    },\n    'train_data_loader':{\n        'key': f'{DIR_EXTERNAL}/train_full.zarr',\n        'batch_size':16,\n        'shuffle':True,\n        'num_workers':4\n    },\n    'train_params':{\n        'max_num_steps': 1000 if DEBUG else 20000,\n        'checkpoint_every_n_steps':5000\n    }\n}\n</code></pre>\n<p><a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> just one more question why do you calculate distance in 5 seconds always?</p>",
          "rawMarkdown": "I tried something like this, \n\n1. Added the lyft-full training dataset.\n2. Set DIR_INPUT = '../input'\n3. Two other dir variable DIR_COMP and DIR_EXTERNAL\n4. Then for sematic map I specify  **f'{DIR_COMP}/semantic_map/semantic_map.pb'**\n5. For full training data I specify **f'{DIR_EXTERNAL}/train_full.zarr'**\n\nBut during rasterization, it takes forever to run and uses all cpu memory giving oom and a kernel crash.\n\nBelow is my config,\n\n```\nDIR_INPUT = '../input/'\nDIR_COMP = 'lyft-motion-prediction-autonomous-vehicles'\nDIR_EXTERNAL = 'lyft-full-training-set'\nDEBUG=False\n\ncfg = {\n    'format_version':4,\n    'model_params':{\n        'model_architecture':'resnet18',\n        'history_num_frames':15,\n        'history_step_size':1,\n        'history_delta_time':0.1,\n        'future_num_frames':50,\n        'future_step_size':1,\n        'future_delta_time':0.1\n    },\n    'raster_params':{\n        'raster_size':[331,331],\n        'pixel_size':[0.5,0.5],\n        'ego_center':[0.25,0.25],\n        'map_type':'py_semantic',\n        'satellite_map_key': f'{DIR_COMP}/aerial_map/aerial_map.png',\n        'semantic_map_key': f'{DIR_COMP}/semantic_map/semantic_map.pb',\n        'dataset_meta_key': 'meta.json',\n        'filter_agents_threshold': 0.5\n    },\n    'train_data_loader':{\n        'key': f'{DIR_EXTERNAL}/train_full.zarr',\n        'batch_size':16,\n        'shuffle':True,\n        'num_workers':4\n    },\n    'train_params':{\n        'max_num_steps': 1000 if DEBUG else 20000,\n        'checkpoint_every_n_steps':5000\n    }\n}\n```\n\n@pestipeti just one more question why do you calculate distance in 5 seconds always?"
        },
        {
          "id": 991401,
          "postDate": "2020-08-30T11:48:19.190Z",
          "content": "<p><a href=\"https://www.kaggle.com/rhtsingh\" target=\"_blank\">@rhtsingh</a> <br>\nI am not sure what causes your issue. Somewhere in your code, there should be something like this: <code>os.environ[\"L5KIT_DATA_FOLDER\"] = \"./input\"</code>. l5kit uses this as root and all of the dir is relative to this one.</p>\n<p>IMO, you should ignore the full dataset in kaggle kernel. For my current result, I used ~75% of the small ds for one epoch.</p>\n<p>5 seconds is our prediction horizon, I wanted to include the farthest point in the rendered image.</p>",
          "rawMarkdown": "@rhtsingh \nI am not sure what causes your issue. Somewhere in your code, there should be something like this: `os.environ[\"L5KIT_DATA_FOLDER\"] = \"./input\"`. l5kit uses this as root and all of the dir is relative to this one.\n\nIMO, you should ignore the full dataset in kaggle kernel. For my current result, I used ~75% of the small ds for one epoch.\n\n5 seconds is our prediction horizon, I wanted to include the farthest point in the rendered image.",
          "votes": 1
        },
        {
          "id": 991485,
          "postDate": "2020-08-30T12:58:38.403Z",
          "content": "<p>Thanks a ton for all your assistance and heartfelt congratulations for becoming a gradmaster <a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> 🔥🔥</p>",
          "rawMarkdown": "Thanks a ton for all your assistance and heartfelt congratulations for becoming a gradmaster @pestipeti 🔥🔥",
          "votes": 1
        },
        {
          "id": 996400,
          "postDate": "2020-09-03T09:05:15.637Z",
          "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3535327%2F9af1275fba87cc0f0aef7ab075192b44%2FScreenshot%20from%202020-09-04%2002-29-03.png?generation=1599123766700215&amp;alt=media\" alt=\"\"></p>\n<p>i am getting velocity each containing 2 values. does this signify velocity component in x and y direction?</p>",
          "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3535327%2F9af1275fba87cc0f0aef7ab075192b44%2FScreenshot%20from%202020-09-04%2002-29-03.png?generation=1599123766700215&alt=media)\n\ni am getting velocity each containing 2 values. does this signify velocity component in x and y direction?",
          "votes": 1
        },
        {
          "id": 996442,
          "postDate": "2020-09-03T09:41:58.427Z",
          "content": "<p><a href=\"https://www.kaggle.com/debasish05\" target=\"_blank\">@debasish05</a> yes. those are the velocity_x and velocity_y values.</p>",
          "rawMarkdown": "@debasish05 yes. those are the velocity_x and velocity_y values.",
          "votes": 2
        },
        {
          "id": 996444,
          "postDate": "2020-09-03T09:47:53.883Z",
          "content": "<p>While doing analysis of the velocity of all agents, should I consider the resultant velocity?</p>",
          "rawMarkdown": "While doing analysis of the velocity of all agents, should I consider the resultant velocity?",
          "votes": 1
        },
        {
          "id": 996499,
          "postDate": "2020-09-03T10:46:31.263Z",
          "content": "<p>I only used the max of the absolute values, but yes you should do that.</p>",
          "rawMarkdown": "I only used the max of the absolute values, but yes you should do that.",
          "votes": 1
        },
        {
          "id": 996564,
          "postDate": "2020-09-03T11:53:24.443Z",
          "content": "<p><a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> Thankyou sir!!</p>",
          "rawMarkdown": "@pestipeti Thankyou sir!!"
        },
        {
          "id": 997233,
          "postDate": "2020-09-03T20:52:34.853Z",
          "content": "<p><a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> One question by small dataset you mean: sample.zarr or train.zarr?</p>",
          "rawMarkdown": "@pestipeti One question by small dataset you mean: sample.zarr or train.zarr?",
          "votes": 1
        },
        {
          "id": 1004919,
          "postDate": "2020-09-10T06:11:56.783Z",
          "rawMarkdown": "",
          "isDeleted": true
        }
      ]
    },
    {
      "id": 1088916,
      "postDate": "2020-11-24T04:07:19.760Z",
      "content": "<p>Helpful explanation👍</p>",
      "rawMarkdown": "Helpful explanation👍"
    },
    {
      "id": 1047301,
      "postDate": "2020-10-12T13:01:19.733Z",
      "content": "<blockquote>\n  <p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F97e2b600eba5e926b8f6a6b07ce538e6%2Fraster_test_667h_02.png?generation=1598711842889402&amp;alt=media\" alt=\"\"></p>\n  <p>Unfortunately, there is a bug in the l5kit. They initialize the box image in (w, h) format, and (h, w) format in the semantic map. The sam-box rasterizer can not concatenate them. We can wait for a fix, or you can implement your own sem-box rasterizer and fix it.</p>\n</blockquote>\n<p>Is this bug fixed? I looked into the functions for rendering and didn´t find any clues how to change the order in the rendering process.</p>\n<p>However, if I change the parameter in the config to 400,200 for example, the picture is rendered which should not be possible, correct?</p>",
      "rawMarkdown": "> ![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F97e2b600eba5e926b8f6a6b07ce538e6%2Fraster_test_667h_02.png?generation=1598711842889402&alt=media)\n> \n> Unfortunately, there is a bug in the l5kit. They initialize the box image in (w, h) format, and (h, w) format in the semantic map. The sam-box rasterizer can not concatenate them. We can wait for a fix, or you can implement your own sem-box rasterizer and fix it.\n\nIs this bug fixed? I looked into the functions for rendering and didn´t find any clues how to change the order in the rendering process.\n\nHowever, if I change the parameter in the config to 400,200 for example, the picture is rendered which should not be possible, correct?",
      "replies": [
        {
          "id": 1047314,
          "postDate": "2020-10-12T13:23:47.753Z",
          "content": "<p><a href=\"https://www.kaggle.com/benbla\" target=\"_blank\">@benbla</a> When I posted this thread the l5kit version was (I think) 1.0.6. In the latest release, the bug is <a href=\"https://github.com/lyft/l5kit/pull/133\" target=\"_blank\">fixed</a></p>",
          "rawMarkdown": "@benbla When I posted this thread the l5kit version was (I think) 1.0.6. In the latest release, the bug is [fixed](https://github.com/lyft/l5kit/pull/133)",
          "votes": 1
        },
        {
          "id": 1047324,
          "postDate": "2020-10-12T13:34:56.680Z",
          "content": "<p><a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> Thanks you for the fast answer! Did you go on with rectangular instead of quadratic input images or is this your secret? ;)</p>",
          "rawMarkdown": "@pestipeti Thanks you for the fast answer! Did you go on with rectangular instead of quadratic input images or is this your secret? ;)"
        },
        {
          "id": 1047353,
          "postDate": "2020-10-12T14:02:16.427Z",
          "content": "<p>A note on this:<br>\nis fixed for semantic but I've seen weird results with satellite. That's still under investigation :) </p>",
          "rawMarkdown": "A note on this:\nis fixed for semantic but I've seen weird results with satellite. That's still under investigation :) "
        }
      ]
    },
    {
      "id": 1003875,
      "postDate": "2020-09-09T10:21:34.163Z",
      "content": "<p>Thanks for sharing this. I was planning to play around with these values but because of the slow rasterization process there's not much that we can verify by executing things. Thanks again for the explanation!</p>",
      "rawMarkdown": "Thanks for sharing this. I was planning to play around with these values but because of the slow rasterization process there's not much that we can verify by executing things. Thanks again for the explanation!"
    },
    {
      "id": 994178,
      "postDate": "2020-09-01T12:49:46.170Z",
      "content": "<p>Hey <a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a>, its awesome. Very nicely explained.</p>",
      "rawMarkdown": "Hey @pestipeti, its awesome. Very nicely explained."
    },
    {
      "id": 990358,
      "postDate": "2020-08-29T14:56:34.743Z",
      "content": "<p>I don't know how far this analysis will help. But an input from my end is, maybe you should have histogram plot of speed because Lyft is stressing on the point that this is a URBAN scenario (On top of that busy urban scenario where people commute)and that's how this dataset differs compared to others. So there is high probability that you will see dense agents around ego with ego travelling at lower speed.   </p>",
      "rawMarkdown": "I don't know how far this analysis will help. But an input from my end is, maybe you should have histogram plot of speed because Lyft is stressing on the point that this is a URBAN scenario (On top of that busy urban scenario where people commute)and that's how this dataset differs compared to others. So there is high probability that you will see dense agents around ego with ego travelling at lower speed.   ",
      "replies": [
        {
          "id": 990380,
          "postDate": "2020-08-29T15:13:28.083Z",
          "content": "<p>I plotted a histogram (speed &gt; 1 m/s). You are right; most of the time ego is sitting in a traffic jam. I think it is easy to predict those scenarios. IMO, the key to this competition, is how accurately we can predict everything else.</p>\n<p>Here is the histogram plot of speed if I don' exclude the slow traffic.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F5be30fe68f3744b6abba0f75450fc56d%2Fall_velocities.png?generation=1598713896758949&amp;alt=media\" alt=\"\"></p>",
          "rawMarkdown": "I plotted a histogram (speed > 1 m/s). You are right; most of the time ego is sitting in a traffic jam. I think it is easy to predict those scenarios. IMO, the key to this competition, is how accurately we can predict everything else.\n\nHere is the histogram plot of speed if I don' exclude the slow traffic.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F5be30fe68f3744b6abba0f75450fc56d%2Fall_velocities.png?generation=1598713896758949&alt=media)",
          "votes": 6
        },
        {
          "id": 990414,
          "postDate": "2020-08-29T15:30:14.700Z",
          "content": "<p><a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> Looks interesting. I take different stance, I think Its difficult in congested areas with higher density. The Risk is more and error values should be very less. Keep The graphs coming peter. :D  </p>",
          "rawMarkdown": "@pestipeti Looks interesting. I take different stance, I think Its difficult in congested areas with higher density. The Risk is more and error values should be very less. Keep The graphs coming peter. :D  ",
          "votes": 2
        },
        {
          "id": 1087789,
          "postDate": "2020-11-23T04:40:55.823Z",
          "content": "<p>Just to add to this<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1010129%2F17ca9c290fceff73de27a5565c308de3%2Fworse%20case.png?generation=1606106395518950&amp;alt=media\" alt=\"\"><br>\nI found most of the worst cases are from target agent that has travel about 100m in 5s (20m/s). So 100m is about right.</p>",
          "rawMarkdown": "Just to add to this\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1010129%2F17ca9c290fceff73de27a5565c308de3%2Fworse%20case.png?generation=1606106395518950&alt=media)\nI found most of the worst cases are from target agent that has travel about 100m in 5s (20m/s). So 100m is about right.",
          "votes": 1
        }
      ]
    },
    {
      "id": 1033054,
      "postDate": "2020-09-30T16:18:58.667Z",
      "content": "<p>Thank you!</p>",
      "rawMarkdown": "Thank you!"
    },
    {
      "id": 994931,
      "postDate": "2020-09-02T04:33:33.417Z",
      "content": "<p>Thank you for sharing, congrats!</p>",
      "rawMarkdown": "Thank you for sharing, congrats!"
    },
    {
      "id": 994691,
      "postDate": "2020-09-01T20:28:31.010Z",
      "content": "<p>Thanks for sharing</p>",
      "rawMarkdown": "Thanks for sharing"
    }
  ],
  "comments": [
    {
      "id": 1068154,
      "author_name": "Arpit",
      "author_url": "",
      "post_date": "2020-11-03T06:02:26.167000",
      "content": "<p>Thanks for your insights <a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a>! I tried making the width 667px and height much smaller.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2000147%2F1bd6b1aa9ab05afc76fbbe65830f7bef%2FScreen%20Shot%202020-11-03%20at%2011.23.03%20AM.png?generation=1604383215502519&amp;alt=media\" alt=\"\"></p>\n<p>However I am getting a tilted image with lots of blank space -<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2000147%2Fe2444da3965764b36601fef5d3d00d03%2FScreen%20Shot%202020-11-03%20at%2011.21.49%20AM.png?generation=1604383257448310&amp;alt=media\" alt=\"\"></p>\n<p>Although, this one looks fine - <br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2000147%2F8ecf277b337cafa93f953008bac4eec6%2FScreen%20Shot%202020-11-03%20at%2011.31.10%20AM.png?generation=1604383305411280&amp;alt=media\" alt=\"\"></p>\n<p>Any idea why the first image has empty space and why it's tilted?</p>",
      "votes": 3,
      "replies": [
        {
          "id": 1068276,
          "author_name": "Pascal Pfeiffer",
          "author_url": "",
          "post_date": "2020-11-03T08:21:48.740000",
          "content": "<p>this is completly normal. As you can see the ego vehicle in this frame is turning left and each image is drawn with the ego vehicle facing in the x direction. </p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1079778,
          "author_name": "Benedikt Droste",
          "author_url": "",
          "post_date": "2020-11-16T13:14:09.280000",
          "content": "<p><a href=\"https://www.kaggle.com/arpitrf\" target=\"_blank\">@arpitrf</a> <a href=\"https://www.kaggle.com/ilu000\" target=\"_blank\">@ilu000</a> Did it work for you? Increasing pixel size, increasing image size and changing width and height relation?</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 990636,
      "author_name": "nosound",
      "author_url": "",
      "post_date": "2020-08-29T18:48:41.227000",
      "content": "<p>Great analysis. Important to remember that we are predicting trajectories of other agents, and they can move much faster, or slower. We do have the agent's type, specifically there are these 4 types:</p>\n<pre><code>['PERCEPTION_LABEL_UNKNOWN', 'PERCEPTION_LABEL_CAR', 'PERCEPTION_LABEL_CYCLIST', 'PERCEPTION_LABEL_PEDESTRIAN']\n</code></pre>\n<p>maybe the parameters that you discuss should depend on the agent type.</p>",
      "votes": 3,
      "replies": [
        {
          "id": 991009,
          "author_name": "SujaydKhandekar",
          "author_url": "",
          "post_date": "2020-08-30T03:57:11.890000",
          "content": "<p>I agree with you. I think It will be much better if done for individual agents depending on their velocity. Great analysis this though!</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 991531,
      "author_name": "Bo Peng",
      "author_url": "",
      "post_date": "2020-08-30T13:28:51.147000",
      "content": "<p>Congrats on GM. Did you just turn GM I think?</p>",
      "votes": 4,
      "replies": [
        {
          "id": 991552,
          "author_name": "Peter",
          "author_url": "",
          "post_date": "2020-08-30T13:39:54.753000",
          "content": "<p>Yes, thank you!</p>",
          "votes": 8,
          "replies": []
        }
      ]
    },
    {
      "id": 1063610,
      "author_name": "SuryaJR_Rafl",
      "author_url": "",
      "post_date": "2020-10-29T05:40:51.833000",
      "content": "<p>Hi,</p>\n<p>Thanks <a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> for your wonderful insight. Might be little late, but just a thought to finding the raster size. Is it possible that we transform the target position to the ego vehicle coordinate system (as in raster images) and find the distribution of the size in x and y direction?<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3481038%2F486bc798f7e857dd03fcc9a82612b1cf%2FIMG_20201029_105435.jpg?generation=1603950009616270&amp;alt=media\" alt=\"transformation \"></p>\n<p>But for doing this transformation, we need the ego vehicle coordinate and yaw angle in the world coordinates (present in centroid and yaw keys of egodataset) and world coordinates of the agent target position (in Agentdataset). Is there any mapping already available (we can iterate over timestamps and ids, still is there a easier solution?)  which instances of Agent dataset map to those in ego dataset? Or I am missing something important? </p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 996078,
      "author_name": "Beans",
      "author_url": "",
      "post_date": "2020-09-03T04:59:43.163000",
      "content": "<p>Congratulations on become a gradmaster <a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> 👏!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1088784,
      "author_name": "Louis Yang",
      "author_url": "",
      "post_date": "2020-11-24T00:13:11.290000",
      "content": "<p>One idea is that you don't need to increase the pixels per meter to see all the pedestrians. You can actually just modify the extents of those agents to certain minimum values in the rasterizer so that it can always show at least a dot on the image for smaller agents.</p>",
      "votes": 2,
      "replies": [
        {
          "id": 1089217,
          "author_name": "Miroslav Valan",
          "author_url": "",
          "post_date": "2020-11-24T09:53:21.837000",
          "content": "<p>It's like having a bunch of dudes like Maui <img src=\"https://i.guim.co.uk/img/media/e5fc4c57289d36edb62b0e75a8cd828b2e13c488/0_1_722_433/master/722.jpg?width=700&amp;quality=85&amp;auto=format&amp;fit=max&amp;s=755d147cc6aa13821569f6e8c6f6456d\" alt=\"Maui\"> </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1090020,
          "author_name": "Louis Yang",
          "author_url": "",
          "post_date": "2020-11-25T01:51:16.490000",
          "content": "<p>haha, right!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 994286,
      "author_name": "Shyam R",
      "author_url": "",
      "post_date": "2020-09-01T13:56:38.127000",
      "content": "<p>Wow thanks for sharing the \"GrandMaster way\" 😏😃</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 993237,
      "author_name": "Akshay Sadanand",
      "author_url": "",
      "post_date": "2020-08-31T18:40:12.673000",
      "content": "<p>Congrats on becoming GM.</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 993188,
      "author_name": "Bijeesha Vs",
      "author_url": "",
      "post_date": "2020-08-31T18:02:39.597000",
      "content": "<p>Nice write up </p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 992687,
      "author_name": "Jared Savage",
      "author_url": "",
      "post_date": "2020-08-31T10:55:15.620000",
      "content": "<p>Great post. Thanks for all the help in this comp and congrats on becoming GM 👍</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 991167,
      "author_name": "torch",
      "author_url": "",
      "post_date": "2020-08-30T07:32:55.637000",
      "content": "<blockquote>\n  <p>The question is, what is the average velocity. In the image below, you can see the average speeds. (I assume that the unit is meter/seconds). I exclude everything with less than 1 m/s. Based on this information, we can select the size of the image.?</p>\n</blockquote>\n<p>I am being unable to wrap my head around how are you calculating the velocity of these vehicles? I would be really thankful if you could elaborate this one. </p>",
      "votes": 2,
      "replies": [
        {
          "id": 991176,
          "author_name": "Peter",
          "author_url": "",
          "post_date": "2020-08-30T07:46:59.427000",
          "content": "<p>They are in the dataset, but l5kit don't return them by default, I modified it a little.</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 991221,
          "author_name": "torch",
          "author_url": "",
          "post_date": "2020-08-30T08:38:04.960000",
          "content": "<p>Yes found it thanks <a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> </p>\n<p>For others if confused they can find it in the agents dataset</p>\n<pre><code>AGENT_DTYPE = [\n    (\"centroid\", np.float64, (2,)),\n    (\"extent\", np.float32, (3,)),\n    (\"yaw\", np.float32),\n    (\"velocity\", np.float32, (2,)),\n    (\"track_id\", np.uint64),\n    (\"label_probabilities\", np.float32, (len(LABELS),)),\n]\n</code></pre>\n<p>Just few out of context questions</p>\n<ol>\n<li>Are you training your models on kaggle kernels?</li>\n<li>The full training data is also hosted here <a href=\"https://www.kaggle.com/philculliton/lyft-full-training-set\" target=\"_blank\">https://www.kaggle.com/philculliton/lyft-full-training-set</a> but I am being unable to use it because the semantic and aerial maps are not included which are required for rasterization. Can you share some ideas on how to make use of it?</li>\n</ol>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 991346,
          "author_name": "Peter",
          "author_url": "",
          "post_date": "2020-08-30T10:38:13.643000",
          "content": "<p><a href=\"https://www.kaggle.com/rhtsingh\" target=\"_blank\">@rhtsingh</a> </p>\n<p>1, No. I use my local computer<br>\n2, I haven't tried it yet. Try to copy (or symlink) the train_full.zarr into the scenes folder (where we have the train.zarr, test.zarr, etc)</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 991380,
          "author_name": "torch",
          "author_url": "",
          "post_date": "2020-08-30T11:17:10.553000",
          "content": "<p>I tried something like this, </p>\n<ol>\n<li>Added the lyft-full training dataset.</li>\n<li>Set DIR_INPUT = '../input'</li>\n<li>Two other dir variable DIR_COMP and DIR_EXTERNAL</li>\n<li>Then for sematic map I specify  <strong>f'{DIR_COMP}/semantic_map/semantic_map.pb'</strong></li>\n<li>For full training data I specify <strong>f'{DIR_EXTERNAL}/train_full.zarr'</strong></li>\n</ol>\n<p>But during rasterization, it takes forever to run and uses all cpu memory giving oom and a kernel crash.</p>\n<p>Below is my config,</p>\n<pre><code>DIR_INPUT = '../input/'\nDIR_COMP = 'lyft-motion-prediction-autonomous-vehicles'\nDIR_EXTERNAL = 'lyft-full-training-set'\nDEBUG=False\n\ncfg = {\n    'format_version':4,\n    'model_params':{\n        'model_architecture':'resnet18',\n        'history_num_frames':15,\n        'history_step_size':1,\n        'history_delta_time':0.1,\n        'future_num_frames':50,\n        'future_step_size':1,\n        'future_delta_time':0.1\n    },\n    'raster_params':{\n        'raster_size':[331,331],\n        'pixel_size':[0.5,0.5],\n        'ego_center':[0.25,0.25],\n        'map_type':'py_semantic',\n        'satellite_map_key': f'{DIR_COMP}/aerial_map/aerial_map.png',\n        'semantic_map_key': f'{DIR_COMP}/semantic_map/semantic_map.pb',\n        'dataset_meta_key': 'meta.json',\n        'filter_agents_threshold': 0.5\n    },\n    'train_data_loader':{\n        'key': f'{DIR_EXTERNAL}/train_full.zarr',\n        'batch_size':16,\n        'shuffle':True,\n        'num_workers':4\n    },\n    'train_params':{\n        'max_num_steps': 1000 if DEBUG else 20000,\n        'checkpoint_every_n_steps':5000\n    }\n}\n</code></pre>\n<p><a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> just one more question why do you calculate distance in 5 seconds always?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 991401,
          "author_name": "Peter",
          "author_url": "",
          "post_date": "2020-08-30T11:48:19.190000",
          "content": "<p><a href=\"https://www.kaggle.com/rhtsingh\" target=\"_blank\">@rhtsingh</a> <br>\nI am not sure what causes your issue. Somewhere in your code, there should be something like this: <code>os.environ[\"L5KIT_DATA_FOLDER\"] = \"./input\"</code>. l5kit uses this as root and all of the dir is relative to this one.</p>\n<p>IMO, you should ignore the full dataset in kaggle kernel. For my current result, I used ~75% of the small ds for one epoch.</p>\n<p>5 seconds is our prediction horizon, I wanted to include the farthest point in the rendered image.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 991485,
          "author_name": "torch",
          "author_url": "",
          "post_date": "2020-08-30T12:58:38.403000",
          "content": "<p>Thanks a ton for all your assistance and heartfelt congratulations for becoming a gradmaster <a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> 🔥🔥</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 996400,
          "author_name": "Debasish Behera",
          "author_url": "",
          "post_date": "2020-09-03T09:05:15.637000",
          "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3535327%2F9af1275fba87cc0f0aef7ab075192b44%2FScreenshot%20from%202020-09-04%2002-29-03.png?generation=1599123766700215&amp;alt=media\" alt=\"\"></p>\n<p>i am getting velocity each containing 2 values. does this signify velocity component in x and y direction?</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 996442,
          "author_name": "Peter",
          "author_url": "",
          "post_date": "2020-09-03T09:41:58.427000",
          "content": "<p><a href=\"https://www.kaggle.com/debasish05\" target=\"_blank\">@debasish05</a> yes. those are the velocity_x and velocity_y values.</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 996444,
          "author_name": "Debasish Behera",
          "author_url": "",
          "post_date": "2020-09-03T09:47:53.883000",
          "content": "<p>While doing analysis of the velocity of all agents, should I consider the resultant velocity?</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 996499,
          "author_name": "Peter",
          "author_url": "",
          "post_date": "2020-09-03T10:46:31.263000",
          "content": "<p>I only used the max of the absolute values, but yes you should do that.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 996564,
          "author_name": "Debasish Behera",
          "author_url": "",
          "post_date": "2020-09-03T11:53:24.443000",
          "content": "<p><a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> Thankyou sir!!</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 997233,
          "author_name": "Marcin Czelej",
          "author_url": "",
          "post_date": "2020-09-03T20:52:34.853000",
          "content": "<p><a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> One question by small dataset you mean: sample.zarr or train.zarr?</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1004919,
          "author_name": "",
          "author_url": "",
          "post_date": "2020-09-10T06:11:56.783000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1088916,
      "author_name": "Hongshu DAI",
      "author_url": "",
      "post_date": "2020-11-24T04:07:19.760000",
      "content": "<p>Helpful explanation👍</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1047301,
      "author_name": "Benedikt Droste",
      "author_url": "",
      "post_date": "2020-10-12T13:01:19.733000",
      "content": "<blockquote>\n  <p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F97e2b600eba5e926b8f6a6b07ce538e6%2Fraster_test_667h_02.png?generation=1598711842889402&amp;alt=media\" alt=\"\"></p>\n  <p>Unfortunately, there is a bug in the l5kit. They initialize the box image in (w, h) format, and (h, w) format in the semantic map. The sam-box rasterizer can not concatenate them. We can wait for a fix, or you can implement your own sem-box rasterizer and fix it.</p>\n</blockquote>\n<p>Is this bug fixed? I looked into the functions for rendering and didn´t find any clues how to change the order in the rendering process.</p>\n<p>However, if I change the parameter in the config to 400,200 for example, the picture is rendered which should not be possible, correct?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1047314,
          "author_name": "Peter",
          "author_url": "",
          "post_date": "2020-10-12T13:23:47.753000",
          "content": "<p><a href=\"https://www.kaggle.com/benbla\" target=\"_blank\">@benbla</a> When I posted this thread the l5kit version was (I think) 1.0.6. In the latest release, the bug is <a href=\"https://github.com/lyft/l5kit/pull/133\" target=\"_blank\">fixed</a></p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1047324,
          "author_name": "Benedikt Droste",
          "author_url": "",
          "post_date": "2020-10-12T13:34:56.680000",
          "content": "<p><a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> Thanks you for the fast answer! Did you go on with rectangular instead of quadratic input images or is this your secret? ;)</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1047353,
          "author_name": "Luca Bergamini",
          "author_url": "",
          "post_date": "2020-10-12T14:02:16.427000",
          "content": "<p>A note on this:<br>\nis fixed for semantic but I've seen weird results with satellite. That's still under investigation :) </p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1003875,
      "author_name": "UjjwalJain",
      "author_url": "",
      "post_date": "2020-09-09T10:21:34.163000",
      "content": "<p>Thanks for sharing this. I was planning to play around with these values but because of the slow rasterization process there's not much that we can verify by executing things. Thanks again for the explanation!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 994178,
      "author_name": "Vaibhav Kumar",
      "author_url": "",
      "post_date": "2020-09-01T12:49:46.170000",
      "content": "<p>Hey <a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a>, its awesome. Very nicely explained.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 990358,
      "author_name": "The Brown Iceman",
      "author_url": "",
      "post_date": "2020-08-29T14:56:34.743000",
      "content": "<p>I don't know how far this analysis will help. But an input from my end is, maybe you should have histogram plot of speed because Lyft is stressing on the point that this is a URBAN scenario (On top of that busy urban scenario where people commute)and that's how this dataset differs compared to others. So there is high probability that you will see dense agents around ego with ego travelling at lower speed.   </p>",
      "votes": 0,
      "replies": [
        {
          "id": 990380,
          "author_name": "Peter",
          "author_url": "",
          "post_date": "2020-08-29T15:13:28.083000",
          "content": "<p>I plotted a histogram (speed &gt; 1 m/s). You are right; most of the time ego is sitting in a traffic jam. I think it is easy to predict those scenarios. IMO, the key to this competition, is how accurately we can predict everything else.</p>\n<p>Here is the histogram plot of speed if I don' exclude the slow traffic.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F5be30fe68f3744b6abba0f75450fc56d%2Fall_velocities.png?generation=1598713896758949&amp;alt=media\" alt=\"\"></p>",
          "votes": 6,
          "replies": []
        },
        {
          "id": 990414,
          "author_name": "The Brown Iceman",
          "author_url": "",
          "post_date": "2020-08-29T15:30:14.700000",
          "content": "<p><a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> Looks interesting. I take different stance, I think Its difficult in congested areas with higher density. The Risk is more and error values should be very less. Keep The graphs coming peter. :D  </p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1087789,
          "author_name": "Louis Yang",
          "author_url": "",
          "post_date": "2020-11-23T04:40:55.823000",
          "content": "<p>Just to add to this<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1010129%2F17ca9c290fceff73de27a5565c308de3%2Fworse%20case.png?generation=1606106395518950&amp;alt=media\" alt=\"\"><br>\nI found most of the worst cases are from target agent that has travel about 100m in 5s (20m/s). So 100m is about right.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1033054,
      "author_name": "Yier",
      "author_url": "",
      "post_date": "2020-09-30T16:18:58.667000",
      "content": "<p>Thank you!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 994931,
      "author_name": "Jake",
      "author_url": "",
      "post_date": "2020-09-02T04:33:33.417000",
      "content": "<p>Thank you for sharing, congrats!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 994691,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-09-01T20:28:31.010000",
      "content": "<p>Thanks for sharing</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "990345": "There are two important configuration options we should carefully select.\n\n- `raster_size` The rasterized image final size in pixels (eg: [300, 300]\n- `pixel_size` Raster's spatial resolution [meters per pixel]: the size in real-world one pixel corresponds to.\n\n\n### Raster sizes\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F3b0e8f27b2fab2d056e8dff5f5dacbad%2Fdifferent_raster_sizes.png?generation=1598710965429449&alt=media)\n*`pixel_size = [0.5, 0.5]`*\n\nAs you can see in the image, if you increase the raster size (pixel size is constant), the model (ego/agent) will \"see\" more areas surrounding.\n\n- More area behind/ahead\n- Slower rendering, because of the more information (agents, roads, etc.)\n\n**What is a good raster size?**\nI think it depends on the vehicle's velocity. \n\n| km/h | m/s   | Distance in 5 sec | In pixels |\n| ---- | ----- | ----------------- | --------- |\n| 1    | 0.28  | 1.39              | 2.78      |\n| 5    | 1.39  | 6.94              | 13.89     |\n| 10   | 2.78  | 13.89             | 27.78     |\n| 15   | 4.17  | 20.83             | 41.67     |\n| 20   | 5.56  | 27.78             | 55.56     |\n| 25   | 6.94  | 34.72             | 69.44     |\n| 30   | 8.33  | 41.67             | 83.33     |\n| 35   | 9.72  | 48.61             | 97.22     |\n| 40   | 11.11 | 55.56             | 111.11    |\n| 50   | 13.89 | 69.44             | 138.89    |\n| 60   | 16.67 | 83.33             | 166.67    |\n\n*I used constant `pixel_size = [0.5, 0.5]` for these calculations.*\n\nThe question is, what is the average velocity. In the image below, you can see the average speeds. (I assume that the unit is meter/seconds). I exclude everything with less than 1 m/s. Based on this information, we can select the size of the image.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F8518e5091477c01133bcb1f636c200af%2Fvelocities.png?generation=1598711375111984&alt=media)\n\n- Pick your maximum speed. For example 20 m/s\n- Calculate the maximum distance in 5 seconds. (100 meters)\n- Divide it by the size of the pixels (100 / 0.5 = 200)\n- Because the ego is at `raster_size * 0.25` pixels from the left side of the image, we have to add some space. The final size is `200/0.75 = 267`\n\n### Pixel sizes\nThe other parameter is the size of the pixels. What is one pixel in terms of world-meters? In the default settings, it is 1px = 0.5m\nIn the image below, you can see the differences between different pixel sizes. (The size of the images is 300x300px). Because for example, the pedestrians are less the half meter (from the above view); they are not visible in the first 2-3 images. So we have to select a higher resolution (lower pixel_size). Somewhere between 0.1 and 0.25.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F043c846e85cd2963099b0bef759e6dbf%2Fdifferent_pixel_sizes.png?generation=1598711489251202&alt=media)\n\nIf we use a different pixel size, we have to recalculate the image size as well. Recalculate the example above with `pixel_size=0.2`:\n- 20 m/s\n- 100 meters in 5 seconds\n- 100/0.2 = 500\n- final image size: 500/0.75 = 667px\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F47b83af93978fbaee9a89c2f87dfe76c%2Fraster_test_667_02.png?generation=1598711708763131&alt=media)\n\n### Problems\nAs we increase the image_size and the resolution (decreasing the pixel size), the rasterizer has to work more. It is already a bottleneck, so we have to balance between the model performance and training time.\n\nI have one trick, though: The ego is always \"moving\" along the x-axis, so we need the 667px width, but we don't need that much height.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F97e2b600eba5e926b8f6a6b07ce538e6%2Fraster_test_667h_02.png?generation=1598711842889402&alt=media)\n\nUnfortunately, there is a bug in the l5kit. They initialize the box image in (w, h) format, and (h, w) format in the semantic map. The sam-box rasterizer can not concatenate them. We can wait for a fix, or you can implement your own sem-box rasterizer and fix it.",
    "1068154": "Thanks for your insights @pestipeti! I tried making the width 667px and height much smaller.\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2000147%2F1bd6b1aa9ab05afc76fbbe65830f7bef%2FScreen%20Shot%202020-11-03%20at%2011.23.03%20AM.png?generation=1604383215502519&alt=media)\n\nHowever I am getting a tilted image with lots of blank space -\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2000147%2Fe2444da3965764b36601fef5d3d00d03%2FScreen%20Shot%202020-11-03%20at%2011.21.49%20AM.png?generation=1604383257448310&alt=media)\n\nAlthough, this one looks fine - \n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2000147%2F8ecf277b337cafa93f953008bac4eec6%2FScreen%20Shot%202020-11-03%20at%2011.31.10%20AM.png?generation=1604383305411280&alt=media)\n\nAny idea why the first image has empty space and why it's tilted?",
    "990636": "Great analysis. Important to remember that we are predicting trajectories of other agents, and they can move much faster, or slower. We do have the agent's type, specifically there are these 4 types:\n```\n['PERCEPTION_LABEL_UNKNOWN', 'PERCEPTION_LABEL_CAR', 'PERCEPTION_LABEL_CYCLIST', 'PERCEPTION_LABEL_PEDESTRIAN']\n```\nmaybe the parameters that you discuss should depend on the agent type.",
    "991531": "Congrats on GM. Did you just turn GM I think?",
    "1063610": "Hi,\n\nThanks @pestipeti for your wonderful insight. Might be little late, but just a thought to finding the raster size. Is it possible that we transform the target position to the ego vehicle coordinate system (as in raster images) and find the distribution of the size in x and y direction?\n![transformation ](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3481038%2F486bc798f7e857dd03fcc9a82612b1cf%2FIMG_20201029_105435.jpg?generation=1603950009616270&alt=media)\n\nBut for doing this transformation, we need the ego vehicle coordinate and yaw angle in the world coordinates (present in centroid and yaw keys of egodataset) and world coordinates of the agent target position (in Agentdataset). Is there any mapping already available (we can iterate over timestamps and ids, still is there a easier solution?)  which instances of Agent dataset map to those in ego dataset? Or I am missing something important? ",
    "996078": "Congratulations on become a gradmaster @pestipeti 👏!",
    "1088784": "One idea is that you don't need to increase the pixels per meter to see all the pedestrians. You can actually just modify the extents of those agents to certain minimum values in the rasterizer so that it can always show at least a dot on the image for smaller agents.",
    "994286": "Wow thanks for sharing the \"GrandMaster way\" 😏😃",
    "993237": "Congrats on becoming GM.",
    "993188": "Nice write up ",
    "992687": "Great post. Thanks for all the help in this comp and congrats on becoming GM 👍",
    "991167": ">The question is, what is the average velocity. In the image below, you can see the average speeds. (I assume that the unit is meter/seconds). I exclude everything with less than 1 m/s. Based on this information, we can select the size of the image.?\n\n I am being unable to wrap my head around how are you calculating the velocity of these vehicles? I would be really thankful if you could elaborate this one. ",
    "1088916": "Helpful explanation👍",
    "1047301": "> ![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2F97e2b600eba5e926b8f6a6b07ce538e6%2Fraster_test_667h_02.png?generation=1598711842889402&alt=media)\n> \n> Unfortunately, there is a bug in the l5kit. They initialize the box image in (w, h) format, and (h, w) format in the semantic map. The sam-box rasterizer can not concatenate them. We can wait for a fix, or you can implement your own sem-box rasterizer and fix it.\n\nIs this bug fixed? I looked into the functions for rendering and didn´t find any clues how to change the order in the rendering process.\n\nHowever, if I change the parameter in the config to 400,200 for example, the picture is rendered which should not be possible, correct?",
    "1003875": "Thanks for sharing this. I was planning to play around with these values but because of the slow rasterization process there's not much that we can verify by executing things. Thanks again for the explanation!",
    "994178": "Hey @pestipeti, its awesome. Very nicely explained.",
    "990358": "I don't know how far this analysis will help. But an input from my end is, maybe you should have histogram plot of speed because Lyft is stressing on the point that this is a URBAN scenario (On top of that busy urban scenario where people commute)and that's how this dataset differs compared to others. So there is high probability that you will see dense agents around ego with ego travelling at lower speed.   ",
    "1033054": "Thank you!",
    "994931": "Thank you for sharing, congrats!",
    "994691": "Thanks for sharing"
  }
}