{"id":21629383,"url":"https://github.com/khanovico/neural-image-retrieval","last_synced_at":"2026-03-01T15:32:04.754Z","repository":{"id":245112344,"uuid":"817298714","full_name":"khanovico/neural-image-retrieval","owner":"khanovico","description":"DNN trained on Kepture dataset","archived":false,"fork":false,"pushed_at":"2024-06-26T17:52:37.000Z","size":117,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-23T17:44:23.707Z","etag":null,"topics":["artificial-intelligence","computer-vision","deep-nueral-networks"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/khanovico.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":"2024-06-19T12:20:43.000Z","updated_at":"2024-06-30T16:19:54.000Z","dependencies_parsed_at":"2024-06-19T22:24:21.794Z","dependency_job_id":"28c7c632-76ac-4b7c-b42e-bbbe3c1c3529","html_url":"https://github.com/khanovico/neural-image-retrieval","commit_stats":null,"previous_names":["khanovicdev/neural-image-retrieval","khanovict/neural-image-retrieval","xleonsalman/neural-image-retrieval","khanovico/neural-image-retrieval"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/khanovico/neural-image-retrieval","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanovico%2Fneural-image-retrieval","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanovico%2Fneural-image-retrieval/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanovico%2Fneural-image-retrieval/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanovico%2Fneural-image-retrieval/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khanovico","download_url":"https://codeload.github.com/khanovico/neural-image-retrieval/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanovico%2Fneural-image-retrieval/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29973317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T15:29:09.406Z","status":"ssl_error","status_checked_at":"2026-03-01T15:28:28.558Z","response_time":124,"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":["artificial-intelligence","computer-vision","deep-nueral-networks"],"created_at":"2024-11-25T02:07:36.195Z","updated_at":"2026-03-01T15:32:04.737Z","avatar_url":"https://github.com/khanovico.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neural Image Retrival\n\n## Evaluation\n\nThe script `test_dir.py` can be used to evaluate the pre-trained models provided and to reproduce the results above:\n\n```\npython -m dirtorch.test_dir --dataset DATASET --checkpoint PATH_TO_MODEL \\\n\t\t[--whiten DATASET] [--whitenp POWER] [--aqe ALPHA-QEXP] \\\n\t\t[--trfs TRANSFORMS] [--gpu ID] [...]\n```\n\n- `--dataset`: selects the dataset (eg.: Oxford5K, Paris6K, ROxford5K, RParis6K) [**required**]\n- `--checkpoint`: path to the model weights [**required**]\n- `--whiten`: applies whitening to the output features [default 'Landmarks_clean']\n- `--whitenp`: whitening power [default: 0.25]\n- `--aqe`: alpha-query expansion parameters [default: None]\n- `--trfs`: input image transformations (can be used to apply multi-scale) [default: None]\n- `--gpu`: selects the GPU ID (-1 selects the CPU)\n\n```\ncd $DIR_ROOT\nexport DB_ROOT=/PATH/TO/YOUR/DATASETS\n\npython -m dirtorch.test_dir --dataset RParis6K \\\n\t\t--checkpoint dirtorch/data/Resnet101-AP-GeM.pt \\\n\t\t--whiten Landmarks_clean --whitenp 0.25 --gpu 0\n```\n\nAnd you should see the following output:\n\n```\n\u003e\u003e Evaluation...\n * mAP-easy = 0.907568\n * mAP-medium = 0.803098\n * mAP-hard = 0.608556\n```\n\n**Note:** this script integrates an automatic downloader for the Oxford5K, Paris6K, ROxford5K, and RParis6K datasets (kudos to Filip Radenovic ;)). The datasets will be saved in `$DB_ROOT`.\n\n## Feature extraction with kapture datasets\n\nIt contains conversion tools for popular formats and several popular datasets are directly available in kapture.\n\nIt can be installed with:\n```bash\npip install kapture\n```\n\nDatasets can be downloaded with:\n```bash\nkapture_download_dataset.py update\nkapture_download_dataset.py list\n# e.g.: install mapping and query of Extended-CMU-Seasons_slice22\nkapture_download_dataset.py install \"Extended-CMU-Seasons_slice22_*\"\n```\nIf you want to convert your own dataset into kapture, please find some examples [here](https://github.com/naver/kapture/blob/master/doc/datasets.adoc).\n\nOnce installed, you can extract global features for your kapture dataset with:\n```bash\ncd $DIR_ROOT\npython -m dirtorch.extract_kapture --kapture-root pathto/yourkapturedataset --checkpoint dirtorch/data/Resnet101-AP-GeM-LM18.pt --gpu 0\n```\n\nRun `python -m dirtorch.extract_kapture --help` for more information on the extraction parameters. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhanovico%2Fneural-image-retrieval","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhanovico%2Fneural-image-retrieval","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhanovico%2Fneural-image-retrieval/lists"}