[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-sczhou--ProPainter":3,"tool-sczhou--ProPainter":61},[4,18,28,37,45,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":24,"last_commit_at":25,"category_tags":26,"status":17},9989,"n8n","n8n-io\u002Fn8n","n8n 是一款面向技术团队的公平代码（fair-code）工作流自动化平台，旨在让用户在享受低代码快速构建便利的同时，保留编写自定义代码的灵活性。它主要解决了传统自动化工具要么过于封闭难以扩展、要么完全依赖手写代码效率低下的痛点，帮助用户轻松连接 400 多种应用与服务，实现复杂业务流程的自动化。\n\nn8n 特别适合开发者、工程师以及具备一定技术背景的业务人员使用。其核心亮点在于“按需编码”：既可以通过直观的可视化界面拖拽节点搭建流程，也能随时插入 JavaScript 或 Python 代码、调用 npm 包来处理复杂逻辑。此外，n8n 原生集成了基于 LangChain 的 AI 能力，支持用户利用自有数据和模型构建智能体工作流。在部署方面，n8n 提供极高的自由度，支持完全自托管以保障数据隐私和控制权，也提供云端服务选项。凭借活跃的社区生态和数百个现成模板，n8n 让构建强大且可控的自动化系统变得简单高效。",184740,2,"2026-04-19T23:22:26",[16,14,13,15,27],"插件",{"id":29,"name":30,"github_repo":31,"description_zh":32,"stars":33,"difficulty_score":10,"last_commit_at":34,"category_tags":35,"status":17},10095,"AutoGPT","Significant-Gravitas\u002FAutoGPT","AutoGPT 是一个旨在让每个人都能轻松使用和构建 AI 的强大平台，核心功能是帮助用户创建、部署和管理能够自动执行复杂任务的连续型 AI 智能体。它解决了传统 AI 应用中需要频繁人工干预、难以自动化长流程工作的痛点，让用户只需设定目标，AI 即可自主规划步骤、调用工具并持续运行直至完成任务。\n\n无论是开发者、研究人员，还是希望提升工作效率的普通用户，都能从 AutoGPT 中受益。开发者可利用其低代码界面快速定制专属智能体；研究人员能基于开源架构探索多智能体协作机制；而非技术背景用户也可直接选用预置的智能体模板，立即投入实际工作场景。\n\nAutoGPT 的技术亮点在于其模块化“积木式”工作流设计——用户通过连接功能块即可构建复杂逻辑，每个块负责单一动作，灵活且易于调试。同时，平台支持本地自托管与云端部署两种模式，兼顾数据隐私与使用便捷性。配合完善的文档和一键安装脚本，即使是初次接触的用户也能在几分钟内启动自己的第一个 AI 智能体。AutoGPT 正致力于降低 AI 应用门槛，让人人都能成为 AI 的创造者与受益者。",183572,"2026-04-20T04:47:55",[13,36,27,14,15],"语言模型",{"id":38,"name":39,"github_repo":40,"description_zh":41,"stars":42,"difficulty_score":10,"last_commit_at":43,"category_tags":44,"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":46,"name":47,"github_repo":48,"description_zh":49,"stars":50,"difficulty_score":24,"last_commit_at":51,"category_tags":52,"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":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":24,"last_commit_at":59,"category_tags":60,"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",[27,13,15,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":77,"owner_location":78,"owner_email":79,"owner_twitter":80,"owner_website":81,"owner_url":82,"languages":83,"stars":88,"forks":89,"last_commit_at":90,"license":91,"difficulty_score":10,"env_os":92,"env_gpu":93,"env_ram":92,"env_deps":94,"category_tags":101,"github_topics":103,"view_count":24,"oss_zip_url":109,"oss_zip_packed_at":109,"status":17,"created_at":110,"updated_at":111,"faqs":112,"releases":153},10155,"sczhou\u002FProPainter","ProPainter","[ICCV 2023] ProPainter: Improving Propagation and Transformer for Video Inpainting","ProPainter 是一款专为视频修复打造的先进开源 AI 工具，由南洋理工大学团队研发并发表于 ICCV 2023。它的核心功能是智能移除视频中不需要的物体（如路人、杂物），或自动补全视频中缺失、损坏的画面区域。与传统方法相比，ProPainter 有效解决了视频修复中常见的画面闪烁、纹理模糊以及时间序列不连贯等难题，能够生成细节丰富且过渡自然的修复结果。\n\n在技术层面，ProPainter 的独特之处在于改进了光流传播机制与 Transformer 架构。通过引入“递归传播”策略，它能更精准地利用视频前后帧的信息来填补当前帧的空白，确保修复内容在动态场景中依然保持稳定和真实。此外，项目近期还优化了显存占用，支持在消费级显卡上进行高效推理，降低了使用门槛。\n\n这款工具非常适合多类人群使用：影视后期设计师可利用它快速清理拍摄素材中的穿帮镜头；研究人员可基于其开源代码探索视频生成前沿技术；开发者能将其集成到多媒体处理工作流中。虽然官方移除了直接去水印的演示以防滥用，但其强大的物体移除能力仍为合法的视频编辑需求提供了极佳的解决方案。无论是专业创作者还是技术爱好者，都能通过 ProPain","ProPainter 是一款专为视频修复打造的先进开源 AI 工具，由南洋理工大学团队研发并发表于 ICCV 2023。它的核心功能是智能移除视频中不需要的物体（如路人、杂物），或自动补全视频中缺失、损坏的画面区域。与传统方法相比，ProPainter 有效解决了视频修复中常见的画面闪烁、纹理模糊以及时间序列不连贯等难题，能够生成细节丰富且过渡自然的修复结果。\n\n在技术层面，ProPainter 的独特之处在于改进了光流传播机制与 Transformer 架构。通过引入“递归传播”策略，它能更精准地利用视频前后帧的信息来填补当前帧的空白，确保修复内容在动态场景中依然保持稳定和真实。此外，项目近期还优化了显存占用，支持在消费级显卡上进行高效推理，降低了使用门槛。\n\n这款工具非常适合多类人群使用：影视后期设计师可利用它快速清理拍摄素材中的穿帮镜头；研究人员可基于其开源代码探索视频生成前沿技术；开发者能将其集成到多媒体处理工作流中。虽然官方移除了直接去水印的演示以防滥用，但其强大的物体移除能力仍为合法的视频编辑需求提供了极佳的解决方案。无论是专业创作者还是技术爱好者，都能通过 ProPainter 体验到高质量的自动化视频修复能力。","\u003Cdiv align=\"center\">\n\n\u003Cdiv class=\"logo\">\n   \u003Ca href=\"https:\u002F\u002Fshangchenzhou.com\u002Fprojects\u002FProPainter\u002F\">\n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_readme_f71f02d56132.png\" style=\"width: 180px\">\n   \u003C\u002Fa>\n\u003C\u002Fdiv>\n\n\u003Ch1>ProPainter: Improving Propagation and Transformer for Video Inpainting\u003C\u002Fh1>\n\n\u003Cdiv>\n    \u003Ca href='https:\u002F\u002Fshangchenzhou.com\u002F' target='_blank'>Shangchen Zhou\u003C\u002Fa>&emsp;\n    \u003Ca href='https:\u002F\u002Fli-chongyi.github.io\u002F' target='_blank'>Chongyi Li\u003C\u002Fa>&emsp;\n    \u003Ca href='https:\u002F\u002Fckkelvinchan.github.io\u002F' target='_blank'>Kelvin C.K. Chan\u003C\u002Fa>&emsp;\n    \u003Ca href='https:\u002F\u002Fwww.mmlab-ntu.com\u002Fperson\u002Fccloy\u002F' target='_blank'>Chen Change Loy\u003C\u002Fa>\n\u003C\u002Fdiv>\n\u003Cdiv>\n    S-Lab, Nanyang Technological University&emsp; \n\u003C\u002Fdiv>\n\n\u003Cdiv>\n    \u003Cstrong>ICCV 2023\u003C\u002Fstrong>\n\u003C\u002Fdiv>\n\n\u003Cdiv>\n    \u003Ch4 align=\"center\">\n        \u003Ca href=\"https:\u002F\u002Fshangchenzhou.com\u002Fprojects\u002FProPainter\" target='_blank'>\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F🐳-Project%20Page-blue\">\n        \u003C\u002Fa>\n        \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2309.03897\" target='_blank'>\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2309.03897-b31b1b.svg\">\n        \u003C\u002Fa>\n        \u003Ca href=\"https:\u002F\u002Fyoutu.be\u002F92EHfgCO5-Q\" target='_blank'>\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDemo%20Video-%23FF0000.svg?logo=YouTube&logoColor=white\">\n        \u003C\u002Fa>\n        \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fsczhou\u002FProPainter\" target='_blank'>\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDemo-%F0%9F%A4%97%20Hugging%20Face-blue\">\n        \u003C\u002Fa>\n        \u003Ca href=\"https:\u002F\u002Fopenxlab.org.cn\u002Fapps\u002Fdetail\u002FShangchenZhou\u002FProPainter\" target='_blank'>\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDemo-%F0%9F%91%A8%E2%80%8D%F0%9F%8E%A8%20OpenXLab-blue\">\n        \u003C\u002Fa>\n        \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_readme_e9dc14225eb5.png\">\n    \u003C\u002Fh4>\n\u003C\u002Fdiv>\n\n⭐ If ProPainter is helpful to your projects, please help star this repo. Thanks! 🤗\n\n:open_book: For more visual results, go checkout our \u003Ca href=\"https:\u002F\u002Fshangchenzhou.com\u002Fprojects\u002FProPainter\u002F\" target=\"_blank\">project page\u003C\u002Fa>\n\n\n---\n\n\u003C\u002Fdiv>\n\n\n## Update\n- **2023.11.09**: Integrated to :man_artist: [OpenXLab](https:\u002F\u002Fopenxlab.org.cn\u002Fapps). Try out online demo! [![OpenXLab](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDemo-%F0%9F%91%A8%E2%80%8D%F0%9F%8E%A8%20OpenXLab-blue)](https:\u002F\u002Fopenxlab.org.cn\u002Fapps\u002Fdetail\u002FShangchenZhou\u002FProPainter)\n- **2023.11.09**: Integrated to :hugs: [Hugging Face](https:\u002F\u002Fhuggingface.co\u002Fspaces). Try out online demo! [![Hugging Face](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDemo-%F0%9F%A4%97%20Hugging%20Face-blue)](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fsczhou\u002FProPainter)\n- **2023.09.24**: We remove the watermark removal demos officially to prevent the misuse of our work for unethical purposes.\n- **2023.09.21**: Add features for memory-efficient inference. Check our [GPU memory](https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter#-memory-efficient-inference) requirements. 🚀\n- **2023.09.07**: Our code and model are publicly available. 🐳\n- **2023.09.01**: This repo is created.\n\n\n### TODO\n- [ ] Make a Colab demo.\n- [x] ~~Make a interactive Gradio demo.~~\n- [x] ~~Update features for memory-efficient inference.~~\n  \n## Results\n\n#### 👨🏻‍🎨 Object Removal\n\u003Ctable>\n\u003Ctr>\n   \u003Ctd> \n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_readme_2054f3d4e0a3.gif\">\n   \u003C\u002Ftd>\n   \u003Ctd> \n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_readme_eb471dd3c08a.gif\">\n   \u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n#### 🎨 Video Completion\n\u003Ctable>\n\u003Ctr>\n   \u003Ctd> \n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_readme_17a4304f97c4.gif\">\n   \u003C\u002Ftd>\n   \u003Ctd> \n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_readme_7994844970f4.gif\">\n   \u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n   \u003Ctd> \n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_readme_9402ac69a7c6.gif\">\n   \u003C\u002Ftd>\n   \u003Ctd> \n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_readme_4097d761e223.gif\">\n   \u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n\n\n## Overview\n![overall_structure](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_readme_554a85c045ec.png)\n\n\n## Dependencies and Installation\n\n1. Clone Repo\n\n   ```bash\n   git clone https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter.git\n   ```\n\n2. Create Conda Environment and Install Dependencies\n\n   ```bash\n   # create new anaconda env\n   conda create -n propainter python=3.8 -y\n   conda activate propainter\n\n   # install python dependencies\n   pip3 install -r requirements.txt\n   ```\n\n   - CUDA >= 9.2\n   - PyTorch >= 1.7.1\n   - Torchvision >= 0.8.2\n   - Other required packages in `requirements.txt`\n\n## Get Started\n### Prepare pretrained models\nDownload our pretrained models from [Releases V0.1.0](https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter\u002Freleases\u002Ftag\u002Fv0.1.0) to the `weights` folder. (All pretrained models can also be automatically downloaded during the first inference.)\n\nThe directory structure will be arranged as:\n```\nweights\n   |- ProPainter.pth\n   |- recurrent_flow_completion.pth\n   |- raft-things.pth\n   |- i3d_rgb_imagenet.pt (for evaluating VFID metric)\n   |- README.md\n```\n\n### 🏂 Quick test\nWe provide some examples in the [`inputs`](.\u002Finputs) folder. \nRun the following commands to try it out:\n```shell\n# The first example (object removal)\npython inference_propainter.py --video inputs\u002Fobject_removal\u002Fbmx-trees --mask inputs\u002Fobject_removal\u002Fbmx-trees_mask \n# The second example (video completion)\npython inference_propainter.py --video inputs\u002Fvideo_completion\u002Frunning_car.mp4 --mask inputs\u002Fvideo_completion\u002Fmask_square.png --height 240 --width 432\n```\n\nThe results will be saved in the `results` folder.\nTo test your own videos, please prepare the input `mp4 video` (or `split frames`) and `frame-wise mask(s)`.\n\nIf you want to specify the video resolution for processing or avoid running out of memory, you can set the video size of `--width` and `--height`:\n```shell\n# process a 576x320 video; set --fp16 to use fp16 (half precision) during inference.\npython inference_propainter.py --video inputs\u002Fvideo_completion\u002Frunning_car.mp4 --mask inputs\u002Fvideo_completion\u002Fmask_square.png --height 320 --width 576 --fp16\n```\n\n#### 💃🏻 Interactive Demo\n\nWe also provide an interactive demo for object removal, allowing users to select any object they wish to remove from a video. You can try the demo on [Hugging Face](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fsczhou\u002FProPainter) or run it [locally](https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter\u002Ftree\u002Fmain\u002Fweb-demos\u002Fhugging_face). \n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_readme_587f32bb7511.gif\" alt=\"Demo GIF\" style=\"max-width: 512px; height: auto;\">\n\u003C\u002Fdiv>\n\n*Please note that the demo's interface and usage may differ from the GIF animation above. For detailed instructions, refer to the [user guide](https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter\u002Fblob\u002Fmain\u002Fweb-demos\u002Fhugging_face\u002FREADME.md).*\n\n### 🚀 Memory-efficient inference\n\nVideo inpainting typically requires a significant amount of GPU memory. Here, we offer various features that facilitate memory-efficient inference, effectively avoiding the Out-Of-Memory (OOM) error. You can use the following options to reduce memory usage further:\n\n   - Reduce the number of local neighbors through decreasing the `--neighbor_length` (default 10).\n   - Reduce the number of global references by increasing the `--ref_stride` (default 10).\n   - Set the `--resize_ratio` (default 1.0) to resize the processing video.\n   - Set a smaller video size via specifying the `--width` and `--height`.\n   - Set `--fp16` to use fp16 (half precision) during inference.\n   - Reduce the frames of sub-videos `--subvideo_length` (default 80), which effectively decouples GPU memory costs and video length.\n\nBlow shows the estimated GPU memory requirements for different sub-video lengths with fp32\u002Ffp16 precision: \n\n| Resolution | 50 frames | 80 frames |\n| :---       | :----:    | :----:    |\n| 1280 x 720 | 28G \u002F 19G | OOM \u002F 25G |\n| 720 x 480  | 11G \u002F 7G  | 13G \u002F 8G  |\n| 640 x 480  | 10G \u002F 6G  | 12G \u002F 7G  |\n| 320 x 240  | 3G  \u002F 2G  | 4G  \u002F 3G  | \n\n\n## Dataset preparation\n\u003Ctable>\n\u003Cthead>\n  \u003Ctr>\n    \u003Cth>Dataset\u003C\u002Fth>\n    \u003Cth>YouTube-VOS\u003C\u002Fth>\n    \u003Cth>DAVIS\u003C\u002Fth>\n  \u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n  \u003Ctr>\n    \u003Ctd>Description\u003C\u002Ftd>\n    \u003Ctd>For training (3,471) and evaluation (508)\u003C\u002Ftd>\n    \u003Ctd>For evaluation (50 in 90)\u003C\u002Ftd>\n  \u003Ctr>\n    \u003Ctd>Images\u003C\u002Ftd>\n    \u003Ctd> [\u003Ca href=\"https:\u002F\u002Fcompetitions.codalab.org\u002Fcompetitions\u002F19544#participate-get-data\">Official Link\u003C\u002Fa>] (Download train and test all frames) \u003C\u002Ftd>\n    \u003Ctd> [\u003Ca href=\"https:\u002F\u002Fdata.vision.ee.ethz.ch\u002Fcsergi\u002Fshare\u002Fdavis\u002FDAVIS-2017-trainval-480p.zip\">Official Link\u003C\u002Fa>] (2017, 480p, TrainVal) \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd>Masks\u003C\u002Ftd>\n    \u003Ctd colspan=\"2\"> [\u003Ca href=\"https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1dFTneS_zaJAHjglxU10gYzr1-xALgHa4\u002Fview?usp=sharing\">Google Drive\u003C\u002Fa>] [\u003Ca href=\"https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1JC-UKmlQfjhVtD81196cxA?pwd=87e3\">Baidu Disk\u003C\u002Fa>] (For reproducing paper results; provided in \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2309.03897\">ProPainter\u003C\u002Fa> paper) \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\nThe training and test split files are provided in `datasets\u002F\u003Cdataset_name>`. For each dataset, you should place `JPEGImages` to `datasets\u002F\u003Cdataset_name>`. Resize all video frames to size `432x240` for training. Unzip downloaded mask files to `datasets`.\n\nThe `datasets` directory structure will be arranged as: (**Note**: please check it carefully)\n```\ndatasets\n   |- davis\n      |- JPEGImages_432_240\n         |- \u003Cvideo_name>\n            |- 00000.jpg\n            |- 00001.jpg\n      |- test_masks\n         |- \u003Cvideo_name>\n            |- 00000.png\n            |- 00001.png   \n      |- train.json\n      |- test.json\n   |- youtube-vos\n      |- JPEGImages_432_240\n         |- \u003Cvideo_name>\n            |- 00000.jpg\n            |- 00001.jpg\n      |- test_masks\n         |- \u003Cvideo_name>\n            |- 00000.png\n            |- 00001.png\n      |- train.json\n      |- test.json   \n```\n\n## Training\nOur training configures are provided in [`train_flowcomp.json`](.\u002Fconfigs\u002Ftrain_flowcomp.json) (for Recurrent Flow Completion Network) and [`train_propainter.json`](.\u002Fconfigs\u002Ftrain_propainter.json) (for ProPainter).\n\nRun one of the following commands for training:\n```shell\n # For training Recurrent Flow Completion Network\n python train.py -c configs\u002Ftrain_flowcomp.json\n # For training ProPainter\n python train.py -c configs\u002Ftrain_propainter.json\n```\nYou can run the **same command** to **resume** your training.\n\nTo speed up the training process, you can precompute optical flow for the training dataset using the following command:\n```shell\n # Compute optical flow for training dataset\n python scripts\u002Fcompute_flow.py --root_path \u003Cdataset_root> --save_path \u003Csave_flow_root> --height 240 --width 432\n```\n\n## Evaluation\nRun one of the following commands for evaluation:\n```shell\n # For evaluating flow completion model\n python scripts\u002Fevaluate_flow_completion.py --dataset \u003Cdataset_name> --video_root \u003Cvideo_root> --mask_root \u003Cmask_root> --save_results\n # For evaluating ProPainter model\n python scripts\u002Fevaluate_propainter.py --dataset \u003Cdataset_name> --video_root \u003Cvideo_root> --mask_root \u003Cmask_root> --save_results\n```\n\nThe scores and results will also be saved in the `results_eval` folder.\nPlease `--save_results` for further [evaluating temporal warping error](https:\u002F\u002Fgithub.com\u002Fphoenix104104\u002Ffast_blind_video_consistency#evaluation).\n\n\n\n## Citation\n\n   If you find our repo useful for your research, please consider citing our paper:\n\n   ```bibtex\n   @inproceedings{zhou2023propainter,\n      title={{ProPainter}: Improving Propagation and Transformer for Video Inpainting},\n      author={Zhou, Shangchen and Li, Chongyi and Chan, Kelvin C.K and Loy, Chen Change},\n      booktitle={Proceedings of IEEE International Conference on Computer Vision (ICCV)},\n      year={2023}\n   }\n   ```\n\n\n## License\n\n#### Non-Commercial Use Only Declaration\nThe ProPainter is made available for use, reproduction, and distribution strictly for non-commercial purposes. The code and models are licensed under \u003Ca rel=\"license\" href=\".\u002FLICENSE\">NTU S-Lab License 1.0\u003C\u002Fa>. Redistribution and use should follow this license.\n\nFor inquiries or to obtain permission for commercial use, please consult Dr. Shangchen Zhou (shangchenzhou@gmail.com).\n\n\n## Projects that use ProPainter\n\nIf you develop or use ProPainter in your projects, feel free to let me know. Also, please include this [ProPainter](https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter) repo link, authorship information, and our [S-Lab license](https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter\u002Fblob\u002Fmain\u002FLICENSE) (with link).\n\n#### Projects\u002FApplications from the Community\n\n- Streaming ProPainter: https:\u002F\u002Fgithub.com\u002Fosmr\u002Fpropainter\n- Faster ProPainter: https:\u002F\u002Fgithub.com\u002Fhalfzm\u002Ffaster-propainter\n- ProPainter WebUI: https:\u002F\u002Fgithub.com\u002Fhalfzm\u002FProPainter-Webui\n- ProPainter ComfyUI: https:\u002F\u002Fgithub.com\u002Fdaniabib\u002FComfyUI_ProPainter_Nodes\n- Cutie (video segmentation): https:\u002F\u002Fgithub.com\u002Fhkchengrex\u002FCutie\n- Cinetransfer (character transfer): https:\u002F\u002Fvirtualfilmstudio.github.io\u002Fprojects\u002Fcinetransfer\n- Motionshop (character transfer): https:\u002F\u002Faigc3d.github.io\u002Fmotionshop\n\n\n\n#### PyPI\n- propainter: https:\u002F\u002Fpypi.org\u002Fproject\u002Fpropainter\n- pytorchcv: https:\u002F\u002Fpypi.org\u002Fproject\u002Fpytorchcv\n\n## Contact\nIf you have any questions, please feel free to reach me out at shangchenzhou@gmail.com. \n\n## Acknowledgement\n\nThis code is based on [E\u003Csup>2\u003C\u002Fsup>FGVI](https:\u002F\u002Fgithub.com\u002FMCG-NKU\u002FE2FGVI) and [STTN](https:\u002F\u002Fgithub.com\u002Fresearchmm\u002FSTTN). Some code are brought from [BasicVSR++](https:\u002F\u002Fgithub.com\u002Fckkelvinchan\u002FBasicVSR_PlusPlus). Thanks for their awesome works. \n\nSpecial thanks to [Yihang Luo](https:\u002F\u002Fgithub.com\u002FLuo-Yihang) for his valuable contributions to build and maintain the Gradio demos for ProPainter.\n","\u003Cdiv align=\"center\">\n\n\u003Cdiv class=\"logo\">\n   \u003Ca href=\"https:\u002F\u002Fshangchenzhou.com\u002Fprojects\u002FProPainter\u002F\">\n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_readme_f71f02d56132.png\" style=\"width: 180px\">\n   \u003C\u002Fa>\n\u003C\u002Fdiv>\n\n\u003Ch1>ProPainter：改进视频修复中的传播与Transformer\u003C\u002Fh1>\n\n\u003Cdiv>\n    \u003Ca href='https:\u002F\u002Fshangchenzhou.com\u002F' target='_blank'>周尚辰\u003C\u002Fa>&emsp;\n    \u003Ca href='https:\u002F\u002Fli-chongyi.github.io\u002F' target='_blank'>李崇义\u003C\u002Fa>&emsp;\n    \u003Ca href='https:\u002F\u002Fckkelvinchan.github.io\u002F' target='_blank'>陈嘉健\u003C\u002Fa>&emsp;\n    \u003Ca href='https:\u002F\u002Fwww.mmlab-ntu.com\u002Fperson\u002Fccloy\u002F' target='_blank'>罗晨杰\u003C\u002Fa>\n\u003C\u002Fdiv>\n\u003Cdiv>\n    南洋理工大学S-Lab&emsp; \n\u003C\u002Fdiv>\n\n\u003Cdiv>\n    \u003Cstrong>ICCV 2023\u003C\u002Fstrong>\n\u003C\u002Fdiv>\n\n\u003Cdiv>\n    \u003Ch4 align=\"center\">\n        \u003Ca href=\"https:\u002F\u002Fshangchenzhou.com\u002Fprojects\u002FProPainter\" target='_blank'>\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F🐳-Project%20Page-blue\">\n        \u003C\u002Fa>\n        \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2309.03897\" target='_blank'>\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2309.03897-b31b1b.svg\">\n        \u003C\u002Fa>\n        \u003Ca href=\"https:\u002F\u002Fyoutu.be\u002F92EHfgCO5-Q\" target='_blank'>\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDemo%20Video-%23FF0000.svg?logo=YouTube&logoColor=white\">\n        \u003C\u002Fa>\n        \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fsczhou\u002FProPainter\" target='_blank'>\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDemo-%F0%9F%A4%97%20Hugging%20Face-blue\">\n        \u003C\u002Fa>\n        \u003Ca href=\"https:\u002F\u002Fopenxlab.org.cn\u002Fapps\u002Fdetail\u002FShangchenZhou\u002FProPainter\" target='_blank'>\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDemo-%F0%9F%91%A8%E2%80%8D%F0%9F%8E%A8%20OpenXLab-blue\">\n        \u003C\u002Fa>\n        \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_readme_e9dc14225eb5.png\">\n    \u003C\u002Fh4>\n\u003C\u002Fdiv>\n\n⭐ 如果ProPainter对您的项目有所帮助，请为本仓库点个赞。谢谢！🤗\n\n:open_book: 如需更多可视化结果，请访问我们的\u003Ca href=\"https:\u002F\u002Fshangchenzhou.com\u002Fprojects\u002FProPainter\u002F\" target=\"_blank\">项目页面\u003C\u002Fa>\n\n\n---\n\n\u003C\u002Fdiv>\n\n\n## 更新\n- **2023.11.09**：集成至 :man_artist: [OpenXLab](https:\u002F\u002Fopenxlab.org.cn\u002Fapps)。快来体验在线演示吧！[![OpenXLab](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDemo-%F0%9F%91%A8%E2%80%8D%F0%9F%8E%A8%20OpenXLab-blue)](https:\u002F\u002Fopenxlab.org.cn\u002Fapps\u002Fdetail\u002FShangchenZhou\u002FProPainter)\n- **2023.11.09**：集成至 :hugs: [Hugging Face](https:\u002F\u002Fhuggingface.co\u002Fspaces)。快来体验在线演示吧！[![Hugging Face](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDemo-%F0%9F%A4%97%20Hugging%20Face-blue)](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fsczhou\u002FProPainter)\n- **2023.09.24**：我们正式移除了水印去除演示，以防止我们的工作被用于不道德的目的。\n- **2023.09.21**：新增了内存高效推理功能。请查看我们的[GPU内存](https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter#-memory-efficient-inference)要求。🚀\n- **2023.09.07**：我们的代码和模型已公开发布。🐳\n- **2023.09.01**：本仓库创建。\n\n\n### 待办事项\n- [ ] 制作Colab演示。\n- [x] ~~制作交互式Gradio演示。~~\n- [x] ~~更新内存高效推理功能。~~\n  \n## 结果\n\n#### 👨🏻‍🎨 物体移除\n\u003Ctable>\n\u003Ctr>\n   \u003Ctd> \n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_readme_2054f3d4e0a3.gif\">\n   \u003C\u002Ftd>\n   \u003Ctd> \n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_readme_eb471dd3c08a.gif\">\n   \u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n#### 🎨 视频补全\n\u003Ctable>\n\u003Ctr>\n   \u003Ctd> \n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_readme_17a4304f97c4.gif\">\n   \u003C\u002Ftd>\n   \u003Ctd> \n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_readme_7994844970f4.gif\">\n   \u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n   \u003Ctd> \n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_readme_9402ac69a7c6.gif\">\n   \u003C\u002Ftd>\n   \u003Ctd> \n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_readme_4097d761e223.gif\">\n   \u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n\n\n## 概述\n![overall_structure](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_readme_554a85c045ec.png)\n\n\n## 依赖与安装\n\n1. 克隆仓库\n\n   ```bash\n   git clone https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter.git\n   ```\n\n2. 创建Conda环境并安装依赖\n\n   ```bash\n   # 创建新的Anaconda环境\n   conda create -n propainter python=3.8 -y\n   conda activate propainter\n\n   # 安装Python依赖\n   pip3 install -r requirements.txt\n   ```\n\n   - CUDA ≥ 9.2\n   - PyTorch ≥ 1.7.1\n   - Torchvision ≥ 0.8.2\n   - `requirements.txt`中列出的其他必要包\n\n## 开始使用\n### 准备预训练模型\n从[Releases V0.1.0](https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter\u002Freleases\u002Ftag\u002Fv0.1.0)下载我们的预训练模型，并将其放置在`weights`文件夹中。（所有预训练模型也可以在首次推理时自动下载。）\n\n目录结构应如下所示：\n```\nweights\n   |- ProPainter.pth\n   |- recurrent_flow_completion.pth\n   |- raft-things.pth\n   |- i3d_rgb_imagenet.pt（用于评估VFID指标）\n   |- README.md\n```\n\n### 🏂 快速测试\n我们在[`inputs`](.\u002Finputs)文件夹中提供了一些示例。运行以下命令即可尝试：\n```shell\n# 第一个示例（物体移除）\npython inference_propainter.py --video inputs\u002Fobject_removal\u002Fbmx-trees --mask inputs\u002Fobject_removal\u002Fbmx-trees_mask \n# 第二个示例（视频补全）\npython inference_propainter.py --video inputs\u002Fvideo_completion\u002Frunning_car.mp4 --mask inputs\u002Fvideo_completion\u002Fmask_square.png --height 240 --width 432\n```\n\n结果将保存在`results`文件夹中。如需测试您自己的视频，请准备输入的`mp4视频`（或`分割后的帧`）以及`逐帧掩码`。\n\n若要指定视频处理分辨率或避免内存不足，可以设置`--width`和`--height`参数：\n```shell\n# 处理分辨率为576×320的视频；设置--fp16以在推理过程中使用半精度（fp16）。\npython inference_propainter.py --video inputs\u002Fvideo_completion\u002Frunning_car.mp4 --mask inputs\u002Fvideo_completion\u002Fmask_square.png --height 320 --width 576 --fp16\n```\n\n#### 💃🏻 交互式演示\n\n我们还提供了物体移除的交互式演示，用户可以选择视频中任何想要移除的对象。您可以在[Hugging Face](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fsczhou\u002FProPainter)上试用该演示，或在本地运行它（详见[GitHub](https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter\u002Ftree\u002Fmain\u002Fweb-demos\u002Fhugging_face)）。 \n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_readme_587f32bb7511.gif\" alt=\"演示GIF\" style=\"max-width: 512px; height: auto;\">\n\u003C\u002Fdiv>\n\n*请注意，演示界面和使用方法可能与上方的GIF动画有所不同。有关详细说明，请参阅[用户指南](https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter\u002Fblob\u002Fmain\u002Fweb-demos\u002Fhugging_face\u002FREADME.md)。*\n\n### 🚀 内存高效的推理\n\n视频修复通常需要大量的显存。在此，我们提供了多种功能来实现内存高效的推理，从而有效避免“显存不足”（OOM）错误。您可以使用以下选项进一步降低显存占用：\n\n   - 通过减少 `--neighbor_length` 参数值（默认为10）来减少局部邻域的数量。\n   - 通过增加 `--ref_stride` 参数值（默认为10）来减少全局参考帧的数量。\n   - 设置 `--resize_ratio` 参数（默认为1.0）以调整处理视频的分辨率。\n   - 通过指定 `--width` 和 `--height` 参数来设置更小的视频尺寸。\n   - 设置 `--fp16` 参数，在推理过程中使用半精度浮点数（FP16）。\n   - 减少子视频的帧数 `--subvideo_length`（默认为80），这可以有效地解耦显存消耗与视频长度之间的关系。\n\n下表展示了在FP32和FP16精度下，不同子视频长度所需的显存估算：\n\n| 分辨率       | 50帧    | 80帧    |\n| :---        | :----:  | :----:  |\n| 1280 x 720  | 28G \u002F 19G | OOM \u002F 25G |\n| 720 x 480   | 11G \u002F 7G  | 13G \u002F 8G  |\n| 640 x 480   | 10G \u002F 6G  | 12G \u002F 7G  |\n| 320 x 240   | 3G  \u002F 2G  | 4G  \u002F 3G  |\n\n\n## 数据集准备\n\u003Ctable>\n\u003Cthead>\n  \u003Ctr>\n    \u003Cth>数据集\u003C\u002Fth>\n    \u003Cth>YouTube-VOS\u003C\u002Fth>\n    \u003Cth>DAVIS\u003C\u002Fth>\n  \u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n  \u003Ctr>\n    \u003Ctd>描述\u003C\u002Ftd>\n    \u003Ctd>用于训练（3,471个）和评估（508个）\u003C\u002Ftd>\n    \u003Ctd>仅用于评估（90个视频中的50个）\u003C\u002Ftd>\n  \u003Ctr>\n    \u003Ctd>图像\u003C\u002Ftd>\n    \u003Ctd colspan=\"2\"> [\u003Ca href=\"https:\u002F\u002Fcompetitions.codalab.org\u002Fcompetitions\u002F19544#participate-get-data\">官方链接\u003C\u002Fa>]（下载训练和测试的所有帧） \u003C\u002Ftd>\n    \u003Ctd> [\u003Ca href=\"https:\u002F\u002Fdata.vision.ee.ethz.ch\u002Fcsergi\u002Fshare\u002Fdavis\u002FDAVIS-2017-trainval-480p.zip\">官方链接\u003C\u002Fa>]（2017年，480p，训练验证集） \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd>掩码\u003C\u002Ftd>\n    \u003Ctd colspan=\"2\"> [\u003Ca href=\"https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1dFTneS_zaJAHjglxU10gYzr1-xALgHa4\u002Fview?usp=sharing\">Google Drive\u003C\u002Fa>] [\u003Ca href=\"https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1JC-UKmlQfjhVtD81196cxA?pwd=87e3\">百度网盘\u003C\u002Fa>]（用于复现论文结果；由\u003Ccode>ProPainter\u003C\u002Fcode>论文提供） \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\n训练和测试划分文件位于 `datasets\u002F\u003Cdataset_name>` 目录中。对于每个数据集，您应将 `JPEGImages` 文件夹放置到 `datasets\u002F\u003Cdataset_name>` 中。训练时，请将所有视频帧调整为 `432x240` 的分辨率。并将下载的掩码文件解压到 `datasets` 目录中。\n\n`datasets` 目录结构如下：（**请注意**仔细检查）\n```\ndatasets\n   |- davis\n      |- JPEGImages_432_240\n         |- \u003Cvideo_name>\n            |- 00000.jpg\n            |- 00001.jpg\n      |- test_masks\n         |- \u003Cvideo_name>\n            |- 00000.png\n            |- 00001.png   \n      |- train.json\n      |- test.json\n   |- youtube-vos\n      |- JPEGImages_432_240\n         |- \u003Cvideo_name>\n            |- 00000.jpg\n            |- 00001.jpg\n      |- test_masks\n         |- \u003Cvideo_name>\n            |- 00000.png\n            |- 00001.png\n      |- train.json\n      |- test.json   \n```\n\n## 训练\n我们的训练配置分别位于 [`train_flowcomp.json`](.\u002Fconfigs\u002Ftrain_flowcomp.json)（用于循环流完成网络）和 [`train_propainter.json`](.\u002Fconfigs\u002Ftrain_propainter.json)（用于ProPainter）。\n\n运行以下命令之一进行训练：\n```shell\n # 训练循环流完成网络\n python train.py -c configs\u002Ftrain_flowcomp.json\n # 训练ProPainter\n python train.py -c configs\u002Ftrain_propainter.json\n```\n\n您可以使用**相同的命令**来**恢复**您的训练。\n\n为了加快训练速度，您可以使用以下命令为训练数据集预先计算光流：\n```shell\n # 计算训练数据集的光流\n python scripts\u002Fcompute_flow.py --root_path \u003Cdataset_root> --save_path \u003Csave_flow_root> --height 240 --width 432\n```\n\n## 评估\n运行以下命令之一进行评估：\n```shell\n # 评估流完成模型\n python scripts\u002Fevaluate_flow_completion.py --dataset \u003Cdataset_name> --video_root \u003Cvideo_root> --mask_root \u003Cmask_root> --save_results\n # 评估ProPainter模型\n python scripts\u002Fevaluate_propainter.py --dataset \u003Cdataset_name> --video_root \u003Cvideo_root> --mask_root \u003Cmask_root> --save_results\n```\n\n分数和结果也将保存在 `results_eval` 文件夹中。请务必使用 `--save_results` 选项，以便后续[评估时间扭曲误差](https:\u002F\u002Fgithub.com\u002Fphoenix104104\u002Ffast_blind_video_consistency#evaluation)。\n\n\n\n## 引用\n\n如果您发现我们的仓库对您的研究有所帮助，请考虑引用我们的论文：\n\n   ```bibtex\n   @inproceedings{zhou2023propainter,\n      title={{ProPainter}: Improving Propagation and Transformer for Video Inpainting},\n      author={Zhou, Shangchen and Li, Chongyi and Chan, Kelvin C.K and Loy, Chen Change},\n      booktitle={Proceedings of IEEE International Conference on Computer Vision (ICCV)},\n      year={2023}\n   }\n   ```\n\n\n## 许可证\n\n#### 仅限非商业用途声明\nProPainter仅允许用于非商业目的的使用、复制和分发。代码和模型根据\u003Ca rel=\"license\" href=\".\u002FLICENSE\">NTU S-Lab许可证1.0\u003C\u002Fa>授权。再分发和使用必须遵守该许可协议。\n\n如需咨询或获得商业用途许可，请联系周尚辰博士（shangchenzhou@gmail.com）。\n\n\n## 使用ProPainter的项目\n\n如果您在项目中开发或使用了ProPainter，请随时告知我。同时，请包含此[ProPainter](https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter)仓库链接、作者信息以及我们的[S-Lab许可证](https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter\u002Fblob\u002Fmain\u002FLICENSE)（附链接）。\n\n#### 社区贡献的项目\u002F应用\n\n- 流式ProPainter：https:\u002F\u002Fgithub.com\u002Fosmr\u002Fpropainter\n- 更快的ProPainter：https:\u002F\u002Fgithub.com\u002Fhalfzm\u002Ffaster-propainter\n- ProPainter WebUI：https:\u002F\u002Fgithub.com\u002Fhalfzm\u002FProPainter-Webui\n- ProPainter ComfyUI：https:\u002F\u002Fgithub.com\u002Fdaniabib\u002FComfyUI_ProPainter_Nodes\n- Cutie（视频分割）：https:\u002F\u002Fgithub.com\u002Fhkchengrex\u002FCutie\n- Cinetransfer（角色迁移）：https:\u002F\u002Fvirtualfilmstudio.github.io\u002Fprojects\u002Fcinetransfer\n- Motionshop（角色迁移）：https:\u002F\u002Faigc3d.github.io\u002Fmotionshop\n\n\n\n#### PyPI\n- propainter：https:\u002F\u002Fpypi.org\u002Fproject\u002Fpropainter\n- pytorchcv：https:\u002F\u002Fpypi.org\u002Fproject\u002Fpytorchcv\n\n## 联系方式\n如有任何问题，请随时通过 shangchenzhou@gmail.com 与我联系。\n\n## 致谢\n\n本代码基于[E\u003Csup>2\u003C\u002Fsup>FGVI](https:\u002F\u002Fgithub.com\u002FMCG-NKU\u002FE2FGVI)和[STTN](https:\u002F\u002Fgithub.com\u002Fresearchmm\u002FSTTN)。部分代码来自[BasicVSR++](https:\u002F\u002Fgithub.com\u002Fckkelvinchan\u002FBasicVSR_PlusPlus)。感谢他们的出色工作。\n\n特别感谢[Luo Yihang](https:\u002F\u002Fgithub.com\u002FLuo-Yihang)，他为构建和维护ProPainter的Gradio演示做出了重要贡献。","# ProPainter 快速上手指南\n\nProPainter 是一款基于 ICCV 2023 论文的视频修复（Video Inpainting）开源工具，擅长处理视频物体移除和视频补全任务。\n\n## 1. 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **操作系统**: Linux (推荐) 或 Windows\n*   **GPU**: NVIDIA 显卡，显存建议 8GB 以上（支持内存优化模式可降低需求）\n*   **CUDA**: >= 9.2\n*   **Python**: 3.8\n*   **PyTorch**: >= 1.7.1\n*   **Torchvision**: >= 0.8.2\n\n> **国内加速提示**：安装 Python 依赖时，建议使用清华源或阿里源以加快下载速度。\n\n## 2. 安装步骤\n\n### 2.1 克隆项目\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter.git\ncd ProPainter\n```\n\n### 2.2 创建虚拟环境并安装依赖\n```bash\n# 创建名为 propainter 的 conda 环境\nconda create -n propainter python=3.8 -y\nconda activate propainter\n\n# 安装依赖 (推荐使用国内镜像源)\npip3 install -r requirements.txt -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n### 2.3 准备预训练模型\n模型文件通常会在首次推理时自动下载。如果需要手动下载，请从 [Releases V0.1.0](https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter\u002Freleases\u002Ftag\u002Fv0.1.0) 获取文件并放入 `weights` 文件夹。\n\n预期的目录结构如下：\n```\nweights\n   |- ProPainter.pth\n   |- recurrent_flow_completion.pth\n   |- raft-things.pth\n   |- i3d_rgb_imagenet.pt\n   |- README.md\n```\n\n## 3. 基本使用\n\n### 3.1 快速测试（使用示例数据）\n项目自带了示例视频和掩码（mask），位于 `inputs` 文件夹。\n\n**示例 1：物体移除 (Object Removal)**\n```bash\npython inference_propainter.py --video inputs\u002Fobject_removal\u002Fbmx-trees --mask inputs\u002Fobject_removal\u002Fbmx-trees_mask\n```\n\n**示例 2：视频补全 (Video Completion)**\n```bash\npython inference_propainter.py --video inputs\u002Fvideo_completion\u002Frunning_car.mp4 --mask inputs\u002Fvideo_completion\u002Fmask_square.png --height 240 --width 432\n```\n\n运行完成后，结果将保存在 `results` 文件夹中。\n\n### 3.2 处理自定义视频\n要处理自己的视频，请准备以下两个输入：\n1.  **视频文件**：`.mp4` 格式或拆分后的帧图像文件夹。\n2.  **掩码文件**：对应每一帧的黑白掩码图（白色区域为需要修复的部分）。\n\n**命令格式：**\n```bash\npython inference_propainter.py --video \u003C视频路径> --mask \u003C掩码路径>\n```\n\n### 3.3 显存优化（低显存用户必读）\n如果遇到显存不足（OOM）错误，或希望处理更高分辨率视频，可通过以下参数降低显存占用：\n\n*   `--fp16`: 启用半精度推理（显著降低显存）。\n*   `--height` \u002F `--width`: 调整输入视频分辨率。\n*   `--subvideo_length`: 减少子视频长度（默认 80，可设为 50 或更低）。\n*   `--neighbor_length`: 减少局部邻居数量（默认 10）。\n*   `--ref_stride`: 增加全局参考步长（默认 10）。\n\n**低显存运行示例：**\n```bash\n# 将视频调整为 576x320，启用 fp16，缩短子视频长度至 50 帧\npython inference_propainter.py --video inputs\u002Fvideo_completion\u002Frunning_car.mp4 --mask inputs\u002Fvideo_completion\u002Fmask_square.png --height 320 --width 576 --fp16 --subvideo_length 50\n```\n\n### 3.4 交互式演示 (可选)\n如果您希望通过网页界面交互式地涂抹去除物体，可以运行本地 Gradio 演示：\n```bash\n# 进入 web-demos 目录并运行 (需额外安装 gradio 等依赖)\ncd web-demos\u002Fhugging_face\n# 具体运行命令请参考该目录下的 README.md\n```\n或者直接访问在线 Demo：[Hugging Face Space](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fsczhou\u002FProPainter)","某影视后期团队在修复一部珍贵的 90 年代纪录片时，发现原始胶片上存在严重的划痕、灰尘斑点以及因胶带修补留下的遮挡物，急需在不破坏画面连贯性的前提下完成高清修复。\n\n### 没有 ProPainter 时\n- **逐帧修图效率极低**：传统方法需人工在 Photoshop 中逐帧涂抹修复，面对每分钟 24 帧的视频，耗时数周且成本高昂。\n- **动态背景闪烁严重**：简单的静态图像修复算法无法理解时间维度，导致修复区域在视频播放时出现明显的抖动和闪烁，破坏观感。\n- **大物体移除痕迹明显**：对于画面中较大的遮挡物，现有工具难以从周围帧借用纹理，填补内容往往模糊不清或与背景运动轨迹不匹配。\n- **硬件资源消耗过大**：部分高精度视频修复模型对显存要求极高，普通工作站无法运行，必须租用昂贵的云端算力。\n\n### 使用 ProPainter 后\n- **自动化批量处理**：ProPainter 利用改进的传播机制和 Transformer 架构，能自动分析前后帧信息，一键完成整段视频的瑕疵去除，将数周工作缩短至数小时。\n- **时序一致性完美**：通过光流引导的特征传播，ProPainter 确保修复区域随镜头运动自然流动，彻底消除了画面闪烁，视觉过渡平滑如原生拍摄。\n- **复杂场景智能补全**：即使移除画面中心的大面积物体，ProPainter 也能精准参考多帧上下文，生成纹理清晰、结构合理的背景内容，几乎看不出修改痕迹。\n- **显存优化友好**：得益于内存高效推理特性，ProPainter 能在消费级显卡上流畅运行高分辨率视频修复，大幅降低了团队的硬件门槛。\n\nProPainter 通过将时空上下文理解深度融入视频修复流程，让高保真、无闪烁的自动化视频清理成为普惠型工作流。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsczhou_ProPainter_17a4304f.gif","sczhou","Shangchen Zhou","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fsczhou_83746552.png","Research Assistant Professor at MMLab@NTU. ","Nanyang Technological University","Singapore","shangchenzhou@gmail.com","ShangchenZhou","shangchenzhou.com","https:\u002F\u002Fgithub.com\u002Fsczhou",[84],{"name":85,"color":86,"percentage":87},"Python","#3572A5",100,6651,782,"2026-04-20T05:48:30","NOASSERTION","未说明","需要 NVIDIA GPU，CUDA >= 9.2。显存需求取决于分辨率和帧数：处理 720p (1280x720) 50 帧视频需约 19GB (FP16) 或 28GB (FP32)；处理 480p (640x480) 80 帧视频需约 7GB (FP16)。支持通过参数调整以降低显存占用。",{"notes":95,"python":96,"dependencies":97},"建议使用 Conda 创建虚拟环境。首次推理时会自动下载预训练模型（包含 ProPainter.pth, recurrent_flow_completion.pth, raft-things.pth 等）。若遇显存不足 (OOM)，可通过设置 --fp16 (半精度)、减小 --width\u002F--height、缩短 --subvideo_length 或调整 --neighbor_length 等参数进行优化。许可证仅限非商业用途。","3.8",[98,99,100],"PyTorch>=1.7.1","Torchvision>=0.8.2","requirements.txt 中列出的其他包",[102,15],"视频",[104,105,106,107,108],"object-removal","video-completion","video-inpainting","video-outpainting","watermark-removal",null,"2026-03-27T02:49:30.150509","2026-04-20T19:22:55.896178",[113,118,123,128,133,138,143,148],{"id":114,"question_zh":115,"answer_zh":116,"source_url":117},45597,"如何自定义输出分辨率？","可以在命令行中使用 `--size` 参数来设置输出分辨率。请参考推理代码中的参数说明：https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter\u002Fblob\u002Fmain\u002Finference_propainter.py#L177。注意：如果新分辨率的宽和高不能被 8 整除，可能会报错；此外，1080P 输出会消耗大量显存（例如 1920x1080 输入可能需要 96GB 显存），若显存不足需降低分辨率。","https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter\u002Fissues\u002F6",{"id":119,"question_zh":120,"answer_zh":121,"source_url":122},45598,"训练时出现 'view size is not compatible' 错误如何解决？","在报错文件 `model\u002Fpropainter.py` 的第 184 行之前，添加代码 `x = x.contiguous()` 即可解决该问题。这是因为张量在内存中不连续导致的，使用 `.contiguous()` 可以确保其连续性。","https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter\u002Fissues\u002F30",{"id":124,"question_zh":125,"answer_zh":126,"source_url":127},45599,"如何处理长视频（如超过 10 分钟）以避免显存溢出？","目前的推理代码已实现自动子视频切段功能（默认每段 80 帧），可有效解耦显存成本与视频长度，处理完成后无需手动拼接。但对于特别长的视频（如 10 分钟以上），建议先手动切割成 1 分钟以内的片段再进行批量处理，以减少出错概率。","https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter\u002Fissues\u002F23",{"id":129,"question_zh":130,"answer_zh":131,"source_url":132},45600,"安装环境时遇到 'ninja: build stopped' 或 'mmcv' 编译失败怎么办？","维护者已简化安装流程，移除了对 `mmcv` 的依赖并更新了安装步骤。请查看最新的安装指南：https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter#dependencies-and-installation。此修复解决了包括 #1, #7, #13, #20 在内的多个类似安装问题。","https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter\u002Fissues\u002F13",{"id":134,"question_zh":135,"answer_zh":136,"source_url":137},45601,"训练代码中遇到 'flows_f == None' 判断失效的问题如何解决？","这是一个已知 Bug。由于 `flows_f` 和 `flows_b` 实际上是列表，直接判断 `== 'None'` 永远为假。解决方法是将判断条件改为 `if flows_f[0] == 'None' or flows_b[0] == 'None':`。维护者已在最新代码中修复此问题，拉取最新代码即可。","https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter\u002Fissues\u002F29",{"id":139,"question_zh":140,"answer_zh":141,"source_url":142},45602,"Windows 环境下运行推理时程序卡住无报错怎么办？","这是 Windows 用户常见的问题，通常与依赖包版本有关。有用户提供了适用于 Windows (Python 3.7) 的 `requirements.txt` 参考配置，包含特定版本的 torch (1.6.0+cu101), torchvision (0.7.0+cu101), mmcv-full (1.4.8) 等。如果仍然卡住，建议检查显卡驱动及 CUDA 版本兼容性，或尝试在 Linux 环境下运行。","https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter\u002Fissues\u002F1",{"id":144,"question_zh":145,"answer_zh":146,"source_url":147},45603,"遇到 'Could not run torchvision::deform_conv2d' CUDA 后端错误怎么办？","该错误通常是因为 `torchvision` 版本与 PyTorch 版本不匹配，或者安装的 `torchvision` 未包含对应的 CUDA 扩展。请确保安装的是与当前 PyTorch 版本匹配的带有 CUDA 支持的 `torchvision` 版本（例如使用 `pip install torchvision==\u003Cversion>+cu\u003Ccuda_version>` 或从官方源安装）。","https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter\u002Fissues\u002F54",{"id":149,"question_zh":150,"answer_zh":151,"source_url":152},45604,"视频处理后结果出现闪烁（flickering）是什么原因？","闪烁通常与生成的掩码（mask）质量有关。如果您使用 SAM 和 Xmem 获取掩码，请检查掩码的时序一致性。虽然具体解决方案因案例而异（有用户表示问题已解决），但建议确保掩码在帧间平滑过渡，避免单帧绘制导致的抖动。如有必要，可尝试对掩码进行时域滤波处理。","https:\u002F\u002Fgithub.com\u002Fsczhou\u002FProPainter\u002Fissues\u002F9",[154],{"id":155,"version":156,"summary_zh":157,"released_at":158},360480,"v0.1.0","此版本主要用于存储预训练模型等。","2023-09-03T12:26:48"]