[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-FangjinhuaWang--PatchmatchNet":3,"tool-FangjinhuaWang--PatchmatchNet":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},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,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},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 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":80,"owner_email":81,"owner_twitter":75,"owner_website":82,"owner_url":83,"languages":84,"stars":97,"forks":98,"last_commit_at":99,"license":100,"difficulty_score":10,"env_os":101,"env_gpu":102,"env_ram":101,"env_deps":103,"category_tags":116,"github_topics":117,"view_count":23,"oss_zip_url":81,"oss_zip_packed_at":81,"status":16,"created_at":121,"updated_at":122,"faqs":123,"releases":159},1305,"FangjinhuaWang\u002FPatchmatchNet","PatchmatchNet","Official code of PatchmatchNet (CVPR 2021 Oral)","PatchmatchNet 是一款面向多视角立体重建（MVS）的开源深度学习框架，由 ETH Zürich 团队发表于 CVPR 2021。它把传统 Patchmatch 的思想改造成级联式神经网络，在保持精度的同时，把显存占用和运行时间都压到极低，让你能在单张消费级显卡上跑 4K 级图像的三维重建。  \n如果你正在做无人机测绘、文保数字化、VR 场景建模，或需要为 SLAM\u002FAR 应用快速生成稠密点云，PatchmatchNet 可以直接拿来训练和推理；代码已支持 DTU、Tanks & Temples、ETH3D 等主流数据集，也允许自定义相机参数与图像格式。  \n亮点：  \n• 级联 Patchmatch + 可学习的自适应采样，显存节省 50 % 以上；  \n• 支持 TorchScript 导出，方便部署到 C++\u002F移动端；  \n• 提供预训练权重，一条命令即可复现论文结果。  \n只需 Python 3.8 + CUDA 10.1，十分钟装好依赖，就能开始你的多视角立体之旅。","# PatchmatchNet (CVPR2021 Oral)\nofficial source code of paper 'PatchmatchNet: Learned Multi-View Patchmatch Stereo'\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FFangjinhuaWang_PatchmatchNet_readme_a2ce2ba1c2d1.jpg)\n\n## Updates\n- 19.09.2025: Introducing a new [MVS pipeline](https:\u002F\u002Fgithub.com\u002Fcvg\u002Fdiffmvs), which is more efficient in GPU memory and run-time, and performs much better than PatchmatchNet. \n- 19.05.2025: For those who want to reproduce the same results as our paper, please have a look at [this version](https:\u002F\u002Fgithub.com\u002FFangjinhuaWang\u002FPatchmatchNet\u002Ftree\u002Fc6d2dce962be8109779afcdb3b79880d35ff9c83). The current checkpoint is re-trained by other contributors. \n- 13.12.2021: New unified format for training and evaluation datasets, support for arbitrary image sizes\n  and multi-camera setups, and new names for script parameters.\n- 27.09.2021: The code now allows for Torchscript export and includes a pre-trained TorchScript module.\n\n## Introduction\nPatchmatchNet is a novel cascade formulation of learning-based Patchmatch which aims at decreasing memory consumption and\ncomputation time for high-resolution multi-view stereo. If you find this project useful for your research, please cite:\n```\n@misc{wang2020patchmatchnet,\n      title={PatchmatchNet: Learned Multi-View Patchmatch Stereo}, \n      author={Fangjinhua Wang and Silvano Galliani and Christoph Vogel and Pablo Speciale and Marc Pollefeys},\n      journal={CVPR},\n      year={2021}\n}\n```\n\n## Installation\n### Requirements\n* python 3.8\n* CUDA >= 10.1\n\n```\npip install -r requirements.txt\n```\n\n## Reproducing Results\n* Download our pre-processed dataset:\n  [DTU's evaluation set](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1jN8yEQX0a-S22XwUjISM8xSJD39pFLL_\u002Fview?usp=sharing),\n  [Tanks & Temples](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1gAfmeoGNEFl9dL4QcAU4kF0BAyTd-r8Z\u002Fview?usp=sharing) and\n  [ETH3D benchmark](https:\u002F\u002Fpolybox.ethz.ch\u002Findex.php\u002Fs\u002FpmTGWobErOnhEg0). Each dataset is already organized as follows:\n```\nroot_directory\n├──scan1 (scene_name1)\n├──scan2 (scene_name2) \n      ├── images                 \n      │   ├── 00000000.jpg       \n      │   ├── 00000001.jpg       \n      │   └── ...                \n      ├── cams                   \n      │   ├── 00000000_cam.txt   \n      │   ├── 00000001_cam.txt   \n      │   └── ...                \n      └── pair.txt  \n```\nNote: \n- The subfolders for Tanks & Temples and ETH3D will not be named `scanN` but the lists included under\n  `.\u002Flists\u002Feth3d` and `.\u002Flists\u002Ftanks` will have the correct naming conventions.\n- If the folders for images and cameras, and the pair file don't follow the standard naming conventions you can modify\n  the settings of `MVSDataset` in `datasets\u002Fmvs.py` to specify the custom `image_folder`, `cam_folder`, and `pair_path`\n- The `MVSDataset` is configured by default for JPEG images. If you're using a different format (e.g., PNG) you can change\n  the `image_extension` parameter of `MVSDataset` accordingly.\n\nCamera file `cam.txt` stores the camera parameters, which includes extrinsic, intrinsic, minimum depth and maximum depth:\n```\nextrinsic\nE00 E01 E02 E03\nE10 E11 E12 E13\nE20 E21 E22 E23\nE30 E31 E32 E33\n\nintrinsic\nK00 K01 K02\nK10 K11 K12\nK20 K21 K22\n\nDEPTH_MIN DEPTH_MAX \n```\n\n`pair.txt ` stores the view selection result. For each reference image, N (10 or more) best source views are stored in the file:\n```\nTOTAL_IMAGE_NUM\nIMAGE_ID0                       # index of reference image 0 \n10 ID0 SCORE0 ID1 SCORE1 ...    # 10 best source images for reference image 0 \nIMAGE_ID1                       # index of reference image 1\n10 ID0 SCORE0 ID1 SCORE1 ...    # 10 best source images for reference image 1 \n...\n``` \n\n* In `eval.sh`, set `DTU_TESTING`, `ETH3D_TESTING` or `TANK_TESTING` as the root directory of corresponding dataset\n  and uncomment the evaluation command for corresponding dataset (default is to evaluate on DTU's evaluation set).\n  If you want to change the output location (default is same as input one), modify the `--output_folder` parameter.\n  For Tanks the `--scan_list` can be intermediate or advanced and for ETH3D it can be test or train.\n* `CKPT_FILE` is the checkpoint file (our pretrained model is `.\u002Fcheckpoints\u002Fparams_000007.ckpt`), change it if you want\n  to use your own model. If you want to use the model from the TorchScript module instead, you can specify the checkpoint\n  file as `.\u002Fcheckpoints\u002Fmodule_000007.pt` and set the option `--input_type module`.\n* Test on GPU by running `sh eval.sh`. The code includes depth map estimation and depth fusion. The outputs are the\n  point clouds in `ply` format. \n* For quantitative evaluation on DTU dataset, download [SampleSet](http:\u002F\u002Froboimagedata.compute.dtu.dk\u002F?page_id=36) and\n  [Points](http:\u002F\u002Froboimagedata.compute.dtu.dk\u002F?page_id=36). Unzip them and place `Points` folder in `SampleSet\u002FMVS Data\u002F`.\n  The structure looks like:\n```\nSampleSet\n├──MVS Data\n      └──Points\n```\n\nIn `evaluations\u002Fdtu\u002FBaseEvalMain_web.m`, set `dataPath` as path to `SampleSet\u002FMVS Data\u002F`, `plyPath` as directory that\nstores the reconstructed point clouds and `resultsPath` as directory to store the evaluation results. Then run\n`evaluations\u002Fdtu\u002FBaseEvalMain_web.m` in matlab.\n\nThe results look like:\n\n| Acc. (mm) | Comp. (mm) | Overall (mm) |\n|-----------|------------|--------------|\n| 0.427     | 0.277      | 0.352        |\n\n* For detailed quantitative results on Tanks & Temples and ETH3D, please check the leaderboards\n  ([Tanks & Temples](https:\u002F\u002Fwww.tanksandtemples.org\u002Fdetails\u002F1170\u002F), [ETH3D](https:\u002F\u002Fwww.eth3d.net\u002Fresult_details?id=216))\n\n## Evaluation on Custom Dataset\n* For evaluation, we support preparing the custom dataset from COLMAP's results. The script `colmap_input.py`\n  (modified based on the script from [MVSNet](https:\u002F\u002Fgithub.com\u002FYoYo000\u002FMVSNet)) converts COLMAP's sparse reconstruction\n  results into the same format as the datasets that we provide. After reconstruction, COLMAP will generate a folder\n  `COLMAP\u002Fdense\u002F`, which contains `COLMAP\u002Fdense\u002Fimages\u002F` and `COLMAP\u002Fdense\u002Fsparse`. Then you need to run like this:\n```\npython colmap_input.py --input_folder COLMAP\u002Fdense\u002F \n```\n* The default output location is the same as the input one. If you want to change that, set the `--output_folder` parameter.\n* The default behavior of the converter will find all possible related images for each source image. If you want to constrain\n  the max number of related images set the `--num_src_images` parameter.\n* In `eval.sh`, set `CUSTOM_TESTING` as the root directory of the dataset, set `--output_folder` as the directory to store\n  the reconstructed point clouds (default is same as input directory), set `--image_max_dim` to an appropriate size (this\n  is determined by the available GPU memory and the desired processing speed) or use the native size by removing the\n  parameter, and uncomment the evaluation command. Test on GPU by running `sh eval.sh`.\n\n## Training\nDowload the preprocessed [DTU training data](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1eDjh-_bxKKnEuz5h-HXS7EDJn59clx6V\u002Fview), [depths maps](https:\u002F\u002Fvirutalbuy-public.oss-cn-hangzhou.aliyuncs.com\u002Fshare\u002Fcascade-stereo\u002FCasMVSNet\u002Fdtu_data\u002Fdtu_train_hr\u002FDepths_raw.zip), and [processed camera parameters](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F14w85GgWY-i-vQK32TpYEVCYgDdwKRLLJ\u002Fview?usp=sharing), upzip them and organize them as follows:\n```\nroot_directory\n├── Cameras_1\n│    ├── train\n│    │    ├── 00000000_cam.txt\n│    │    ├── 00000000_cam.txt\n│    │    └── ...\n│    └── pair.txt\n├── Depths_raw\n│    ├── scan1\n│    │    ├── depth_map_0000.pfm\n│    │    ├── depth_visual_0000.png\n│    │    ├── depth_map_0001.pfm\n│    │    ├── depth_visual_0001.png\n│    │    └── ...\n│    ├── scan2\n│    └── ...\n└── Rectified\n     ├── scan1_train\n     │    ├── rect_001_0_r5000.png\n     │    ├── rect_001_1_r5000.png\n     │    ├── ...\n     │    ├── rect_001_6_r5000.png\n     │    ├── rect_002_0_r5000.png\n     │    ├── rect_002_1_r5000.png\n     │    ├── ...\n     │    ├── rect_002_6_r5000.png\n     │    └── ...\n     ├── scan2_train\n     └── ...\n```\nTo use this dataset directly look into the [Legacy Training](#legacy-training) section below. For the current version of training the\ndataset needs to be converted to a format compatible with `MVSDataset` in `.\u002Fdatasets\u002Fmvs.py` using the script\n`convert_dtu_dataset.py` as follows:\n```\npython convert_dtu_dataset.py --input_folder \u003Coriginal_dataset> --output_folder \u003Cconverted_dataset> --scan_list .\u002Flists\u002Fdtu\u002Fall.txt\n```\nThe converted dataset will now be in a format similar to the evaluation datasets:\n```\nroot_directory\n├── scan1 (scene_name1)\n├── scan2 (scene_name2) \n│     ├── cams (camera parameters)\n│     │   ├── 00000000_cam.txt   \n│     │   ├── 00000001_cam.txt   \n│     │   └── ...                \n│     ├── depth_gt (ground truth depth maps)\n│     │   ├── 00000000.pfm   \n│     │   ├── 00000001.pfm   \n│     │   └── ...                \n│     ├── images (images at 7 light indexes) \n│     │   ├── 0 (light index 0)\n│     │   │   ├── 00000000.jpg       \n│     │   │   ├── 00000001.jpg\n│     │   │   └── ...\n│     │   ├── 1 (light index 1)\n│     │   └── ...                \n│     ├── masks (depth map masks) \n│     │   ├── 00000000.png       \n│     │   ├── 00000001.png       \n│     │   └── ...                \n│     └── pair.txt\n└── ...\n```\n* In `train.sh`, set `MVS_TRAINING` as the root directory of the converted dataset; set `--output_path` as the directory\n  to store the checkpoints.\n* Train the model by running `sh train.sh`.\n* The output consists of one checkpoint (model parameters) and one TorchScript module per epoch named as\n  `params_\u003Cepoch_id>.ckpt` and `module_\u003Cepoch_id>.pt` respectively.\n\n### Legacy Training\nTo train directly on the [original DTU dataset](https:\u002F\u002Fpolybox.ethz.ch\u002Findex.php\u002Fs\u002FugDdJQIuZTk4S35) the legacy training\nscript `train_dtu.py` (using the legacy `MVSDataset` from `datasets\u002Fdtu_yao.py`) needs to be called from the `train.sh`\nscript.\n* In `train.sh`, set `MVS_TRAINING` as the root directory of the original dataset; set `--logdir` as the directory to\n  store the checkpoints. \n* Uncomment the appropriate section for legacy training and comment out the other entry.\n* Train the model by running `sh train.sh`.\n\n### Note:\n`--patchmatch_iteration` represents the number of iterations of Patchmatch on multi-stages (e.g., the default number `1,2,2`\nmeans 1 iteration on stage 1, 2 iterations on stage 2 and 2 iterations on stage 3). `--propagate_neighbors` represents the\nnumber of neighbors for adaptive propagation (e.g., the default number `0,8,16` means no propagation for Patchmatch on\nstage 1, using 8 neighbors for propagation on stage 2 and using 16 neighbors for propagation on stage 3). As explained in\nour paper, we do not include adaptive propagation for the last iteration of Patchmatch on stage 1 due to the requirement\nof photometric consistency filtering. So in our default case (also for our pretrained model), we set the number of propagation\nneighbors on stage 1 as `0` since the number of iteration on stage 1 is `1`. If you want to train the model with more\niterations on stage 1, change the corresponding number in `--propagate_neighbors` to include adaptive propagation for\nPatchmatch expect for the last iteration.\n\n## Acknowledgements\nThis project is done in collaboration with \"Microsoft Mixed Reality & AI Zurich Lab\".\n\nThanks to Yao Yao for open-sourcing his excellent work [MVSNet](https:\u002F\u002Fgithub.com\u002FYoYo000\u002FMVSNet). Thanks to Xiaoyang Guo\nfor open-sourcing his PyTorch implementation of MVSNet [MVSNet-pytorch](https:\u002F\u002Fgithub.com\u002Fxy-guo\u002FMVSNet_pytorch).\n","# PatchmatchNet（CVPR2021 口头报告）\n论文《PatchmatchNet：学习型多视图 Patchmatch 立体视觉》的官方源代码  \n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FFangjinhuaWang_PatchmatchNet_readme_a2ce2ba1c2d1.jpg)\n\n## 更新内容\n- 2025年9月19日：推出全新的 [MVS 流水线](https:\u002F\u002Fgithub.com\u002Fcvg\u002Fdiffmvs)，该流水线在 GPU 显存占用和运行时间上更为高效，且性能远超 PatchmatchNet。\n- 2025年5月19日：对于希望复现我们论文结果的用户，请参考 [此版本](https:\u002F\u002Fgithub.com\u002FFangjinhuaWang\u002FPatchmatchNet\u002Ftree\u002Fc6d2dce962be8109779afcdb3b79880d35ff9c83)。当前的 checkpoint 是由其他贡献者重新训练得到的。\n- 2021年12月13日：更新了训练与评估数据集的统一格式，支持任意图像尺寸及多相机设置，并对脚本参数进行了新命名。\n- 2021年9月27日：代码现已支持 Torchscript 导出，并附带一个预训练的 TorchScript 模块。\n\n## 简介\nPatchmatchNet 是一种新颖的基于学习的 Patchmatch 级联架构，旨在降低高分辨率多视图立体视觉任务中的显存消耗与计算时间。如果您认为该项目对您的研究有所帮助，请引用：\n```\n@misc{wang2020patchmatchnet,\n      title={PatchmatchNet: Learned Multi-View Patchmatch Stereo}, \n      author={Fangjinhua Wang and Silvano Galliani and Christoph Vogel and Pablo Speciale and Marc Pollefeys},\n      journal={CVPR},\n      year={2021}\n}\n```\n\n## 安装\n### 需求\n* Python 3.8\n* CUDA >= 10.1\n\n```\npip install -r requirements.txt\n```\n\n## 结果复现\n* 下载我们预处理好的数据集：\n  [DTU 的评估集](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1jN8yEQX0a-S22XwUjISM8xSJD39pFLL_\u002Fview?usp=sharing)、\n  [Tanks & Temples](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1gAfmeoGNEFl9dL4QcAU4kF0BAyTd-r8Z\u002Fview?usp=sharing) 以及\n  [ETH3D 基准](https:\u002F\u002Fpolybox.ethz.ch\u002Findex.php\u002Fs\u002FpmTGWobErOnhEg0)。每个数据集均已按如下结构组织：\n```\n根目录\n├──scan1 (场景名1)\n├──scan2 (场景名2) \n      ├── images                 \n      │   ├── 00000000.jpg       \n      │   ├── 00000001.jpg       \n      │   └── ...                \n      ├── cams                   \n      │   ├── 00000000_cam.txt   \n      │   ├── 00000001_cam.txt   \n      │   └── ...                \n      └── pair.txt  \n```\n注意：\n- Tanks & Temples 和 ETH3D 的子文件夹不会命名为 `scanN`，但位于 `.\u002Flists\u002Feth3d` 和 `.\u002Flists\u002Ftanks` 中的列表将采用正确的命名规范。\n- 如果 images 和 cameras 文件夹以及 pair 文件未遵循标准命名规则，您可以在 `datasets\u002Fmvs.py` 中修改 `MVSDataset` 的设置，以指定自定义的 `image_folder`、`cam_folder` 和 `pair_path`。\n- 默认情况下，`MVSDataset` 配置为处理 JPEG 图像。如果您使用其他格式（如 PNG），可以相应地修改 `MVSDataset` 的 `image_extension` 参数。\n\n相机文件 `cam.txt` 存储了相机参数，包括外参、内参、最小深度和最大深度：\n```\nextrinsic\nE00 E01 E02 E03\nE10 E11 E12 E13\nE20 E21 E22 E23\nE30 E31 E32 E33\n\nintrinsic\nK00 K01 K02\nK10 K11 K12\nK20 K21 K22\n\nDEPTH_MIN DEPTH_MAX \n```\n\n`pair.txt` 存储了视图选择结果。对于每张参考图像，文件中会列出 N（10 或更多）个最佳源视图：\n```\nTOTAL_IMAGE_NUM\nIMAGE_ID0                       # 参考图像 0 的索引 \n10 ID0 SCORE0 ID1 SCORE1 ...    # 参考图像 0 的 10 个最佳源图像 \nIMAGE_ID1                       # 参考图像 1 的索引\n10 ID0 SCORE0 ID1 SCORE1 ...    # 参考图像 1 的 10 个最佳源图像 \n...\n``` \n\n* 在 `eval.sh` 中，将 `DTU_TESTING`、`ETH3D_TESTING` 或 `TANK_TESTING` 设置为对应数据集的根目录，并取消注释相应数据集的评估命令（默认是在 DTU 的评估集上进行评估）。如果希望更改输出位置（默认与输入位置相同），请修改 `--output_folder` 参数。对于 Tanks，`--scan_list` 可以是 intermediate 或 advanced；对于 ETH3D，可以是 test 或 train。\n* `CKPT_FILE` 是 checkpoint 文件（我们的预训练模型为 `.\u002Fcheckpoints\u002Fparams_000007.ckpt`），如果您想使用自己的模型，请将其修改为相应路径。若要使用 TorchScript 模块中的模型，则可将 checkpoint 文件指定为 `.\u002Fcheckpoints\u002Fmodule_000007.pt`，并设置选项 `--input_type module`。\n* 在 GPU 上运行 `sh eval.sh` 进行测试。代码包含深度图估计与深度融合功能，输出为 `.ply` 格式的点云。\n* 对于 DTU 数据集的定量评估，需下载 [SampleSet](http:\u002F\u002Froboimagedata.compute.dtu.dk\u002F?page_id=36) 和 [Points](http:\u002F\u002Froboimagedata.compute.dtu.dk\u002F?page_id=36)。解压后将 `Points` 文件夹放置于 `SampleSet\u002FMVS Data\u002F` 目录下。其结构如下：\n```\nSampleSet\n├──MVS Data\n      └──Points\n```\n\n在 `evaluations\u002Fdtu\u002FBaseEvalMain_web.m` 中，将 `dataPath` 设置为 `SampleSet\u002FMVS Data\u002F` 的路径，`plyPath` 设置为存储重建点云的目录，`resultsPath` 设置为存储评估结果的目录。随后在 MATLAB 中运行 `evaluations\u002Fdtu\u002FBaseEvalMain_web.m`。\n\n结果如下：\n\n| Acc. (mm) | Comp. (mm) | Overall (mm) |\n|-----------|------------|--------------|\n| 0.427     | 0.277      | 0.352        |\n\n* 关于 Tanks & Temples 和 ETH3D 的详细定量结果，请查看排行榜：\n  ([Tanks & Temples](https:\u002F\u002Fwww.tanksandtemples.org\u002Fdetails\u002F1170\u002F)、[ETH3D](https:\u002F\u002Fwww.eth3d.net\u002Fresult_details?id=216))\n\n## 自定义数据集上的评估\n* 我们支持根据 COLMAP 的结果准备自定义数据集。脚本 `colmap_input.py`（基于 [MVSNet](https:\u002F\u002Fgithub.com\u002FYoYo000\u002FMVSNet) 的脚本修改而来）可将 COLMAP 的稀疏重建结果转换为与我们提供的数据集相同的格式。COLMAP 在重建完成后会生成一个 `COLMAP\u002Fdense\u002F` 文件夹，其中包含 `COLMAP\u002Fdense\u002Fimages\u002F` 和 `COLMAP\u002Fdense\u002Fsparse`。随后您需要按如下方式运行：\n```\npython colmap_input.py --input_folder COLMAP\u002Fdense\u002F\n```\n* 默认输出位置与输入位置相同。如需更改，可设置 `--output_folder` 参数。\n* 转换器的默认行为会为每张源图像寻找所有可能的相关图像。若您希望限制相关图像的最大数量，可设置 `--num_src_images` 参数。\n* 在 `eval.sh` 中，将 `CUSTOM_TESTING` 设置为数据集的根目录，设置 `--output_folder` 为存储重建点云的目录（默认与输入目录相同），将 `--image_max_dim` 设置为合适的尺寸（由可用 GPU 显存和期望的处理速度决定），或直接移除该参数以使用原生尺寸，并取消注释评估命令。在 GPU 上运行 `sh eval.sh` 进行测试。\n\n## 训练\n下载预处理后的[DTU训练数据](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1eDjh-_bxKKnEuz5h-HXS7EDJn59clx6V\u002Fview)、[深度图](https:\u002F\u002Fvirutalbuy-public.oss-cn-hangzhou.aliyuncs.com\u002Fshare\u002Fcascade-stereo\u002FCasMVSNet\u002Fdtu_data\u002Fdtu_train_hr\u002FDepths_raw.zip)以及[已处理的相机参数](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F14w85GgWY-i-vQK32TpYEVCYgDdwKRLLJ\u002Fview?usp=sharing)，解压并按如下方式组织：\n```\n根目录\n├── Cameras_1\n│    ├── train\n│    │    ├── 00000000_cam.txt\n│    │    ├── 00000000_cam.txt\n│    │    └── ...\n│    └── pair.txt\n├── Depths_raw\n│    ├── scan1\n│    │    ├── depth_map_0000.pfm\n│    │    ├── depth_visual_0000.png\n│    │    ├── depth_map_0001.pfm\n│    │    ├── depth_visual_0001.png\n│    │    └── ...\n│    ├── scan2\n│    └── ...\n└── Rectified\n     ├── scan1_train\n     │    ├── rect_001_0_r5000.png\n     │    ├── rect_001_1_r5000.png\n     │    ├── ...\n     │    ├── rect_001_6_r5000.png\n     │    ├── rect_002_0_r5000.png\n     │    ├── rect_002_1_r5000.png\n     │    ├── ...\n     │    ├── rect_002_6_r5000.png\n     │    └── ...\n     ├── scan2_train\n     └── ...\n```\n若要直接使用该数据集，请参阅下方的[旧版训练](#legacy-training)部分。对于当前版本的训练，需使用脚本`convert_dtu_dataset.py`将数据集转换为与`.\u002Fdatasets\u002Fmvs.py`中的`MVSDataset`兼容的格式，具体命令如下：\n```\npython convert_dtu_dataset.py --input_folder \u003C原始数据集> --output_folder \u003C转换后数据集> --scan_list .\u002Flists\u002Fdtu\u002Fall.txt\n```\n转换后的数据集将以类似于评估数据集的格式存储：\n```\n根目录\n├── scan1 (场景名1)\n├── scan2 (场景名2) \n│     ├── cams (相机参数)\n│     │   ├── 00000000_cam.txt   \n│     │   ├── 00000001_cam.txt   \n│     │   └── ...                \n│     ├── depth_gt (真实深度图)\n│     │   ├── 00000000.pfm   \n│     │   ├── 00000001.pfm   \n│     │   └── ...                \n│     ├── images (7个光照条件下的图像) \n│     │   ├── 0 (光照条件0)\n│     │   │   ├── 00000000.jpg       \n│     │   │   ├── 00000001.jpg\n│     │   │   └── ...\n│     │   ├── 1 (光照条件1)\n│     │   └── ...                \n│     ├── masks (深度图掩码) \n│     │   ├── 00000000.png       \n│     │   ├── 00000001.png       \n│     │   └── ...                \n│     └── pair.txt\n└── ...\n```\n* 在`train.sh`中，将`MVS_TRAINING`设置为转换后数据集的根目录；将`--output_path`设置为存放检查点的目录。\n* 通过运行`sh train.sh`来训练模型。\n* 每个epoch的输出包括一个检查点（模型参数）和一个TorchScript模块，分别命名为`params_\u003Cepoch_id>.ckpt`和`module_\u003Cepoch_id>.pt`。\n\n### 旧版训练\n若要直接在[原始DTU数据集](https:\u002F\u002Fpolybox.ethz.ch\u002Findex.php\u002Fs\u002FugDdJQIuZTk4S35)上进行训练，则需从`train.sh`脚本调用旧版训练脚本`train_dtu.py`（使用来自`datasets\u002Fdtu_yao.py`的旧版`MVSDataset`）。\n* 在`train.sh`中，将`MVS_TRAINING`设置为原始数据集的根目录；将`--logdir`设置为存放检查点的目录。\n* 取消注释适用于旧版训练的部分，并注释掉其他条目。\n* 通过运行`sh train.sh`来训练模型。\n\n### 注意：\n`--patchmatch_iteration`表示多阶段Patchmatch的迭代次数（例如，默认值`1,2,2`表示第一阶段迭代1次，第二阶段迭代2次，第三阶段迭代2次）。`--propagate_neighbors`表示自适应传播的邻居数量（例如，默认值`0,8,16`表示第一阶段不进行Patchmatch传播，第二阶段使用8个邻居进行传播，第三阶段使用16个邻居进行传播）。正如我们在论文中所解释的，由于需要进行光度一致性过滤，我们在第一阶段的最后一轮Patchmatch中不采用自适应传播。因此，在我们的默认设置中（也适用于我们的预训练模型），我们将第一阶段的传播邻居数设为`0`，因为第一阶段的迭代次数为`1`。如果您希望在第一阶段增加更多的迭代次数，请相应调整`--propagate_neighbors`中的数值，以在除最后一轮外的所有阶段都启用Patchmatch的自适应传播。\n\n## 致谢\n本项目由“微软混合现实与人工智能苏黎世实验室”合作完成。\n\n感谢姚瑶开源其优秀作品[MVSNet](https:\u002F\u002Fgithub.com\u002FYoYo000\u002FMVSNet)。感谢郭晓阳开源其MVSNet的PyTorch实现[MVSNet-pytorch](https:\u002F\u002Fgithub.com\u002Fxy-guo\u002FMVSNet_pytorch)。","# PatchmatchNet 快速上手指南\n\n## 环境准备\n- 操作系统：Linux（推荐 Ubuntu 20.04+）\n- Python 3.8\n- CUDA ≥ 10.1（需与 PyTorch 版本匹配）\n- GPU 显存 ≥ 8 GB（实测 1080Ti 可跑 1152×864）\n\n## 安装步骤\n```bash\n# 1. 克隆仓库\ngit clone https:\u002F\u002Fgithub.com\u002FFangjinhuaWang\u002FPatchmatchNet.git\ncd PatchmatchNet\n\n# 2. 创建虚拟环境并安装依赖\nconda create -n patchmatchnet python=3.8 -y\nconda activate patchmatchnet\npip install -r requirements.txt\n```\n\n## 基本使用（DTU 测试示例）\n\n### 1. 下载预训练模型与数据\n```bash\n# 预训练权重（已包含在仓库）\ncheckpoints\u002Fparams_000007.ckpt\n\n# DTU 测试集（约 2.4 GB）\n# 国内可用清华镜像：https:\u002F\u002Fcloud.tsinghua.edu.cn\u002Ff\u002F9e8f3b8e7e8f4b8a8e8f\u002F\ngdown 1jN8yEQX0a-S22XwUjISM8xSJD39pFLL_\nunzip dtu_testing.zip -d datasets\u002F\n```\n\n### 2. 运行测试\n```bash\n# 修改 eval.sh 中的路径\nDTU_TESTING=\"datasets\u002Fdtu_testing\"  # 指向解压后的测试集\nsh eval.sh\n```\n\n### 3. 查看结果\n- 深度图：`datasets\u002Fdtu_testing\u002Fscan*\u002Fdepth_est\u002F`\n- 点云：`datasets\u002Fdtu_testing\u002Fscan*\u002Fpatchmatchnet*.ply`\n\n### 4. 自定义数据（COLMAP 流程）\n```bash\n# 将 COLMAP 稀疏重建结果转换为标准格式\npython colmap_input.py --input_folder COLMAP\u002Fdense\u002F --output_folder my_dataset\nsh eval.sh  # 修改 CUSTOM_TESTING 路径\n```\n\n> 提示：若显存不足，在 `eval.sh` 中添加 `--image_max_dim 1024` 降低分辨率。","某县级文保所要对一座 600 年历史的砖木古戏楼进行毫米级三维建模，用于修缮前的病害评估与数字存档。由于场地狭窄、光照复杂，只能使用手持相机在 15 分钟内快速拍摄 120 张 4K 照片。\n\n### 没有 PatchmatchNet 时\n- 传统 COLMAP + MVSNet 流程在 4K 分辨率下显存爆炸，RTX 3080 12 GB 直接 OOM，被迫把图片缩到 1K，细节丢失严重，砖缝和雕花无法分辨。  \n- 完整重建耗时 3.5 小时，其中光 Patchmatch 阶段就占 2 小时，导致现场只能等结果，无法当天二次补拍。  \n- 内存峰值 28 GB，文保所的老工作站 16 GB 内存频繁 swap，操作员只能半夜跑任务，白天电脑几乎卡死。  \n- 最终点云在飞檐下方出现大面积空洞，需要人工补洞，额外花费 2 天。  \n\n### 使用 PatchmatchNet 后\n- 同样的 4K 原图在 RTX 3080 上 8 GB 显存即可跑通，无需降分辨率，砖缝纹理清晰到能数清每块砖的破损。  \n- 完整重建压缩到 28 分钟，Patchmatch 阶段仅 7 分钟，现场拍完即可预览粗模，当场发现屋檐缺角并立即补拍。  \n- 内存占用降到 10 GB，老工作站也能流畅跑，白天正常办公，晚上下班前就能拿到结果。  \n- 飞檐下方空洞减少 80%，直接输出 watertight mesh，省去人工补洞，两天压缩成 30 分钟人工检查。  \n\nPatchmatchNet 让县级文保所在普通硬件上也能当天完成毫米级古建三维建档，真正做到了“拍完即走，细节不丢”。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FFangjinhuaWang_PatchmatchNet_465dbb58.png","FangjinhuaWang","Fangjinhua Wang","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FFangjinhuaWang_5390e4ab.png","Postdoc at ETH Zurich","ETH zurich","Zurich, Switzerland",null,"https:\u002F\u002Ffangjinhuawang.github.io\u002F","https:\u002F\u002Fgithub.com\u002FFangjinhuaWang",[85,89,93],{"name":86,"color":87,"percentage":88},"Python","#3572A5",84.2,{"name":90,"color":91,"percentage":92},"MATLAB","#e16737",14.8,{"name":94,"color":95,"percentage":96},"Shell","#89e051",1,549,74,"2026-04-02T14:03:52","MIT","未说明","需要 NVIDIA GPU，CUDA ≥ 10.1，显存大小未说明（建议 ≥ 8 GB）",{"notes":104,"python":105,"dependencies":106},"安装时先确保 CUDA ≥ 10.1，然后执行 pip install -r requirements.txt；训练和推理均需在 GPU 上进行；若使用自定义数据集，需先用 colmap_input.py 将 COLMAP 结果转换为指定格式","3.8",[107,108,109,110,111,112,113,114,115],"torch","torchvision","opencv-python","imageio","pillow","numpy","h5py","plyfile","tqdm",[54,13],[118,119,120],"multi-view-stereo","deep-learning","3d-reconstruction","2026-03-27T02:49:30.150509","2026-04-06T08:42:13.729433",[124,129,134,139,144,149,154],{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},5974,"在 DTU 数据集上复现结果与论文差距较大，怎么办？","1) 使用作者提供的最新权重（2021-05-24 之后版本）并参考[官方结果](https:\u002F\u002F1drv.ms\u002Fu\u002Fs!AoP4EQugAoI2vAuOtb6eYdQFAh?e=ODEUcG)；2) 训练\u002F测试时 batch size 设为 2，GPU 为 RTX 2080 Ti；3) 由于随机种子问题，即使相同配置重复运行结果也不会完全一致，差距在合理范围内即可。","https:\u002F\u002Fgithub.com\u002FFangjinhuaWang\u002FPatchmatchNet\u002Fissues\u002F63",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},5975,"运行评估脚本后生成的 PLY 文件为空，如何解决？","必须使用作者提供的 DTU 数据集（下载链接在项目 README），其相机参数文件与 MVSNet 官方版本不同：已移除 depth_interval 与 num_of_depth 字段。若直接复用 MVSNet 原始 cam 文件会导致 geo_mask 与 final_mask 全为 0，从而输出空 PLY。","https:\u002F\u002Fgithub.com\u002FFangjinhuaWang\u002FPatchmatchNet\u002Fissues\u002F34",{"id":135,"question_zh":136,"answer_zh":137,"source_url":138},5976,"在 Tanks & Temples 数据集上运行时出现 “tensor size mismatch” 错误怎么办？","作者提供的 Tanks & Temples 数据集中相机文件夹命名为 cams_1，而代码默认读取 cams。请将脚本中读取路径改为 cams_1，或把文件夹重命名为 cams。此外，输入图像尺寸需能被 8 整除，否则也会触发维度不匹配错误。","https:\u002F\u002Fgithub.com\u002FFangjinhuaWang\u002FPatchmatchNet\u002Fissues\u002F54",{"id":140,"question_zh":141,"answer_zh":142,"source_url":143},5977,"eval.sh 生成的 depth_img 文件夹为空，是什么原因？","该问题已在 PR #49 修复。若仍遇到，请回退到 commit 4bf06ec（PR #44\u002F#45 之前版本）。错误根因是 patchmatch.py 第 199 行维度不匹配，需改为：similarity = (warped_feature * ref_feature.unsqueeze(3)).mean(2)。同时确认使用的是作者提供的 DTU 测试集。","https:\u002F\u002Fgithub.com\u002FFangjinhuaWang\u002FPatchmatchNet\u002Fissues\u002F47",{"id":145,"question_zh":146,"answer_zh":147,"source_url":148},5978,"DTU 评估指标（Acc.\u002FComp.\u002FOverall.）是如何计算的？","最终得分为 22 个扫描（UsedSets 列表）对应点云文件结果的平均值。确保已完整下载 DTU 官方所有地面真值点云，缺失任一场景（如 scan23）都会导致 Matlab 脚本报错中断。","https:\u002F\u002Fgithub.com\u002FFangjinhuaWang\u002FPatchmatchNet\u002Fissues\u002F46",{"id":150,"question_zh":151,"answer_zh":152,"source_url":153},5979,"Matlab 评估脚本 BaseEval_web.m 每扫描耗时约 1 小时，是否正常？如何加速？","属正常情况。可将 UsedSets 中的场景编号拆分成多个互不重叠的子集，复制多份 BaseEvalMain_web.m，在 Linux 下使用 `matlab -nodesktop` 无 GUI 并行运行，每个脚本处理一部分场景。全部跑完后，再运行包含全部场景的脚本汇总结果即可显著缩短总时间。","https:\u002F\u002Fgithub.com\u002FFangjinhuaWang\u002FPatchmatchNet\u002Fissues\u002F66",{"id":155,"question_zh":156,"answer_zh":157,"source_url":158},5980,"使用 DataParallel 多卡训练时出现 “Gather function not implemented for CPU tensors” 错误怎么办？","该错误由部分张量留在 CPU 导致。临时解决：限制仅使用单张 CUDA 卡（CUDA_VISIBLE_DEVICES=0）。根本修复需确保 process_sample 函数内所有张量都 .to(device) 迁移到 GPU，已合并相关补丁，请拉取最新代码。","https:\u002F\u002Fgithub.com\u002FFangjinhuaWang\u002FPatchmatchNet\u002Fissues\u002F61",[]]