Skip to main content

Selective Search in Python

Project description

Selective Search

GitHub release PyPI Travis Build Status Codacy grade

This is a full implementation of selective search in Python. The implementation is typically based on this paper[1]. It have three selective search modes according to various diversification strategies as in the paper.

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

selective_search-0.1.2.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

selective_search-0.1.2-py3.7.egg (15.6 kB view details)

Uploaded Source

File details

Details for the file selective_search-0.1.2.tar.gz.

File metadata

  • Download URL: selective_search-0.1.2.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for selective_search-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4dfd6aa4f391e583c63c76eaa9c0efe081ae5640d7e71d00b2f072bf5ab3056a
MD5 47f49d2d2fe6b72d5cc22dcb43e01446
BLAKE2b-256 dbc09d32d248a59891de2bff1db9aba6aca9f46a04f47dc62d29a7eae56980cc

See more details on using hashes here.

File details

Details for the file selective_search-0.1.2-py3.7.egg.

File metadata

  • Download URL: selective_search-0.1.2-py3.7.egg
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for selective_search-0.1.2-py3.7.egg
Algorithm Hash digest
SHA256 7f36ac1f53de2bf1f7c3bc8e1f3d0124daa69d35899bcbada1e9e2a99dbf93b3
MD5 021ff5dc875dffaac9bbdebc46cad0cc
BLAKE2b-256 dcd40e67f13a4a12311f552a36a5e4ae29ed4fe8e6051f6d26a7c1e2d9a6d5ff

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page