{"id":22372226,"url":"https://github.com/materight/repnet-pytorch","last_synced_at":"2025-07-20T02:33:18.779Z","repository":{"id":263610120,"uuid":"607740250","full_name":"materight/RepNet-pytorch","owner":"materight","description":"A PyTorch port with pre-trained weights of RepNet, from \"Counting Out Time: Class Agnostic Video Repetition Counting in the Wild\".","archived":false,"fork":false,"pushed_at":"2024-11-19T12:58:07.000Z","size":7083,"stargazers_count":24,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-19T13:49:58.804Z","etag":null,"topics":["deep-learning","pytorch","self-supervised-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/materight.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-02-28T15:28:43.000Z","updated_at":"2024-11-19T12:58:11.000Z","dependencies_parsed_at":"2024-11-19T13:50:05.101Z","dependency_job_id":"d72f7ba8-b760-491f-8331-3bc6bcdc345f","html_url":"https://github.com/materight/RepNet-pytorch","commit_stats":null,"previous_names":["materight/repnet-pytorch"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/materight%2FRepNet-pytorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/materight%2FRepNet-pytorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/materight%2FRepNet-pytorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/materight%2FRepNet-pytorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/materight","download_url":"https://codeload.github.com/materight/RepNet-pytorch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228188817,"owners_count":17882527,"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":["deep-learning","pytorch","self-supervised-learning"],"created_at":"2024-12-04T20:34:23.531Z","updated_at":"2024-12-04T20:34:24.563Z","avatar_url":"https://github.com/materight.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RepNet PyTorch\nA PyTorch port with pre-trained weights of **RepNet**, from *Counting Out Time: Class Agnostic Video Repetition Counting in the Wild* (CVPR 2020) [[paper]](https://arxiv.org/abs/2006.15418) [[project]](https://sites.google.com/view/repnet) [[notebook]](https://colab.research.google.com/github/google-research/google-research/blob/master/repnet/repnet_colab.ipynb#scrollTo=FUg2vSYhmsT0).\n\nThis repo provides an implementation of RepNet written in PyTorch and a script to convert the pre-trained TensorFlow weights provided by the authors. The outputs of the two implementations are almost identical, with a small deviation (less than $10^{-6}$ at most) probably caused by the [limited precision of floating point operations](https://pytorch.org/docs/stable/notes/numerical_accuracy.html).\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"img/example1.gif\" height=\"160\" /\u003e\n  \u003cimg src=\"img/example2.gif\" height=\"160\" /\u003e\n  \u003cimg src=\"img/example3.gif\" height=\"160\" /\u003e\n  \u003cimg src=\"img/example4.gif\" height=\"160\" /\u003e\n\u003c/div\u003e\n\n## Get Started\n- Clone this repo and install dependencies:\n```bash\ngit clone https://github.com/materight/RepNet-pytorch\ncd RepNet-pytorch\npip install -r requirements.txt\n```\n\n- Download the pre-trained weights from [Hugging Face](https://huggingface.co/materight/repnet/blob/main/pytorch_weights.pth).\n\n## Run inference\nSimply run:\n```bash\npython run.py --weights [weights_path]\n```\nThe script will download a sample video, run inference on it and save the count visualization. You can also specify a video path as argument (either a local path or a YouTube/HTTP URL):\n```bash\npython run.py --weights [weights_path] --video_path [video_path]\n```\nIf the model does not produce good results, try to run the script with more stride values using `--strides`.\n\nExample of generated videos showing the repetition count, with the periodicity score and the temporal self-similarity matrix:\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"img/example5_score.gif\" height=\"200\" /\u003e\n  \u003cimg src=\"img/example5_tsm.png\" height=\"200\" /\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmateright%2Frepnet-pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmateright%2Frepnet-pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmateright%2Frepnet-pytorch/lists"}