Selective Search in Python
Project description
Selective Search
English | 简体中文
This is a complete implementation of selective search in Python. I thoroughly read the related papers [1][2][3] and the author’s MATLAB implementation. Compared with other implementations, my method is authentically shows the idea of the original paper. Moreover, this method has clear logic and rich annotations, which is very suitable for teaching purposes, allowing people who have just entered the CV field to understand the basic principles of selective search and exercise code reading ability.
Installation
Installing from PyPI is recommended :
$ pip install selective-search
It is also possible to install the latest version from Github source:
$ git clone https://github.com/ChenjieXu/selective_search.git
$ cd selective_search
$ python setup.py install
Install from Anaconda:
conda install -c chenjiexu selective_search
Quick Start
import skimage.io
from selective_search import selective_search
# Load image as NumPy array from image files
image = skimage.io.imread('path/to/image')
# Run selective search using single mode
boxes = selective_search(image, mode='single', random_sort=False)
For detailed examples, refer this part of the repository.
Parameters
Mode
Three modes correspond to various combinations of diversification strategies. The appoach to combine different diversification strategies, say, color spaces, similarity measures, starting regions is listed in the following table[1].
Mode | Color Spaces | Similarity Measures | Starting Regions (k) | Number of Combinations |
---|---|---|---|---|
single | HSV | CTSF | 100 | 1 |
fast | HSV, Lab | CTSF, TSF | 50, 100 | 8 |
quality | HSV, Lab, rgI, H, I | CTSF, TSF, F, S | 50, 100, 150, 300 | 80 |
-
Color Space [Source Code]
Initial oversegmentation algorithm and our subsequent grouping algorithm are performed in this colour space. -
Similarity Measure [Source Code]
'CTSF' means the similarity measure is aggregate of color similarity, texture similarity, size similarity, and fill similarity. -
Starting Region [Source Code]
A parameter of initial grouping algorithm[2], which yields high quality starting locations efficiently. A larger k causes a preference for larger components of initial strating regions.
Random Sort
If random_sort set to True, function will carry out pseudo random sorting. It only alters sequences of bounding boxes, instead of locations, which prevents heavily emphasis on large regions as combing proposals from up to 80 different strategies[1]. This only has a significant impact when selecting a subset of region proposals with high rankings, as in RCNN.
References
[1] J. R. R. Uijlings et al., Selective Search for Object Recognition, IJCV, 2013
[2] Felzenszwalb, P. F. et al., Efficient Graph-based Image Segmentation, IJCV, 2004
[3] Segmentation as Selective Search for Object Recognition
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file selective_search-1.0.0.tar.gz
.
File metadata
- Download URL: selective_search-1.0.0.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02406c69620611eefa63fdaa0d5125187b57897be1cdd558b8cc7a7a38fddd96 |
|
MD5 | 8fa7f460e6336bb5d36da2642751a87f |
|
BLAKE2b-256 | bfc2b22586445a60f1bff8aca330f2369f970aa4976fb00ba8e90ca65d0225d6 |
File details
Details for the file selective_search-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: selective_search-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95f4ea048390e73e73623d949437a4b10d2cbac5f4782df83ca9faed066addca |
|
MD5 | e2a4e6aa1538abb82f1a736efe3d946b |
|
BLAKE2b-256 | 52f33c820a9df4a57b80f6c6cbd60922dbfff74a347692341e6af468c9eac9cb |