-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Created using Colaboratory #846
Open
Bobbyorr007
wants to merge
14
commits into
tensorflow:master
Choose a base branch
from
Bobbyorr007:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d75a552
Created using Colaboratory
Bobbyorr007 b1a17cd
Created using Colaboratory
Bobbyorr007 c33032d
Delete Object_Detection_Inference_on_TF_2_and_TF_Hub.ipynb
Bobbyorr007 47fb918
Created using Colaboratory
Bobbyorr007 10353c9
Created using Colaboratory
Bobbyorr007 61a17f4
Created using Colaboratory
Bobbyorr007 01987b7
Created using Colaboratory
Bobbyorr007 7109af9
Created using Colaboratory
Bobbyorr007 5094c76
Delete Object_Detection_Inference_on_TF_2_and_TF_Hub.ipynbObject_Dete…
Bobbyorr007 63f3829
Created using Colaboratory
Bobbyorr007 a76bee1
Delete Object_Detection_Inference_on_TF_2_and_TF_Hub.ipynb
Bobbyorr007 3abcb7a
Created using Colaboratory
Bobbyorr007 31b7e06
Created using Colaboratory
Bobbyorr007 efadb65
Update tf2_object_detection.ipynb
Bobbyorr007 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": { | ||
"id": "view-in-github", | ||
"colab_type": "text" | ||
}, | ||
"source": [ | ||
"<a href=\"https://colab.research.google.com/github/Bobbyorr007/hub/blob/master/examples/colab/tf2_object_detection.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": { | ||
|
@@ -42,23 +52,23 @@ | |
"id": "V1UUX8SUUiMO" | ||
}, | ||
"source": [ | ||
"\u003ctable class=\"tfo-notebook-buttons\" align=\"left\"\u003e\n", | ||
" \u003ctd\u003e\n", | ||
" \u003ca target=\"_blank\" href=\"https://www.tensorflow.org/hub/tutorials/tf2_object_detection\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/tf_logo_32px.png\" /\u003eView on TensorFlow.org\u003c/a\u003e\n", | ||
" \u003c/td\u003e\n", | ||
" \u003ctd\u003e\n", | ||
" \u003ca target=\"_blank\" href=\"https://colab.research.google.com/github/tensorflow/hub/blob/master/examples/colab/tf2_object_detection.ipynb\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/colab_logo_32px.png\" /\u003eRun in Google Colab\u003c/a\u003e\n", | ||
" \u003c/td\u003e\n", | ||
" \u003ctd\u003e\n", | ||
" \u003ca target=\"_blank\" href=\"https://github.com/tensorflow/hub/blob/master/examples/colab/tf2_object_detection.ipynb\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/GitHub-Mark-32px.png\" /\u003eView on GitHub\u003c/a\u003e\n", | ||
" \u003c/td\u003e\n", | ||
" \u003ctd\u003e\n", | ||
" \u003ca href=\"https://storage.googleapis.com/tensorflow_docs/hub/examples/colab/tf2_object_detection.ipynb\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/download_logo_32px.png\" /\u003eDownload notebook\u003c/a\u003e\n", | ||
" \u003c/td\u003e\n", | ||
" \u003ctd\u003e\n", | ||
" \u003ca href=\"https://tfhub.dev/tensorflow/collections/object_detection/1\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/hub_logo_32px.png\" /\u003eSee TF Hub models\u003c/a\u003e\n", | ||
" \u003c/td\u003e\n", | ||
"\u003c/table\u003e" | ||
"<table class=\"tfo-notebook-buttons\" align=\"left\">\n", | ||
" <td>\n", | ||
" <a target=\"_blank\" href=\"https://www.tensorflow.org/hub/tutorials/tf2_object_detection\"><img src=\"https://www.tensorflow.org/images/tf_logo_32px.png\" />View on TensorFlow.org</a>\n", | ||
" </td>\n", | ||
" <td>\n", | ||
" <a target=\"_blank\" href=\"https://colab.research.google.com/github/tensorflow/hub/blob/master/examples/colab/tf2_object_detection.ipynb\"><img src=\"https://www.tensorflow.org/images/colab_logo_32px.png\" />Run in Google Colab</a>\n", | ||
" </td>\n", | ||
" <td>\n", | ||
" <a target=\"_blank\" href=\"https://github.com/tensorflow/hub/blob/master/examples/colab/tf2_object_detection.ipynb\"><img src=\"https://www.tensorflow.org/images/GitHub-Mark-32px.png\" />View on GitHub</a>\n", | ||
" </td>\n", | ||
" <td>\n", | ||
" <a href=\"https://storage.googleapis.com/tensorflow_docs/hub/examples/colab/tf2_object_detection.ipynb\"><img src=\"https://www.tensorflow.org/images/download_logo_32px.png\" />Download notebook</a>\n", | ||
" </td>\n", | ||
" <td>\n", | ||
" <a href=\"https://tfhub.dev/tensorflow/collections/object_detection/1\"><img src=\"https://www.tensorflow.org/images/hub_logo_32px.png\" />See TF Hub models</a>\n", | ||
" </td>\n", | ||
"</table>" | ||
] | ||
}, | ||
{ | ||
|
@@ -102,7 +112,7 @@ | |
"outputs": [], | ||
"source": [ | ||
"# This Colab requires TF 2.5.\n", | ||
"!pip install -U \"tensorflow\u003e=2.5\"" | ||
"!pip install -U \"tensorflow>=2.5\"" | ||
] | ||
}, | ||
{ | ||
|
@@ -151,7 +161,6 @@ | |
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"cellView": "form", | ||
"id": "-y9R0Xllefec" | ||
}, | ||
"outputs": [], | ||
|
@@ -290,7 +299,7 @@ | |
"id": "yX3pb_pXDjYA" | ||
}, | ||
"source": [ | ||
"Intalling the Object Detection API" | ||
"Installing the Object Detection API" | ||
] | ||
}, | ||
{ | ||
|
@@ -554,7 +563,7 @@ | |
"\n", | ||
"Among the available object detection models there's Mask R-CNN and the output of this model allows instance segmentation.\n", | ||
"\n", | ||
"To visualize it we will use the same method we did before but adding an aditional parameter: `instance_masks=output_dict.get('detection_masks_reframed', None)`\n" | ||
"To visualize it, we will use the same method we did before but adding an aditional parameter: `instance_masks=output_dict.get('detection_masks_reframed', None)`\n" | ||
] | ||
}, | ||
{ | ||
|
@@ -577,7 +586,7 @@ | |
" detection_masks_reframed = utils_ops.reframe_box_masks_to_image_masks(\n", | ||
" detection_masks, detection_boxes,\n", | ||
" image_np.shape[1], image_np.shape[2])\n", | ||
" detection_masks_reframed = tf.cast(detection_masks_reframed \u003e 0.5,\n", | ||
" detection_masks_reframed = tf.cast(detection_masks_reframed > 0.5,\n", | ||
" tf.uint8)\n", | ||
" result['detection_masks_reframed'] = detection_masks_reframed.numpy()\n", | ||
"\n", | ||
|
@@ -606,13 +615,15 @@ | |
"name": "Object Detection Inference on TF 2 and TF Hub", | ||
"private_outputs": true, | ||
"provenance": [], | ||
"toc_visible": true | ||
"toc_visible": true, | ||
"include_colab_link": true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please also remove these additions There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll, and created a pull request, thank you! |
||
}, | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"name": "python3" | ||
} | ||
}, | ||
"accelerator": "GPU" | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 0 | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove that section again, please?