{"id":22920060,"url":"https://github.com/zjcv/non-local","last_synced_at":"2026-05-02T19:34:59.241Z","repository":{"id":111996962,"uuid":"298848219","full_name":"ZJCV/Non-local","owner":"ZJCV","description":"[CVPR 2018] Non-local Neural Networks","archived":false,"fork":false,"pushed_at":"2020-12-15T12:16:16.000Z","size":6472,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-01T13:31:37.506Z","etag":null,"topics":["action-recognition","c2d","i3d","non-local","pytorch","resnet3d","video-recognition","video-understanding"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZJCV.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-26T15:53:05.000Z","updated_at":"2024-05-10T06:21:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"93c25da0-54d0-4f24-ae30-2ff87e1157aa","html_url":"https://github.com/ZJCV/Non-local","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ZJCV/Non-local","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJCV%2FNon-local","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJCV%2FNon-local/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJCV%2FNon-local/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJCV%2FNon-local/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZJCV","download_url":"https://codeload.github.com/ZJCV/Non-local/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJCV%2FNon-local/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32547650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T19:18:06.202Z","status":"ssl_error","status_checked_at":"2026-05-02T19:16:21.335Z","response_time":132,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action-recognition","c2d","i3d","non-local","pytorch","resnet3d","video-recognition","video-understanding"],"created_at":"2024-12-14T07:14:20.504Z","updated_at":"2026-05-02T19:34:59.223Z","avatar_url":"https://github.com/ZJCV.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"right\"\u003e\n  语言:\n    🇨🇳\n  \u003ca title=\"英语\" href=\"./README.en.md\"\u003e🇺🇸\u003c/a\u003e\n  \u003c!-- \u003ca title=\"俄语\" href=\"../ru/README.md\"\u003e🇷🇺\u003c/a\u003e --\u003e\n\u003c/div\u003e\n\n \u003cdiv align=\"center\"\u003e\u003ca title=\"\" href=\"https://github.com/ZJCV/Non-local\"\u003e\u003cimg align=\"center\" src=\"./imgs/Non-local.png\"\u003e\u003c/a\u003e\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  «Non-local»复现了论文\u003ca title=\"\" href=\"https://arxiv.org/abs/1711.079719\"\u003eNon-local Neural Networks\u003c/a\u003e提出的视频分类模型\n\u003cbr\u003e\n\u003cbr\u003e\n  \u003ca href=\"https://github.com/RichardLitt/standard-readme\"\u003e\u003cimg src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://conventionalcommits.org\"\u003e\u003cimg src=\"https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"http://commitizen.github.io/cz-cli/\"\u003e\u003cimg src=\"https://img.shields.io/badge/commitizen-friendly-brightgreen.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n* `CodeBase`：[ZJCV/TSN](https://github.com/ZJCV/TSN)和[ZJCV/ZCls](https://github.com/ZJCV/ZCls)\n\n## 内容列表\n\n- [内容列表](#内容列表)\n- [背景](#背景)\n- [安装](#安装)\n- [使用](#使用)\n- [主要维护人员](#主要维护人员)\n- [致谢](#致谢)\n- [参与贡献方式](#参与贡献方式)\n- [许可证](#许可证)\n\n## 背景\n\n受到传统图像处理算法`non-local means`影响，[Non-local Neural Networks](https://arxiv.org/abs/1608.00859)提出了注意力模块`Non-local Block`\n\n## 安装\n\n通过`requirements.txt`安装运行所需依赖\n\n```\n$ pip install -r requirements.txt\n```\n\n处理数据时需要额外安装[denseflow](https://github.com/open-mmlab/denseflow)，可以在[innerlee/setup](https://github.com/innerlee/setup)中找到安装脚本\n\n## 使用\n\n首先设置`GPU`和当前位置\n\n```\n$ export CUDA_VISIBLE_DEVICES=1\n$ export PYTHONPATH=.\n```\n\n* 训练\n\n```\n# 训练UCF101\n# 单GPU\n$ python tools/train.py --config_file=configs/i3d-3x3-nl_r3d50_ucf101_rgb_224x32_dense.yaml\n# 多GPU\n$ python tools/train.py \\\n--config_file=configs/i3d-3x3-nl_r3d50_ucf101_rgb_224x32_dense.yaml \\\n--eval_step=1000 \\\n--save_step=1000 \\\n-g=\u003cN\u003e\n```\n\n* 测试\n\n```\n$ python tools/test.py \u003cconfig_file\u003e \u003cpth_file\u003e\n$ python tools/test.py configs/i3d-3x3-nl_r3d50_ucf101_rgb_224x32_dense.yaml outputs/i3d-3x3-nl_r3d50_ucf101_rgb_224x32_dense.pth\n```\n\n## 主要维护人员\n\n* zhujian - *Initial work* - [zjykzj](https://github.com/zjykzj)\n\n## 致谢\n\n* [ facebookresearch/SlowFast](https://github.com/facebookresearch/SlowFast)\n* [open-mmlab/mmaction2](https://github.com/open-mmlab/mmaction2)\n\n```\n@misc{fan2020pyslowfast,\n  author =       {Haoqi Fan and Yanghao Li and Bo Xiong and Wan-Yen Lo and\n                  Christoph Feichtenhofer},\n  title =        {PySlowFast},\n  howpublished = {\\url{https://github.com/facebookresearch/slowfast}},\n  year =         {2020}\n}\n\n\n@misc{wang2018nonlocal,\n      title={Non-local Neural Networks}, \n      author={Xiaolong Wang and Ross Girshick and Abhinav Gupta and Kaiming He},\n      year={2018},\n      eprint={1711.07971},\n      archivePrefix={arXiv},\n      primaryClass={cs.CV}\n}\n```\n\n## 参与贡献方式\n\n欢迎任何人的参与！打开[issue](https://github.com/ZJCV/Non-local/issues)或提交合并请求。\n\n注意:\n\n* `GIT`提交，请遵守[Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0-beta.4/)规范\n* 语义版本化，请遵守[Semantic Versioning 2.0.0](https://semver.org)规范\n* `README`编写，请遵守[standard-readme](https://github.com/RichardLitt/standard-readme)规范\n\n## 许可证\n\n[Apache License 2.0](LICENSE) © 2020 zjykzj","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzjcv%2Fnon-local","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzjcv%2Fnon-local","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzjcv%2Fnon-local/lists"}