{"id":15674017,"url":"https://github.com/amazingang/pytorch-tvnet","last_synced_at":"2025-05-06T22:46:06.044Z","repository":{"id":108866180,"uuid":"170269458","full_name":"AmazingAng/pytorch-tvnet","owner":"AmazingAng","description":"TVNet to generate optical flow in pytorch","archived":false,"fork":false,"pushed_at":"2020-06-05T05:17:03.000Z","size":1417,"stargazers_count":15,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-06T22:45:56.381Z","etag":null,"topics":["optical-flow","pytorch"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AmazingAng.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":"2019-02-12T07:04:29.000Z","updated_at":"2023-09-20T13:05:47.000Z","dependencies_parsed_at":"2023-04-20T20:19:18.506Z","dependency_job_id":null,"html_url":"https://github.com/AmazingAng/pytorch-tvnet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmazingAng%2Fpytorch-tvnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmazingAng%2Fpytorch-tvnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmazingAng%2Fpytorch-tvnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmazingAng%2Fpytorch-tvnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AmazingAng","download_url":"https://codeload.github.com/AmazingAng/pytorch-tvnet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252782459,"owners_count":21803380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["optical-flow","pytorch"],"created_at":"2024-10-03T15:43:25.293Z","updated_at":"2025-05-06T22:46:06.035Z","avatar_url":"https://github.com/AmazingAng.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pytorch-tvnet\nThis project contains a **simple** and **pytorch** implementation of TVNet in ['End-to-End Learning of Motion Representation for Video Understanding'](http://lijiefan.me/project_webpage/TVNet_cvpr/papers/TVNet_cvpr.pdf) with **pytorch-style**.\n\n- **Simple**: in total ~350 lines of code\n\n- **Pytorch-style**: All modules (central gradient, forward gradient \u0026 divergence) extend torch.nn.Module.\n\nThe original implementation was in tensorflow, which can be found in https://github.com/LijieFan/tvnet.\n\n- **Update 2020/04/20**: GPU support, try demo_gpu.py; support batch mode, try demo_batch_mode.py.\n\n# Requirements\n- **Python 3**: also tested on python 2.7.\n\n- **pytorch** \n\n- **matlab (optinonal)**: In the original tensorflow version, authors use `.mat` file for TVNet generated results saving, and `Matlab` for results [`visualization`](http://sintel.is.tue.mpg.de). In the demo code, I also add code for visulizing flow map using cv2 (in python).\n \n# Usage\n#### I) Put input frames in `frame/img1.png`, `frame/img2.png`.\n#### II) Use TVNet to generate motion representation\n\nSample usages include\n- Generate motion representation for frames in `frame/img1.png` and `frame/img2.png`.\n\n```\npython demo.py\n``` \n\n#### III) Check results and visualization\n\n-TVNet generated results are saved in `result/result-pytorch.mat`\n\n-For matlab visualization, run ```run visualize/visualize.m```. For python, use code attached at the bottom of ```demo.py```.\n\n\n# Sample input\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cimg src=\"frame/img1.png\" height=\"160\"\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cimg src=\"frame/img2.png\" height=\"160\"\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n# Sample output\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cimg src=\"result/result.png\" height=\"160\"\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cimg src=\"result/result-pytorch.png\" height=\"160\"\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003etensorflow implementation\u003c/td\u003e\n\u003ctd\u003epytorch implementation\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n# Acknowledgement\nThanks [Huang, Wenbing](https://sites.google.com/site/wenbinghuangshomepage/) for the kindly reply and discussions on the original paper.\n\n# Reference\nif you find my code useful for your research, please cite the original paper:\n\n    @inproceedings{fan2018end,\n    title={End-to-End Learning of Motion Representation for Video Understanding},\n    author={Fan, Lijie and Huang, Wenbing and Gan, Chuang and Ermon, Stefano and Gong, Boqing and Huang, Junzhou},\n    booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},\n    pages={},\n    year={2018}\n\t}\n\n# License\nThis project is licensed under the MIT License - see the LICENSE.md file for details\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famazingang%2Fpytorch-tvnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famazingang%2Fpytorch-tvnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famazingang%2Fpytorch-tvnet/lists"}