Created
January 29, 2020 15:46
-
-
Save emadehsan/a93419de91d3bf65296ca2ba84c81f5e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load a random image from the images folder | |
file_names = next(os.walk(IMAGE_DIR))[2] | |
image = skimage.io.imread(os.path.join(IMAGE_DIR, random.choice(file_names))) | |
# Run detection | |
results = model.detect([image], verbose=1) | |
# Visualize results | |
r = results[0] | |
visualize.display_instances(image, r['rois'], r['masks'], r['class_ids'], | |
class_names, r['scores']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment