{
  "id": 114594,
  "title": "Visualizing 3d models on top of the image (not correct)",
  "url": "/competitions/pku-autonomous-driving/discussion/114594",
  "author_name": "Konstantin Lopukhin",
  "post_date": "2019-10-27T20:09:16.393000",
  "votes": 14,
  "comment_count": 7,
  "views": 0,
  "content": "<p>EDIT: I think you'd be better of using <a href=\"https://www.kaggle.com/ebouteillon/augmented-reality\">https://www.kaggle.com/ebouteillon/augmented-reality</a> by <a href=\"/ebouteillon\">@ebouteillon</a> , see also discussion regarding correctness below.</p>\n\n<p>With the help of <a href=\"https://github.com/ApolloScapeAuto/dataset-api/tree/master/car_instance\">https://github.com/ApolloScapeAuto/dataset-api/tree/master/car_instance</a> I rendered 3d car models on top of the image, this is what it looks like:</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F19390%2Ffe58d6611a6c408fe6c876047e4f2638%2Fgt-viz.jpg?generation=1572206919257859&amp;alt=media\" alt=\"\"></p>\n\n<p>Making it a properly runnable kaggle notebook will take more effort, if anyone is willing to do that I would be super happy to upvote this :) I can share how I did this here: <a href=\"https://gist.github.com/lopuhin/1d87dd021ea456dcd443eb9a84983e02#file-gt-viz-ipynb\">https://gist.github.com/lopuhin/1d87dd021ea456dcd443eb9a84983e02#file-gt-viz-ipynb</a></p>\n\n<p>utils and car_models come from <a href=\"https://github.com/ApolloScapeAuto/dataset-api/blob/master/car_instance/car_models.py\">https://github.com/ApolloScapeAuto/dataset-api/blob/master/car_instance/car_models.py</a> and <a href=\"https://github.com/ApolloScapeAuto/dataset-api/blob/master/utils/utils.py\">https://github.com/ApolloScapeAuto/dataset-api/blob/master/utils/utils.py</a></p>\n\n<p>render_esl is from <a href=\"https://github.com/ApolloScapeAuto/dataset-api/tree/master/car_instance/renderer\">https://github.com/ApolloScapeAuto/dataset-api/tree/master/car_instance/renderer</a> (it's linux-only), with some minor python 3 fixes: <a href=\"https://gist.github.com/lopuhin/1d87dd021ea456dcd443eb9a84983e02#file-dataset-api-diff\">https://gist.github.com/lopuhin/1d87dd021ea456dcd443eb9a84983e02#file-dataset-api-diff</a> (I installed it with <code>python setup.py develop</code> at the end). Note that image size should be a multiple of 4, else the renderer will crash (it's not handled properly in the notebook, see dataset-api repo for a possible way to handle this, not sure I like it though).</p>",
  "messages": [
    {
      "id": 659511,
      "postDate": "2019-10-27T20:09:16.393Z",
      "content": "<p>EDIT: I think you'd be better of using <a href=\"https://www.kaggle.com/ebouteillon/augmented-reality\">https://www.kaggle.com/ebouteillon/augmented-reality</a> by <a href=\"/ebouteillon\">@ebouteillon</a> , see also discussion regarding correctness below.</p>\n\n<p>With the help of <a href=\"https://github.com/ApolloScapeAuto/dataset-api/tree/master/car_instance\">https://github.com/ApolloScapeAuto/dataset-api/tree/master/car_instance</a> I rendered 3d car models on top of the image, this is what it looks like:</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F19390%2Ffe58d6611a6c408fe6c876047e4f2638%2Fgt-viz.jpg?generation=1572206919257859&amp;alt=media\" alt=\"\"></p>\n\n<p>Making it a properly runnable kaggle notebook will take more effort, if anyone is willing to do that I would be super happy to upvote this :) I can share how I did this here: <a href=\"https://gist.github.com/lopuhin/1d87dd021ea456dcd443eb9a84983e02#file-gt-viz-ipynb\">https://gist.github.com/lopuhin/1d87dd021ea456dcd443eb9a84983e02#file-gt-viz-ipynb</a></p>\n\n<p>utils and car_models come from <a href=\"https://github.com/ApolloScapeAuto/dataset-api/blob/master/car_instance/car_models.py\">https://github.com/ApolloScapeAuto/dataset-api/blob/master/car_instance/car_models.py</a> and <a href=\"https://github.com/ApolloScapeAuto/dataset-api/blob/master/utils/utils.py\">https://github.com/ApolloScapeAuto/dataset-api/blob/master/utils/utils.py</a></p>\n\n<p>render_esl is from <a href=\"https://github.com/ApolloScapeAuto/dataset-api/tree/master/car_instance/renderer\">https://github.com/ApolloScapeAuto/dataset-api/tree/master/car_instance/renderer</a> (it's linux-only), with some minor python 3 fixes: <a href=\"https://gist.github.com/lopuhin/1d87dd021ea456dcd443eb9a84983e02#file-dataset-api-diff\">https://gist.github.com/lopuhin/1d87dd021ea456dcd443eb9a84983e02#file-dataset-api-diff</a> (I installed it with <code>python setup.py develop</code> at the end). Note that image size should be a multiple of 4, else the renderer will crash (it's not handled properly in the notebook, see dataset-api repo for a possible way to handle this, not sure I like it though).</p>",
      "rawMarkdown": "EDIT: I think you'd be better of using https://www.kaggle.com/ebouteillon/augmented-reality by @ebouteillon , see also discussion regarding correctness below.\n\nWith the help of https://github.com/ApolloScapeAuto/dataset-api/tree/master/car_instance I rendered 3d car models on top of the image, this is what it looks like:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F19390%2Ffe58d6611a6c408fe6c876047e4f2638%2Fgt-viz.jpg?generation=1572206919257859&amp;alt=media)\n\n\nMaking it a properly runnable kaggle notebook will take more effort, if anyone is willing to do that I would be super happy to upvote this :) I can share how I did this here: https://gist.github.com/lopuhin/1d87dd021ea456dcd443eb9a84983e02#file-gt-viz-ipynb\n\nutils and car_models come from https://github.com/ApolloScapeAuto/dataset-api/blob/master/car_instance/car_models.py and https://github.com/ApolloScapeAuto/dataset-api/blob/master/utils/utils.py\n\nrender_esl is from https://github.com/ApolloScapeAuto/dataset-api/tree/master/car_instance/renderer (it's linux-only), with some minor python 3 fixes: https://gist.github.com/lopuhin/1d87dd021ea456dcd443eb9a84983e02#file-dataset-api-diff (I installed it with ``python setup.py develop`` at the end). Note that image size should be a multiple of 4, else the renderer will crash (it's not handled properly in the notebook, see dataset-api repo for a possible way to handle this, not sure I like it though).",
      "votes": 14
    },
    {
      "id": 660066,
      "postDate": "2019-10-28T16:08:37.380Z",
      "content": "<p><a href=\"/ebouteillon\">@ebouteillon</a> btw I compared results from our approaches and they look different in some cases (and both look strange). If we check the car on the left on <code>ID_0e6f0cc36</code>:</p>\n\n<p>your notebook:</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F19390%2F5066f28ad1688a2cd8c5fcf7d03548c0%2FScreenshot%202019-10-28%20at%2018.54.00.png?generation=1572278750372834&amp;alt=media\" alt=\"\"></p>\n\n<p>my notebook:</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F19390%2F01c92677897224e8739eca81a2c96d65%2FScreenshot%202019-10-28%20at%2018.55.54.png?generation=1572278772994078&amp;alt=media\" alt=\"\"></p>\n\n<p>But in most cases they agree quite well, and don't agree that well with what we can see on the images, that could be either annotation quality, or something we're still missing.</p>",
      "rawMarkdown": "@ebouteillon btw I compared results from our approaches and they look different in some cases (and both look strange). If we check the car on the left on ``ID_0e6f0cc36``:\n\nyour notebook:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F19390%2F5066f28ad1688a2cd8c5fcf7d03548c0%2FScreenshot%202019-10-28%20at%2018.54.00.png?generation=1572278750372834&amp;alt=media)\n\n\nmy notebook:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F19390%2F01c92677897224e8739eca81a2c96d65%2FScreenshot%202019-10-28%20at%2018.55.54.png?generation=1572278772994078&amp;alt=media)\n\nBut in most cases they agree quite well, and don't agree that well with what we can see on the images, that could be either annotation quality, or something we're still missing.",
      "votes": 1,
      "replies": [
        {
          "id": 660076,
          "postDate": "2019-10-28T16:32:20.650Z",
          "content": "<p>Upon more checking, it seems that this is an annotation (or ground-truth-generation) error, but from the look of this error it seems that my approach is not correct here, and I'll stick to <a href=\"https://www.kaggle.com/ebouteillon/augmented-reality\">https://www.kaggle.com/ebouteillon/augmented-reality</a></p>\n\n<p>EDIT: yeah on ID_d10a385ea on the left it's clear that rendering is not correct with my approach.</p>",
          "rawMarkdown": "Upon more checking, it seems that this is an annotation (or ground-truth-generation) error, but from the look of this error it seems that my approach is not correct here, and I'll stick to https://www.kaggle.com/ebouteillon/augmented-reality\n\nEDIT: yeah on ID_d10a385ea on the left it's clear that rendering is not correct with my approach.",
          "votes": 1
        },
        {
          "id": 660933,
          "postDate": "2019-10-29T19:29:34.710Z",
          "content": "<p>Thanks for sharing your method. The real hero is Li Linye ( <a href=\"/zstusnoopy\">@zstusnoopy</a> ) for sharing the right formula to project 3D points onto the image. My notebook is simply standing upon his sharing.</p>",
          "rawMarkdown": "Thanks for sharing your method. The real hero is Li Linye ( @zstusnoopy ) for sharing the right formula to project 3D points onto the image. My notebook is simply standing upon his sharing.",
          "votes": 1
        }
      ]
    },
    {
      "id": 659590,
      "postDate": "2019-10-28T00:35:40.387Z",
      "content": "<p>Hi <a href=\"/lopuhin\">@lopuhin</a> , you may be interested in my <a href=\"https://www.kaggle.com/ebouteillon/augmented-reality\">augmented reality</a> notebook then. 😄 </p>",
      "rawMarkdown": "Hi @lopuhin , you may be interested in my [augmented reality](https://www.kaggle.com/ebouteillon/augmented-reality) notebook then. 😄 ",
      "votes": 1,
      "replies": [
        {
          "id": 659720,
          "postDate": "2019-10-28T06:46:06.343Z",
          "content": "<p>Oh yes, that's exactly what I needed myself, thank you :) And it's nice that it does not require any extra renderer with crazy dependencies.</p>",
          "rawMarkdown": "Oh yes, that's exactly what I needed myself, thank you :) And it's nice that it does not require any extra renderer with crazy dependencies.",
          "votes": 1
        },
        {
          "id": 659751,
          "postDate": "2019-10-28T08:16:12.787Z",
          "content": "<p>you're welcomed!</p>",
          "rawMarkdown": "you're welcomed!"
        }
      ]
    },
    {
      "id": 659827,
      "postDate": "2019-10-28T10:04:42.110Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 660066,
      "author_name": "Konstantin Lopukhin",
      "author_url": "",
      "post_date": "2019-10-28T16:08:37.380000",
      "content": "<p><a href=\"/ebouteillon\">@ebouteillon</a> btw I compared results from our approaches and they look different in some cases (and both look strange). If we check the car on the left on <code>ID_0e6f0cc36</code>:</p>\n\n<p>your notebook:</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F19390%2F5066f28ad1688a2cd8c5fcf7d03548c0%2FScreenshot%202019-10-28%20at%2018.54.00.png?generation=1572278750372834&amp;alt=media\" alt=\"\"></p>\n\n<p>my notebook:</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F19390%2F01c92677897224e8739eca81a2c96d65%2FScreenshot%202019-10-28%20at%2018.55.54.png?generation=1572278772994078&amp;alt=media\" alt=\"\"></p>\n\n<p>But in most cases they agree quite well, and don't agree that well with what we can see on the images, that could be either annotation quality, or something we're still missing.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 660076,
          "author_name": "Konstantin Lopukhin",
          "author_url": "",
          "post_date": "2019-10-28T16:32:20.650000",
          "content": "<p>Upon more checking, it seems that this is an annotation (or ground-truth-generation) error, but from the look of this error it seems that my approach is not correct here, and I'll stick to <a href=\"https://www.kaggle.com/ebouteillon/augmented-reality\">https://www.kaggle.com/ebouteillon/augmented-reality</a></p>\n\n<p>EDIT: yeah on ID_d10a385ea on the left it's clear that rendering is not correct with my approach.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 660933,
          "author_name": "Eric Bouteillon",
          "author_url": "",
          "post_date": "2019-10-29T19:29:34.710000",
          "content": "<p>Thanks for sharing your method. The real hero is Li Linye ( <a href=\"/zstusnoopy\">@zstusnoopy</a> ) for sharing the right formula to project 3D points onto the image. My notebook is simply standing upon his sharing.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 659590,
      "author_name": "Eric Bouteillon",
      "author_url": "",
      "post_date": "2019-10-28T00:35:40.387000",
      "content": "<p>Hi <a href=\"/lopuhin\">@lopuhin</a> , you may be interested in my <a href=\"https://www.kaggle.com/ebouteillon/augmented-reality\">augmented reality</a> notebook then. 😄 </p>",
      "votes": 1,
      "replies": [
        {
          "id": 659720,
          "author_name": "Konstantin Lopukhin",
          "author_url": "",
          "post_date": "2019-10-28T06:46:06.343000",
          "content": "<p>Oh yes, that's exactly what I needed myself, thank you :) And it's nice that it does not require any extra renderer with crazy dependencies.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 659751,
          "author_name": "Eric Bouteillon",
          "author_url": "",
          "post_date": "2019-10-28T08:16:12.787000",
          "content": "<p>you're welcomed!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 659827,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-10-28T10:04:42.110000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "659511": "EDIT: I think you'd be better of using https://www.kaggle.com/ebouteillon/augmented-reality by @ebouteillon , see also discussion regarding correctness below.\n\nWith the help of https://github.com/ApolloScapeAuto/dataset-api/tree/master/car_instance I rendered 3d car models on top of the image, this is what it looks like:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F19390%2Ffe58d6611a6c408fe6c876047e4f2638%2Fgt-viz.jpg?generation=1572206919257859&amp;alt=media)\n\n\nMaking it a properly runnable kaggle notebook will take more effort, if anyone is willing to do that I would be super happy to upvote this :) I can share how I did this here: https://gist.github.com/lopuhin/1d87dd021ea456dcd443eb9a84983e02#file-gt-viz-ipynb\n\nutils and car_models come from https://github.com/ApolloScapeAuto/dataset-api/blob/master/car_instance/car_models.py and https://github.com/ApolloScapeAuto/dataset-api/blob/master/utils/utils.py\n\nrender_esl is from https://github.com/ApolloScapeAuto/dataset-api/tree/master/car_instance/renderer (it's linux-only), with some minor python 3 fixes: https://gist.github.com/lopuhin/1d87dd021ea456dcd443eb9a84983e02#file-dataset-api-diff (I installed it with ``python setup.py develop`` at the end). Note that image size should be a multiple of 4, else the renderer will crash (it's not handled properly in the notebook, see dataset-api repo for a possible way to handle this, not sure I like it though).",
    "660066": "@ebouteillon btw I compared results from our approaches and they look different in some cases (and both look strange). If we check the car on the left on ``ID_0e6f0cc36``:\n\nyour notebook:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F19390%2F5066f28ad1688a2cd8c5fcf7d03548c0%2FScreenshot%202019-10-28%20at%2018.54.00.png?generation=1572278750372834&amp;alt=media)\n\n\nmy notebook:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F19390%2F01c92677897224e8739eca81a2c96d65%2FScreenshot%202019-10-28%20at%2018.55.54.png?generation=1572278772994078&amp;alt=media)\n\nBut in most cases they agree quite well, and don't agree that well with what we can see on the images, that could be either annotation quality, or something we're still missing.",
    "659590": "Hi @lopuhin , you may be interested in my [augmented reality](https://www.kaggle.com/ebouteillon/augmented-reality) notebook then. 😄 ",
    "659827": ""
  }
}