{
  "id": 411974,
  "title": "Remember to set a random seed",
  "url": "/competitions/image-matching-challenge-2023/discussion/411974",
  "author_name": "",
  "post_date": "2023-05-21T20:34:52.166733500Z",
  "votes": 1,
  "comment_count": 2,
  "views": 0,
  "content": "<p>The Colmap library uses some randomness to handle image matching, feature extraction, optimization, etc. So if you want to achieve repeatable experiments, it might be a good idea to set up a random seed.</p>\n<pre><code>def set_seed(seed):\n    np.random.seed(seed)\n    random.seed(seed)\n    torch.manual_seed(seed)\n    torch.cuda.manual_seed(seed)\n    torch.cuda.manual_seed_all(seed)\n</code></pre>",
  "messages": [
    {
      "id": "2268587",
      "postDate": "05/21/2023 20:34:52",
      "content": "<p>The Colmap library uses some randomness to handle image matching, feature extraction, optimization, etc. So if you want to achieve repeatable experiments, it might be a good idea to set up a random seed.</p>\n<pre><code>def set_seed(seed):\n    np.random.seed(seed)\n    random.seed(seed)\n    torch.manual_seed(seed)\n    torch.cuda.manual_seed(seed)\n    torch.cuda.manual_seed_all(seed)\n</code></pre>",
      "rawMarkdown": "The Colmap library uses some randomness to handle image matching, feature extraction, optimization, etc. So if you want to achieve repeatable experiments, it might be a good idea to set up a random seed.\n```\ndef set_seed(seed):\n    np.random.seed(seed)\n    random.seed(seed)\n    torch.manual_seed(seed)\n    torch.cuda.manual_seed(seed)\n    torch.cuda.manual_seed_all(seed)\n```",
      "votes": null
    },
    {
      "id": "2268885",
      "postDate": "05/22/2023 04:57:52",
      "content": "<p>I found it seems useless with this function.</p>",
      "rawMarkdown": "I found it seems useless with this function.",
      "votes": null
    },
    {
      "id": "2269166",
      "postDate": "05/22/2023 08:55:01",
      "content": "<p><a href=\"https://github.com/colmap/colmap/issues/757\" target=\"_blank\">https://github.com/colmap/colmap/issues/757</a></p>",
      "rawMarkdown": "https://github.com/colmap/colmap/issues/757",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2268885,
      "author_name": "distiller",
      "author_url": "",
      "post_date": "05/22/2023 04:57:52",
      "content": "<p>I found it seems useless with this function.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2269166,
          "author_name": "fabiobellavia",
          "author_url": "",
          "post_date": "05/22/2023 08:55:01",
          "content": "<p><a href=\"https://github.com/colmap/colmap/issues/757\" target=\"_blank\">https://github.com/colmap/colmap/issues/757</a></p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2268587": "The Colmap library uses some randomness to handle image matching, feature extraction, optimization, etc. So if you want to achieve repeatable experiments, it might be a good idea to set up a random seed.\n```\ndef set_seed(seed):\n    np.random.seed(seed)\n    random.seed(seed)\n    torch.manual_seed(seed)\n    torch.cuda.manual_seed(seed)\n    torch.cuda.manual_seed_all(seed)\n```",
    "2268885": "I found it seems useless with this function.",
    "2269166": "https://github.com/colmap/colmap/issues/757"
  },
  "source": "meta"
}