{"id":13437300,"url":"https://github.com/nearthlab/SiamMaskCpp","last_synced_at":"2025-03-19T06:31:00.277Z","repository":{"id":166436895,"uuid":"207737883","full_name":"nearthlab/SiamMaskCpp","owner":"nearthlab","description":"C++ Implementation of SiamMask","archived":false,"fork":false,"pushed_at":"2020-02-28T01:26:06.000Z","size":6904,"stargazers_count":97,"open_issues_count":4,"forks_count":23,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-27T21:50:48.789Z","etag":null,"topics":["computer-vision","deep-learning","pytorch-cpp","real-time","video-object-segmentation","visual-tracking"],"latest_commit_sha":null,"homepage":"https://github.com/foolwood/SiamMask","language":"C++","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/nearthlab.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}},"created_at":"2019-09-11T06:20:04.000Z","updated_at":"2024-09-14T02:40:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"c4da5685-64c1-4f64-bb0a-ada5b8aa86a2","html_url":"https://github.com/nearthlab/SiamMaskCpp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nearthlab%2FSiamMaskCpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nearthlab%2FSiamMaskCpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nearthlab%2FSiamMaskCpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nearthlab%2FSiamMaskCpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nearthlab","download_url":"https://codeload.github.com/nearthlab/SiamMaskCpp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244370950,"owners_count":20442319,"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":["computer-vision","deep-learning","pytorch-cpp","real-time","video-object-segmentation","visual-tracking"],"created_at":"2024-07-31T03:00:55.806Z","updated_at":"2025-03-19T06:30:57.095Z","avatar_url":"https://github.com/nearthlab.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# SiamMaskCpp\n* C++ Implementation of [SiamMask](https://github.com/foolwood/SiamMask)\n* Porting slogan:\n    * numpy operations \u0026rarr; cv::Mat operations\n    * CNNs \u0026rarr; torch::jit::script::Module\n    * Other tensor operations \u0026rarr; torch::Tensor operations\n* Faster than the original implementation (speed increased from 22fps to 40fps when tested with a single NVIDIA GeForce GTX 1070)\n\n# Requirements\n* OpenCV \u003e= 3 (tested with 3.4.0)\n* PyTorch \u003e= 1 (tested with 1.3.0)\n\n# Convert a SiamMask model to Torch scripts\nYou can use the models (with the refine module) trained with the original repository [foolwood/SiamMask](https://github.com/foolwood/SiamMask) for inference in C++. Just Follow the instruction in [jiwoong-choi/SiamMask](https://github.com/jiwoong-choi/SiamMask#converting-siammask-model-with-the-refine-module-to-torch-scripts) to convert your own models to Torch script files.\n\n# Download pretrained Torch scripts\nOr you can download pretrained Torch scripts. These files are converted from the pretrained models ([SiamMask_DAVIS.pth](http://www.robots.ox.ac.uk/~qwang/SiamMask_DAVIS.pth) and [SiamMask_VOT.pth](http://www.robots.ox.ac.uk/~qwang/SiamMask_VOT.pth)) in the original repository.\n\n```bash\ngit clone --recurse-submodules https://github.com/nearthlab/SiamMaskCpp\ncd SiamMaskCpp\nmkdir models\ncd models\nwget https://github.com/nearthlab/SiamMaskCpp/releases/download/v1.0/SiamMask_DAVIS.tar.gz\nwget https://github.com/nearthlab/SiamMaskCpp/releases/download/v1.0/SiamMask_VOT.tar.gz\ntar -xvzf SiamMask_DAVIS.tar.gz\ntar -xvzf SiamMask_VOT.tar.gz\n```\n\nBefore building demo, make sure the following command prints out the correct path to torch install directory.\n```bash\npython3 -c \"import torch; print(torch.__path__[0])\"\n# /path/to/lib/python3.x/site-packages/torch\n```\n\n# How to build demo\n```bash\ncd SiamMaskCpp\nmkdir build\ncd build\n# specify -DTORCH_PATH=/path/to/lib/python3.x/site-packages/torch if cmake fails to detect PyTorch automatically\ncmake ..\nmake\n\n# Move the executable file to the repository directory\nmv demo ..\n```\n\n# How to run demo\n```bash\ncd SiamMaskCpp\n./demo -c config_davis.json -m models/SiamMask_DAVIS tennis\n./demo -c config_vot.json -m models/SiamMask_VOT tennis\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnearthlab%2FSiamMaskCpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnearthlab%2FSiamMaskCpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnearthlab%2FSiamMaskCpp/lists"}