{"id":31769217,"url":"https://github.com/second-state/wasmedge-tensorflow-tools","last_synced_at":"2025-10-10T02:42:04.437Z","repository":{"id":37967532,"uuid":"362770586","full_name":"second-state/WasmEdge-tensorflow-tools","owner":"second-state","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-27T22:47:35.000Z","size":131,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T18:57:36.144Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/second-state.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"LICENSE.spdx","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-29T09:58:42.000Z","updated_at":"2023-09-17T17:08:08.000Z","dependencies_parsed_at":"2023-01-30T19:30:33.306Z","dependency_job_id":null,"html_url":"https://github.com/second-state/WasmEdge-tensorflow-tools","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/second-state/WasmEdge-tensorflow-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/second-state%2FWasmEdge-tensorflow-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/second-state%2FWasmEdge-tensorflow-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/second-state%2FWasmEdge-tensorflow-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/second-state%2FWasmEdge-tensorflow-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/second-state","download_url":"https://codeload.github.com/second-state/WasmEdge-tensorflow-tools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/second-state%2FWasmEdge-tensorflow-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002541,"owners_count":26083403,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-10-10T02:42:02.731Z","updated_at":"2025-10-10T02:42:04.430Z","avatar_url":"https://github.com/second-state.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WasmEdge Tools for Tensorflow Extension (WILL BE DEPRECATED SOON)\n\n\u003e The WasmEdge extension will be deprecated soon and be replaced by the [WasmEdge-Image plug-in](https://wasmedge.org/docs/contribute/source/plugin/image), [WasmEdge-Tensorflow plug-in](https://wasmedge.org/docs/contribute/source/plugin/tensorflow), and [WasmEdge-TensorflowLite plug-in](https://wasmedge.org/docs/contribute/source/plugin/tensorflowlite).\n\nThe [WasmEdge](https://github.com/WasmEdge/WasmEdge) is a high performance WebAssembly runtime optimized for server side applications. This project provides WasmEdge tools accessing with [Tensorflow C library](https://www.tensorflow.org/install/lang_c).\n\n## Getting Started\n\n### Install the WasmEdge-Tensorflow-Tools and dependencies\n\n```bash\nwget -qO- https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -e all -v 0.12.1\n```\n\n### Example\n\nWe provide a simple tool for showing the tensors information of TensorFlow-Lite models.\nTake the [bird v1 tflite model](https://github.com/second-state/wasm-learning/blob/master/rust/birds_v1/lite-model_aiy_vision_classifier_birds_V1_3.tflite) for example.\n\n```bash\n./show-tflite-tensor lite-model_aiy_vision_classifier_birds_V1_3.tflite\n```\n\nThe output will be as following:\n\n```bash\nInput tensor nums: 1\n    Input tensor name: module/hub_input/images_uint8\n        dimensions: [1 , 224 , 224 , 3]\n        data type: UInt8\n        tensor byte size: 150528\nOutput tensor nums: 1\n    Output tensor name: module/prediction\n        dimensions: [1 , 965]\n        data type: UInt8\n        tensor byte size: 965\n```\n\n## Build\n\n### Get Source Code\n\n```bash\ngit clone https://github.com/second-state/WasmEdge-tensorflow-tools.git\ncd WasmEdge-tensorflow-tools\ngit checkout 0.12.1\n```\n\n### Check Dependencies\n\nWasmEdge will try to use the latest LLVM release to create our nightly build.\nIf you want to build from source, you may need to install these dependencies by yourself or using our docker images which provides several Linux distribution support.\n\n- GCC 11.1.0 (\u003e= 9.4.0)\n\n### Prepare the Environment\n\n#### Option 1: Use Docker Images\n\nRepository on dockerhub `wasmedge/wasmedge`\n\nYou can use the following commands to get our latest docker image:\n\n```bash\ndocker pull wasmedge/wasmedge # Equals to wasmedge/wasmedge:latest\n```\n\nThe followings are available tags of docker images to build and run `WasmEdge-Tensorflow-Tools`:\n\n| tag name                | arch    | based operating system | LLVM version | ENVs                  | compatibility            | comments                                                                            |\n| ---                     | ---     | ---                    | ---          | ---                   | ---                      | ---                                                                                 |\n| `latest`                | x86\\_64 | Ubuntu 20.04 LTS       | 12.0.0       | CC=clang, CXX=clang++ | Ubuntu 20.04+            | This is for CI, will always use the latest Ubuntu release                           |\n| `ubuntu-build-gcc`      | x86\\_64 | Ubuntu 20.04 LTS       | 12.0.0       | CC=gcc, CXX=g++       | Ubuntu 20.04+            | This is for CI, will always use the latest Ubuntu release                           |\n| `ubuntu-build-clang`    | x86\\_64 | Ubuntu 20.04 LTS       | 12.0.0       | CC=clang, CXX=clang++ | Ubuntu 20.04+            | This is for CI, will always use the latest Ubuntu release                           |\n| `manylinux2014_x86_64`  | x86\\_64 | CentOS 7, 7.9.2009     | 12.0.0       | CC=gcc, CXX=g++       | Ubuntu 16.04+, CentOS 7+ | This is for developers who familiar with CentOS on x86\\_64 architecture             |\n\n#### Option 2: Install dependencies on Ubuntu 20.04 manually\n\n```bash\n# Tools and libraries\nsudo apt install -y \\\n    software-properties-common \\\n    cmake \\\n    libboost-all-dev\n\n# WasmEdge supports both clang++ and g++ compilers\n# You can choose one of them for building this project\n# If you prefer GCC\nsudo apt install -y gcc g++\n# Else you can choose clang\nsudo apt install -y clang-12\n```\n\n### Build WasmEdge-Tensorflow-Tools\n\n`WasmEdge-Tensorflow-Tools` depends on `WasmEdge-core`, `WasmEdge-image`, and `WasmEdge-tensorflow`.\nYou have to prepare the `WasmEdge-core`, `WasmEdge-image`, and the `WasmEdge-tensorflow` before you build `WasmEdge-Tensorflow-Tools`.\nWe provides two options for setting up the `WasmEdge-core`:\n\n#### Create and Enter the Build Folder\n\n```bash\n# After pulling our WasmEdge docker image\ndocker run -it --rm \\\n    -v \u003cpath/to/your/WasmEdge-tensorflow/source/folder\u003e:/root/WasmEdge-tensorflow-tools \\\n    wasmedge/wasmedge:latest\n# In docker\ncd /root/WasmEdge-tensorflow-tools\nmkdir -p build \u0026\u0026 cd build\n```\n\n#### Option 1. Use built-in CMakeLists to get WasmEdge-Core, WasmEdge-image, and WasmEdge-tensorflow (Recommended)\n\n```bash\n# In docker\ncmake -DCMAKE_BUILD_TYPE=Release .. \u0026\u0026 make\n```\n\n#### Option 2. Use specific version of WasmEdge-Core by giving WASMEDGE_CORE_PATH\n\nYou can also specify the `WasmEdge-image` by assigning `WASMEDGE_IMAGE_PATH`, and the `WasmEdge-tensorflow` by assigning `WASMEDGE_TENSORFLOW_PATH`. The dependencies not assigned will be fetched with the default versions automatically.\n\n```bash\n# In docker\ncmake \\\n    -DWASMEDGE_CORE_PATH=\u003cpath/to/WasmEdge/source\u003e \\\n    -DWASMEDGE_IMAGE_PATH=\u003cpath/to/WasmEdge-image/source\u003e \\\n    -DWASMEDGE_TENSORFLOW_PATH=\u003cpath/to/WasmEdge-tensorflow/source\u003e \\\n    -DCMAKE_BUILD_TYPE=Release .. \u0026\u0026 make\n```\n\nThe executable `build/tools/wasmedge-tensorflow` is the runner for executing WASM or compiled WASM.\nThe executable `build/tools/wasmedge-tensorflow-lite` is the runner for executing WASM or compiled WASM with only TensorFlow-lite host functions supported.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecond-state%2Fwasmedge-tensorflow-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecond-state%2Fwasmedge-tensorflow-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecond-state%2Fwasmedge-tensorflow-tools/lists"}