Skip to content

Instantly share code, notes, and snippets.

@ontheklaud
Last active February 14, 2020 03:07
Show Gist options
  • Save ontheklaud/4711354851162d741e2d7bddbdbc62f2 to your computer and use it in GitHub Desktop.
Save ontheklaud/4711354851162d741e2d7bddbdbc62f2 to your computer and use it in GitHub Desktop.
GCP AutoML Multi-Class Image Label Prediction
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"# reference: https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/vision/automl/automl_vision_predict.py"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import subprocess\n",
"import sys\n",
"\n",
"def pip_install(package):\n",
" subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", package])\n",
"\n",
"pip_install(\"google-cloud-automl\")"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"os.environ[\"GOOGLE_APPLICATION_CREDENTIALS\"]=\"<credential>.json\""
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"# TODO(developer): Uncomment and set the following variables\n",
"project_id = '***-****-*****'\n",
"compute_region = 'us-central1'\n",
"model_id = 'ICN****'\n",
"file_path = 'cat.jpg'\n",
"score_threshold = '0.5'"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Prediction results:\n",
"Predicted class name: cats\n",
"Predicted class score: 0.995783805847168\n"
]
}
],
"source": [
"from google.cloud import automl_v1beta1 as automl\n",
"\n",
"automl_client = automl.AutoMlClient()\n",
"\n",
"# Get the full path of the model.\n",
"model_full_id = automl_client.model_path(\n",
" project_id, compute_region, model_id\n",
")\n",
"\n",
"# Create client for prediction service.\n",
"prediction_client = automl.PredictionServiceClient()\n",
"\n",
"# Read the image and assign to payload.\n",
"with open(file_path, \"rb\") as image_file:\n",
" content = image_file.read()\n",
"payload = {\"image\": {\"image_bytes\": content}}\n",
"\n",
"# params is additional domain-specific parameters.\n",
"# score_threshold is used to filter the result\n",
"# Initialize params\n",
"params = {}\n",
"if score_threshold:\n",
" params = {\"score_threshold\": score_threshold}\n",
"\n",
"response = prediction_client.predict(model_full_id, payload, params)\n",
"print(\"Prediction results:\")\n",
"for result in response.payload:\n",
" print(\"Predicted class name: {}\".format(result.display_name))\n",
" print(\"Predicted class score: {}\".format(result.classification.score))"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA84AAACnCAIAAAE4Y6KWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAADn7SURBVHhe7Z37k1zHdd/9x8hJahS5yswPcSHa5XIJYAAQ4AuPXYCPERlaIgSERVmCl4JtEIotK4yccUqAHEsiIztbgMvlsh7Wb8N/Lt/ub98z5/Z9zJ07d2Znge+nTs12nz59+nRPz9meO6/f+/qLL0k2Jo3LvXP5+u6dH7B8+/HM9JJVJCw3VvPM7t0zuwe+4Y0b48cPvoLCg+t7Tz4NTVd396yV8uDpbPb4LstohSVtLr76BpWSTJRMNioLlvurYlAWL/dofERTK2SMRuPx0TFurcoClCwQ6tNtdEUDdo+FCW6JKa0M8R5CoRLYihGSudlkygIwJcmqxNsDP5wNlJb74ufXbIlD9ZXLLNBoKfyq9cbPp3ZuVarjUtOkN1DNVspT7b4sPv763f3yuTELyUoMRIdkEu8cPE75ULX7CjtiXi43iSb0r3KjpOW+efOmJRCITybaswNSv9yHhzdZgIVf7tqlz5SstvzzeZ5RMtkoXf9VLku+5eNmD0eu6rGs8jhY/ey1tdQs969/+zsIy8lKDETNch++9Q6E5WQlBqI+mVy68hoLyUoMhP5VbpSa5X77vQ8oKMOi47/KWrMufZ/hf4xV6v9V/uuvfmPLLQZk8e4WA7Igd0uGlcbl3rn+/u7e3p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coOp24XwzWu4vwNpR7R3dLZ4W6CBVCorwi3hsmLrAMFB7/FVoPoFV6p/GS81CCCGE6EXNUfuNIch8UhYetb9556OP7x2ZoOpbN3lV28OGVCnITlTzo09xqKHeWHjWAexbM1aDvkp2wPJUAua0imrqN++Y2Xt8PE1+oromkkxf1GpGIcn9+Gh6NIbveFm65LY2zqrbhfPNaIqf0FcYueKkYzxN2MKlekHmdvFRu6xfSLR36xOq+SyEEEIIsSzbdVW79qj93aP7//qr3/CQ7eXvf/75ux98y3eHeP+QNMsOZEcxDxtSxcHjTvUqOEAX6oE1cYikdXp4SaqynyZ9C9WjdjYoqL1sWfRL+mQasSvZtfE0+bGm1MF3CeqgDxpnXwud0IYLXpQb4yQWbft8Wa2lNn50RBlF2sAC1XAmXTKepG2AbonF2bTfuEJJ6eZVGz+71OLtaze8EEIIIZbl1LyBxB+4aw/ZFO8fkmYphBBCCCHExjlNH4uEfPTde02HbIr3D0mzFEIIIYQQYuNs9VXtdvHXvE28f0iapRBCCCGEEBtnq9+r3S7ZhyYp3j8kzVIIIYQQQoiNc8reQLJQvH9ImqUQQgghhBAbp/9R+6Wz53/++S+vXj/M9C2io7YQQgghhHh+6HnUvnbj5q9+8298z/Q//fO/dDxwZ0ft8eUr2UF5RYFD7x+SZimEEEIIIcSG+epX/z950z9xQbXqZwAAAABJRU5ErkJggg==\n",
"text/plain": [
"<IPython.core.display.Image object>"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# execution result from local python IDE (PyCharm)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment