{
  "id": 178844,
  "title": "Frame and Timestamp",
  "url": "/competitions/lyft-motion-prediction-autonomous-vehicles/discussion/178844",
  "author_name": "",
  "post_date": "2020-08-31T15:09:49.984003700Z",
  "votes": 4,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I think a frame is a snapshot in time identified uniquely by a particular timestamp but when running the code below on the full training set:<br>\n<code>len(zarr_dataset.frames['timestamp'])</code> gives 33437057</p>\n<p>and <code>len(np.unique(zarr_dataset.frames['timestamp']))</code> gives 33435551</p>\n<p>Does this mean there are duplicate frames ? If two frames have the same timestamp should they have the same agents ? below I show all frames have different agents </p>\n<p><code>len(np.unique(zarr_dataset.frames['agent_index_interval'],axis = 0))</code> gives 33437057</p>",
  "messages": [
    {
      "id": "992987",
      "postDate": "08/31/2020 15:09:49",
      "content": "<p>I think a frame is a snapshot in time identified uniquely by a particular timestamp but when running the code below on the full training set:<br>\n<code>len(zarr_dataset.frames['timestamp'])</code> gives 33437057</p>\n<p>and <code>len(np.unique(zarr_dataset.frames['timestamp']))</code> gives 33435551</p>\n<p>Does this mean there are duplicate frames ? If two frames have the same timestamp should they have the same agents ? below I show all frames have different agents </p>\n<p><code>len(np.unique(zarr_dataset.frames['agent_index_interval'],axis = 0))</code> gives 33437057</p>",
      "rawMarkdown": "I think a frame is a snapshot in time identified uniquely by a particular timestamp but when running the code below on the full training set:\n`len(zarr_dataset.frames['timestamp'])` gives 33437057\n\nand `len(np.unique(zarr_dataset.frames['timestamp']))` gives 33435551\n\nDoes this mean there are duplicate frames ? If two frames have the same timestamp should they have the same agents ? below I show all frames have different agents \n\n`len(np.unique(zarr_dataset.frames['agent_index_interval'],axis = 0))` gives 33437057",
      "votes": null
    },
    {
      "id": "993258",
      "postDate": "08/31/2020 19:18:03",
      "content": "<p>My guess is that it is because of two vehicles operating at the same time, can you check?</p>",
      "rawMarkdown": "My guess is that it is because of two vehicles operating at the same time, can you check?",
      "votes": null
    },
    {
      "id": "993416",
      "postDate": "08/31/2020 23:30:29",
      "content": "<p>Yeah, looks like it's just that frames from separate AVs were recorded at the same time, note the different locations. So not uniquely identified by timestamp.</p>\n<table>\n<thead>\n<tr>\n<th>Timestamp</th>\n<th>StartAgent</th>\n<th>EndAgent</th>\n<th>LocX</th>\n<th>LocY</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1574355155002177024</td>\n<td>27549458</td>\n<td>27549527</td>\n<td>676</td>\n<td>-1360</td>\n</tr>\n<tr>\n<td>1574355155002177024</td>\n<td>224546871</td>\n<td>224546966</td>\n<td>672</td>\n<td>-590</td>\n</tr>\n</tbody>\n</table>\n<p>That being from <code>train_zarr.frames.get_coordinate_selection([ 339691, 2814467])</code>.</p>\n<p>Note also that agents IDs are unique to a frame so frames never share agent IDs (indexes into the agents array). If the same agent occurs in multiple frames within a scene then it will have different IDs in each frame. The <code>track_id</code> is what identifies agents across frames (but only within a scene).</p>\n<p>(Actually that code wouldn't detect shared agents, the agent_index_interval is the start/end indexes but that just checks equality, so you could have (0, 10) and (1,10) and they wouldn't be equal)</p>",
      "rawMarkdown": "Yeah, looks like it's just that frames from separate AVs were recorded at the same time, note the different locations. So not uniquely identified by timestamp.\n\n|           Timestamp |   StartAgent |   EndAgent |   LocX |   LocY |\n|--------------------:|-------------:|-----------:|-------:|-------:|\n| 1574355155002177024 |     27549458 |   27549527 |    676 |  -1360 |\n| 1574355155002177024 |    224546871 |  224546966 |    672 |   -590 |\n\nThat being from `train_zarr.frames.get_coordinate_selection([ 339691, 2814467])`.\n\nNote also that agents IDs are unique to a frame so frames never share agent IDs (indexes into the agents array). If the same agent occurs in multiple frames within a scene then it will have different IDs in each frame. The `track_id` is what identifies agents across frames (but only within a scene).\n\n(Actually that code wouldn't detect shared agents, the agent_index_interval is the start/end indexes but that just checks equality, so you could have (0, 10) and (1,10) and they wouldn't be equal)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 993258,
      "author_name": "zaharch",
      "author_url": "",
      "post_date": "08/31/2020 19:18:03",
      "content": "<p>My guess is that it is because of two vehicles operating at the same time, can you check?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 993416,
      "author_name": "thomasbrandon",
      "author_url": "",
      "post_date": "08/31/2020 23:30:29",
      "content": "<p>Yeah, looks like it's just that frames from separate AVs were recorded at the same time, note the different locations. So not uniquely identified by timestamp.</p>\n<table>\n<thead>\n<tr>\n<th>Timestamp</th>\n<th>StartAgent</th>\n<th>EndAgent</th>\n<th>LocX</th>\n<th>LocY</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1574355155002177024</td>\n<td>27549458</td>\n<td>27549527</td>\n<td>676</td>\n<td>-1360</td>\n</tr>\n<tr>\n<td>1574355155002177024</td>\n<td>224546871</td>\n<td>224546966</td>\n<td>672</td>\n<td>-590</td>\n</tr>\n</tbody>\n</table>\n<p>That being from <code>train_zarr.frames.get_coordinate_selection([ 339691, 2814467])</code>.</p>\n<p>Note also that agents IDs are unique to a frame so frames never share agent IDs (indexes into the agents array). If the same agent occurs in multiple frames within a scene then it will have different IDs in each frame. The <code>track_id</code> is what identifies agents across frames (but only within a scene).</p>\n<p>(Actually that code wouldn't detect shared agents, the agent_index_interval is the start/end indexes but that just checks equality, so you could have (0, 10) and (1,10) and they wouldn't be equal)</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "992987": "I think a frame is a snapshot in time identified uniquely by a particular timestamp but when running the code below on the full training set:\n`len(zarr_dataset.frames['timestamp'])` gives 33437057\n\nand `len(np.unique(zarr_dataset.frames['timestamp']))` gives 33435551\n\nDoes this mean there are duplicate frames ? If two frames have the same timestamp should they have the same agents ? below I show all frames have different agents \n\n`len(np.unique(zarr_dataset.frames['agent_index_interval'],axis = 0))` gives 33437057",
    "993258": "My guess is that it is because of two vehicles operating at the same time, can you check?",
    "993416": "Yeah, looks like it's just that frames from separate AVs were recorded at the same time, note the different locations. So not uniquely identified by timestamp.\n\n|           Timestamp |   StartAgent |   EndAgent |   LocX |   LocY |\n|--------------------:|-------------:|-----------:|-------:|-------:|\n| 1574355155002177024 |     27549458 |   27549527 |    676 |  -1360 |\n| 1574355155002177024 |    224546871 |  224546966 |    672 |   -590 |\n\nThat being from `train_zarr.frames.get_coordinate_selection([ 339691, 2814467])`.\n\nNote also that agents IDs are unique to a frame so frames never share agent IDs (indexes into the agents array). If the same agent occurs in multiple frames within a scene then it will have different IDs in each frame. The `track_id` is what identifies agents across frames (but only within a scene).\n\n(Actually that code wouldn't detect shared agents, the agent_index_interval is the start/end indexes but that just checks equality, so you could have (0, 10) and (1,10) and they wouldn't be equal)"
  },
  "source": "meta"
}