{
  "id": 509902,
  "title": "8th Place Solution",
  "url": "/competitions/image-matching-challenge-2024/writeups/motono0223-8th-place-solution",
  "author_name": "",
  "post_date": "2024-06-04T12:50:11.430Z",
  "votes": 58,
  "comment_count": 4,
  "views": 0,
  "content": "<p>Thanks to the competition organizers and Kaggle staff for hosting this amazing competition and solid support.<br>\nThe image matching challenge competition gives us a lot of insight every year. <br>\nI really enjoyed participating.</p>\n<h2>Overview of 8th place solution</h2>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8163878%2F77cb834444008210032bbeba352326ec%2FScreenshot%202024-06-04%2019.00.41.png?generation=1717496287174831&amp;alt=media\"></p>\n<ul>\n<li><p>Basically, I adopted the ALiked + LightGlue method.</p></li>\n<li><p>Since the keypoints of ALiked + LightGlue method decreases with image rotation[1], one image was rotated every 90 degrees to search for corresponding points (1st step).</p></li>\n<li><p>Next, using the keypoints obtained in the 1st step, I corrected the orientation of the two images and performed image matching again (2nd step). Affine transformation using HomographyMatrix is ​​used to correct the image orientation. The reason for this is that the orientation can be corrected without specifying the rotation angle between the images.</p></li>\n<li><p>In pycolmap's incrementalMapping, this function was implemented under the camera model with \"simple-radial\" and \"simple-pinhole\" settings.  <br>\nTo eliminate randomness in the results, \"simple-radial\" twice and \"simple-pinhole\" once were ran.  <br>\nFrom the results of \"simple-radial\" and \"simple-pinhole\", the largest model was adopted as the submission.</p></li>\n<li><p>Additionally, in order to complete the above process within 9 hours, the notebook had 2 threads (to process keypoints extraction) and 2 forked processes (to process colmap). I used T4x2 notebook and  assigned each GPU to each thread for keypoints extraction.</p></li>\n</ul>\n<h2>Keypoints extraction</h2>\n<p>A conceptual diagram of keypoints extraction is shown below.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8163878%2Feb529e38034653f78f6f3d5364da62dd%2FScreenshot%202024-06-04%2019.01.08.png?generation=1717495939957855&amp;alt=media\"></p>\n<h2>Reference</h2>\n<ul>\n<li>[1] <a href=\"https://www.kaggle.com/code/motono0223/rotation-effect-for-image-matching\" target=\"_blank\">https://www.kaggle.com/code/motono0223/rotation-effect-for-image-matching</a></li>\n</ul>",
  "messages": [
    {
      "id": "2854563",
      "postDate": "06/04/2024 11:03:49",
      "content": "<p>Thanks to the competition organizers and Kaggle staff for hosting this amazing competition and solid support.<br>\nThe image matching challenge competition gives us a lot of insight every year. <br>\nI really enjoyed participating.</p>\n<h2>Overview of 8th place solution</h2>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8163878%2F77cb834444008210032bbeba352326ec%2FScreenshot%202024-06-04%2019.00.41.png?generation=1717496287174831&amp;alt=media\"></p>\n<ul>\n<li><p>Basically, I adopted the ALiked + LightGlue method.</p></li>\n<li><p>Since the keypoints of ALiked + LightGlue method decreases with image rotation[1], one image was rotated every 90 degrees to search for corresponding points (1st step).</p></li>\n<li><p>Next, using the keypoints obtained in the 1st step, I corrected the orientation of the two images and performed image matching again (2nd step). Affine transformation using HomographyMatrix is ​​used to correct the image orientation. The reason for this is that the orientation can be corrected without specifying the rotation angle between the images.</p></li>\n<li><p>In pycolmap's incrementalMapping, this function was implemented under the camera model with \"simple-radial\" and \"simple-pinhole\" settings.  <br>\nTo eliminate randomness in the results, \"simple-radial\" twice and \"simple-pinhole\" once were ran.  <br>\nFrom the results of \"simple-radial\" and \"simple-pinhole\", the largest model was adopted as the submission.</p></li>\n<li><p>Additionally, in order to complete the above process within 9 hours, the notebook had 2 threads (to process keypoints extraction) and 2 forked processes (to process colmap). I used T4x2 notebook and  assigned each GPU to each thread for keypoints extraction.</p></li>\n</ul>\n<h2>Keypoints extraction</h2>\n<p>A conceptual diagram of keypoints extraction is shown below.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8163878%2Feb529e38034653f78f6f3d5364da62dd%2FScreenshot%202024-06-04%2019.01.08.png?generation=1717495939957855&amp;alt=media\"></p>\n<h2>Reference</h2>\n<ul>\n<li>[1] <a href=\"https://www.kaggle.com/code/motono0223/rotation-effect-for-image-matching\" target=\"_blank\">https://www.kaggle.com/code/motono0223/rotation-effect-for-image-matching</a></li>\n</ul>",
      "rawMarkdown": "Thanks to the competition organizers and Kaggle staff for hosting this amazing competition and solid support.\nThe image matching challenge competition gives us a lot of insight every year. \nI really enjoyed participating.\n\n## Overview of 8th place solution\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8163878%2F77cb834444008210032bbeba352326ec%2FScreenshot%202024-06-04%2019.00.41.png?generation=1717496287174831&alt=media)\n\n- Basically, I adopted the ALiked + LightGlue method.\n- Since the keypoints of ALiked + LightGlue method decreases with image rotation[1], one image was rotated every 90 degrees to search for corresponding points (1st step).\n- Next, using the keypoints obtained in the 1st step, I corrected the orientation of the two images and performed image matching again (2nd step). Affine transformation using HomographyMatrix is ​​used to correct the image orientation. The reason for this is that the orientation can be corrected without specifying the rotation angle between the images.\n\n- In pycolmap's incrementalMapping, this function was implemented under the camera model with \"simple-radial\" and \"simple-pinhole\" settings.  \nTo eliminate randomness in the results, \"simple-radial\" twice and \"simple-pinhole\" once were ran.  \nFrom the results of \"simple-radial\" and \"simple-pinhole\", the largest model was adopted as the submission.\n\n- Additionally, in order to complete the above process within 9 hours, the notebook had 2 threads (to process keypoints extraction) and 2 forked processes (to process colmap). I used T4x2 notebook and  assigned each GPU to each thread for keypoints extraction.\n\n## Keypoints extraction\nA conceptual diagram of keypoints extraction is shown below.\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8163878%2Feb529e38034653f78f6f3d5364da62dd%2FScreenshot%202024-06-04%2019.01.08.png?generation=1717495939957855&alt=media)\n\n## Reference\n- [1] [https://www.kaggle.com/code/motono0223/rotation-effect-for-image-matching](https://www.kaggle.com/code/motono0223/rotation-effect-for-image-matching)",
      "votes": null
    },
    {
      "id": "2854696",
      "postDate": "06/04/2024 12:05:50",
      "content": "<p><a href=\"https://www.kaggle.com/motono0223\" target=\"_blank\">@motono0223</a> Thank you for your solution. Will you share the code later? I am looking forward to it.</p>",
      "rawMarkdown": "motono0223 Thank you for your solution. Will you share the code later? I am looking forward to it.",
      "votes": null
    },
    {
      "id": "2855603",
      "postDate": "06/04/2024 22:16:25",
      "content": "<p><a href=\"https://www.kaggle.com/monoto0223\" target=\"_blank\">@monoto0223</a> Great works!</p>",
      "rawMarkdown": "monoto0223 Great works!",
      "votes": null
    },
    {
      "id": "2855705",
      "postDate": "06/05/2024 01:18:29",
      "content": "<p>nice work. thanks for sharing.</p>",
      "rawMarkdown": "nice work. thanks for sharing.",
      "votes": null
    },
    {
      "id": "2861623",
      "postDate": "06/08/2024 09:26:35",
      "content": "<p>Congrats <a href=\"https://www.kaggle.com/motono0223\" target=\"_blank\">@motono0223</a>, well deserved! May I know the reason behind using 2 threads (to process keypoints extraction) instead of 2 processes?</p>",
      "rawMarkdown": "Congrats @motono0223, well deserved! May I know the reason behind using 2 threads (to process keypoints extraction) instead of 2 processes?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2854696,
      "author_name": "",
      "author_url": "",
      "post_date": "06/04/2024 12:05:50",
      "content": "<p><a href=\"https://www.kaggle.com/motono0223\" target=\"_blank\">@motono0223</a> Thank you for your solution. Will you share the code later? I am looking forward to it.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2855603,
      "author_name": "hoangqc",
      "author_url": "",
      "post_date": "06/04/2024 22:16:25",
      "content": "<p><a href=\"https://www.kaggle.com/monoto0223\" target=\"_blank\">@monoto0223</a> Great works!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2855705,
      "author_name": "dragonzhang",
      "author_url": "",
      "post_date": "06/05/2024 01:18:29",
      "content": "<p>nice work. thanks for sharing.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2861623,
      "author_name": "huyduong7101",
      "author_url": "",
      "post_date": "06/08/2024 09:26:35",
      "content": "<p>Congrats <a href=\"https://www.kaggle.com/motono0223\" target=\"_blank\">@motono0223</a>, well deserved! May I know the reason behind using 2 threads (to process keypoints extraction) instead of 2 processes?</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2854563": "Thanks to the competition organizers and Kaggle staff for hosting this amazing competition and solid support.\nThe image matching challenge competition gives us a lot of insight every year. \nI really enjoyed participating.\n\n## Overview of 8th place solution\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8163878%2F77cb834444008210032bbeba352326ec%2FScreenshot%202024-06-04%2019.00.41.png?generation=1717496287174831&alt=media)\n\n- Basically, I adopted the ALiked + LightGlue method.\n- Since the keypoints of ALiked + LightGlue method decreases with image rotation[1], one image was rotated every 90 degrees to search for corresponding points (1st step).\n- Next, using the keypoints obtained in the 1st step, I corrected the orientation of the two images and performed image matching again (2nd step). Affine transformation using HomographyMatrix is ​​used to correct the image orientation. The reason for this is that the orientation can be corrected without specifying the rotation angle between the images.\n\n- In pycolmap's incrementalMapping, this function was implemented under the camera model with \"simple-radial\" and \"simple-pinhole\" settings.  \nTo eliminate randomness in the results, \"simple-radial\" twice and \"simple-pinhole\" once were ran.  \nFrom the results of \"simple-radial\" and \"simple-pinhole\", the largest model was adopted as the submission.\n\n- Additionally, in order to complete the above process within 9 hours, the notebook had 2 threads (to process keypoints extraction) and 2 forked processes (to process colmap). I used T4x2 notebook and  assigned each GPU to each thread for keypoints extraction.\n\n## Keypoints extraction\nA conceptual diagram of keypoints extraction is shown below.\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8163878%2Feb529e38034653f78f6f3d5364da62dd%2FScreenshot%202024-06-04%2019.01.08.png?generation=1717495939957855&alt=media)\n\n## Reference\n- [1] [https://www.kaggle.com/code/motono0223/rotation-effect-for-image-matching](https://www.kaggle.com/code/motono0223/rotation-effect-for-image-matching)",
    "2854696": "motono0223 Thank you for your solution. Will you share the code later? I am looking forward to it.",
    "2855603": "monoto0223 Great works!",
    "2855705": "nice work. thanks for sharing.",
    "2861623": "Congrats @motono0223, well deserved! May I know the reason behind using 2 threads (to process keypoints extraction) instead of 2 processes?"
  },
  "source": "meta"
}