[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-zhoubolei--TRN-pytorch":3,"tool-zhoubolei--TRN-pytorch":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":77,"owner_email":75,"owner_twitter":72,"owner_website":78,"owner_url":79,"languages":80,"stars":89,"forks":90,"last_commit_at":91,"license":92,"difficulty_score":93,"env_os":94,"env_gpu":95,"env_ram":96,"env_deps":97,"category_tags":104,"github_topics":75,"view_count":32,"oss_zip_url":75,"oss_zip_packed_at":75,"status":17,"created_at":106,"updated_at":107,"faqs":108,"releases":142},9336,"zhoubolei\u002FTRN-pytorch","TRN-pytorch","Temporal Relation Networks","TRN-pytorch 是一个基于 PyTorch 框架实现的时序关系网络（Temporal Relation Networks）开源项目，专为视频动作识别任务设计。它旨在解决传统方法难以有效捕捉视频中帧与帧之间复杂时间依赖关系的痛点，通过建模不同时间片段间的逻辑关联，显著提升了对“推”、“拉”、“扔”等细粒度动作的理解能力。\n\n该工具特别适合计算机视觉领域的研究人员和开发者使用，尤其是那些希望复现经典论文成果、进行动作识别算法对比或构建自定义视频分析系统的技术团队。其核心亮点在于模块化的 TRN 结构设计，能够以“即插即用”的方式轻松集成到现有的 TSN（时序分段网络）架构中，支持单尺度与多尺度两种训练模式，兼顾了灵活性与高性能。此外，项目不仅提供了在 Something-Something V2、Jester 等主流数据集上预训练的模型权重，还包含了完整的数据预处理、训练及测试脚本，甚至附带了有趣的演示视频（如杂耍动作识别），极大地降低了复现门槛，帮助用户快速验证想法并开展后续研究。","# Temporal Relation Networks\n**NEW(April 20, 2020)**: Check out our recent CVPR'20 work [Temporal Pyramid Networks (TPN) for action recognition](https:\u002F\u002Fgithub.com\u002Fdecisionforce\u002FTPN), which outperforms TRN with a large margin and achieves close to SOTA results on many video benchmarks with RGB stream only. Bonus: bolei_juggling_v2.mp4 is attached in that repo!  \n\nWe release the code of the [Temporal Relation Networks](http:\u002F\u002Frelation.csail.mit.edu\u002F), built on top of the [TSN-pytorch codebase](https:\u002F\u002Fgithub.com\u002Fyjxiong\u002Ftemporal-segment-networks).\n\n**NEW (July 29, 2018)**: This work is accepted to ECCV'18, check the [paper](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1711.08496.pdf) for the latest result. We also release the state of the art model trained on the Something-Something V2, see following instruction.\n\n**Note**: always use `git clone --recursive https:\u002F\u002Fgithub.com\u002Fmetalbubble\u002FTRN-pytorch` to clone this project\nOtherwise you will not be able to use the inception series CNN architecture.\n\n![framework](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzhoubolei_TRN-pytorch_readme_35b80f36078b.png)\n\n### Data preparation\nDownload the [something-something dataset](https:\u002F\u002Fwww.twentybn.com\u002Fdatasets\u002Fsomething-something\u002Fv1) or [jester dataset](https:\u002F\u002Fwww.twentybn.com\u002Fdatasets\u002Fsomething-something) or [charades dataset](http:\u002F\u002Fallenai.org\u002Fplato\u002Fcharades\u002F). Decompress them into some folder. Use [process_dataset.py](process_dataset.py) to generate the index files for train, val, and test split. Finally properly set up the train, validation, and category meta files in [datasets_video.py](datasets_video.py).\n\nFor [Something-Something-V2](https:\u002F\u002Fwww.twentybn.com\u002Fdatasets\u002Fsomething-something), we provide a utilty script [extract_frames.py](https:\u002F\u002Fgithub.com\u002Fmetalbubble\u002FTRN-pytorch\u002Fblob\u002Fmaster\u002Fextract_frames.py) for converting the downloaded `.webm` videos into directories containing extracted frames. Additionally, the corresponding optic flow images can be downloaded from [here](http:\u002F\u002Frelation.csail.mit.edu\u002Fdata\u002F20bn-something-something-v2-flow.tar.gz).\n\n### Code\n\nCore code to implement the Temporal Relation Network module is [TRNmodule](TRNmodule.py). It is plug-and-play on top of the TSN.\n\n### Training and Testing\n\n* The command to train single scale TRN\n\n```bash\nCUDA_VISIBLE_DEVICES=0,1 python main.py something RGB \\\n                     --arch BNInception --num_segments 3 \\\n                     --consensus_type TRN --batch-size 64\n```\n\n* The command to train multi-scale TRN\n```bash\nCUDA_VISIBLE_DEVICES=0,1 python main.py something RGB \\\n                     --arch BNInception --num_segments 8 \\\n                     --consensus_type TRNmultiscale --batch-size 64\n```\n\n* The command to test the single scale TRN\n\n```bash\npython test_models.py something RGB model\u002FTRN_something_RGB_BNInception_TRN_segment3_best.pth.tar \\\n   --arch BNInception --crop_fusion_type TRN --test_segments 3\n```\n\n* The command to test the multi-scale TRN\n\n```bash\npython test_models.py something RGB model\u002FTRN_something_RGB_BNInception_TRNmultiscale_segment8_best.pth.tar \\\n   --arch BNInception --crop_fusion_type TRNmultiscale --test_segments 8\n```\n\n### Pretrained models and demo code\n\n* Download pretrained models on [Something-Something](https:\u002F\u002F20bn.com\u002Fdatasets\u002Fsomething-something\u002Fv1), [Something-Something-V2](https:\u002F\u002Fwww.twentybn.com\u002Fdatasets\u002Fsomething-something), [Jester](https:\u002F\u002Fwww.twentybn.com\u002Fdatasets\u002Fjester), and [Moments in Time](http:\u002F\u002Fmoments.csail.mit.edu\u002F)\n\n```bash\n.\u002Fdownload.sh\n```\n\n* Download sample video and extracted frames. There will be mp4 video file and a folder containing the RGB frames for that video.\n\n```bash\ncd sample_data\n.\u002Fdownload_sample_data.sh\n```\n\nThe sample video is the following\n\n![result](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzhoubolei_TRN-pytorch_readme_e9934d223d7c.gif)\n\n* Test pretrained model trained on Something-Something-V2\n\n```bash\npython test_video.py --arch BNInception --dataset somethingv2 \\\n    --weights pretrain\u002FTRN_somethingv2_RGB_BNInception_TRNmultiscale_segment8_best.pth.tar \\\n    --frame_folder sample_data\u002Fbolei_juggling\n\nRESULT ON sample_data\u002Fbolei_juggling\n0.500 -> Throwing something in the air and catching it\n0.141 -> Throwing something in the air and letting it fall\n0.072 -> Pretending to throw something\n0.024 -> Throwing something\n0.024 -> Hitting something with something\n\n```\n\n\n* Test pretrained model trained on [Moments in Time](http:\u002F\u002Fmoments.csail.mit.edu\u002F)\n\n```bash\npython test_video.py --arch InceptionV3 --dataset moments \\\n    --weights pretrain\u002FTRN_moments_RGB_InceptionV3_TRNmultiscale_segment8_best.pth.tar \\\n    --frame_folder sample_data\u002Fbolei_juggling\n\nRESULT ON sample_data\u002Fbolei_juggling\n\n0.982 -> juggling\n0.003 -> flipping\n0.003 -> spinning\n0.003 -> smoking\n0.002 -> whistling\n```\n\n* Test pretrained model on mp4 video file\n\n```bash\npython test_video.py --arch InceptionV3 --dataset moments \\\n    --weights pretrain\u002FTRN_moments_RGB_InceptionV3_TRNmultiscale_segment8_best.pth.tar \\\n    --video_file sample_data\u002Fbolei_juggling.mp4 --rendered_output sample_data\u002Fpredicted_video.mp4\n```\n\nThe command above uses `ffmpeg` to extract frames from the supplied video `--video_file` and optionally generates a new video `--rendered_output` from the frames used to make the prediction with the predicted category in the top-left corner.\n\n* Gesture recognition web-cam [demo](https:\u002F\u002Fyoutu.be\u002F6PAvFzV4Yfo\u002F) script\npython fps_dem_trn.py\n\n### TODO\n\n* TODO: Web-cam demo script\n* TODO: Visualization script\n* TODO: class-aware data augmentation\n\n### Reference:\nB. Zhou, A. Andonian, and A. Torralba. Temporal Relational Reasoning in Videos. European Conference on Computer Vision (ECCV), 2018. [PDF](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1711.08496.pdf)\n```\n@article{zhou2017temporalrelation,\n    title = {Temporal Relational Reasoning in Videos},\n    author = {Zhou, Bolei and Andonian, Alex and Oliva, Aude and Torralba, Antonio},\n    journal={European Conference on Computer Vision},\n    year={2018}\n}\n```\n\n### Acknowledgement\nOur temporal relation network is plug-and-play on top of the [TSN-Pytorch](https:\u002F\u002Fgithub.com\u002Fyjxiong\u002Ftemporal-segment-networks), but it could be extended to other network architectures easily. We thank Yuanjun Xiong for releasing TSN-Pytorch codebase. Something-something dataset and Jester dataset are from [TwentyBN](https:\u002F\u002Fwww.twentybn.com\u002F), we really appreciate their effort to build such nice video datasets. Please refer to [their dataset website](https:\u002F\u002Fwww.twentybn.com\u002Fdatasets\u002Fsomething-something) for the proper usage of the data.\n","# 时序关系网络\n**新增（2020年4月20日）**：请查看我们最近在CVPR'20发表的工作[用于动作识别的时序金字塔网络（TPN）](https:\u002F\u002Fgithub.com\u002Fdecisionforce\u002FTPN)，该方法大幅超越TRN，在仅使用RGB流的情况下，已在多个视频基准上接近当前最优结果。额外福利：该仓库中附带了bolei_juggling_v2.mp4！  \n\n我们发布了基于[TSN-pytorch代码库](https:\u002F\u002Fgithub.com\u002Fyjxiong\u002Ftemporal-segment-networks)构建的[时序关系网络](http:\u002F\u002Frelation.csail.mit.edu\u002F)的代码。\n\n**新增（2018年7月29日）**：本工作已被ECCV'18接收，请参阅[论文](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1711.08496.pdf)获取最新成果。我们还发布了在Something-Something V2数据集上训练的当前最优模型，具体说明见下文。\n\n**注意**：请始终使用`git clone --recursive https:\u002F\u002Fgithub.com\u002Fmetalbubble\u002FTRN-pytorch`来克隆该项目，否则将无法使用inception系列CNN架构。\n\n![框架](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzhoubolei_TRN-pytorch_readme_35b80f36078b.png)\n\n### 数据准备\n下载[Something-Something数据集](https:\u002F\u002Fwww.twentybn.com\u002Fdatasets\u002Fsomething-something\u002Fv1)、[Jester数据集](https:\u002F\u002Fwww.twentybn.com\u002Fdatasets\u002Fsomething-something)或[Charades数据集](http:\u002F\u002Fallenai.org\u002Fplato\u002Fcharades\u002F)。将其解压到某个文件夹中。使用[process_dataset.py](process_dataset.py)生成训练、验证和测试集的索引文件。最后，在[datasets_video.py](datasets_video.py)中正确配置训练、验证和类别元文件。\n\n对于[Something-Something-V2](https:\u002F\u002Fwww.twentybn.com\u002Fdatasets\u002Fsomething-something)，我们提供了一个实用脚本[extract_frames.py](https:\u002F\u002Fgithub.com\u002Fmetalbubble\u002FTRN-pytorch\u002Fblob\u002Fmaster\u002Fextract_frames.py)，用于将下载的`.webm`视频转换为包含提取帧的目录。此外，对应的光流图像可从[这里](http:\u002F\u002Frelation.csail.mit.edu\u002Fdata\u002F20bn-something-something-v2-flow.tar.gz)下载。\n\n### 代码\n\n实现时序关系网络模块的核心代码是[TRNmodule](TRNmodule.py)。它可以直接插拔到TSN之上。\n\n### 训练与测试\n\n* 单尺度TRN的训练命令：\n\n```bash\nCUDA_VISIBLE_DEVICES=0,1 python main.py something RGB \\\n                     --arch BNInception --num_segments 3 \\\n                     --consensus_type TRN --batch-size 64\n```\n\n* 多尺度TRN的训练命令：\n\n```bash\nCUDA_VISIBLE_DEVICES=0,1 python main.py something RGB \\\n                     --arch BNInception --num_segments 8 \\\n                     --consensus_type TRNmultiscale --batch-size 64\n```\n\n* 单尺度TRN的测试命令：\n\n```bash\npython test_models.py something RGB model\u002FTRN_something_RGB_BNInception_TRN_segment3_best.pth.tar \\\n   --arch BNInception --crop_fusion_type TRN --test_segments 3\n```\n\n* 多尺度TRN的测试命令：\n\n```bash\npython test_models.py something RGB model\u002FTRN_something_RGB_BNInception_TRNmultiscale_segment8_best.pth.tar \\\n   --arch BNInception --crop_fusion_type TRNmultiscale --test_segments 8\n```\n\n### 预训练模型与演示代码\n\n* 下载在[Something-Something](https:\u002F\u002F20bn.com\u002Fdatasets\u002Fsomething-something\u002Fv1)、[Something-Something-V2](https:\u002F\u002Fwww.twentybn.com\u002Fdatasets\u002Fsomething-something)、[Jester](https:\u002F\u002Fwww.twentybn.com\u002Fdatasets\u002Fjester)以及[Moments in Time](http:\u002F\u002Fmoments.csail.mit.edu\u002F)数据集上训练的预训练模型：\n\n```bash\n.\u002Fdownload.sh\n```\n\n* 下载示例视频及提取的帧。您将获得一个mp4视频文件和一个包含该视频RGB帧的文件夹。\n\n```bash\ncd sample_data\n.\u002Fdownload_sample_data.sh\n```\n\n示例视频如下：\n\n![结果](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzhoubolei_TRN-pytorch_readme_e9934d223d7c.gif)\n\n* 测试在Something-Something-V2上训练的预训练模型：\n\n```bash\npython test_video.py --arch BNInception --dataset somethingv2 \\\n    --weights pretrain\u002FTRN_somethingv2_RGB_BNInception_TRNmultiscale_segment8_best.pth.tar \\\n    --frame_folder sample_data\u002Fbolei_juggling\n\n结果：sample_data\u002Fbolei_juggling\n0.500 -> 将某物抛向空中并接住\n0.141 -> 将某物抛向空中后任其落下\n0.072 -> 假装投掷某物\n0.024 -> 投掷某物\n0.024 -> 用某物击打某物\n```\n\n* 测试在[Moments in Time](http:\u002F\u002Fmoments.csail.mit.edu\u002F)上训练的预训练模型：\n\n```bash\npython test_video.py --arch InceptionV3 --dataset moments \\\n    --weights pretrain\u002FTRN_moments_RGB_InceptionV3_TRNmultiscale_segment8_best.pth.tar \\\n    --frame_folder sample_data\u002Fbolei_juggling\n\n结果：sample_data\u002Fbolei_juggling\n0.982 -> 杂耍\n0.003 -> 翻转\n0.003 -> 旋转\n0.003 -> 吸烟\n0.002 -> 吹口哨\n```\n\n* 测试在mp4视频文件上的预训练模型：\n\n```bash\npython test_video.py --arch InceptionV3 --dataset moments \\\n    --weights pretrain\u002FTRN_moments_RGB_InceptionV3_TRNmultiscale_segment8_best.pth.tar \\\n    --video_file sample_data\u002Fbolei_juggling.mp4 --rendered_output sample_data\u002Fpredicted_video.mp4\n```\n\n上述命令使用`ffmpeg`从提供的视频`--video_file`中提取帧，并可选地根据用于预测的帧生成新视频`--rendered_output`，在视频左上角显示预测的类别。\n\n* 手势识别网络摄像头[演示](https:\u002F\u002Fyoutu.be\u002F6PAvFzV4Yfo\u002F)脚本：\npython fps_dem_trn.py\n\n### 待办事项\n\n* 待办：网络摄像头演示脚本\n* 待办：可视化脚本\n* 待办：类别感知的数据增强\n\n### 参考文献：\nB. Zhou, A. Andonian, 和 A. Torralba. 视频中的时序关系推理。欧洲计算机视觉会议（ECCV），2018年。[PDF](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1711.08496.pdf)\n```\n@article{zhou2017temporalrelation,\n    title = {视频中的时序关系推理},\n    author = {周博磊、安多尼安·亚历克斯、奥利瓦·奥德、托拉尔巴·安东尼奥},\n    journal={欧洲计算机视觉会议},\n    year={2018}\n}\n```\n\n### 致谢\n我们的时序关系网络可以轻松插拔到[TSN-Pytorch](https:\u002F\u002Fgithub.com\u002Fyjxiong\u002Ftemporal-segment-networks)之上，但也可以方便地扩展到其他网络架构。我们感谢熊元俊发布TSN-Pytorch代码库。Something-Something数据集和Jester数据集来自[TwentyBN](https:\u002F\u002Fwww.twentybn.com\u002F)，我们非常感激他们为构建这些优质视频数据集所做出的努力。请参考他们的[数据集网站](https:\u002F\u002Fwww.twentybn.com\u002Fdatasets\u002Fsomething-something)以正确使用这些数据。","# TRN-pytorch 快速上手指南\n\nTRN (Temporal Relation Networks) 是一个用于视频动作识别的深度学习模型，基于 TSN-pytorch 构建，擅长捕捉视频帧之间的时间关系。\n\n## 1. 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**: Linux (推荐 Ubuntu 16.04+)\n*   **Python**: Python 3.x\n*   **深度学习框架**: PyTorch (建议版本与官方 TSN 兼容，通常为 0.4.0 - 1.2.0，具体视显卡驱动而定)\n*   **其他依赖**:\n    *   `ffmpeg`: 用于视频帧提取和处理。\n    *   `git`: 必须支持递归克隆。\n    *   CUDA 环境 (如需 GPU 训练\u002F推理)。\n\n**前置依赖安装示例 (Ubuntu):**\n```bash\nsudo apt-get update\nsudo apt-get install ffmpeg git\npip install torch torchvision opencv-python numpy\n```\n\n## 2. 安装步骤\n\n**重要提示**：该项目依赖子模块（特别是 Inception 系列 CNN 架构），**必须**使用 `--recursive` 参数克隆，否则无法运行。\n\n### 2.1 克隆代码库\n```bash\ngit clone --recursive https:\u002F\u002Fgithub.com\u002Fmetalbubble\u002FTRN-pytorch\ncd TRN-pytorch\n```\n\n### 2.2 下载预训练模型 (可选)\n如果您只想进行测试或演示，可以直接下载官方提供的预训练模型：\n```bash\n.\u002Fdownload.sh\n```\n\n### 2.3 准备示例数据 (可选)\n下载用于测试的示例视频和提取后的帧：\n```bash\ncd sample_data\n.\u002Fdownload_sample_data.sh\ncd ..\n```\n\n## 3. 基本使用\n\n以下展示最基础的**推理测试**流程，直接使用预训练模型对示例视频进行动作分类。\n\n### 3.1 单视频推理测试\n假设您已下载了针对 \"Something-Something-V2\" 数据集训练的预训练模型，并准备了示例帧数据 `sample_data\u002Fbolei_juggling`。\n\n运行以下命令进行测试：\n\n```bash\npython test_video.py --arch BNInception --dataset somethingv2 \\\n    --weights pretrain\u002FTRN_somethingv2_RGB_BNInception_TRNmultiscale_segment8_best.pth.tar \\\n    --frame_folder sample_data\u002Fbolei_juggling\n```\n\n**预期输出示例：**\n```text\nRESULT ON sample_data\u002Fbolei_juggling\n0.500 -> Throwing something in the air and catching it\n0.141 -> Throwing something in the air and letting it fall\n...\n```\n\n### 3.2 直接处理 MP4 视频文件\n如果您不想手动提取帧，可以直接输入 `.mp4` 视频文件（需安装 `ffmpeg`），并可生成带有预测结果的可视化视频：\n\n```bash\npython test_video.py --arch InceptionV3 --dataset moments \\\n    --weights pretrain\u002FTRN_moments_RGB_InceptionV3_TRNmultiscale_segment8_best.pth.tar \\\n    --video_file sample_data\u002Fbolei_juggling.mp4 --rendered_output sample_data\u002Fpredicted_video.mp4\n```\n\n### 3.3 核心模块说明\n如果您希望在其他项目中集成 TRN，核心实现位于 `TRNmodule.py`。该模块设计为即插即用，可轻松嵌入到基于 TSN 架构的网络中。\n\n---\n*注：如需从头训练模型，请先参考原文档 \"Data preparation\" 部分准备 Something-Something、Jester 或 Charades 数据集，并使用 `process_dataset.py` 生成索引文件。*","某智能安防团队正在开发一套能够识别“扔垃圾”、“推倒物体”等细微动作的视频分析系统，以升级现有的静态行为监控方案。\n\n### 没有 TRN-pytorch 时\n- **动作理解碎片化**：传统模型仅能识别单帧图像中的物体（如看到“手”和“杯子”），无法理解“拿起杯子”到“放下杯子”这一连贯的时间逻辑，导致对动态行为误判率高。\n- **时序建模成本高**：若采用传统的 3D 卷积或复杂的循环神经网络（RNN）来捕捉时间关系，不仅训练收敛极慢，且对显存资源消耗巨大，难以在边缘设备部署。\n- **细粒度分类困难**：对于 Something-Something 数据集中那些依赖严格时间顺序的相似动作（如“从左向右推”与“从右向左推”），现有方案区分度极低，几乎靠猜。\n\n### 使用 TRN-pytorch 后\n- **精准捕捉时序逻辑**：利用 TRN-pytorch 核心的时序关系模块，系统能高效建模视频片段间的依赖关系，准确判断动作发生的先后顺序，显著提升了对复杂动态行为的理解力。\n- **轻量化即插即用**：基于 TSN 架构的插件式设计，让团队无需重构整个网络，仅在原有基础上替换共识层即可实现多尺度时序融合，训练速度大幅提升且显存占用可控。\n- **细粒度识别突破**：在 Something-Something V2 数据集上的预训练模型直接迁移，使系统能敏锐区分方向相反或过程细微差别的动作，将细粒度行为识别准确率提升至行业领先水平。\n\nTRN-pytorch 通过高效建模视频帧间的时间依赖关系，以轻量级的代价解决了传统模型“看得清画面却看不懂动作”的核心痛点。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzhoubolei_TRN-pytorch_47b6ac17.png","zhoubolei","Bolei Zhou","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fzhoubolei_5aa0b043.jpg",null,"UCLA","California","https:\u002F\u002Fboleizhou.github.io\u002F","https:\u002F\u002Fgithub.com\u002Fzhoubolei",[81,85],{"name":82,"color":83,"percentage":84},"Python","#3572A5",95.9,{"name":86,"color":87,"percentage":88},"Shell","#89e051",4.1,791,189,"2026-03-07T13:04:40","NOASSERTION",4,"Linux","需要 NVIDIA GPU (命令中包含 CUDA_VISIBLE_DEVICES)，具体型号和显存未说明，需支持 CUDA","未说明",{"notes":98,"python":99,"dependencies":100},"1. 必须使用 `git clone --recursive` 克隆项目以获取 inception 系列 CNN 架构的子模块。2. 代码基于 TSN-pytorch 构建，核心模块为 TRNmodule.py。3. 视频处理依赖 ffmpeg 提取帧。4. 支持 Something-Something, Jester, Charades 等数据集，需自行下载并运行脚本生成索引文件。5. 提供预训练模型下载脚本 (download.sh)。","未说明 (基于 PyTorch 环境)",[101,102,103],"pytorch","torchvision","ffmpeg",[105,14],"视频","2026-03-27T02:49:30.150509","2026-04-19T06:02:09.726176",[109,114,119,124,129,133,138],{"id":110,"question_zh":111,"answer_zh":112,"source_url":113},41882,"如何获取 Something-Something V1 数据集的光流（Optical Flow）文件？","您可以从以下链接下载 Something-Something V1 的光流数据：http:\u002F\u002Frelation.csail.mit.edu\u002Fdata\u002F20bn-something-something-v1-flow.tar.gz。如果下载的文件解压失败或大小异常（如只有 500MB），可能是文件损坏，维护者已重新上传修复后的版本（约 4.8GB），请尝试使用同一链接重新下载。","https:\u002F\u002Fgithub.com\u002Fzhoubolei\u002FTRN-pytorch\u002Fissues\u002F19",{"id":115,"question_zh":116,"answer_zh":117,"source_url":118},41883,"在哪里可以下载预训练模型（例如 TRN_something_RGB_BNInception...）？","您可以通过运行项目根目录下的 `download_models.sh` 脚本来自动下载所需的预训练模型文件。该脚本会处理所有必要的模型权重下载工作。","https:\u002F\u002Fgithub.com\u002Fzhoubolei\u002FTRN-pytorch\u002Fissues\u002F2",{"id":120,"question_zh":121,"answer_zh":122,"source_url":123},41884,"如何处理和使用 Something-Something 数据集（RGB 图片及 CSV 文件）？","请下载数据集对应的 train.csv, validation.csv, test.csv 和 labels.csv 文件。具体的数据处理流程和代码示例请参考项目中的 `process_dataset.py` 脚本：https:\u002F\u002Fgithub.com\u002Fmetalbubble\u002FTRN-pytorch\u002Fblob\u002Fmaster\u002Fprocess_dataset.py。该脚本展示了如何将原始图片和标签文件转换为模型可输入的格式。","https:\u002F\u002Fgithub.com\u002Fzhoubolei\u002FTRN-pytorch\u002Fissues\u002F6",{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},41885,"测试预训练模型时出现 'size mismatch' 错误（如 conv_batchnorm.weight 形状不匹配）如何解决？","这是一个已知问题（参考 Issue #10）。通常是因为 PyTorch 版本差异导致 BatchNorm 层参数形状不一致。解决方法是检查并更新相关依赖，或者参考 Issue #10 中的讨论，可能需要手动调整模型加载代码以兼容旧的权重文件格式，确保加载的权重维度与当前模型定义一致。","https:\u002F\u002Fgithub.com\u002Fzhoubolei\u002FTRN-pytorch\u002Fissues\u002F43",{"id":130,"question_zh":131,"answer_zh":132,"source_url":118},41886,"运行视频测试脚本后，为什么在文件夹中找不到生成的 predicted_video.mp4 文件？支持哪些视频格式？","如果控制台显示 '[MoviePy] >>>> Video ready' 但找不到文件，请检查输出路径是否正确以及是否有写入权限。关于格式支持，脚本底层依赖 ffmpeg 提取帧，理论上支持 ffmpeg 能解码的格式（如 .h264, .avi, .mp4）。如果特定格式无法生成结果，建议先将视频统一转换为标准的 .mp4 格式后再进行测试。",{"id":134,"question_zh":135,"answer_zh":136,"source_url":137},41887,"是否有针对 Moments in Time 或 AVA 数据集的数据预处理脚本？","目前官方仓库主要提供了 Something-Something 和 Jester 数据集的处理脚本（如 process_dataset.py, datasets_video.py, extract_frames.py）。对于 Moments in Time 或 AVA 数据集，官方尚未提供直接对应的专用预处理脚本，用户可能需要参考现有的视频处理逻辑自行适配编写。","https:\u002F\u002Fgithub.com\u002Fzhoubolei\u002FTRN-pytorch\u002Fissues\u002F25",{"id":139,"question_zh":140,"answer_zh":141,"source_url":123},41888,"Something-Something V2 数据集的 CSV 文件（validation, test, labels）在哪里下载？","CSV 文件通常需要从数据集的官方来源（如 TwentyBN 网站）申请和下载，而不是直接从 GitHub 仓库获取。下载后，请结合 `process_dataset.py` 脚本来解析和使用这些标签文件。",[]]