[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-cvg--glue-factory":3,"tool-cvg--glue-factory":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",160015,2,"2026-04-18T11:30:52",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",109154,"2026-04-18T11:18:24",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":76,"owner_email":76,"owner_twitter":76,"owner_website":77,"owner_url":78,"languages":79,"stars":88,"forks":89,"last_commit_at":90,"license":91,"difficulty_score":10,"env_os":92,"env_gpu":93,"env_ram":94,"env_deps":95,"category_tags":101,"github_topics":102,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":107,"updated_at":108,"faqs":109,"releases":138},9170,"cvg\u002Fglue-factory","glue-factory","Training library for local feature detection and matching","Glue Factory 是专为计算机视觉研究者打造的深度学习训练库，专注于局部特征（如点和线）的检测与匹配。它有效解决了复现顶尖算法难、自定义数据训练繁琐以及模型评估标准不统一等痛点，让用户能轻松重现 LightGlue 和 GlueStick 等前沿模型的训练过程。\n\n无论是希望探索新架构的学术研究人员，还是需要将视觉匹配技术落地到实际项目中的开发者，都能从中受益。Glue Factory 支持在多个数据集上使用自定义特征进行灵活训练，并内置了 HPatches、MegaDepth 等标准基准的自动化评估流程，大幅降低了实验门槛。\n\n其独特亮点在于完善的生态整合：不仅提供模型的自动下载功能，实现“开箱即用”，还智能集成了 PoseLib 等高级鲁棒估计器以优化评估精度。此外，项目采用友好的 Apache-2.0 协议开源核心代码与训练好的模型，在保障自由使用的同时，也规范了第三方受限模型的管理，是进行视觉特征匹配研究的高效得力助手。","# Glue Factory\nGlue Factory is CVG's library for training and evaluating deep neural network that extract and match local visual feature. It enables you to:\n- Reproduce the training of state-of-the-art models for point and line matching, like [LightGlue](https:\u002F\u002Fgithub.com\u002Fcvg\u002FLightGlue) and [GlueStick](https:\u002F\u002Fgithub.com\u002Fcvg\u002FGlueStick) (ICCV 2023)\n- Train these models on multiple datasets using your own local features or lines\n- Evaluate feature extractors or matchers on standard benchmarks like HPatches or MegaDepth-1500\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcvg\u002FLightGlue\">\u003Cimg src=\"docs\u002Flightglue_matches.svg\" width=\"60%\"\u002F>\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcvg\u002FGlueStick\">\u003Cimg src=\"docs\u002Fgluestick_img.svg\" width=\"60%\"\u002F>\u003C\u002Fa>\n  \u003Cbr \u002F>\u003Cem>Point and line matching with LightGlue and GlueStick.\u003C\u002Fem>\n\u003C\u002Fp>\n\n## Installation\nGlue Factory runs with Python 3 and [PyTorch](https:\u002F\u002Fpytorch.org\u002F). The following installs the library and its basic dependencies:\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fcvg\u002Fglue-factory\ncd glue-factory\npython3 -m pip install -e .  # editable mode\n```\nSome advanced features might require installing the full set of dependencies:\n```bash\npython3 -m pip install -e .[extra]\n```\n\nAll models and datasets in gluefactory have auto-downloaders, so you can get started right away!\n\n## License\nThe code and trained models in Glue Factory are released with an Apache-2.0 license. This includes LightGlue and an [open version of SuperPoint](https:\u002F\u002Fgithub.com\u002Frpautrat\u002FSuperPoint). Third-party models that are not compatible with this license, such as SuperPoint (original) and SuperGlue, are provided in `gluefactory_nonfree`, where each model might follow its own, restrictive license.\n\n## Evaluation\n\n#### HPatches\nRunning the evaluation commands automatically downloads the dataset, by default to the directory `data\u002F`. You will need about 1.8 GB of free disk space.\n\n\u003Cdetails>\n\u003Csummary>[Evaluating LightGlue]\u003C\u002Fsummary>\n\nTo evaluate the pre-trained SuperPoint+LightGlue model on HPatches, run:\n```bash\npython -m gluefactory.eval.hpatches --conf superpoint+lightglue-official --overwrite\n```\nYou should expect the following results\n```\n{'H_error_dlt@1px': 0.3515,\n 'H_error_dlt@3px': 0.6723,\n 'H_error_dlt@5px': 0.7756,\n 'H_error_ransac@1px': 0.3428,\n 'H_error_ransac@3px': 0.5763,\n 'H_error_ransac@5px': 0.6943,\n 'mnum_keypoints': 1024.0,\n 'mnum_matches': 560.756,\n 'mprec@1px': 0.337,\n 'mprec@3px': 0.89,\n 'mransac_inl': 130.081,\n 'mransac_inl%': 0.217,\n 'ransac_mAA': 0.5378}\n```\n\nThe default robust estimator is `opencv`, but we strongly recommend to use `poselib` instead:\n```bash\npython -m gluefactory.eval.hpatches --conf superpoint+lightglue-official --overwrite \\\n    eval.estimator=poselib eval.ransac_th=-1\n```\nSetting `eval.ransac_th=-1` auto-tunes the RANSAC inlier threshold by running the evaluation with a range of thresholds and reports results for the optimal value.\nHere are the results as Area Under the Curve (AUC) of the homography error at  1\u002F3\u002F5 pixels:\n\n| Methods                                                      | DLT         | [OpenCV](..\u002Fgluefactory\u002Frobust_estimators\u002Fhomography\u002Fopencv.py)       | [PoseLib](..\u002Fgluefactory\u002Frobust_estimators\u002Fhomography\u002Fposelib.py)      |\n| ------------------------------------------------------------ | ------------------ | ------------------ | ------------------ |\n| [SuperPoint + SuperGlue](gluefactory\u002Fconfigs\u002Fsuperpoint+superglue-official.yaml) | 32.1 \u002F 65.0 \u002F 75.7 | 32.9 \u002F 55.7 \u002F 68.0 | 37.0 \u002F 68.2 \u002F 78.7 |\n| [SuperPoint + LightGlue](gluefactory\u002Fconfigs\u002Fsuperpoint+lightglue-official.yaml) | 35.1 \u002F 67.2 \u002F 77.6 | 34.2 \u002F 57.9 \u002F 69.9 | 37.1 \u002F 67.4 \u002F 77.8 |\n\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>[Evaluating GlueStick]\u003C\u002Fsummary>\n\nTo evaluate GlueStick on HPatches, run:\n```bash\npython -m gluefactory.eval.hpatches --conf gluefactory\u002Fconfigs\u002Fsuperpoint+lsd+gluestick.yaml --overwrite\n```\nYou should expect the following results\n```\n{\"mprec@1px\": 0.245,\n \"mprec@3px\": 0.838,\n \"mnum_matches\": 1290.5,\n \"mnum_keypoints\": 2287.5,\n \"mH_error_dlt\": null,\n \"H_error_dlt@1px\": 0.3355,\n \"H_error_dlt@3px\": 0.6637,\n \"H_error_dlt@5px\": 0.7713,\n \"H_error_ransac@1px\": 0.3915,\n \"H_error_ransac@3px\": 0.6972,\n \"H_error_ransac@5px\": 0.7955,\n \"H_error_ransac_mAA\": 0.62806,\n \"mH_error_ransac\": null}\n```\n\nSince we use points and lines to solve for the homography, we use a different robust estimator here: [Hest](https:\u002F\u002Fgithub.com\u002Frpautrat\u002Fhomography_est\u002F). Here are the results as Area Under the Curve (AUC) of the homography error at  1\u002F3\u002F5 pixels:\n\n| Methods                                                      | DLT         | [Hest](gluefactory\u002Frobust_estimators\u002Fhomography\u002Fhomography_est.py)       |\n| ------------------------------------------------------------ | ------------------ | ------------------ |\n| [SP + LSD + GlueStick](gluefactory\u002Fconfigs\u002Fsuperpoint+lsd+gluestick.yaml) | 33.6 \u002F 66.4 \u002F 77.1 | 39.2 \u002F 69.7 \u002F 79.6 |\n\n\u003C\u002Fdetails>\n\n\n#### MegaDepth-1500\n\nRunning the evaluation commands automatically downloads the dataset, which takes about 1.5 GB of disk space.\n\n\u003Cdetails>\n\u003Csummary>[Evaluating LightGlue]\u003C\u002Fsummary>\n\nTo evaluate the pre-trained SuperPoint+LightGlue model on MegaDepth-1500, run:\n```bash\npython -m gluefactory.eval.megadepth1500 --conf superpoint+lightglue-official\n# or the adaptive variant\npython -m gluefactory.eval.megadepth1500 --conf superpoint+lightglue-official \\\n    model.matcher.{depth_confidence=0.95,width_confidence=0.95}\n```\nThe first command should print the following results\n```\n{'mepi_prec@1e-3': 0.795,\n 'mepi_prec@1e-4': 0.15,\n 'mepi_prec@5e-4': 0.567,\n 'mnum_keypoints': 2048.0,\n 'mnum_matches': 613.287,\n 'mransac_inl': 280.518,\n 'mransac_inl%': 0.442,\n 'rel_pose_error@10°': 0.681,\n 'rel_pose_error@20°': 0.8065,\n 'rel_pose_error@5°': 0.5102,\n 'ransac_mAA': 0.6659}\n```\n\nTo use the PoseLib estimator:\n\n```bash\npython -m gluefactory.eval.megadepth1500 --conf superpoint+lightglue-official \\\n    eval.estimator=poselib eval.ransac_th=2.0\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>[Evaluating GlueStick]\u003C\u002Fsummary>\n\nTo evaluate the pre-trained SuperPoint+GlueStick model on MegaDepth-1500, run:\n```bash\npython -m gluefactory.eval.megadepth1500 --conf gluefactory\u002Fconfigs\u002Fsuperpoint+lsd+gluestick.yaml\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\nHere are the results as Area Under the Curve (AUC) of the pose error at  5\u002F10\u002F20 degrees:\n\n| Methods                                                      | [pycolmap](..\u002Fgluefactory\u002Frobust_estimators\u002Frelative_pose\u002Fpycolmap.py)         | [OpenCV](..\u002Fgluefactory\u002Frobust_estimators\u002Frelative_pose\u002Fopencv.py)       | [PoseLib](..\u002Fgluefactory\u002Frobust_estimators\u002Frelative_pose\u002Fposelib.py)      |\n| ------------------------------------------------------------ | ------------------ | ------------------ | ------------------ |\n| [SuperPoint + SuperGlue](gluefactory\u002Fconfigs\u002Fsuperpoint+superglue-official.yaml) | 54.4 \u002F 70.4 \u002F 82.4 | 48.7 \u002F 65.6 \u002F 79.0 | 64.8 \u002F 77.9 \u002F 87.0 |\n| [SuperPoint + LightGlue](gluefactory\u002Fconfigs\u002Fsuperpoint+lightglue-official.yaml) | 56.7 \u002F 72.4 \u002F 83.7 | 51.0 \u002F 68.1 \u002F 80.7 | 66.8 \u002F 79.3 \u002F 87.9 |\n| [SIFT (2K) + LightGlue](gluefactory\u002Fconfigs\u002Fsift+lightglue-official.yaml) | ? \u002F ? \u002F ? | 43.5 \u002F 61.5 \u002F 75.9 | 60.4 \u002F 74.3 \u002F 84.5 |\n| [SIFT (4K) + LightGlue](gluefactory\u002Fconfigs\u002Fsift+lightglue-official.yaml) | ? \u002F ? \u002F ? | 49.9 \u002F 67.3 \u002F 80.3 | 65.9 \u002F 78.6 \u002F 87.4 |\n| [ALIKED + LightGlue](gluefactory\u002Fconfigs\u002Faliked+lightglue-official.yaml) | ? \u002F ? \u002F ? | 52.3 \u002F 68.8 \u002F 81.0 | 66.4 \u002F 79.0 \u002F 87.5 |\n| [SuperPoint + GlueStick](gluefactory\u002Fconfigs\u002Fsuperpoint+lsd+gluestick.yaml) | 53.2 \u002F 69.8 \u002F 81.9 | 46.3 \u002F 64.2 \u002F 78.1 | 64.4 \u002F 77.5 \u002F 86.5 |\n\n\u003C\u002Fdetails>\n\n\n#### Scannet-1500\n\nRunning the evaluation commands automatically downloads the dataset, which takes about 1.1 GB of disk space.\n\n\u003Cdetails>\n\u003Csummary>[Evaluating LightGlue]\u003C\u002Fsummary>\n\nTo evaluate the pre-trained SuperPoint+LightGlue model on Scannet-1500, run:\n```bash\npython -m gluefactory.eval.scannet1500 --conf superpoint+lightglue-official\n# or the adaptive variant\npython -m gluefactory.eval.scannet1500 --conf superpoint+lightglue-official \\\n    model.matcher.{depth_confidence=0.95,width_confidence=0.95}\n```\n\nHere are the results as Area Under the Curve (AUC) of the pose error at  5\u002F10\u002F20 degrees:\n\n| Methods                                                      | [OpenCV](..\u002Fgluefactory\u002Frobust_estimators\u002Frelative_pose\u002Fopencv.py) | [PoseLib](..\u002Fgluefactory\u002Frobust_estimators\u002Frelative_pose\u002Fposelib.py) |\n| ------------------------------------------------------------ | ------------------ | ------------------ |\n| [SuperPoint + SuperGlue](..\u002Fgluefactory\u002Fconfigs\u002Fsuperpoint+superglue-official.yaml) | 17.9 \u002F 35.4 \u002F 49.5 | 22.7 \u002F 39.5 \u002F 54.3 |\n| [SuperPoint + LightGlue](..\u002Fgluefactory\u002Fconfigs\u002Fsuperpoint+lightglue-official.yaml) | 17.8 \u002F 34.0 \u002F 52.0 | 21.9 \u002F 39.8 \u002F 55.7 |\n| [DISK + LightGlue](..\u002Fgluefactory\u002Fconfigs\u002Fdisk+lightglue-official.yaml) | 9.0 \u002F 18.1 \u002F 29.2 | 12.1 \u002F 23.1 \u002F 35.0 |\n| [ALIKED + LightGlue](..\u002Fgluefactory\u002Fconfigs\u002Faliked+lightglue-official.yaml) | 15.4 \u002F 31.2 \u002F 47.5 | 19.6 \u002F 36.5 \u002F 52.8 |\n\n\u003C\u002Fdetails>\n\n#### ETH3D\n\nThe dataset will be auto-downloaded if it is not found on disk, and will need about 6 GB of free disk space.\n\n\u003Cdetails>\n\u003Csummary>[Evaluating GlueStick]\u003C\u002Fsummary>\n\nTo evaluate GlueStick on ETH3D, run:\n```bash\npython -m gluefactory.eval.eth3d --conf gluefactory\u002Fconfigs\u002Fsuperpoint+lsd+gluestick.yaml\n```\nYou should expect the following results\n```\nAP: 77.92\nAP_lines: 69.22\n```\n\n\u003C\u002Fdetails>\n\n#### Image Matching Challenge 2021\nComing soon!\n\n#### Image Matching Challenge 2023\nComing soon!\n\n#### Visual inspection\n\u003Cdetails>\nTo inspect the evaluation visually, you can run:\n\n```bash\npython -m gluefactory.eval.inspect hpatches superpoint+lightglue-official\n```\n\nClick on a point to visualize matches on this pair.\n\nTo compare multiple methods on a dataset:\n\n```bash\npython -m gluefactory.eval.inspect hpatches superpoint+lightglue-official superpoint+superglue-official\n```\n\nAll current benchmarks are supported by the viewer.\n\u003C\u002Fdetails>\n\nDetailed evaluation instructions can be found [here](.\u002Fdocs\u002Fevaluation.md).\n\n## Training\n\nWe generally follow a two-stage training:\n1. Pre-train on a large dataset of synthetic homographies applied to internet images. We use the 1M-image distractor set of the Oxford-Paris retrieval dataset. It requires about 450 GB of disk space.\n2. Fine-tune on the MegaDepth dataset, which is based on PhotoTourism pictures of popular landmarks around the world. It exhibits more complex and realistic appearance and viewpoint changes.  It requires about 420 GB of disk space.\n\nAll training commands automatically download the datasets.\n\n\u003Cdetails>\n\u003Csummary>[Training LightGlue]\u003C\u002Fsummary>\n\nWe show how to train LightGlue with [SuperPoint](https:\u002F\u002Fgithub.com\u002Fmagicleap\u002FSuperPointPretrainedNetwork).\nWe first pre-train LightGlue on the homography dataset:\n```bash\npython -m gluefactory.train sp+lg_homography \\  # experiment name\n    --conf gluefactory\u002Fconfigs\u002Fsuperpoint+lightglue_homography.yaml\n```\nFeel free to use any other experiment name. By default the checkpoints are written to `outputs\u002Ftraining\u002F`. The default batch size of 128 corresponds to the results reported in the paper and requires 2x 3090 GPUs with 24GB of VRAM each as well as PyTorch >= 2.0 (FlashAttention).\nConfigurations are managed by [OmegaConf](https:\u002F\u002Fomegaconf.readthedocs.io\u002F) so any entry can be overridden from the command line.\nIf you have PyTorch \u003C 2.0 or weaker GPUs, you may thus need to reduce the batch size via:\n```bash\npython -m gluefactory.train sp+lg_homography \\\n    --conf gluefactory\u002Fconfigs\u002Fsuperpoint+lightglue_homography.yaml  \\\n    data.batch_size=32  # for 1x 1080 GPU\n```\nBe aware that this can impact the overall performance. You might need to adjust the learning rate accordingly.\n\nWe then fine-tune the model on the MegaDepth dataset:\n```bash\npython -m gluefactory.train sp+lg_megadepth \\\n    --conf gluefactory\u002Fconfigs\u002Fsuperpoint+lightglue_megadepth.yaml \\\n    train.load_experiment=sp+lg_homography\n```\n\nHere the default batch size is 32. To speed up training on MegaDepth, we suggest to cache the local features before training (requires around 150 GB of disk space):\n```bash\n# extract features\npython -m gluefactory.scripts.export_megadepth --method sp --num_workers 8\n# run training with cached features\npython -m gluefactory.train sp+lg_megadepth \\\n    --conf gluefactory\u002Fconfigs\u002Fsuperpoint+lightglue_megadepth.yaml \\\n    train.load_experiment=sp+lg_homography \\\n    data.load_features.do=True\n```\n\nThe model can then be evaluated using its experiment name:\n```bash\npython -m gluefactory.eval.megadepth1500 --checkpoint sp+lg_megadepth\n```\n\nYou can also run all benchmarks after each training epoch with the option `--run_benchmarks`.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>[Training GlueStick]\u003C\u002Fsummary>\n\nWe first pre-train GlueStick on the homography dataset:\n```bash\npython -m gluefactory.train gluestick_H --conf gluefactory\u002Fconfigs\u002Fsuperpoint+lsd+gluestick-homography.yaml --distributed\n```\nFeel free to use any other experiment name. Configurations are managed by [OmegaConf](https:\u002F\u002Fomegaconf.readthedocs.io\u002F) so any entry can be overridden from the command line.\n\nWe then fine-tune the model on the MegaDepth dataset:\n```bash\npython -m gluefactory.train gluestick_MD --conf gluefactory\u002Fconfigs\u002Fsuperpoint+lsd+gluestick-megadepth.yaml --distributed\n```\nNote that we used the training splits `train_scenes.txt` and `valid_scenes.txt` to train the original model, which contains some overlap with the IMC challenge. The new default splits are now `train_scenes_clean.txt` and `valid_scenes_clean.txt`, without this overlap.\n\n\u003C\u002Fdetails>\n\n### Available models\nGlue Factory supports training and evaluating the following deep matchers:\n| Model     | Training? | Evaluation? |\n| --------- | --------- | ----------- |\n| [LightGlue](https:\u002F\u002Fgithub.com\u002Fcvg\u002FLightGlue) | ✅         | ✅           |\n| [GlueStick](https:\u002F\u002Fgithub.com\u002Fcvg\u002FGlueStick) | ✅         | ✅           |\n| [SuperGlue](https:\u002F\u002Fgithub.com\u002Fmagicleap\u002FSuperGluePretrainedNetwork) | ✅         | ✅           |\n| [LoFTR](https:\u002F\u002Fgithub.com\u002Fzju3dv\u002FLoFTR)     | ❌         | ✅           |\n\nUsing the following local feature extractors:\n\n| Model     | LightGlue config |\n| --------- | --------- |\n| [SuperPoint (open)](https:\u002F\u002Fgithub.com\u002Frpautrat\u002FSuperPoint) | `superpoint-open+lightglue_{homography,megadepth}.yaml` |\n| [SuperPoint (official)](https:\u002F\u002Fgithub.com\u002Fmagicleap\u002FSuperPointPretrainedNetwork) | `superpoint+lightglue_{homography,megadepth}.yaml` |\n| SIFT (via [pycolmap](https:\u002F\u002Fgithub.com\u002Fcolmap\u002Fpycolmap)) | `sift+lightglue_{homography,megadepth}.yaml` |\n| [ALIKED](https:\u002F\u002Fgithub.com\u002FShiaoming\u002FALIKED) | `aliked+lightglue_{homography,megadepth}.yaml` |\n| [DISK](https:\u002F\u002Fgithub.com\u002Fcvlab-epfl\u002Fdisk) | `disk+lightglue_{homography,megadepth}.yaml` |\n| Key.Net + HardNet | ❌ TODO |\n\n## Coming soon\n- [ ] More baselines (LoFTR, ASpanFormer, MatchFormer, SGMNet, DKM, RoMa)\n- [ ] Training deep detectors and descriptors like SuperPoint\n- [ ] IMC evaluations\n- [ ] Better documentation\n\n## BibTeX Citation\nPlease consider citing the following papers if you found this library useful:\n```bibtex\n@InProceedings{lindenberger_2023_lightglue,\n  title     = {{LightGlue: Local Feature Matching at Light Speed}},\n  author    = {Philipp Lindenberger and\n               Paul-Edouard Sarlin and\n               Marc Pollefeys},\n  booktitle = {International Conference on Computer Vision (ICCV)},\n  year      = {2023}\n}\n```\n```bibtex\n@InProceedings{pautrat_suarez_2023_gluestick,\n  title     = {{GlueStick: Robust Image Matching by Sticking Points and Lines Together}},\n  author    = {R{\\'e}mi Pautrat* and\n               Iago Su{\\'a}rez* and\n               Yifan Yu and\n               Marc Pollefeys and\n               Viktor Larsson},\n  booktitle = {International Conference on Computer Vision (ICCV)},\n  year      = {2023}\n}\n```\n","# 胶水工厂\n胶水工厂是CVG用于训练和评估提取与匹配局部视觉特征的深度神经网络的库。它使您能够：\n- 重现点和线匹配领域最先进模型的训练，例如[LightGlue](https:\u002F\u002Fgithub.com\u002Fcvg\u002FLightGlue)和[GlueStick](https:\u002F\u002Fgithub.com\u002Fcvg\u002FGlueStick)（ICCV 2023）\n- 使用您自己的局部特征或线条，在多个数据集上训练这些模型\n- 在HPatches或MegaDepth-1500等标准基准上评估特征提取器或匹配器\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcvg\u002FLightGlue\">\u003Cimg src=\"docs\u002Flightglue_matches.svg\" width=\"60%\"\u002F>\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcvg\u002FGlueStick\">\u003Cimg src=\"docs\u002Fgluestick_img.svg\" width=\"60%\"\u002F>\u003C\u002Fa>\n  \u003Cbr \u002F>\u003Cem>使用LightGlue和GlueStick进行点和线匹配。\u003C\u002Fem>\n\u003C\u002Fp>\n\n## 安装\n胶水工厂运行在Python 3和[PyTorch](https:\u002F\u002Fpytorch.org\u002F)上。以下命令将安装该库及其基本依赖项：\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fcvg\u002Fglue-factory\ncd glue-factory\npython3 -m pip install -e .  # 可编辑模式\n```\n某些高级功能可能需要安装完整的依赖包：\n```bash\npython3 -m pip install -e .[extra]\n```\n\n胶水工厂中的所有模型和数据集都配备了自动下载工具，因此您可以立即开始使用！\n\n## 许可证\n胶水工厂中的代码和训练好的模型采用Apache-2.0许可证发布。这包括LightGlue以及一个[SuperPoint的开源版本](https:\u002F\u002Fgithub.com\u002Frpautrat\u002FSuperPoint)。不兼容此许可证的第三方模型，例如SuperPoint（原版）和SuperGlue，则位于`gluefactory_nonfree`目录中，每个模型可能遵循其各自的限制性许可证。\n\n## 评估\n\n#### HPatches\n运行评估命令会自动下载数据集，默认保存到`data\u002F`目录下。您需要大约1.8 GB的可用磁盘空间。\n\n\u003Cdetails>\n\u003Csummary>[评估LightGlue]\u003C\u002Fsummary>\n\n要评估HPatches上的预训练SuperPoint+LightGlue模型，请运行：\n```bash\npython -m gluefactory.eval.hpatches --conf superpoint+lightglue-official --overwrite\n```\n您应该会得到如下结果：\n```\n{'H_error_dlt@1px': 0.3515,\n 'H_error_dlt@3px': 0.6723,\n 'H_error_dlt@5px': 0.7756,\n 'H_error_ransac@1px': 0.3428,\n 'H_error_ransac@3px': 0.5763,\n 'H_error_ransac@5px': 0.6943,\n 'mnum_keypoints': 1024.0,\n 'mnum_matches': 560.756,\n 'mprec@1px': 0.337,\n 'mprec@3px': 0.89,\n 'mransac_inl': 130.081,\n 'mransac_inl%': 0.217,\n 'ransac_mAA': 0.5378}\n```\n\n默认的鲁棒估计器是`opencv`，但我们强烈建议改用`poselib`：\n```bash\npython -m gluefactory.eval.hpatches --conf superpoint+lightglue-official --overwrite \\\n    eval.estimator=poselib eval.ransac_th=-1\n```\n设置`eval.ransac_th=-1`会通过在一系列阈值下运行评估来自动调整RANSAC内点阈值，并报告最优值的结果。以下是按1\u002F3\u002F5像素的单应误差曲线下的面积（AUC）：\n\n| 方法                                                      | DLT         | [OpenCV](..\u002Fgluefactory\u002Frobust_estimators\u002Fhomography\u002Fopencv.py)       | [PoseLib](..\u002Fgluefactory\u002Frobust_estimators\u002Fhomography\u002Fposelib.py)      |\n| ------------------------------------------------------------ | ------------------ | ------------------ | ------------------ |\n| [SuperPoint + SuperGlue](gluefactory\u002Fconfigs\u002Fsuperpoint+superglue-official.yaml) | 32.1 \u002F 65.0 \u002F 75.7 | 32.9 \u002F 55.7 \u002F 68.0 | 37.0 \u002F 68.2 \u002F 78.7 |\n| [SuperPoint + LightGlue](gluefactory\u002Fconfigs\u002Fsuperpoint+lightglue-official.yaml) | 35.1 \u002F 67.2 \u002F 77.6 | 34.2 \u002F 57.9 \u002F 69.9 | 37.1 \u002F 67.4 \u002F 77.8 |\n\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>[评估GlueStick]\u003C\u002Fsummary>\n\n要评估GlueStick在HPatches上的表现，请运行：\n```bash\npython -m gluefactory.eval.hpatches --conf gluefactory\u002Fconfigs\u002Fsuperpoint+lsd+gluestick.yaml --overwrite\n```\n您应该会得到如下结果：\n```\n{\"mprec@1px\": 0.245,\n \"mprec@3px\": 0.838,\n \"mnum_matches\": 1290.5,\n \"mnum_keypoints\": 2287.5,\n \"mH_error_dlt\": null,\n \"H_error_dlt@1px\": 0.3355,\n \"H_error_dlt@3px\": 0.6637,\n \"H_error_dlt@5px\": 0.7713,\n \"H_error_ransac@1px\": 0.3915,\n \"H_error_ransac@3px\": 0.6972,\n \"H_error_ransac@5px\": 0.7955,\n \"H_error_ransac_mAA\": 0.62806,\n \"mH_error_ransac\": null}\n```\n\n由于我们使用点和线来求解单应矩阵，这里采用了不同的鲁棒估计器：[Hest](https:\u002F\u002Fgithub.com\u002Frpautrat\u002Fhomography_est\u002F)。以下是按1\u002F3\u002F5像素的单应误差曲线下的面积（AUC）：\n\n| 方法                                                      | DLT         | [Hest](gluefactory\u002Frobust_estimators\u002Fhomography\u002Fhomography_est.py)       |\n| ------------------------------------------------------------ | ------------------ | ------------------ |\n| [SP + LSD + GlueStick](gluefactory\u002Fconfigs\u002Fsuperpoint+lsd+gluestick.yaml) | 33.6 \u002F 66.4 \u002F 77.1 | 39.2 \u002F 69.7 \u002F 79.6 |\n\n\u003C\u002Fdetails>\n\n\n#### MegaDepth-1500\n\n运行评估命令会自动下载数据集，大约需要1.5 GB的磁盘空间。\n\n\u003Cdetails>\n\u003Csummary>[评估LightGlue]\u003C\u002Fsummary>\n\n要评估MegaDepth-1500上的预训练SuperPoint+LightGlue模型，请运行：\n```bash\npython -m gluefactory.eval.megadepth1500 --conf superpoint+lightglue-official\n\n# 或者自适应变体\npython -m gluefactory.eval.megadepth1500 --conf superpoint+lightglue-official \\\n    model.matcher.{depth_confidence=0.95,width_confidence=0.95}\n```\n第一条命令应该会打印出以下结果：\n```\n{'mepi_prec@1e-3': 0.795,\n 'mepi_prec@1e-4': 0.15,\n 'mepi_prec@5e-4': 0.567,\n 'mnum_keypoints': 2048.0,\n 'mnum_matches': 613.287,\n 'mransac_inl': 280.518,\n 'mransac_inl%': 0.442,\n 'rel_pose_error@10°': 0.681,\n 'rel_pose_error@20°': 0.8065,\n 'rel_pose_error@5°': 0.5102,\n 'ransac_mAA': 0.6659}\n```\n\n要使用 PoseLib 估计器：\n\n```bash\npython -m gluefactory.eval.megadepth1500 --conf superpoint+lightglue-official \\\n    eval.estimator=poselib eval.ransac_th=2.0\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>[评估 GlueStick]\u003C\u002Fsummary>\n\n要在 MegaDepth-1500 上评估预训练的 SuperPoint+GlueStick 模型，运行：\n```bash\npython -m gluefactory.eval.megadepth1500 --conf gluefactory\u002Fconfigs\u002Fsuperpoint+lsd+gluestick.yaml\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\n以下是姿态误差在 5\u002F10\u002F20 度下的曲线下面积（AUC）结果：\n\n| 方法                                                      | [pycolmap](..\u002Fgluefactory\u002Frobust_estimators\u002Frelative_pose\u002Fpycolmap.py)         | [OpenCV](..\u002Fgluefactory\u002Frobust_estimators\u002Frelative_pose\u002Fopencv.py)       | [PoseLib](..\u002Fgluefactory\u002Frobust_estimators\u002Frelative_pose\u002Fposelib.py)      |\n| ------------------------------------------------------------ | ------------------ | ------------------ | ------------------ |\n| [SuperPoint + SuperGlue](gluefactory\u002Fconfigs\u002Fsuperpoint+superglue-official.yaml) | 54.4 \u002F 70.4 \u002F 82.4 | 48.7 \u002F 65.6 \u002F 79.0 | 64.8 \u002F 77.9 \u002F 87.0 |\n| [SuperPoint + LightGlue](gluefactory\u002Fconfigs\u002Fsuperpoint+lightglue-official.yaml) | 56.7 \u002F 72.4 \u002F 83.7 | 51.0 \u002F 68.1 \u002F 80.7 | 66.8 \u002F 79.3 \u002F 87.9 |\n| [SIFT (2K) + LightGlue](gluefactory\u002Fconfigs\u002Fsift+lightglue-official.yaml) | ? \u002F ? \u002F ? | 43.5 \u002F 61.5 \u002F 75.9 | 60.4 \u002F 74.3 \u002F 84.5 |\n| [SIFT (4K) + LightGlue](gluefactory\u002Fconfigs\u002Fsift+lightglue-official.yaml) | ? \u002F ? \u002F ? | 49.9 \u002F 67.3 \u002F 80.3 | 65.9 \u002F 78.6 \u002F 87.4 |\n| [ALIKED + LightGlue](gluefactory\u002Fconfigs\u002Faliked+lightglue-official.yaml) | ? \u002F ? \u002F ? | 52.3 \u002F 68.8 \u002F 81.0 | 66.4 \u002F 79.0 \u002F 87.5 |\n| [SuperPoint + GlueStick](gluefactory\u002Fconfigs\u002Fsuperpoint+lsd+gluestick.yaml) | 53.2 \u002F 69.8 \u002F 81.9 | 46.3 \u002F 64.2 \u002F 78.1 | 64.4 \u002F 77.5 \u002F 86.5 |\n\n\u003C\u002Fdetails>\n\n\n#### Scannet-1500\n\n运行评估命令会自动下载数据集，大约需要 1.1 GB 的磁盘空间。\n\n\u003Cdetails>\n\u003Csummary>[评估 LightGlue]\u003C\u002Fsummary>\n\n要在 Scannet-1500 上评估预训练的 SuperPoint+LightGlue 模型，运行：\n```bash\npython -m gluefactory.eval.scannet1500 --conf superpoint+lightglue-official\n# 或者自适应变体\npython -m gluefactory.eval.scannet1500 --conf superpoint+lightglue-official \\\n    model.matcher.{depth_confidence=0.95,width_confidence=0.95}\n```\n\n以下是姿态误差在 5\u002F10\u002F20 度下的曲线下面积（AUC）结果：\n\n| 方法                                                      | [OpenCV](..\u002Fgluefactory\u002Frobust_estimators\u002Frelative_pose\u002Fopencv.py) | [PoseLib](..\u002Fgluefactory\u002Frobust_estimators\u002Frelative_pose\u002Fposelib.py) |\n| ------------------------------------------------------------ | ------------------ | ------------------ |\n| [SuperPoint + SuperGlue](..\u002Fgluefactory\u002Fconfigs\u002Fsuperpoint+superglue-official.yaml) | 17.9 \u002F 35.4 \u002F 49.5 | 22.7 \u002F 39.5 \u002F 54.3 |\n| [SuperPoint + LightGlue](..\u002Fgluefactory\u002Fconfigs\u002Fsuperpoint+lightglue-official.yaml) | 17.8 \u002F 34.0 \u002F 52.0 | 21.9 \u002F 39.8 \u002F 55.7 |\n| [DISK + LightGlue](..\u002Fgluefactory\u002Fconfigs\u002Fdisk+lightglue-official.yaml) | 9.0 \u002F 18.1 \u002F 29.2 | 12.1 \u002F 23.1 \u002F 35.0 |\n| [ALIKED + LightGlue](..\u002Fgluefactory\u002Fconfigs\u002Faliked+lightglue-official.yaml) | 15.4 \u002F 31.2 \u002F 47.5 | 19.6 \u002F 36.5 \u002F 52.8 |\n\n\u003C\u002Fdetails>\n\n#### ETH3D\n\n如果磁盘上没有该数据集，它将自动下载，大约需要 6 GB 的可用磁盘空间。\n\n\u003Cdetails>\n\u003Csummary>[评估 GlueStick]\u003C\u002Fsummary>\n\n要在 ETH3D 上评估 GlueStick，运行：\n```bash\npython -m gluefactory.eval.eth3d --conf gluefactory\u002Fconfigs\u002Fsuperpoint+lsd+gluestick.yaml\n```\n你应该会得到以下结果：\n```\nAP: 77.92\nAP_lines: 69.22\n```\n\n\u003C\u002Fdetails>\n\n#### 图像匹配挑战赛 2021\n即将推出！\n\n#### 图像匹配挑战赛 2023\n即将推出！\n\n#### 可视化检查\n\u003Cdetails>\n要对评估结果进行可视化检查，可以运行：\n\n```bash\npython -m gluefactory.eval.inspect hpatches superpoint+lightglue-official\n```\n\n点击某个点即可查看该图像对上的匹配情况。\n\n要在同一数据集上比较多种方法：\n\n```bash\npython -m gluefactory.eval.inspect hpatches superpoint+lightglue-official superpoint+superglue-official\n```\n\n当前所有的基准测试都支持该查看器。\n\u003C\u002Fdetails>\n\n详细的评估说明可以在 [这里](.\u002Fdocs\u002Fevaluation.md) 找到。\n\n## 训练\n\n我们通常采用两阶段训练：\n1. 先在大规模合成单应矩阵数据集上进行预训练，这些数据集是基于互联网图片生成的。我们使用牛津-巴黎检索数据集中的 100 万张干扰图片。这大约需要 450 GB 的磁盘空间。\n2. 然后在 MegaDepth 数据集上进行微调，该数据集基于全球热门地标的照片。它展示了更复杂、更真实的外观和视角变化。这大约需要 420 GB 的磁盘空间。\n\n所有训练命令都会自动下载数据集。\n\n\u003Cdetails>\n\u003Csummary>[训练 LightGlue]\u003C\u002Fsummary>\n\n我们展示如何使用 [SuperPoint](https:\u002F\u002Fgithub.com\u002Fmagicleap\u002FSuperPointPretrainedNetwork) 来训练 LightGlue。\n首先我们在单应矩阵数据集上预训练 LightGlue：\n```bash\npython -m gluefactory.train sp+lg_homography \\  # 实验名称\n    --conf gluefactory\u002Fconfigs\u002Fsuperpoint+lightglue_homography.yaml\n```\n你可以自由选择其他实验名称。默认情况下，检查点会被保存到 `outputs\u002Ftraining\u002F` 目录下。默认的 128 批次大小对应于论文中报告的结果，需要两块各有 24GB 显存的 3090 显卡，以及 PyTorch >= 2.0（FlashAttention）。\n配置由 [OmegaConf](https:\u002F\u002Fomegaconf.readthedocs.io\u002F) 管理，因此任何参数都可以通过命令行覆盖。\n如果你使用的是 PyTorch \u003C 2.0 或显卡性能较弱，你可能需要通过以下方式降低批次大小：\n```bash\npython -m gluefactory.train sp+lg_homography \\\n    --conf gluefactory\u002Fconfigs\u002Fsuperpoint+lightglue_homography.yaml  \\\n    data.batch_size=32  # 对于一块 1080 显卡\n```\n请注意，这可能会影响整体性能。你可能还需要相应地调整学习率。\n\n然后我们在 MegaDepth 数据集上对模型进行微调：\n```bash\npython -m gluefactory.train sp+lg_megadepth \\\n    --conf gluefactory\u002Fconfigs\u002Fsuperpoint+lightglue_megadepth.yaml \\\n    train.load_experiment=sp+lg_homography\n```\n\n在这里，默认批次大小为 32。为了加快 MegaDepth 上的训练速度，我们建议在训练前缓存局部特征（大约需要 150 GB 的磁盘空间）：\n```bash\n# 提取特征\npython -m gluefactory.scripts.export_megadepth --method sp --num_workers 8\n\n# 使用缓存的特征运行训练\npython -m gluefactory.train sp+lg_megadepth \\\n    --conf gluefactory\u002Fconfigs\u002Fsuperpoint+lightglue_megadepth.yaml \\\n    train.load_experiment=sp+lg_homography \\\n    data.load_features.do=True\n```\n\n随后可以使用实验名称对该模型进行评估：\n```bash\npython -m gluefactory.eval.megadepth1500 --checkpoint sp+lg_megadepth\n```\n\n你还可以通过添加 `--run_benchmarks` 选项，在每个训练周期后运行所有基准测试。\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>[训练 GlueStick]\u003C\u002Fsummary>\n\n我们首先在单应性数据集上对 GlueStick 进行预训练：\n```bash\npython -m gluefactory.train gluestick_H --conf gluefactory\u002Fconfigs\u002Fsuperpoint+lsd+gluestick-homography.yaml --distributed\n```\n你可以自由选择其他实验名称。配置由 [OmegaConf](https:\u002F\u002Fomegaconf.readthedocs.io\u002F) 管理，因此任何配置项都可以通过命令行覆盖。\n\n接着，我们在 MegaDepth 数据集上对该模型进行微调：\n```bash\npython -m gluefactory.train gluestick_MD --conf gluefactory\u002Fconfigs\u002Fsuperpoint+lsd+gluestick-megadepth.yaml --distributed\n```\n需要注意的是，我们之前使用 `train_scenes.txt` 和 `valid_scenes.txt` 这两个训练划分来训练原始模型，而这些划分与 IMC 挑战赛存在一定的重叠。现在默认的新划分是 `train_scenes_clean.txt` 和 `valid_scenes_clean.txt`，其中不再包含这种重叠。\n\n\u003C\u002Fdetails>\n\n### 可用模型\nGlue Factory 支持以下深度匹配器的训练和评估：\n| 模型     | 训练？ | 评估？ |\n| --------- | --------- | ----------- |\n| [LightGlue](https:\u002F\u002Fgithub.com\u002Fcvg\u002FLightGlue) | ✅         | ✅           |\n| [GlueStick](https:\u002F\u002Fgithub.com\u002Fcvg\u002FGlueStick) | ✅         | ✅           |\n| [SuperGlue](https:\u002F\u002Fgithub.com\u002Fmagicleap\u002FSuperGluePretrainedNetwork) | ✅         | ✅           |\n| [LoFTR](https:\u002F\u002Fgithub.com\u002Fzju3dv\u002FLoFTR)     | ❌         | ✅           |\n\n同时支持以下局部特征提取器：\n\n| 模型     | LightGlue 配置 |\n| --------- | --------- |\n| [SuperPoint（开源版）](https:\u002F\u002Fgithub.com\u002Frpautrat\u002FSuperPoint) | `superpoint-open+lightglue_{homography,megadepth}.yaml` |\n| [SuperPoint（官方版）](https:\u002F\u002Fgithub.com\u002Fmagicleap\u002FSuperPointPretrainedNetwork) | `superpoint+lightglue_{homography,megadepth}.yaml` |\n| SIFT（通过 [pycolmap](https:\u002F\u002Fgithub.com\u002Fcolmap\u002Fpycolmap) 实现） | `sift+lightglue_{homography,megadepth}.yaml` |\n| [ALIKED](https:\u002F\u002Fgithub.com\u002FShiaoming\u002FALIKED) | `aliked+lightglue_{homography,megadepth}.yaml` |\n| [DISK](https:\u002F\u002Fgithub.com\u002Fcvlab-epfl\u002Fdisk) | `disk+lightglue_{homography,megadepth}.yaml` |\n| Key.Net + HardNet | ❌ 待实现 |\n\n## 即将推出\n- [ ] 更多基线模型（LoFTR、ASpanFormer、MatchFormer、SGMNet、DKM、RoMa）\n- [ ] 训练 SuperPoint 等深度检测器和描述符\n- [ ] IMC 评估\n- [ ] 更完善的文档\n\n## BibTeX 引用\n如果你觉得本库对你有所帮助，请考虑引用以下论文：\n```bibtex\n@InProceedings{lindenberger_2023_lightglue,\n  title     = {{LightGlue: 局部特征匹配极速方案}},\n  author    = {Philipp Lindenberger 和\n               Paul-Edouard Sarlin 和\n               Marc Pollefeys},\n  booktitle = {国际计算机视觉会议（ICCV）},\n  year      = {2023}\n}\n```\n```bibtex\n@InProceedings{pautrat_suarez_2023_gluestick,\n  title     = {{GlueStick: 通过点线粘连实现鲁棒图像匹配}},\n  author    = {R{\\'e}mi Pautrat* 和\n               Iago Su{\\'a}rez* 和\n               Yifan Yu 和\n               Marc Pollefeys 和\n               Viktor Larsson},\n  booktitle = {国际计算机视觉会议（ICCV）},\n  year      = {2023}\n}\n```","# Glue Factory 快速上手指南\n\nGlue Factory 是 CVG 实验室推出的深度学习库，专门用于训练和评估局部视觉特征（点与线）的提取与匹配模型。它支持复现 LightGlue、GlueStick 等 SOTA 模型，并提供在 HPatches、MegaDepth 等标准基准上的评估工具。\n\n## 环境准备\n\n*   **操作系统**: Linux (推荐) 或 macOS\n*   **Python**: 3.8 及以上版本\n*   **深度学习框架**: PyTorch (建议版本 >= 2.0 以启用 FlashAttention 加速)\n*   **硬件要求**:\n    *   **推理\u002F评估**: 任意支持 CUDA 的 GPU 或 CPU。\n    *   **训练**: 建议配备大显存 GPU (如 RTX 3090 24GB x 2)。若显存较小，需调整 batch size。\n*   **磁盘空间**:\n    *   基础安装：约 1-2 GB。\n    *   数据集自动下载：根据评估或训练任务不同，需预留 1.5 GB (HPatches) 至 450 GB (大规模预训练) 不等的空间。\n\n## 安装步骤\n\n### 1. 克隆仓库\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fcvg\u002Fglue-factory\ncd glue-factory\n```\n\n### 2. 安装依赖\n**基础安装**（适用于大多数评估和推理任务）：\n```bash\npython3 -m pip install -e .\n```\n\n**完整安装**（包含高级功能和所有可选依赖，推荐用于训练）：\n```bash\npython3 -m pip install -e .[extra]\n```\n\n> **提示**：国内用户若遇到下载慢的问题，可指定国内镜像源安装：\n> `python3 -m pip install -e .[extra] -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`\n\n安装完成后，库中的模型和数据集均支持**自动下载**，无需手动配置路径即可开始使用。\n\n## 基本使用\n\nGlue Factory 的核心功能是通过命令行直接运行评估脚本。以下是在 **HPatches** 数据集上评估预训练的 **SuperPoint + LightGlue** 模型的最简示例。\n\n### 1. 执行评估\n运行以下命令将自动下载 HPatches 数据集（约 1.8 GB）并输出评估结果：\n\n```bash\npython -m gluefactory.eval.hpatches --conf superpoint+lightglue-official --overwrite\n```\n\n### 2. 查看结果\n命令执行完毕后，终端将打印详细的评估指标，包括单应性矩阵误差（H_error）、关键点数量、匹配精度等：\n\n```text\n{'H_error_dlt@1px': 0.3515,\n 'H_error_dlt@3px': 0.6723,\n 'H_error_dlt@5px': 0.7756,\n 'H_error_ransac@1px': 0.3428,\n ...\n 'ransac_mAA': 0.5378}\n```\n\n### 3. 进阶：使用更优的鲁棒估计器\n默认使用 OpenCV 进行鲁棒估计，但官方推荐使用 `poselib` 以获得更高精度。可通过参数动态覆盖配置：\n\n```bash\npython -m gluefactory.eval.hpatches --conf superpoint+lightglue-official --overwrite \\\n    eval.estimator=poselib eval.ransac_th=-1\n```\n*注：`eval.ransac_th=-1` 会自动搜索最佳的 RANSAC 内点阈值。*\n\n### 4. 可视化检查（可选）\n如需直观查看匹配效果，可运行可视化工具：\n\n```bash\npython -m gluefactory.eval.inspect hpatches superpoint+lightglue-official\n```\n运行后将弹出窗口，点击图像中的点即可查看具体的匹配连线。","某自动驾驶感知团队正在研发高精度的视觉里程计系统，需要训练一个能同时处理特征点和直线匹配的深度学习模型，以适应城市复杂光照环境。\n\n### 没有 glue-factory 时\n- **复现门槛极高**：想要使用 LightGlue 或 GlueStick 等 SOTA 模型，必须手动搜集分散的代码、配置环境和寻找预训练权重，往往因依赖冲突导致项目启动停滞数周。\n- **数据适配困难**：若需将模型迁移到团队自有的车载数据集上，缺乏统一的训练框架，必须从头编写繁琐的数据加载器和损失函数，极易引入 Bug。\n- **评估标准不一**：在 HPatches 等基准测试中，不同团队使用的鲁棒估计器（如 RANSAC 实现）不一致，导致无法公平对比模型性能，难以判断优化方向。\n- **功能支持单一**：现有开源代码多仅支持点特征，若要加入直线特征匹配以提升弱纹理场景的稳定性，需大幅修改底层架构，开发成本巨大。\n\n### 使用 glue-factory 后\n- **一键复现顶尖模型**：通过简单的命令行即可自动下载并运行 LightGlue 和 GlueStick 的官方预训练模型，将环境配置和模型验证时间从数周缩短至几小时。\n- **灵活定制训练流程**：利用其模块化设计，团队能快速接入自有数据集，轻松配置多任务训练脚本，高效微调出适应特定城市场景的专用模型。\n- **标准化权威评估**：内置集成了 PoseLib 等先进鲁棒估计器，可直接运行标准评测命令，获得包含单应性误差 AUC 在内的详细指标，确保结果具有行业可比性。\n- **点线融合原生支持**：原生支持点与线的联合检测与匹配，团队无需重写核心代码即可启用 GlueStick 等模型，显著提升了隧道等弱纹理区域的定位鲁棒性。\n\nglue-factory 通过提供标准化的训练与评估流水线，让研发团队能从繁琐的工程基建中解放出来，专注于算法核心的迭代与落地。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcvg_glue-factory_88c440f4.png","cvg","Computer Vision and Geometry Lab","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fcvg_d85caeeb.png","",null,"http:\u002F\u002Fcvg.ethz.ch","https:\u002F\u002Fgithub.com\u002Fcvg",[80,84],{"name":81,"color":82,"percentage":83},"Python","#3572A5",100,{"name":85,"color":86,"percentage":87},"Shell","#89e051",0,1079,148,"2026-04-17T08:03:58","Apache-2.0","未说明","训练必需：推荐 2x NVIDIA RTX 3090 (24GB 显存)；若使用单卡 (如 GTX 1080) 需减小 batch size。推理未明确指定，但需支持 PyTorch 的 GPU。","未说明 (但训练数据集需大量磁盘空间：预训练约 450GB，微调约 420GB)",{"notes":96,"python":97,"dependencies":98},"1. 训练默认配置需要 PyTorch >= 2.0 以支持 FlashAttention。2. 若 PyTorch 版本低于 2.0 或显卡较弱，需手动减小 batch size 并可能调整学习率。3. 评估和训练命令会自动下载数据集，请确保有足够的磁盘空间 (HPatches 1.8GB, MegaDepth 1.5GB\u002F420GB, Scannet 1.1GB, ETH3D 6GB)。4. 部分高级功能需安装额外依赖 (pip install -e .[extra])。5. 推荐使用 'poselib' 作为鲁棒估计器以获得更佳评估结果。","3.x",[99,100],"torch>=2.0","omegaconf",[14,15],[103,104,105,106],"computer-vision","deep-learning","iccv2023","image-matching","2026-03-27T02:49:30.150509","2026-04-19T03:05:09.601384",[110,115,119,124,129,134],{"id":111,"question_zh":112,"answer_zh":113,"source_url":114},41174,"训练配置中的 best_key 应该设置为数值还是字符串（例如 'loss\u002Ftotal'）？","best_key 应设置为字符串格式（如 'loss\u002Ftotal'）。您可以在用于训练过程的 .yaml 配置文件的数据部分（data section）进行设置。代码中虽然涉及数值比较，但配置文件中需使用对应的键名字符串来索引日志中的损失值。","https:\u002F\u002Fgithub.com\u002Fcvg\u002Fglue-factory\u002Fissues\u002F62",{"id":116,"question_zh":117,"answer_zh":118,"source_url":114},41175,"如何解决训练时出现的 'empty val_loader'（验证集加载器为空）错误？","该问题通常是因为数据集未正确划分为训练集、测试集和验证集。您需要检查数据加载脚本或配置文件，确保明确指定了验证集的大小（val_size）或比例，并且数据目录中包含有效的验证数据。如果是自定义数据集，需参考官方 Homographies 数据集的结构来编写加载逻辑，确保能正确生成验证集的 DataLoader。",{"id":120,"question_zh":121,"answer_zh":122,"source_url":123},41176,"如何将 GlueFactory 训练生成的 checkpoint 转换为官方 LightGlue 格式的权重文件？","可以使用以下 Python 脚本提取并转换权重。该脚本会加载训练好的 `.tar` 文件，提取 matcher 部分的状态字典，并重命名键以匹配官方 LightGlue 的层级结构（将 `transformers.i.self_attn` 转换为 `self_attn.i` 等）：\n\n```python\nimport torch\n\ndef extract_checkpoint(checkpoint_path, save_model_path, n_layers):\n    checkpoint = torch.load(checkpoint_path, map_location=torch.device('cpu'))\n    state_dict = checkpoint.get('model', {})\n\n    # 提取 matcher 部分的权重\n    matcher_dict = {k.split('matcher.', 1)[1]: v for k, v in state_dict.items() if k.startswith('matcher')}\n\n    if matcher_dict:\n        for i in range(n_layers):\n            patterns = [\n                (f\"transformers.{i}.self_attn\", f\"self_attn.{i}\"),\n                (f\"transformers.{i}.cross_attn\", f\"cross_attn.{i}\")\n            ]\n            for old_key, new_key in patterns:\n                matcher_dict = {k.replace(old_key, new_key) if old_key in k else k: v for k, v in matcher_dict.items()}\n\n    torch.save(matcher_dict, save_model_path)\n\n# 使用方法：extract_checkpoint(\"checkpoint_best.tar\", \"lightglue_weights.pth\", n_layers=9)\n```","https:\u002F\u002Fgithub.com\u002Fcvg\u002Fglue-factory\u002Fissues\u002F48",{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},41177,"开源版 SuperPoint (MIT License) 和非免费版 SuperPoint 在关键点检测效果上为何存在差异？","这种差异可能与 PyTorch 版本有关。有用户发现开源版 SuperPoint 在 PyTorch 2.1.0 和 2.0.1 版本下生成的结果不同，可能是由于新版 PyTorch 的内部变更导致的。如果遇到关键点分数极低或被阈值过滤掉大部分点的情况，建议尝试切换 PyTorch 版本（例如使用 2.0.1+cu117）作为临时解决方案，并确保在干净的环境中重新测试。","https:\u002F\u002Fgithub.com\u002Fcvg\u002Fglue-factory\u002Fissues\u002F23",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},41178,"如何为 MegaDepth 数据集生成 scene_info (.npz) 文件？","MegaDepth 官方数据包中有时缺失 `scenes_info.tar.gz` 文件。目前社区中尚无官方提供的直接生成脚本。如果您需要使用 aerial-megadepth 等变体，可能需要参考 MegaDepth 原始论文或相关数据处理仓库手动构建场景信息，或者检查是否可以通过下载完整的 MegaDepth 数据集包来获取缺失的元数据文件。在使用前请确认数据加载器是否能正确读取这些 .npz 文件。","https:\u002F\u002Fgithub.com\u002Fcvg\u002Fglue-factory\u002Fissues\u002F153",{"id":135,"question_zh":136,"answer_zh":137,"source_url":123},41179,"如何在自定义数据集上配置训练参数以复现官方 LightGlue 的效果？","您需要创建一个自定义的 .yaml 配置文件。关键步骤包括：1. 复制并修改 `datasets\u002Fhomgraphies.py` 为 `datasets\u002Fcustom.py` 以加载您的数据；2. 在配置文件中设置 `data.name` 为 custom，并指定 `data_dir` 和 `metadata_dir`；3. 配置模型部分，指定 extractor（如 superpoint）和 matcher（如 lightglue），并调整 `max_num_keypoints` 等参数；4. 设置训练超参数如 `epochs`, `lr`, `batch_size`。示例配置可参考 Issue #48 中的 YAML 片段。",[]]