{"id":18930162,"url":"https://github.com/nheidloff/visual-recognition-tensorflow-openwhisk","last_synced_at":"2025-04-15T15:31:21.695Z","repository":{"id":88375302,"uuid":"112178910","full_name":"nheidloff/visual-recognition-tensorflow-openwhisk","owner":"nheidloff","description":"Visual Recognition with TensorFlow and OpenWhisk","archived":false,"fork":false,"pushed_at":"2018-03-26T06:58:25.000Z","size":5368,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-28T22:51:10.989Z","etag":null,"topics":["kubernetes","openwhisk","tensorflow"],"latest_commit_sha":null,"homepage":"http://visual-recognition-tensorflow.mybluemix.net/","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nheidloff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2017-11-27T09:58:32.000Z","updated_at":"2020-02-14T19:43:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"0720fcd7-9ce1-4de3-aef4-8502c9dfbc82","html_url":"https://github.com/nheidloff/visual-recognition-tensorflow-openwhisk","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/nheidloff%2Fvisual-recognition-tensorflow-openwhisk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nheidloff%2Fvisual-recognition-tensorflow-openwhisk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nheidloff%2Fvisual-recognition-tensorflow-openwhisk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nheidloff%2Fvisual-recognition-tensorflow-openwhisk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nheidloff","download_url":"https://codeload.github.com/nheidloff/visual-recognition-tensorflow-openwhisk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249097910,"owners_count":21212376,"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":["kubernetes","openwhisk","tensorflow"],"created_at":"2024-11-08T11:36:48.404Z","updated_at":"2025-04-15T15:31:21.669Z","avatar_url":"https://github.com/nheidloff.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Visual Recognition with TensorFlow and OpenWhisk\n\nThis [project](https://github.com/nheidloff/visual-recognition-tensorflow-openwhisk) contains a sample application which uses an extended [MobileNet](https://research.googleblog.com/2017/06/mobilenets-open-source-models-for.html) TensorFlow model to recognize different flower types. The predictions are executed by [TensorFlow](https://www.tensorflow.org/) running in an [OpenWhisk](https://www.ibm.com/cloud/functions) function.\n\nThis project is an extension of the TensorFlow tutorial [TensorFlow for Poets](https://codelabs.developers.google.com/codelabs/tensorflow-for-poets/#0) which describes how to [retrain](https://www.tensorflow.org/tutorials/image_retraining) MobileNet's final layer of a neural network for new categories.\n\nThe screenshot shows the sample web application:\n\n![alt text](https://github.com/nheidloff/visual-recognition-tensorflow-openwhisk/raw/master/screenshots/web-app.png \"Visual Recognition with TensorFlow and OpenWhisk\")\n\n\n## Documentation\n\n[Ansgar Schmidt](https://ansi.23-5.eu/) and I have blogged about this project:\n\n* [Sample Application to classify Images with TensorFlow and OpenWhisk](https://heidloff.net/article/visual-recognition-tensorflow)\n* [Accessing IBM Object Store from Python](https://ansi.23-5.eu/2017/11/accessing-ibm-object-store-python/)\n* [Image Recognition with Tensorflow training on Kubernetes](https://ansi.23-5.eu/2017/11/image-recognition-with-tensorflow-training-on-kubernetes/)\n* [Image Recognition with Tensorflow classification on OpenWhisk](https://ansi.23-5.eu/2017/11/image-recognition-tensorflow-classification-openwhisk/)\n* [Visual Recognition with TensorFlow and OpenWhisk](http://heidloff.net/article/visual-recognition-tensorflow-openwhisk)\n\n\n## Prerequisites\n\nThis project only contains the web application and an OpenWhisk function which provides the classify REST API. The project [VisualRecognitionWithTensorflow](https://github.com/AnsgarSchmidt/VisualRecognitionWithTensorflow) contains the code to train the model as well as the code for a Docker image to classify flowers. You also need an instance of IBM Object Storage to store the images and the models. Check out the blog entries above.\n\nAdditionally you need an IBM Cloud account and two CLIs:\n\n* [IBM Cloud account][sign_up]\n* [Cloud Foundry CLI][cloud_foundry]\n* [IBM Cloud CLI](https://console.bluemix.net/docs/cli/reference/bluemix_cli/download_cli.html)\n\nClone the two projects:\n\n```sh\n$ git clone https://github.com/nheidloff/visual-recognition-tensorflow-openwhisk.git\n$ git clone https://github.com/AnsgarSchmidt/VisualRecognitionWithTensorflow.git\n$ cd visual-recognition-tensorflow-openwhisk\n```\n\n\n## Setup OpenWhisk Functions\n\nIn order to deploy the two OpenWhisk functions and one sequence run the following commands from the 'openwhisk-api' directory:\n\n```sh\n$ cd openwhisk-api\n$ bx login -a api.ng.bluemix.net\n$ bx target -o \u003cyour-organization\u003e -s \u003cyour-space\u003e\n$ bx plugin install Cloud-Functions -r Bluemix\n$ wsk package update visualRecognition\n$ wsk action create visualRecognition/tensorflow-classify --docker \u003cyour-dockerhub-name\u003e/tensorflow-openwhisk-classify:latest\n$ npm install\n$ sh ./deploy\n$ wsk action create --sequence visualRecognition/classifyAPI visualRecognition/classifyImage,visualRecognition/tensorflow-classify --web raw\n```\n\n## Setup Web Application\n\nIn the [OpenWhisk web application](https://console.bluemix.net/openwhisk/manage/actions) choose your sequence and open 'Additional Details'. From there copy the URL into the clipboard. Create a new file '.env' in the 'web-app' directory. See [.env-template](.env-template) for an example. Paste the URL in this file.\n\nFrom the directory 'web-app' run these commands:\n\n```sh\n$ cd web-app\n$ npm install\n$ npm start\n```\n  \nOpen the web application via [http://localhost:3000/](http://localhost:3000/).\n\nOptionally: In order to deploy the application to the IBM Cloud change the application name in [manifest.yml](manifest.yml) to something unique and run these commands:\n\n```sh\n$ bx login -a api.ng.bluemix.net\n$ bx target -o \u003cyour-organization\u003e -s \u003cyour-space\u003e\n$ cf push\n```\n\nOpen the web application via [http://your-application-name.mybluemix.net/](http://your-application-name.mybluemix.net/).\n\n\n## License\n\nThis sample code is licensed under Apache 2.0. Full license text is available in [LICENSE](LICENSE).\n\n\n## Open Source @ IBM\n  Find more open source projects on the [IBM Github Page](http://ibm.github.io/).\n\n[cloud_foundry]: https://github.com/cloudfoundry/cli\n[sign_up]: https://console.ng.bluemix.net/registration/\n[node_js]: http://nodejs.org/\n[npm]: https://www.npmjs.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnheidloff%2Fvisual-recognition-tensorflow-openwhisk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnheidloff%2Fvisual-recognition-tensorflow-openwhisk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnheidloff%2Fvisual-recognition-tensorflow-openwhisk/lists"}