{"id":19430732,"url":"https://github.com/alpacatechjp/selectivesearch","last_synced_at":"2025-05-16T11:04:50.002Z","repository":{"id":34857834,"uuid":"38855091","full_name":"AlpacaTechJP/selectivesearch","owner":"AlpacaTechJP","description":"Selective Search Implementation for Python","archived":false,"fork":false,"pushed_at":"2024-05-21T05:40:36.000Z","size":802,"stargazers_count":771,"open_issues_count":21,"forks_count":250,"subscribers_count":37,"default_branch":"develop","last_synced_at":"2025-05-10T21:02:56.639Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/AlpacaTechJP.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":"2015-07-10T01:54:22.000Z","updated_at":"2025-05-08T11:24:01.000Z","dependencies_parsed_at":"2024-06-18T15:28:42.999Z","dependency_job_id":"b9495c56-0c1f-4876-8ca5-3cfcd6ce86c4","html_url":"https://github.com/AlpacaTechJP/selectivesearch","commit_stats":null,"previous_names":["alpacadb/selectivesearch"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlpacaTechJP%2Fselectivesearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlpacaTechJP%2Fselectivesearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlpacaTechJP%2Fselectivesearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlpacaTechJP%2Fselectivesearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlpacaTechJP","download_url":"https://codeload.github.com/AlpacaTechJP/selectivesearch/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254518384,"owners_count":22084374,"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":[],"created_at":"2024-11-10T14:26:20.403Z","updated_at":"2025-05-16T11:04:44.993Z","avatar_url":"https://github.com/AlpacaTechJP.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Selective Search Implementation for Python\n\nThis is a simple Selective Search Implementation for Python\n\n## Install\n\n```\n$ pip install selectivesearch\n```\n\n## Usage\n\nIt is super-simple.\n\n```python\nimport skimage.data\nimport selectivesearch\n\nimg = skimage.data.astronaut()\nimg_lbl, regions = selectivesearch.selective_search(img, scale=500, sigma=0.9, min_size=10)\nregions[:10]\n=\u003e\n[{'labels': [0.0], 'rect': (0, 0, 15, 24), 'size': 260},\n {'labels': [1.0], 'rect': (13, 0, 1, 12), 'size': 23},\n {'labels': [2.0], 'rect': (0, 15, 15, 11), 'size': 30},\n {'labels': [3.0], 'rect': (15, 14, 0, 0), 'size': 1},\n {'labels': [4.0], 'rect': (0, 0, 61, 153), 'size': 4927},\n {'labels': [5.0], 'rect': (0, 12, 61, 142), 'size': 177},\n {'labels': [6.0], 'rect': (7, 54, 6, 17), 'size': 8},\n {'labels': [7.0], 'rect': (28, 50, 18, 32), 'size': 22},\n {'labels': [8.0], 'rect': (2, 99, 7, 24), 'size': 24},\n {'labels': [9.0], 'rect': (14, 118, 79, 117), 'size': 4008}]\n```\n\nSee also an example/example.py which generates :\n![alt tag](https://github.com/AlpacaDB/selectivesearch/raw/develop/example/result.png)\n\n## Parameters of selective search\n\nLet's see this paper: http://cs.brown.edu/~pff/papers/seg-ijcv.pdf\n\n#### sigma\n\n```\nIn general we use a Gaussian filter to\nsmooth the image slightly before computing the edge weights, in order to compensate\nfor digitization artifacts. We always use a Gaussian with σ = 0.8, which does not\nproduce any visible change to the image but helps remove artifacts.\n```\n\n#### min_size\n\nIf the rect size is reached on `min_size`, the calculation is stopped.\n\n#### scale\n\n```\nThere is one runtime parameter for the algorithm, which is the value of k that\nis used to compute the threshold function τ . Recall we use the function τ (C) =\n14\nk/|C| where |C| is the number of elements in C. Thus k effectively sets a scale of\nobservation, in that a larger k causes a preference for larger components. We use\ntwo different parameter settings for the examples in this section (and throughout the\npaper), depending on the resolution of the image and the degree to which fine detail\nis important in the scene.\n```\n\n## Blog\n- EN: http://blog.alpaca.ai/open-source-pure-python-selective-search-and-advanced-object-recognition-with-labellio/\n- JP: http://blog-jp.alpaca.ai/entry/2015/08/05/235408\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpacatechjp%2Fselectivesearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falpacatechjp%2Fselectivesearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpacatechjp%2Fselectivesearch/lists"}