Skip to content

Commit

Permalink
added test images from holdout set and updated detect_from_image.py t…
Browse files Browse the repository at this point in the history
…o use opencv instead of matplotlib
  • Loading branch information
youngsoul committed Jan 24, 2021
1 parent fc76928 commit 9b2b69a
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 5 deletions.
13 changes: 13 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ The project in this repo was completely inspired by [Nicholas Renotte](https://g

![SLD](./media/sign-language-detection.gif)

<b>Test Images</b>

![hello](./media/hello-test.gif)

![iloveyou](./media/iloveyou-test.gif)

![no](./media/no-test.gif)

![ty](./media/thank-you-test.gif)

![yes](./media/yes-test.gif)


## Attribution

This repo is a collection of knowledge gained from others who so generously put together github repos and YouTube videos. To you I say 'Thank you!'
Expand Down
Binary file added media/hello-test.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/iloveyou-test.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/no-test.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/thank-you-test.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/yes-test.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 9 additions & 5 deletions scripts/detect_from_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import glob
import matplotlib.pyplot as plt
import model_config as mc

import cv2
from object_detection.utils import ops as utils_ops
from object_detection.utils import label_map_util
from object_detection.utils import visualization_utils as vis_util
Expand Down Expand Up @@ -102,8 +102,10 @@ def run_inference(model, category_index, image_path):
instance_masks=output_dict.get('detection_masks_reframed', None),
use_normalized_coordinates=True,
line_thickness=8)
plt.imshow(image_np)
plt.show()
cv2.imshow("Sign", image_np)
cv2.waitKey(0)
# plt.imshow(image_np)
# plt.show()
else:
image_np = load_image_into_numpy_array(image_path)
# Actual detection.
Expand All @@ -118,8 +120,10 @@ def run_inference(model, category_index, image_path):
instance_masks=output_dict.get('detection_masks_reframed', None),
use_normalized_coordinates=True,
line_thickness=8)
plt.imshow(image_np)
plt.show()
# plt.imshow(image_np)
# plt.show()
cv2.imshow("Sign", image_np)
cv2.waitKey(0)


if __name__ == '__main__':
Expand Down

0 comments on commit 9b2b69a

Please sign in to comment.