{
  "id": 411477,
  "title": "Questions about COLMAP database",
  "url": "/competitions/image-matching-challenge-2023/discussion/411477",
  "author_name": "",
  "post_date": "2023-05-19T12:47:58.421669900Z",
  "votes": 2,
  "comment_count": 1,
  "views": 0,
  "content": "<p>I'm still trying to figure out COLMAP database schema so I can integrate LoFTR into my pipeline. I know it's a long a shot but it would be a great if you can help a fellow Kaggler.</p>\n<p>I found that number of rows and cols in descriptors and keypoints tables doesn't match with the data. For example the first record has 8264 rows and 128 cols (all of the records in descriptors table has 128 cols because of SIFT). When I do <code>np.frombuffer(x).reshape(8264, -1)</code> the output's shape becomes (8264, 16) and when I do <code>np.frombuffer(x).reshape(-1, 128)</code> the output's shape becomes (1033, 128), so there is exactly 8x less data in those records. There are 3x less data for keypoints and 2x less for matches tables. I'm reading those tables with pandas so am I losing some information at some point?</p>\n<p>Another question is I probably don't need to use descriptors table when I'm using LoFTR since it also matches keypoints in a single forward pass. Is that correct?</p>",
  "messages": [
    {
      "id": "2265671",
      "postDate": "05/19/2023 12:47:58",
      "content": "<p>I'm still trying to figure out COLMAP database schema so I can integrate LoFTR into my pipeline. I know it's a long a shot but it would be a great if you can help a fellow Kaggler.</p>\n<p>I found that number of rows and cols in descriptors and keypoints tables doesn't match with the data. For example the first record has 8264 rows and 128 cols (all of the records in descriptors table has 128 cols because of SIFT). When I do <code>np.frombuffer(x).reshape(8264, -1)</code> the output's shape becomes (8264, 16) and when I do <code>np.frombuffer(x).reshape(-1, 128)</code> the output's shape becomes (1033, 128), so there is exactly 8x less data in those records. There are 3x less data for keypoints and 2x less for matches tables. I'm reading those tables with pandas so am I losing some information at some point?</p>\n<p>Another question is I probably don't need to use descriptors table when I'm using LoFTR since it also matches keypoints in a single forward pass. Is that correct?</p>",
      "rawMarkdown": "I'm still trying to figure out COLMAP database schema so I can integrate LoFTR into my pipeline. I know it's a long a shot but it would be a great if you can help a fellow Kaggler.\n\nI found that number of rows and cols in descriptors and keypoints tables doesn't match with the data. For example the first record has 8264 rows and 128 cols (all of the records in descriptors table has 128 cols because of SIFT). When I do `np.frombuffer(x).reshape(8264, -1)` the output's shape becomes (8264, 16) and when I do `np.frombuffer(x).reshape(-1, 128)` the output's shape becomes (1033, 128), so there is exactly 8x less data in those records. There are 3x less data for keypoints and 2x less for matches tables. I'm reading those tables with pandas so am I losing some information at some point?\n\nAnother question is I probably don't need to use descriptors table when I'm using LoFTR since it also matches keypoints in a single forward pass. Is that correct?",
      "votes": null
    },
    {
      "id": "2265788",
      "postDate": "05/19/2023 14:07:22",
      "content": "<p>There is already ready code for this in example submission:</p>\n<p><a href=\"https://www.kaggle.com/code/eduardtrulls/imc-2023-submission-example\" target=\"_blank\">https://www.kaggle.com/code/eduardtrulls/imc-2023-submission-example</a></p>\n<p>cells [5], [8]</p>",
      "rawMarkdown": "There is already ready code for this in example submission:\n\nhttps://www.kaggle.com/code/eduardtrulls/imc-2023-submission-example\n\ncells [5], [8]",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2265788,
      "author_name": "oldufo",
      "author_url": "",
      "post_date": "05/19/2023 14:07:22",
      "content": "<p>There is already ready code for this in example submission:</p>\n<p><a href=\"https://www.kaggle.com/code/eduardtrulls/imc-2023-submission-example\" target=\"_blank\">https://www.kaggle.com/code/eduardtrulls/imc-2023-submission-example</a></p>\n<p>cells [5], [8]</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2265671": "I'm still trying to figure out COLMAP database schema so I can integrate LoFTR into my pipeline. I know it's a long a shot but it would be a great if you can help a fellow Kaggler.\n\nI found that number of rows and cols in descriptors and keypoints tables doesn't match with the data. For example the first record has 8264 rows and 128 cols (all of the records in descriptors table has 128 cols because of SIFT). When I do `np.frombuffer(x).reshape(8264, -1)` the output's shape becomes (8264, 16) and when I do `np.frombuffer(x).reshape(-1, 128)` the output's shape becomes (1033, 128), so there is exactly 8x less data in those records. There are 3x less data for keypoints and 2x less for matches tables. I'm reading those tables with pandas so am I losing some information at some point?\n\nAnother question is I probably don't need to use descriptors table when I'm using LoFTR since it also matches keypoints in a single forward pass. Is that correct?",
    "2265788": "There is already ready code for this in example submission:\n\nhttps://www.kaggle.com/code/eduardtrulls/imc-2023-submission-example\n\ncells [5], [8]"
  },
  "source": "meta"
}