{"id":23338417,"url":"https://github.com/abhirockzz/fn-hello-tensorflow","last_synced_at":"2025-04-09T22:32:24.547Z","repository":{"id":79124957,"uuid":"159647418","full_name":"abhirockzz/fn-hello-tensorflow","owner":"abhirockzz","description":"Image classification as a serverless Function using TensorFlow","archived":false,"fork":false,"pushed_at":"2019-01-10T05:25:03.000Z","size":48820,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T00:25:09.915Z","etag":null,"topics":["faas","fnproject","image-classification","machine-learning","orafunc-la","serverless","tensorflow"],"latest_commit_sha":null,"homepage":"https://medium.com/@abhishek1987/serverless-image-classification-with-oracle-functions-and-tensorflow-849395786110","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abhirockzz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-29T10:19:12.000Z","updated_at":"2020-06-26T06:44:34.000Z","dependencies_parsed_at":"2023-03-12T06:43:19.133Z","dependency_job_id":null,"html_url":"https://github.com/abhirockzz/fn-hello-tensorflow","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhirockzz%2Ffn-hello-tensorflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhirockzz%2Ffn-hello-tensorflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhirockzz%2Ffn-hello-tensorflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhirockzz%2Ffn-hello-tensorflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhirockzz","download_url":"https://codeload.github.com/abhirockzz/fn-hello-tensorflow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248123716,"owners_count":21051518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["faas","fnproject","image-classification","machine-learning","orafunc-la","serverless","tensorflow"],"created_at":"2024-12-21T03:13:53.052Z","updated_at":"2025-04-09T22:32:24.537Z","avatar_url":"https://github.com/abhirockzz.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serverless image classification with functions \u0026 TensorFlow\n\nDemonstrates a serverless function capable of simple image classification using TensorFlow\n\nThrow random images at your function and expect it to (hopefully) return something sane !\nJust like this image (of what looks like a pizza) when passed on to our classification function returns -  `This is a 'pizza' Accuracy - 96%`\n\n![pizza? sure ?](https://cdn-images-1.medium.com/max/2000/1*Vrayow-T48w8ARLjHkPqdA.png)\n\n## Pre-requisites\n\n- Get latest FN CLI - `curl -LSs https://raw.githubusercontent.com/fnproject/cli/master/install | sh`\n- Configure your environment i.e. setup Fn context as well as OCI configuration for Oracle Functions\n\nThis is what a context file looks like:\n\n    api-url: https://functions.us-phoenix-1.oraclecloud.com oracle.compartment-id: \u003cOCI_compartment_OCID\u003e\n    oracle.profile: \u003cprofile_name_in_OCI_config\u003e\n    provider: oracle\n    registry: \u003cOCI_docker_registry\u003e\n\n.. and here is an example configuration file:\n\n    [ORACLE_FUNCTIONS_USER] \n    user=ocid1.user.oc1..exampleuniqueID \n    fingerprint=72:00:22:7f:d3:8b:47:a4:58:05:b8:95:84:31:dd:0e \n    key_file=/.oci/admin_key.pem \n    tenancy=ocid1.tenancy.oc1..exampleuniqueID \n    pass_phrase=s3cr3t \n    region=us-phoenix-1\n\n- Switch to the correct context according to your Functions development environment: `fn use context \u003ccontext_name\u003e`\n\n## Create the Application\n\n- `git clone https://github.com/abhirockzz/fn-hello-tensorflow`\n- `cd fn-hello-tensorflow` \n- `fn create app \u003capp_name\u003e --annotation oracle.com/oci/subnetIds='[\"\u003csubnet_ocid\u003e\"]'`\n\n## Deploy the function\n\nIf you want to use TensorFlow version 1.12.0 (for Java SDK and corresponding native libraries), use the following command: `fn -v deploy --app fn-tensorflow-app`\n\nYou can also choose a specific version. Ensure that you specify it in `pom.xml` file before you build the function. For example, if you want to use version 1.11.0:\n`fn -v deploy --app fn-tensorflow-app --build-arg TENSORFLOW_VERSION=1.11.0`\n\nWhen the deployment completes successfully, your function is ready to use. Use the `fn ls apps` command to list down the applications currently deployed. `fn-tensorflow-app` should be listed\n\n## Test\n\nAll you need to do is pass the image to the function while invoking it:\n\n`cat \u003cpath to image\u003e | fn invoke fn-tensorflow-app classify`\n\nFor the fun part, check out the `Time to Classify Images!` section in the corresponding blog post - https://medium.com/@abhishek1987/serverless-image-classification-with-oracle-functions-and-tensorflow-849395786110\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhirockzz%2Ffn-hello-tensorflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhirockzz%2Ffn-hello-tensorflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhirockzz%2Ffn-hello-tensorflow/lists"}