{"id":28383052,"url":"https://github.com/opendronemap/pypopsift","last_synced_at":"2025-06-25T07:31:07.582Z","repository":{"id":38895218,"uuid":"279898519","full_name":"OpenDroneMap/pypopsift","owner":"OpenDroneMap","description":"Python module for CUDA accelerated SIFT on GPUs","archived":false,"fork":false,"pushed_at":"2025-06-20T16:12:26.000Z","size":21,"stargazers_count":44,"open_issues_count":9,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-21T22:26:27.970Z","etag":null,"topics":["cuda","gpu","popsift","python","sift"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenDroneMap.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}},"created_at":"2020-07-15T14:59:39.000Z","updated_at":"2025-06-20T16:12:30.000Z","dependencies_parsed_at":"2022-09-18T13:12:16.964Z","dependency_job_id":null,"html_url":"https://github.com/OpenDroneMap/pypopsift","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OpenDroneMap/pypopsift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenDroneMap%2Fpypopsift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenDroneMap%2Fpypopsift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenDroneMap%2Fpypopsift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenDroneMap%2Fpypopsift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenDroneMap","download_url":"https://codeload.github.com/OpenDroneMap/pypopsift/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenDroneMap%2Fpypopsift/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261826929,"owners_count":23215664,"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":["cuda","gpu","popsift","python","sift"],"created_at":"2025-05-30T05:11:46.018Z","updated_at":"2025-06-25T07:31:07.577Z","avatar_url":"https://github.com/OpenDroneMap.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pypopsift\nCUDA accelerated SIFT in Python\n\nThis library is a wrapper around [PopSift](https://github.com/alicevision/popsift) to compute SIFT keypoints and descriptors on the GPU using CUDA. It's written to be a drop-in replacement for existing OpenCV functions such as `cv2.FeatureDetector_create('SIFT')` and ` cv2.DescriptorExtractor_create('SIFT')`.\n\n## Building\n\nRequirements:\n * CUDA Toolkit \u003e= 7\n * CMake \u003e= 3.14\n * A C++11 capable compiler (g++ 5.4.0 works fine)\n\n```\n# git clone --recurse-submodules https://github.com/uav4geo/pypopsift\n# cd pypopsift \u0026\u0026 mkdir build \u0026\u0026 cd build\n# make -j8\n```\n\nTo install the Python package:\n\n```\n# cd pypopsift\n# pip install .\n```\n\n## Usage\n\n```\nimport cv2\nimport numpy as np\nfrom pypopsift import popsift\n\nfilename = \"/path/to/image.JPG\"\nconfig = {\n    'sift_peak_threshold': 0.1,\n    'sift_edge_threshold': 10.0,\n    'feature_min_frames': 8000,\n    'feature_use_adaptive_suppression': False,\n    'feature_process_size': 2048\n}\n\ndef resized_image(image, config):\n    \"\"\"Resize image to feature_process_size.\"\"\"\n    max_size = config['feature_process_size']\n    h, w, _ = image.shape\n    size = max(w, h)\n    if 0 \u003c max_size \u003c size:\n        dsize = w * max_size // size, h * max_size // size\n        return cv2.resize(image, dsize=dsize, interpolation=cv2.INTER_AREA)\n    else:\n        return image\n\nflags = cv2.IMREAD_COLOR\nimage = cv2.imread(filename, flags)\n\nif image is None:\n    raise IOError(\"Unable to load image {}\".format(filename))\n\nif len(image.shape) == 3:\n    image[:, :, :3] = image[:, :, [2, 1, 0]]\n\nassert len(image.shape) == 3\nimage = resized_image(image, config)\nimage = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)\n\npoints, desc = popsift(image.astype(np.uint8),  # values between 0, 1\n                            peak_threshold=config['sift_peak_threshold'],\n                            edge_threshold=config['sift_edge_threshold'],\n                            target_num_features=config['feature_min_frames'])\nprint(points.shape)\nprint(points)\nprint(desc.shape)\nprint(desc)\n```\n\n## License\n\nMozilla Public License 2.0\n\n## Acknowledgements\n\n```\n@inproceedings{Griwodz2018Popsift,\n\t author = {Griwodz, Carsten and Calvet, Lilian and Halvorsen, P{\\aa}l},\n\t title = {Popsift: A Faithful SIFT Implementation for Real-time Applications},\n\t booktitle = {Proceedings of the 9th {ACM} Multimedia Systems Conference},\n\t series = {MMSys '18},\n\t year = {2018},\n\t isbn = {978-1-4503-5192-8},\n\t location = {Amsterdam, Netherlands},\n\t pages = {415--420},\n\t numpages = {6},\n\t doi = {10.1145/3204949.3208136},\n\t acmid = {3208136},\n\t publisher = {ACM},\n\t address = {New York, NY, USA},\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopendronemap%2Fpypopsift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopendronemap%2Fpypopsift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopendronemap%2Fpypopsift/lists"}