{"id":33163947,"url":"https://github.com/vbalnt/tfeat","last_synced_at":"2025-11-20T17:01:00.736Z","repository":{"id":80410296,"uuid":"68822672","full_name":"vbalnt/tfeat","owner":"vbalnt","description":"TFeat descriptor models for BMVC 2016 paper \"Learning local feature descriptors with triplets and shallow convolutional neural networks\"","archived":false,"fork":false,"pushed_at":"2021-01-16T11:26:01.000Z","size":31534,"stargazers_count":146,"open_issues_count":2,"forks_count":45,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-05-02T02:17:33.379Z","etag":null,"topics":["deep-learning","descriptor","pytorch","tfeat-descriptor","triplets"],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","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/vbalnt.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":"2016-09-21T14:00:38.000Z","updated_at":"2024-04-04T16:45:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb1d81ba-285a-4d05-94da-4717127b0a76","html_url":"https://github.com/vbalnt/tfeat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vbalnt/tfeat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbalnt%2Ftfeat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbalnt%2Ftfeat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbalnt%2Ftfeat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbalnt%2Ftfeat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vbalnt","download_url":"https://codeload.github.com/vbalnt/tfeat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbalnt%2Ftfeat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285475217,"owners_count":27178110,"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","status":"online","status_checked_at":"2025-11-20T02:00:05.334Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["deep-learning","descriptor","pytorch","tfeat-descriptor","triplets"],"created_at":"2025-11-15T23:00:43.434Z","updated_at":"2025-11-20T17:01:00.731Z","avatar_url":"https://github.com/vbalnt.png","language":"Jupyter Notebook","funding_links":[],"categories":["Deep Learning Feature (Local Feature)"],"sub_categories":[],"readme":"# TFeat shallow convolutional patch descriptor\nCode for the BMVC 2016 paper [Learning local feature descriptors with triplets and shallow convolutional neural networks](http://www.bmva.org/bmvc/2016/papers/paper119/paper119.pdf)\n\n## Pre-trained models\nWe provide the following pre-trained models:\n\n| network name      | model link                                                        | training dataset   |\n| -------------     | :-------------:                                                   | -----:             |\n| `tfeat-liberty`   | [tfeat-liberty.params](./pretrained-models/tfeat-liberty.params)  | liberty (UBC)      |\n| `tfeat-yosemite`  | [tfeat-yosemite.params](./pretrained-models/tfeat-yosemite.params) | yosemite (UBC)     |\n| `tfeat-notredame` | [tfeat-notredame.params](./pretrained-models/tfeat-notredame.params) | notredame (UBC)    |\n| `tfeat-ubc`       | coming soon...                                                    | all UBC            |\n| `tfeat-hpatches`  | coming soon...                                                    | HPatches (split A) |\n| `tfeat-all`       | coming soon...                                                    | All the above      |\n\n\n## Pre-trained models usage with Kornia\n\nTFeat has been integrated into [Kornia](https://github.com/kornia/kornia)\n\nFirst install Kornia: `pip install kornia`\n\n```python\nimport torch\nimport kornia as K\n\ninput = torch.rand(16, 1, 32, 32)\ntfeat = K.feature.TFeat(pretrained=True)\ndescs = tfeat(input) # 16x128\n```\n\n## Quick start guide\nTo run `TFeat` on a tensor of patches:\n\n```python\ntfeat = tfeat_model.TNet()\nnet_name = 'tfeat-liberty'\nmodels_path = 'pretrained-models'\nnet_name = 'tfeat-liberty'\ntfeat.load_state_dict(torch.load(os.path.join(models_path,net_name+\".params\")))\ntfeat.cuda()\ntfeat.eval()\n\nx = torch.rand(10,1,32,32).cuda()\ndescrs = tfeat(x)\nprint(descrs.size())\n\n#torch.Size([10, 128])\n```\n\nNote that no normalisation is needed for the input patches, \nit is done internally inside the network. \n\n## Testing `TFeat`: Examples (WIP)\nWe provide an `ipython` notebook that shows how to load and use \nthe pre-trained networks. We also provide the following examples:\n\n- extracting descriptors from image patches\n- matching two images using `openCV`\n- matching two images using `vlfeat`\n\nFor the testing example code, check [tfeat-test notebook](tfeat-test.ipynb)\n\n## Re-training `TFeat`\nWe provide an `ipython` notebook with examples on how to train\n`TFeat`.  Training can either use the `UBC` datasets `Liberty,\nNotredame, Yosemite`, the `HPatches` dataset, and combinations \nof all the datasets. \n\nFor the training code, check [tfeat-train notebook](tfeat-train.ipynb)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvbalnt%2Ftfeat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvbalnt%2Ftfeat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvbalnt%2Ftfeat/lists"}