Skip to main content

An educational module for generating region proposals for object detection

Project description

Consult the module API page at

for all information related to this module, including information related to the latest changes to the code. The page at the URL shown above lists all of the module functionality you can invoke in your own code.

from RegionProposalGenerator import *

rpg = RegionProposalGenerator(
               ###  The first 6 options affect only the graph-based part of the algo
               sigma = 1.0,
               max_iterations = 40,
               kay = 0.05,
               image_normalization_required = True,
               image_size_reduction_factor = 4,
               min_size_for_graph_based_blobs = 4,
               ###  The next 4 options affect only the Selective Search part of the algo
               color_homogeneity_thresh = [20,20,20],
               gray_var_thresh = 16000,
               texture_homogeneity_thresh = 120,
               max_num_blobs_expected = 8,

image_name = "images/mondrian.jpg"
segmented_graph,color_map = rpg.graph_based_segmentation(image_name)
rpg.visualize_segmentation_in_pseudocolor(segmented_graph[0], color_map, "graph_based" )
merged_blobs, color_map = rpg.selective_search_for_region_proposals( segmented_graph, image_name )
rpg.visualize_segmentation_with_mean_gray(merged_blobs, "ss_based_segmentation_in_bw" )

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

RegionProposalGenerator-1.0.4.tar.gz (150.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page