Skip to main content

Selective Search

English | 简体中文

GitHub release PyPI Conda

Travis Build Status Codacy grade

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

Release files for selective-search 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for selective-search 1.1.0
File Size Uploaded
selective_search-1.1.0.tar.gz 11.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for selective-search 1.1.0
File Interpreter ABI Platform
selective_search-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.6 kB

Release files / selective_search-1.1.0.tar.gz

Download URL selective_search-1.1.0.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0e603cb8b6ef41467746b5f3328ddcb92bd747b4650b858a6dd82ca1b54c3d1c
BLAKE2b-256 checksum
How to use checksums
083381ce30d2047ca16f7a2a9102c651cf96bd23178c979ff340b7d1481465cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

Release files / selective_search-1.1.0-py3-none-any.whl

Download URL selective_search-1.1.0-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
36c9ec094577986e7bedc9ee92c9c82fd1868abed3de5f3115437e247bfc3a01
BLAKE2b-256 checksum
How to use checksums
aeccb145d76be6ad411e59b027c2a33f3b48035b576eda3b8eeb77e74af230a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

0.1.2.2

1 release file

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page