Socket
Socket
Sign inDemoInstall

selective-search

Package Overview
Dependencies
4
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    selective-search

Selective Search in Python


Maintainers
1

Readme

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].

ModeColor SpacesSimilarity MeasuresStarting Regions (k)Number of Combinations
singleHSVCTSF1001
fastHSV, LabCTSF, TSF50, 1008
qualityHSV, Lab, rgI, H, ICTSF, TSF, F, S50, 100, 150, 30080
  • 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

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc