diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b14bdd9..e37fd15 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,4 +26,4 @@ jobs: uses: JamesIves/github-pages-deploy-action@4.1.4 with: branch: gh-pages # The branch the action should deploy to. - folder: out # The folder the action should deploy. \ No newline at end of file + folder: out # The folder the action should deploy. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index 0223d7f..88e47b6 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,124 @@ -## [Demo for image processing](https://60fe22f9ff623f0007656040--reverent-hodgkin-dc1f51.netlify.app) | [Demo for tensorflow](https://60ff7e2d10fe590008db70a9--reverent-hodgkin-dc1f51.netlify.app) +## [Demo for image processing](https://second-state.github.io/aws-lambda-wasm-runtime/) | [Demo for tensorflow](https://robnanarivo.github.io/aws-lambda-wasm-runtime/) -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). +This project is aimed to demonstrate how to implement a Serverless Functions working with WebAssembly in AWS Lambda, using our [WasmEdge runtime](https://github.com/WasmEdge/WasmEdge). Docker is also required for this demo. -This project is aimed to demonstrate how to implement a Serverless Functions working with Webassembly in AWS Lambda. The [main branch](https://github.com/second-state/aws-lambda-wasm-runtime/tree/main) showcases an image processing function, and the [tensorflow branch](https://github.com/second-state/aws-lambda-wasm-runtime/tree/tensorflow) showcases an AI inference function. Both written in simple Rust and runs in the [WasmEdge runtime](https://github.com/WasmEdge/WasmEdge) for WebAssembly. +![](docs/images/service_arch.png) -## Overview +The [main branch](https://github.com/second-state/aws-lambda-wasm-runtime/tree/main) showcases an image processing function, and the [tensorflow branch](https://github.com/second-state/aws-lambda-wasm-runtime/tree/tensorflow) showcases an AI inference function. Both written in simple Rust and runs in the [WasmEdge runtime](https://github.com/WasmEdge/WasmEdge) for WebAssembly. -The Serverless Functions endpoint is located at `api/hello.js` to meet the requirement of Netlify, but not to the Next.js. So if you want to develop on you local machine, you should put it into `pages/api/` and make some change. +## Function Overview -The only function in `api/hello.js` is grayscaling an image. It receives a png file and pass it as stdin stream to a spawned child process. The child process runs using the [WasmEdge](https://github.com/WasmEdge/WasmEdge) command. +The Serverless Functions endpoint is located at [api/hello.js](https://github.com/second-state/aws-lambda-wasm-runtime/blob/tensorflow/api/hello.js) to meet the requirement of AWS Lambda. AWS Lambda requires a [function handler](https://docs.aws.amazon.com/lambda/latest/dg/nodejs-handler.html) as the entry point for various events. -File `api/functions/image-grayscale/src/main.rs` implements the grayscaling logic. You can build it with the Rust `cargo` command with the `-target wasm32-wasi` option to get the `grayscale.wasm` file. +The only function in [api/hello.js](https://github.com/second-state/aws-lambda-wasm-runtime/blob/tensorflow/api/hello.js) is `classify`, which classifies food in a photo. It receives a JPG file and pass it as STDIN stream to a spawned child process. The child process runs using the [wasmedge-tensorflow-lite](https://github.com/second-state/WasmEdge-tensorflow-tools) command. -We define custom build in `api/pre.sh` which is called in package.json to download the [WasmEdge command](https://github.com/WasmEdge/WasmEdge/releases/tag/0.8.2). +File `api/functions/image-classify/src/main.rs` implements the grayscaling logic. You can build it with the Rust `cargo` command with the `-target wasm32-wasi` option to get the [classify.wasm](https://github.com/second-state/aws-lambda-wasm-runtime/blob/tensorflow/api/classify.wasm) file. -![](/netlify-wasmedge-runtime.gif) +We define custom build in [api/pre.sh](https://github.com/second-state/aws-lambda-wasm-runtime/blob/tensorflow/api/pre.sh) which is called in package.json to download the [WasmEdge command](https://github.com/WasmEdge/WasmEdge/releases/tag/0.8.2). +![](docs/images/aws-lambda-wasmedge-runtime.gif) -## Learn More +## Deploy + +### Create An Image Repository on Amazon ECR + +Go to your Amazon [Elastic Container Registry](https://console.aws.amazon.com/ecr/repositories) (ECR) and create a new image repository. Note that you need to set the visibility settings to **Private** in order to use the image to create a serverless function on AWS Lambda. + +![](docs/images/1.repo.png) + +### Build Your Docker Image Locally + +We have everything we need to build a docker image in the [api/](https://github.com/second-state/aws-lambda-wasm-runtime/tree/tensorflow/api) folder. + +- [classify.wasm](https://github.com/second-state/aws-lambda-wasm-runtime/blob/tensorflow/api/classify.wasm) is the WebAssembly function that turns a colored picture into black and white. classify.wasm is compiled from [main.rs](https://github.com/second-state/aws-lambda-wasm-runtime/blob/tensorflow/api/functions/image-classification/src/main.rs) in [api/functions/image-classification/src](https://github.com/second-state/aws-lambda-wasm-runtime/tree/tensorflow/api/functions/image-classification/src), written in Rust. +- [hello.js](https://github.com/second-state/aws-lambda-wasm-runtime/blob/tensorflow/api/hello.js) is the handler function that passes data of the HTTP request to the classify function and runs it. This is required by AWS Lambda. +- [pre.sh](https://github.com/second-state/aws-lambda-wasm-runtime/blob/tensorflow/api/pre.sh) is the shell script that installs the WasmEdge runtime and the Tensorflow extension, as well as all their dependencies. pre.sh is executed while building the Docker image. + +To build the image, make sure the [Dockerfile](https://github.com/second-state/aws-lambda-wasm-runtime/blob/tensorflow/api/Dockerfile) we provided is in the api/ folder and run + +``` +$ cd api +$ docker build -t aws_lambda_classify . +``` + +### Push Your Image to ECR Repository + +You can follow the instructions provided by your ECR repository to push the image. Note that [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) is required in this step. + +![](docs/images/2.push.png) + +### Create A Serverless Function from Repository Image + +Now go to [AWS Lambda Console](https://console.aws.amazon.com/lambda/home) and create a new serverless function. Choose to create a function from **container image**. Put in the name of your function and your container image URL. You can browse images from your private repositories on Amazon ECR or simply paste the container image URL. + +![](docs/images/3.function.png) + +### Set Up An API Trigger for Your Serverless Function + +After creating your function, we need to set up a trigger for your function. A trigger simply defines how your function is called. In this demo we want to call our function through HTTP request, so we will create an API as the trigger. + +Click **Add trigger**. + +![](docs/images/4.trigger.png) + +Choose **API Gateway** as trigger type. For API type, choose **REST API**. For Security, choose **Open**. + +![](docs/images/5.api.png) -To learn more about Next.js, take a look at the following resources: +Once we have created our API, we see that an API endpoint is now available. This is the URL we can use to call our serverless function. -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. +![](docs/images/6.link.png) -To learn more about Serverless Functions in Netlify, take a look at the following resources: +### Enable CORS -- [Serverless Functions](https://docs.netlify.com/functions/overview/) - how to write your Serverless Functions. +Finally, if we want to call our function within a browser, we need to enable [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS). To do so, we need to click the linked text **classify-API** next to API Gateway to enter the Amazon API Gateway console. -## Deploy on Netlify +In the API Gateway console, click **Actions** and choose **Enable CORS**. + +![](docs/images/7.CORS1.png) + +Default options should be enough for our demo. + +![](docs/images/8.CORS2.png) + +### Troubleshooting + +If you find that your serverless function always returns `internal server error`, if might be due to that the default timeout interval is too short for our function to execute. The default timeout interval is 3 seconds for any AWS Lambda function. You may increase the timeout interval to give enough time for the serverless function to execute. Setting **Timeout** to 30 seconds should be more than enough. + +![](docs/images/9.troubleshoot.png) + +## Set Up the Front-End + +This demo provides a simple front-end UI made by [Next.js](https://nextjs.org). It is a static web page deployed through GitHub pages. To set up this static page, all you need to do is add your serverless function endpoint URL to Secrets in the Settings page under the name `NEXT_PUBLIC_FUNCTION_URL`, as shown below. + +![](docs/images/10.page.png) + +We use GitHub Actions to generate pages, so the workflow in [.github/workflow/deploy.yml](https://github.com/second-state/aws-lambda-wasm-runtime/blob/tensorflow/.github/workflows/deploy.yml) (which builds the front-end page) is triggered every time you commit your changes. + +**Caveats:** + +- If you have forked this repository and wish to enable this auto-build feature, you need to manually allow actions to run under the Actions tab in Settings, since by default GitHub Actions are not trigger in forked repositories. + +- If you are building the `gh-pages` branch for the first time, please add an empty file with the name `.nojekyll` in `gh-pages` after the branch is built. Doing so prevents some of your web resources from being ignored by GitHub while presenting your page. + +## Create Your Own Function and Deploy + +[classify.wasm](https://github.com/second-state/aws-lambda-wasm-runtime/blob/tensorflow/api/classify.wasm) is built with `cargo` as follows: + +``` +$ cd api/functions/image-classify/ +$ cargo build --release --target wasm32-wasi +$ cp target/wasm32-wasi/release/classify.wasm ../../ +``` + +You can write your own Rust code and build your own WebAssembly function in a similar way. Don't forget to specify how your function should be called in [api/hello.js](#). Follow the same steps in this demo to deploy your function to AWS Lambda. + +Congrats! You have created your own serverless function! + +## Learn More -The easiest way to deploy your Next.js app is to use the [Netlify Platform](https://www.netlify.com/with/nextjs/). +To learn more about WasmEdge, take a look at the following resources: -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +- WasmEdge's Github [repo](https://github.com/WasmEdge/WasmEdge) +- WasmEdge [Tutorials](https://wasmedge.org/#tutorials) +- Check out [Second State's repositories](https://github.com/second-state) for more demos, as well as resources on Rust and Wasm diff --git a/api/Dockerfile b/api/Dockerfile index 863e8e1..556034c 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -11,7 +11,7 @@ COPY pre.sh ./ RUN chmod +x pre.sh RUN ./pre.sh -# Bundle the JS bootstrap server +# Bundle the JS files COPY *.js ./ CMD [ "hello.handler" ] diff --git a/api/classify.wasm b/api/classify.wasm new file mode 100755 index 0000000..b0559c8 Binary files /dev/null and b/api/classify.wasm differ diff --git a/api/functions/image-classification/Cargo.lock b/api/functions/image-classification/Cargo.lock new file mode 100644 index 0000000..2d66480 --- /dev/null +++ b/api/functions/image-classification/Cargo.lock @@ -0,0 +1,14 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "wasm_vercel_example" +version = "0.1.0" +dependencies = [ + "wasmedge_tensorflow_interface", +] + +[[package]] +name = "wasmedge_tensorflow_interface" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53a95373340532901481ea673809aa760f38fdac81cdbb847490949297edd9cc" diff --git a/api/functions/image-classification/Cargo.toml b/api/functions/image-classification/Cargo.toml new file mode 100644 index 0000000..7fe9b35 --- /dev/null +++ b/api/functions/image-classification/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "wasm_vercel_example" +version = "0.1.0" +authors = ["ubuntu"] +edition = "2018" + +[[bin]] +name = "classify" +path = "src/main.rs" + +[dependencies] +wasmedge_tensorflow_interface = "^0.2.0" + diff --git a/api/functions/image-classification/src/main.rs b/api/functions/image-classification/src/main.rs new file mode 100644 index 0000000..2d32089 --- /dev/null +++ b/api/functions/image-classification/src/main.rs @@ -0,0 +1,51 @@ +use wasmedge_tensorflow_interface; +use std::io::{self, Read}; + +pub fn main() { + let model_data: &[u8] = include_bytes!("models/mobilenet_v1_1.0_224/mobilenet_v1_1.0_224_quant.tflite"); + let labels = include_str!("models/mobilenet_v1_1.0_224/labels_mobilenet_quant_v1_224.txt"); + + let mut buf = Vec::new(); + io::stdin().read_to_end(&mut buf).unwrap(); + + let flat_img = wasmedge_tensorflow_interface::load_jpg_image_to_rgb8(&buf, 224, 224); + + let mut session = wasmedge_tensorflow_interface::Session::new(&model_data, wasmedge_tensorflow_interface::ModelType::TensorFlowLite); + session.add_input("input", &flat_img, &[1, 224, 224, 3]) + .run(); + let res_vec: Vec = session.get_output("MobilenetV1/Predictions/Reshape_1"); + + let mut i = 0; + let mut max_index: i32 = -1; + let mut max_value: u8 = 0; + while i < res_vec.len() { + let cur = res_vec[i]; + if cur > max_value { + max_value = cur; + max_index = i as i32; + } + i += 1; + } + // println!("{} : {}", max_index, max_value as f32 / 255.0); + + let mut confidence = "could be"; + if max_value > 200 { + confidence = "is very likely"; + } else if max_value > 125 { + confidence = "is likely"; + } else if max_value > 50 { + confidence = "could be"; + } + + let mut label_lines = labels.lines(); + for _i in 0..max_index { + label_lines.next(); + } + + let class_name = label_lines.next().unwrap().to_string(); + if max_value > 50 { + println!("It {} a {} in the picture", confidence.to_string(), class_name, class_name); + } else { + println!("It does not appears to be any food item in the picture."); + } +} diff --git a/api/functions/image-classification/src/models/food/aiy_food_V1_labelmap.txt b/api/functions/image-classification/src/models/food/aiy_food_V1_labelmap.txt new file mode 100644 index 0000000..1c8df31 --- /dev/null +++ b/api/functions/image-classification/src/models/food/aiy_food_V1_labelmap.txt @@ -0,0 +1,2024 @@ +__background__ +Chaudin +Bambalouni +Ghoriba +Mango sticky rice +Jianbing +Aguachile +Carrozza +Miyan kuka +Efo riro +Ayam masak merah +Chiffon pie +/g/11b8_rxx4d +Riso patate e cozze +Bazin +Black bottom pie +Palóc soup +Sailor sandwich +Tuwo shinkafa +Carne a la tampiqueña +Pastel azteca +Fujian red wine chicken +Boeber +Lady Baltimore cake +Yam khai dao +Texas Tommy +Har cheong gai +Kolokythopita +Karydopita +Rinflajš +Hainanese curry rice +Sonoran hot dog +/g/11cfty6q3 +Afghani burger +Teochew porridge +Minestra di ceci +Pastrami on rye +Roast beef sandwich +Chahan +Ekuru +Sciusceddu +Breakfast burrito +/g/11dyjj24g +Sausage Stroganoff +Roti jala +Pirao +Casatiello +Khanom tan +Muamba chicken +Dobradinha +Bruckfleisch +Molote +Spongata +Funge +/g/1212ghsj +Köttbullar +Ka'ak +Papet vaudois +/g/12148tdg +Prosciutto di Norcia +Malloreddus +/g/1214g6v_ +Pannenkoek +Dirty macaroni +/g/12175t2y +Garlic butter shrimp +Fricasse +Stracciatella +/g/121b74wr +Sartù +Matelote +Baodu +Mattentaart +Cartellate +Gyeran-ppang +Torta Pasqualina +Caltaboș +Khanom mo kaeng +Suimono +Dimlama +Tavë Kosi +/g/121p63r3 +/g/121slhcd +Kalach +Jambon persillé +Pork Bones +Pozharsky cutlet +Roccocò +Feijão de óleo de palma +Calulu +Bey's Soup +/g/1226mnbh +Thịt kho tàu +Bon bon chicken +Zoque +Bint al-sahn +Tempoyak +Puran poli +/g/122m40vc +Chueo-tang +Naem +/g/122qyvy7 +/g/122rd60t +Pizokel +/g/122vxtxs +Schiacciata +Daheen +Chapssal-tteok +/g/123267k_ +Crescentina modenese +Pansotti +Fried eggplant +Portuguese seafood rice +Tripes à la mode de Caen +/g/12353lp9 +Brenebon +Gnocco fritto +/g/12384pzv +Tahu tek-tek +Bibikkan +Squid tongseng +/g/12fgs6199 +Bundevara +Sop saudara +/g/155q8w2m +Erbazzone +Kisra +Meat from tiblica +/g/1hc0hhj4r +Yufka +Pisarei e faśö +/g/1pznmr_ch +Pampushka +Makowiec +Saleeg +/m/0100fwt6 +Jókai bean soup +Bookbinder soup +Selat solo +Kutsinta +Sago soup +Vinegret +Shrimp and grits +Sirop de Liège +Woku +Muhallebi +Gepuk +Fouée +Octopus +Koba +Bò lúc lắc +Squid lū'au +Shrimp Louie +Black pudding +Cherry kebab +Pitsi-pitsî +Sabich salad +Mie kocok +Maraca pie +Banga +Baccalà alla lucana +Nasi tumpang +Gratin dauphinois +Arroz chaufa +Kuih +Ayam goreng +Chongos zamoranos +/m/011c708 +Mămăligă +Candied almonds +Lasagne +Pecel Lele +Lettuce soup +Acquacotta +Pork blood soup +/m/011sq8kg +Buridda +Maccu +Turkey Devonshire +Ginestrata +Garmugia +Meringue +Peanut butter and jelly sandwich +Couque de Dinant +Omo tuo +Thapthim krop +Pie tee +Sutarfeni +Raclette +Wotou +Punugulu +Succotash +Chim chum +Wachipa +Boat noodles +Tantuni +Shab Deg +Chả giò +Ciabatta Bacon Cheeseburger +Mie kangkung +Tuwo masara +Kokonte +Akple +/m/012vypzp +Kwareżimal +Bento +Osechi +Okonomiyaki +Miso soup +Dango +Onigiri +Hiyayakko +Tempura +Mochi +Peppersoup +Caldo de queso +Dodo ikire +Uirō +Hong dou tang +Kakigōri +Khichu +Bolo de arroz +Chips and dip +Murgh musallam +Utica greens +Zaalouk +Mutton curry +Mughlai paratha +Tuo Zaafi +Bánh bột lọc +/m/013f387h +Cheeseburger +Jelly bean +Apple pie +Udon +Falafel +Agedashi dōfu +Dashi +Tortell +Omelette +Crème brûlée +Cucumber soup +French toast +Tripe +Pepperoni +Salami +Kimchi +Knödel +Takoyaki +Halva +Pigs in a blanket +Spanakopita +Pumpkin pie +Jambalaya +Club sandwich +Churro +Turducken +Welsh rarebit +Hot dog +Oyakodon +Meatball +Waldorf salad +Potato salad +Satay +Pemmican +Mämmi +Fideuà +Waffle +Pancake +Quiche +Borscht +Bratwurst +Foie gras +Burrito +Goulash +Spotted dick +Coq au vin +Ratatouille +Cornbread +Souvlaki +Chow mein +Roast beef +Peking duck +Fried chicken +Croquembouche +Tahini +Gumbo +Fajita +Chicken fried steak +Sukiyaki +Scrapple +Chili con carne +Monte Cristo sandwich +Kielbasa +Polenta +Reuben sandwich +S'more +Andouille +Beignet +Crêpe +Gulai +Breakfast sausage +Chorizo +Gyro +Nachos +Larb +Couscous +Meze +Cheesesteak +Frozen yogurt +Injera +Muesli +Meatloaf +Fuet +Nattō +Banana split +Pączki +Pound cake +Fuqi feipian +Nasi lemak +Flan +Pad thai +Yakitori +Amanattō +Tom kha kai +Lokma +Mooncake +Idli +Spätzle +Nopalito +Sincronizada +Žganci +Totopo +Folar +Cherry pie +Umeboshi +Patty +Saltah +Khinkali +Shkedei marak +Tekkadon +Chadachadi +Kaipen +Draw soup +Shahan ful +Shiro +Ga'at +Skordalia +Budae jjigae +Anju +Fried Coke +Lemang +Basundi +Brown Betty +Khabees +Kottu +Isterband +Ciauscolo +Khatkhate +Pan de muerto +Caponata +/m/0267f9w +Sabaayad +Miyeok-guk +Imoni +Pitha +Kedgeree +Bife a cavalo +Yaki udon +She-crab soup +Koozh +Keşkek +Cabidela +Gerber sandwich +Zagorski Štrukli +Himbasha +Sataraš +Kakuni +Enormous Omelet Sandwich +Turrón +Tsukudani +Hawaiian haystack +Kateh +Stoemp +Pajeon +Ġbejna +Kaya toast +Fit-fit +Kitcha +Thalipeeth +Figgy pudding +Cachupa +Cherries jubilee +Crappit heid +Mince and tatties +Anadama bread +Carbonara +Kladdkaka +Shakshouka +Chicken Vesuvio +Jibarito +Chicken Divan +Motsunabe +Sonofabitch stew +Corn pudding +Johnny Marzetti +Mostarda +Maafe +Churma +Chole bhature +Dobos torte +Carne de porco à alentejana +Khao soi +Kissel +Cottage loaf +Silver needle noodles +Shrimp DeJonghe +Kiritanpo +Bean pie +Churchkhela +Yahni +Gringas +Annin tofu +Jiaozi +Breakfast sandwich +Tanghulu +Black sesame soup +Gougère +Namul +Kosambari +Ma'amoul +Caldo de pollo +Loukaniko +Doberge cake +Nasi campur +Snack cake +Taiyaki +Karnıyarık +Pierogi +Macaroni and cheese +Huevos motuleños +Chislic +Corn dog +Shawarma +Zongzi +Dumpling +Syrniki +King cake +Soufflé +Gyūdon +Chicken nugget +Bulgogi +Eggs Benedict +Hot dry noodles +Mashed potato +Anpan +Quesadilla +Youtiao +Congee +Sekihan +Semla +Arctic roll +Castella +Hanabiramochi +Falukorv +Ketupat +Rendang +Chocolate brownie +Mapo doufu +Chinese noodles +Empanada +Fried rice +Chicago-style pizza +Cuban sandwich +Tarte Tatin +Yakisoba +Dagwood sandwich +Cheesecake +Samosa +Devil's food cake +Shashlik +Horseshoe sandwich +City chicken +Key lime pie +Potato skins +Haejang-guk +Burmese tofu +Shumai +Sour cherry soup +Gigandes plaki +Majboos +Chicken curry +Shrimp Creole +Pork tenderloin sandwich +Dampfnudel +Finnan haddie +Kenkey +Pincho +Gundruk +Chilorio +Koulourakia +Bryndzové halušky +Imagawayaki +Vasilopita +Strapačky +Po' boy +Capirotada +Beef Manhattan +Sandwich loaf +Jian dui +Almond biscuit +West Slavic fermented cereal soups +Fried plantain +Stuffed peppers +Piperade +Rogan josh +Fabada asturiana +Potato wedges +Calisson +Prawn ball +Kushikatsu +Lo mai chi +Manchet +Leek soup +Vanillerostbraten +Hangtown fry +Cabbie claw +Chitranna +Ragi mudde +Denver sandwich +Laverbread +Elote +Kulolo +Oxtail soup +Pantua +Corn relish +Pogača +Qubani-ka-Meetha +Boondi +Arrosticini +Panelle +Santula +Tofu skin roll +Crispy fried chicken +Steamed meatball +Lobio +Suman +Hōtō +Matbukha +/m/02rgjs1 +Açorda +Makdous +Soto +Frangollo +Patty melt +Taro dumpling +Entomatada +Bánh cuốn +Corunda +Zhaliang +Cassoulet +Debrecener +Scampi +Pilaf +Sambar +Century egg +Escargot +Cong you bing +Beef noodle soup +Magiritsa +Gugelhupf +Sachima +White rice +Maultasche +American chop suey +Fish slice +Sea cucumber +Beef ball +Siu yuk +Seafood birdsnest +White cut chicken +/m/02vwryj +Satsivi +Malpua +Chhena gaja +Flying Jacob +Steak de Burgo +Crab Louie +Butter chicken +Amok trey +Menemen +Piadina +Orange cuttlefish +Fudge +Cottage Pudding +Meatcake +Buttermilk pie +Kalamay +Puto +Dal makhani +Mixiote +Bagel dog +Bún riêu +Feijoada +Pho +Milk toast +Liver and onions +Iced bun +Sheer khurma +Yi mein +Shrimp roe noodles +Lai fun +Oil noodles +Kal-guksu +Youmian +Avgolemono +Pork roll +Tart +Leberkäse +Kalakukko +Mustamakkara +Baba ghanoush +Karelian pasty +Shortcake +Profiterole +Moussaka +Dulce de leche +Blaa +Risotto +Funnel cake +Fried dough +Consommé +Clam chowder +Tartiflette +Red curry +Tandoori chicken +Gazpacho +Prosciutto +Boerewors +Baked potato +Bouillabaisse +Kralan +Chireta +Bakewell tart +Grits +Shaved ice +Choco pie +Cumian +Jokbal +Grillades +Hotteok +Ezogelin soup +Knedle +Masgouf +Sope +Coconut rice +Bakarkhani +Asida +Dirt cake +Sel roti +Kalakand +Ghevar +Sussex pond pudding +Lontong +Bánh bèo +Pringá +Bull roast +Stuffed ham +Lablabi +Gooey butter cake +Carciofi alla giudia +Yin si juan +Babi panggang +Chao hong guo +Fun guo +Khira sagara +Coconut bar +Sundae +Tuna fish sandwich +Zhangcha duck +Marry girl cake +Frijoles charros +Rosca de reyes +Happy Faces +Deviled crab +Sundubu-jjigae +Sinseollo +Dongchimi +Nabak-kimchi +Dhondas +Soan papdi +Baek-kimchi +Chicken riggies +Afelia +Gulyásleves +Marie biscuit +Café liégeois +Chè +Pootharekulu +Escalope +Rajma +Beshbarmak +Torta Tre Monti +French dip +Pumpkin-coconut custard +Rose hip soup +Veggie burger +Steak tartare +Bologna sausage +Pâté +Bibimbap +Shahi paneer +Fufu +Pyttipanna +Chicken sandwich +Ghari +Michigan salad +Cabinet pudding +American fried rice +Korovai +Churrasco +Pasulj +Mitraillette +Salată de boeuf +Rice pudding +Rösti +Naryn +Kaldereta +Makroudh +Kachumbari +Tsukemono +Cheese fries +Slatko +Qatayef +Passatelli +Sweet potato soup +Shchi +Kulfi +Dolma +Kai yang +Shark fin soup +Pozole +Pakora +Chantilly cake +Krówki +Russian tea cake +Ox-tongue pastry +Sachertorte +Palitaw +Jolpan +Mantou +Finger steaks +Steak sandwich +Talo +Erkuai +Mixian +St. Louis-style pizza +Moambe +Upma +Panjiri +Eggs Sardou +Shanghai fried noodles +Quarkkäulchen +Cupcake +Snickerdoodle +Farl +Coleslaw +Calas +Beef Stroganoff +Shimotsukare +Squab +Basbousa +Watalappam +Tepsi baytinijan +Kuli-kuli +Shabu-shabu +Sundae +Fried brain sandwich +Rollmops +Higashi +Panna cotta +Aloo gobi +Aspic +Obatzda +Gulab jamun +Tuna casserole +Ribollita +Chomchom +Rassolnik +Jeongol +Cantonese seafood soup +Eggplant Salad +Kürtőskalács +Pölsa +Lobster roll +Sloppy joe +Schnitzel +Bacalhau +Sfenj +Menudo +Gujia +Liver soup +Panocha +Chakapuli +Sklandrausis +Liver pâté +Rullepølse +Frikadeller +Frikandel +Cinnamon roll +Scotch pie +Hot wiener +Wodzionka +Greek salad +Raita +Dong'an chicken +Boortsog +Coca +Champon +Tabbouleh +Korokke +Chile relleno +Brandade +Hoppang +Gozinaki +Lazarakia +Puff Puff +Fatteh +Speculaas +Karasumi +Brandy snaps +Trdelník +Cocido madrileño +Red velvet cake +Kringle +Quenelle +Toasted ravioli +Tajine +Cranachan +Rusk +Mille-feuille +Acorn noodle soup +Gachas +Jingisukan +Thekua +Ghugni +Tarama +Italian beef +Challah +Fried ice cream +Onion ring +Smoked meat +Dahi vada +Mother-in-law +Blondie +Guk +Hiyashi chūka +Sweet shells +Salisbury steak +Poffertjes +Eggs Neptune +Galbi-jjim +Agwi-jjim +Ladob +Instant-boiled mutton +Cincalok +Jook-sing noodles +Potbrood +Burkinabe cuisine +Taralli +Carbonade flamande +Xôi +Sauerbraten +Spiedie +Gimbap +Czernina +Kroppkaka +Buddha's delight +Pain au chocolat +Goetta +German chocolate cake +Melt sandwich +Popiah +Haleem +Hornazo +Janchi-guksu +Kipper +Bossam +Arbroath smokie +Bologna sandwich +Cobbler +Kouign-amann +Char kway teow +Rostbrätel +Doenjang-jjigae +Tharid +Hainanese chicken rice +Bak kut teh +Cabbage roll +Runza +Bananas Foster +Kozhukkatta +Kūčiukai +Smørrebrød +Kutia +Deviled egg +Buchteln +Apple strudel +Wonton +Chess pie +Pirozhki +Douzhi +Macaroni soup +Crossing-the-bridge noodles +Lechazo +Rolled oyster +Asam pedas +Mi krop +Patoleo +Rigó Jancsi +Ollada +Garbure +Sabudana Khichadi +Potée +Phanaeng curry +Madeleine +Mashed pumpkin +Suet pudding +Bombay mix +Namagashi +Struffoli +Dak-galbi +Chuchvara +Misal +Patatnik +Yuxiang +Frozen banana +Psarosoupa +Mekitsa +Sanna +Qazı +Sorbetes +Potatoes O'Brien +Tom yum +Balushahi +Arroz a la cubana +Jalebi +Sopaipilla +Ukha +Svíčková +Túrós csusza +Pinnekjøtt +Salty liquorice +Lemon ice box pie +Knickerbocker glory +Zhajiangmian +Cobb salad +Misua +Shoofly pie +Bhakri +Apple cake +Orange chicken +Jamón serrano +Bundt cake +Bara brith +Hot pot +Kung Pao chicken +Mulukhiyah +Piti +Double ka meetha +Choila +Moustalevria +Arizona cheese crisp +Rice Krispies Treats +Liangpi +Prinskorv +Salmorejo +Chicken Française +Fläskkorv +Glorified rice +/m/04zzsvg +Stinky tofu +Muffuletta +Soy sauce chicken +Chicken fingers +Pecan pie +Eba +Parfait +Ndolé +Cheese sandwich +Carne de vinha d'alhos +Bob Andy pie +Cincinnati chili +Frico +Tapioca pudding +Minestrone +Boxty +Naengmyeon +Seven-layer salad +/m/0553tg +Cawl +Chocolate pudding +Hotdish +Ciccioli +Douhua +Berliner +Fried fish +Apple crisp +Boudin +Yusheng +Babka +Pizzoccheri +Welsh cake +Parker House roll +Tripe soup +Chimichanga +Jucy Lucy +Dodger Dog +Pastiera +Huarache +Solkadhi +Schupfnudel +Waldorf pudding +Harees +Ash reshteh +Celery Victor +Diples +Kompot +French onion soup +Tres leches cake +Torta caprese +Black Forest gateau +Pâté aux pommes de terre +Lâpa +Bündner Nusstorte +Hachee +Spaghetti aglio e olio +Whoopie pie +Ais kacang +Chermoula +Gado-gado +Merguez +Snickers salad +Giouvetsi +Kharcho +Chicken fried bacon +Dessert bar +Coulibiac +Thieboudienne +Rabri +Sapin-sapin +Sealed crustless sandwich +Carne asada +Coyotas +Chocolate-covered bacon +Stroopwafel +Gravlax +Pot pie +Ghormeh sabzi +Surf and turf +Brunswick stew +Mititei +Fluffernutter +Khaja +Stottie cake +London broil +Fasolada +Strudel +Øllebrød +Tamago kake gohan +Hot water corn bread +Philippine adobo +Hulatang +Dyrlægens natmad +Chistorra +Polkagris +Galbi-tang +Mrouzia +Gopchang-jeongol +Miang kham +Clams casino +Nanbanzuke +Dripping cake +Cookie salad +Usal +Mandu-guk +Smalahove +Kokis +Ori-tang +Pakhala +Cream pie +Butajiru +New England boiled dinner +Chhena jalebi +Pastitsio +Panucho +Chhena kheeri +Kifli +Solyanka +Sadhya +Cullen skink +Havregrynskugle +Harira +Cornish game hen +Beef on weck +Tompouce +Caldo de siete mares +Millionbøf +Chicago-style hot dog +Risalamande +Alinazik kebab +Medisterpølse +Sarson da saag +Liangfen +Pistolette +Steamed clams +Ulam +Kheer +Tlacoyo +Tarator +/m/061ptq +/m/062p8x +Cochinita pibil +Buddha Jumps Over the Wall +Sfouf +Ham and cheese sandwich +"""Peanut butter" +"""Bacon" +Chicken karahi +Maple bacon donut +Litti +Nam Khao +Nam tok +Baozi +Kibbeh +Kushari +Jiuniang +/m/06603bl +Machher Jhol +Fahsa +Mysore pak +Chalupa +Swiss roll +Balkenbrij +Tortas de aceite +Popover +Falooda +Macaroni salad +Barbacoa +Hushpuppy +Luther Burger +Ragout +Bánh bao +Moronga +Hayashi rice +Zürcher Geschnetzeltes +Éclair +Colcannon +Bear claw +Francesinha +Wat +Loco moco +Hot milk cake +Hoe +Gordita +Macaron +Pepperoni roll +Rasgulla +Angel wings +Huevos rancheros +Caprese salad +Kombdi vade +Yong tau foo +Chai tow kway +Machaca +Ugali +Arròs negre +Kimchi fried rice +Frybread +Halo-halo +Shiokara +Janssons frestelse +Hot Brown +Torta +Ćevapi +Salt water taffy +Çılbır +Murtabak +Tahu goreng +Soto ayam +Mee siam +Submarine sandwich +Halušky +Kimchi-jjigae +Fish ball +Blodpalt +Lebanon bologna +Okroshka +Linzer torte +Shrikhand +Yakiniku +Huevos divorciados +Nihari +Sautéed reindeer +Hasty pudding +Mission burrito +Sweet and sour pork +Rødgrød +Booyah +Bienenstich +Dressed herring +New York-style pizza +Bistek +Sinigang +Fios de ovos +Vitello tonnato +Bisque +/m/06w9wv4 +Modak +New Haven-style pizza +California-style pizza +Wrap +Puri +Jamón +Khash +Beef bourguignon +Truffade +Bò nướng lá lốt +Ful medames +Aligot +Kolach +Guaiwei +Kesme +Funeral potatoes +Sushi +Arancini +Creamed corn +Mozzarella sticks +American goulash +Gofio +Soup alla Canavese +Red beans and rice +Rössypottu +Fläskpannkaka +Hyderabadi biryani +Baeckeoffe +Eton mess +Khachapuri +Banoffee pie +Ants climbing a tree +Dandan noodles +Suanla chaoshou +Samgye-tang +Spam musubi +Bridie +Kaju katli +Chocolate-covered potato chips +Enne gai +Ruske kape +Spaghetti +Grass jelly +Salt potatoes +Katsudon +Pasanda +Banitsa +Flammekueche +Twice-cooked pork +Kare-kare +Laobing +Banmian +Honey cake +Swiss wing +Michigan hot dog +Tong sui +Taco +Sosatie +Pap +Umngqusho +Malva pudding +Vichyssoise +Zōni +Maxwell Street Polish +Vetkoek +Mealie bread +Chakalaka +Frikkadel +/m/07fr1x +Tteokguk +Coney Island hot dog +Tirokafteri +Fesikh +Boston cream pie +Buttermilk koldskål +White boiled shrimp +Bagnun +Buntil +/m/07l949 +Pisto +Dhokla +Al pastor +St. Paul sandwich +Melonpan +Haupia +Lángos +Étouffée +Galaktoboureko +Börek +Suya +Rye bread +Escudella i carn d'olla +Gari +Tilkut +Botok +Tatws Pum Munud +Char siu +Burgoo +Cacık +Barfi +Mulligan stew +Biangbiang noodles +Banana pudding +Crab cake +Chinese sausage +Veal +Curry bread +Pastry heart +Crème caramel +Panada +Pie à la Mode +Bonus Jack +Princess cake +Harihari-nabe +Hot chicken +Chhena Jhili +Grape pie +Chicken bog +Sausage gravy +Derby pie +Ice cream cake +Swiss steak +/m/083tx9 +Stack cake +Lobster Newberg +Nikujaga +Manti +Parmigiana +Palatschinke +Gujeolpan +Rajas con crema +Mak-guksu +Tetrazzini +Squid +Palak paneer +Krumkake +Bolani +Pork and beans +Nian gao +Oysters Rockefeller +Tavče gravče +Bakkwa +Xacuti +Sarapatel +Taquito +Egg drop soup +Shaobing +Chawanmushi +Nshima/Nsima +Pollock roe +Slinger +Japchae +St. Honoré cake +Barm cake +Tulumba +Xiaolongbao +Delmonico steak +Stromboli +Kanafeh +Hamdog +Garri +Kofta +Chana masala +Salo +Lung fung soup +Dirty rice +Urnebes +Andouillette +Landjäger +Fisherman's soup +Romeritos +Lane cake +Pork jelly +Idiyappam +Smörgåstårta +Smažený sýr +Arroz con pollo +/m/08xmsn +Petit gâteau +Tea egg +Cocada amarela +Japanese curry +Qeema +Unagi +Hoppin' John +Gyūhi +Clafoutis +Green curry +Gỏi cuốn +Chilli crab +Lo mai gai +Lo mein +Puttu +Fried pie +Spanish rice +Nuea phat phrik +Jeow bong +Massaman curry +Ostkaka +Guilinggao +Spettekaka +Cudighi +Saltimbocca +Sfogliatella +Beef chow fun +Chow mein sandwich +Carnitas +Chinese steamed eggs +Oyster omelette +Garden salad +Salade niçoise +Dal bhat +Biscuits and gravy +Omurice +Pao cai +Nasi liwet +Thai suki +Moo shu pork +Corn crab soup +Fabes con almejas +Golden Opulence Sundae +Ketoprak +Mala Mogodu +Tekwan +Vatrushka +Yin Yang fish +Boston cream doughnut +Ramen +Home fries +Mustacciuoli +Clam cake +Sarma +Shahe fen +Charleston red rice +Fish head curry +Podvarak +Pihtije +Popara +Kačamak +Seolleongtang +Gołąbki +Szaloncukor +Kalduny +Zrazy +Panettone +Ambelopoulia +Persimmon pudding +Floating island +Zeeuwse bolus +Ambuyat +Smulpaj +Moravian spice cookies +Mee pok +Jjigae +Pizza bagel +Tteok +Brændende kærlighed +Beaten biscuit +Æbleflæsk +Chicken paprikash +Tangyuan +Tuna pot +Burnt ends +Jamón ibérico +Rakfisk +Zarangollo +Túró Rudi +Flummery +Cecina +Galinha à portuguesa +Ankimo +Galinha à africana +Cha siu bao +Fugu chiri +Assidat Zgougou +Oxtail stew +Laping +Chaku +Caldillo de perro +Sopa de Gato +Keledoş +Mücver +Brotzeit +Shekerbura +Oeufs en meurette +Pappa al pomodoro +Teurgoule +Bánh xèo +Musakhan +Maqluba +Bob chorba +Rum baba +Veda bread +Fried shrimp +Pastilla +Strawberry delight +Cheese dream +Frejon +Gyeran-jjim +Revithia +Nasi bogana +Torta de gazpacho +Double Down +Seri Muka +Obi non +Garganelli +Kig ha farz +Mississippi mud pie +Eve's pudding +Amala +Okinawa soba +Lamian +Soki +Chicken Maryland +Chanpurū +Mlinci +Smyrna meatballs +Tavern sandwich +Yangzhou fried rice +Qutab +Dum Aloo +Queijo do Pico +Cocada +Calf's liver and bacon +Moules-frites +Anarsa +Tlayuda +Šakotis +Jollof rice +Moin moin +Jam roly-poly +Hochzeitssuppe +Mucenici +Ema datshi +Ngo hiang +Jello salad +Claypot chicken rice +Maeun-tang +Cifantuan +Rhubarb pie +Olla podrida +Har gow +Sayur lodeh +Memela +Wenchang chicken +Galinhada +Lecsó +Gypsy tart +Bougatsa +Germknödel +Haystack +Yule log +Butter cookie +Chicken à la King +Méchoui +Croquette +Shami kebab +Chicken and waffles +Poke +Punsch-roll +Turtle soup +Kansar +Glamorgan sausage +Mango pudding +Bánh canh +Caparrones +Zopf +Bath bun +Chelsea bun +London bun +Saffron bun +Chakhchoukha +Angel food cake +Lalab +Suckling pig +Barmbrack +Kotlet schabowy +Pastel de nata +Shave ice +Tipsy cake +Creamed eggs on toast +Kerak telor +Ogok-bap +Mortadella +Nut roll +Fried green tomatoes +Beondegi +Tsoureki +Tiropita +Pljeskavica +Karađorđeva šnicla +Kokoretsi +Skilpadjies +Corn chowder +Tarhana +Tufahije +Birria +Veal Orloff +Fattoush +Pane carasau +Rab cake +Buffalo burger +Treacle tart +Hamburger +Stamppot +Kopytka +Khai yat sai +Minchee +Kinema +Sgabeo +Chili dog +Spaghetti alle vongole +Bavarian cream +Bhaji +Kachori +Chowder +Scotch broth +Pea soup +Kitfo +Gored gored +Bánh chưng +Bún bò Huế +Bò 7 món +Cơm tấm +Ambrosia +Rönttönen +Balchão +Gibassier +Bacalhau à Zé do Pipo +Pane di Altamura +Mykyrokka +Paska +Blackberry pie +Mince pie +Corn cookie +Francesinha poveira +Picadillo +Runeberg torte +Khakhra +Ohn no khao swè +Sultsina +/m/0crv0m +Paella +Espetada +Pathiri +Horumonyaki +Khubz +Ciorbă +Kimchi-buchimgae +Sesame chicken +Thukpa +Chwinamul +Kabuni +Jhunka +Jolada rotti +Spoonbread +Kulich +Phat khing +Namasu +Wonton noodles +Johnnycake +Panellets +Manjū +Mandi +Fortune cookie +Noppe +Slavink +Cockle bread +Caruru +Chả lụa +Pan bagnat +Sardenara +Enchilada +Sausage sandwich +Pistachio pudding +Chikki +Champorado +Coconut cake +Kaassoufflé +Carne pizzaiola +Khauk swè thoke +Gamja-tang +Kadhi +Green bean casserole +Apple dumpling +Cozonac +Pissaladière +Phat si-io +Drunken noodles +Jing Jiang Rou Si +Enduri Pitha +Kakara pitha +Tarta de Santiago +/m/0dn9nd +Sheftalia +Soybean sprout +Italian hot dog +Makchang +Meeshay +Bacalhau com natas +Mazurek +Nan gyi thohk +Ajapsandali +Carac +Mont di +Geng +Vispipuuro +Bakso +Canjica +Fougasse +Fool's Gold Loaf +Blueberry pie +Pickled cucumber +Ogbono soup +Champ +Oysters en brochette +Paskha +Shish taouk +Acarajé +Ras malai +San-nakji +Bungeo-ppang +Skilandis +Gosh-e Fil +Nasi dagang +Gheimeh +Fesenjān +Bacalhau à Gomes de Sá +Fårikål +Bedfordshire clanger +Tonkatsu +Thai fried rice +Manakish +Schweinshaxe +Chorba +Oliebol +Ropa vieja +Natchitoches meat pie +Icebox cake +Sorrel soup +Lahoh +Bolillo +Mollete +Caldeirada +Ogi +Watergate salad +Yaksik +Half-smoke +Dakos +Sweet potato pie +Cappon magro +Serundeng +Rijstevlaai +Ajoblanco +Yaka mein +Jujeh kabab +Soy egg +Shuizhu +Puliyogare +Sago +Laulau +Curtido +Tapai +Press cake +Cuchifritos +Vlaai +Malvern pudding +Baklava +Cheese dog +Luchi +Cowboy beans +Sandesh +Steak Diane +Lobster stew +Finikia +Bibingka +Tafelspitz +Ploye +Sayur asem +Trinxat +Nikuman +Cozido à portuguesa +Bacalhau à Brás +Tomato compote +Sesame seed candy +Dhebra +Kaeng pa +Mas riha +Zosui +Yassa +Pambazo +Imarti +Bacalhau com todos +Black pepper crab +Queso flameado +Black and white cookie +Red braised pork belly +Krofne +Uštipci +Rožata +Punjena paprika +Fusi +Maneštra +Kroštule +Fritule +Protein bar +Cordon bleu +Pirog +Pachi Pulusu +Frigărui +Chhena poda +Poornalu +Ponganalu +Bing +Flaouna +Chakodi +Aloo paratha +Konro +Cemita +Asinan +Broa +Trifle +Rat na +Borlengo +Gazpachuelo +Esterházy torte +Magenbrot +Detroit-style pizza +Fuling jiabing +Lakhamari +Mućkalica +Sukhdi +Kilishi +Baji +Peanut butter cookie +Rabbit pie +Paling in 't groen +Chataamari +Lawar +Arisa Pitha +Empal gentong +Carne asada fries +Takikomi gohan +Kamameshi +Pasta salad +Fasole cu cârnați +Zelnik +Plăcintă +Tongseng +Soto mie +Sarburma +Lutefisk +Khichdi +Briouat +Chili burger +Bolo de mel +Clootie +Seswaa +Tahu sumedang +Pichelsteiner +Bread soup +Scotcheroos +Kartoffelkäse +Schuxen +Caramel +Zwetschgenkuchen +Alloco +Vangibath +Torricado +Phat phrik khing +Tomato and egg soup +/m/0h65ym4 +Spanakorizo +Ostropel +Tamale +Seattle-style hot dog +Ammonia cookie +Boston baked beans +Amandine +Duck blood and vermicelli soup +Azerbaijani pakhlava +Bakwan +Wallenbergare +Pastry +Melomakarono +Cocido lebaniego +Koi +Stir-fried tomato and scrambled eggs +Flæskesteg +Beggar's Chicken +/m/0hzpvf0 +Konkonte +Stuffed squash +Kaeng som +Kentucky jam cake +Murături +Tochitură +Urap +Cornulețe +Quad City-style pizza +Paneer tikka +Ciorbă de perișoare +/m/0j66841 +Shaker lemon pie +Doodhpak +Ceviche +Cabbage soup +Nasi timbel +Pa amb tomàquet +Escalivada +Međimurska gibanica +Khanom chan +Ohaw +Baghrir +Hummingbird cake +Neapolitan pizza +Doughnut +Hummus +Nimono +Chocolate chip cookie +Bún ốc +Cheese straw +Sausage +Frogeye salad +Senate bean soup +Botifarra +Leberknödel +Laziji +Quzi +Chazuke +Sandwich +BLT +Chikhirtma +Pico de gallo +Oden +Tostada +Chilaquiles +Cocido montañés +Lontong Cap Go Meh +Porra antequerana +Kedjenou +Tourin +Attiéké +Dak-bokkeum-tang +Žemlovka +Dovga +Rice and gravy +Sai ua +Nam ngiao +Kaeng khae +Kaeng tai pla +Dim sum +Tahri +Bolo do caco +Buffalo wing +Pustakari +Pieds paquets +Tinginys +Sunnundallu +Lapskaus +Caldo tlalpeño +Milho frito +Kalu dodol +Poppyseed muffin +Peanut soup +Tarte à la Bouillie +Caldo gallego +Samay Baji +Limburger sandwich +Huachinango a la Veracruzana +Sambal stingray +Kuluban +Modjeska +Pan dulce +Florina pepper +Oysters Bienville +Cronut +Duck rice +Sulu köfte +Toyga soup +Majjige huli +Ikan goreng +Lekor +Ciulama +Ayam bakar +Hinava +Waakye +Salbute +Kuchmachi +Kibinai +Lobiani +Chanakhi +Baghali ghatogh +Pkhali +Poc Chuc +Bionico +Bamischijf +Racuchy +Kuurdak +Hokkien fried rice +Mu kratha +Thong yip +Zuppa toscana +Dhindo +Thiakry +Kondowole \ No newline at end of file diff --git a/api/functions/image-classification/src/models/food/lite-model_aiy_vision_classifier_food_V1_1.tflite b/api/functions/image-classification/src/models/food/lite-model_aiy_vision_classifier_food_V1_1.tflite new file mode 100644 index 0000000..4566976 Binary files /dev/null and b/api/functions/image-classification/src/models/food/lite-model_aiy_vision_classifier_food_V1_1.tflite differ diff --git a/api/functions/image-classification/src/models/mobilenet_v1_1.0_224/labels_mobilenet_quant_v1_224.txt b/api/functions/image-classification/src/models/mobilenet_v1_1.0_224/labels_mobilenet_quant_v1_224.txt new file mode 100644 index 0000000..fe81123 --- /dev/null +++ b/api/functions/image-classification/src/models/mobilenet_v1_1.0_224/labels_mobilenet_quant_v1_224.txt @@ -0,0 +1,1001 @@ +background +tench +goldfish +great white shark +tiger shark +hammerhead +electric ray +stingray +cock +hen +ostrich +brambling +goldfinch +house finch +junco +indigo bunting +robin +bulbul +jay +magpie +chickadee +water ouzel +kite +bald eagle +vulture +great grey owl +European fire salamander +common newt +eft +spotted salamander +axolotl +bullfrog +tree frog +tailed frog +loggerhead +leatherback turtle +mud turtle +terrapin +box turtle +banded gecko +common iguana +American chameleon +whiptail +agama +frilled lizard +alligator lizard +Gila monster +green lizard +African chameleon +Komodo dragon +African crocodile +American alligator +triceratops +thunder snake +ringneck snake +hognose snake +green snake +king snake +garter snake +water snake +vine snake +night snake +boa constrictor +rock python +Indian cobra +green mamba +sea snake +horned viper +diamondback +sidewinder +trilobite +harvestman +scorpion +black and gold garden spider +barn spider +garden spider +black widow +tarantula +wolf spider +tick +centipede +black grouse +ptarmigan +ruffed grouse +prairie chicken +peacock +quail +partridge +African grey +macaw +sulphur-crested cockatoo +lorikeet +coucal +bee eater +hornbill +hummingbird +jacamar +toucan +drake +red-breasted merganser +goose +black swan +tusker +echidna +platypus +wallaby +koala +wombat +jellyfish +sea anemone +brain coral +flatworm +nematode +conch +snail +slug +sea slug +chiton +chambered nautilus +Dungeness crab +rock crab +fiddler crab +king crab +American lobster +spiny lobster +crayfish +hermit crab +isopod +white stork +black stork +spoonbill +flamingo +little blue heron +American egret +bittern +crane +limpkin +European gallinule +American coot +bustard +ruddy turnstone +red-backed sandpiper +redshank +dowitcher +oystercatcher +pelican +king penguin +albatross +grey whale +killer whale +dugong +sea lion +Chihuahua +Japanese spaniel +Maltese dog +Pekinese +Shih-Tzu +Blenheim spaniel +papillon +toy terrier +Rhodesian ridgeback +Afghan hound +basset +beagle +bloodhound +bluetick +black-and-tan coonhound +Walker hound +English foxhound +redbone +borzoi +Irish wolfhound +Italian greyhound +whippet +Ibizan hound +Norwegian elkhound +otterhound +Saluki +Scottish deerhound +Weimaraner +Staffordshire bullterrier +American Staffordshire terrier +Bedlington terrier +Border terrier +Kerry blue terrier +Irish terrier +Norfolk terrier +Norwich terrier +Yorkshire terrier +wire-haired fox terrier +Lakeland terrier +Sealyham terrier +Airedale +cairn +Australian terrier +Dandie Dinmont +Boston bull +miniature schnauzer +giant schnauzer +standard schnauzer +Scotch terrier +Tibetan terrier +silky terrier +soft-coated wheaten terrier +West Highland white terrier +Lhasa +flat-coated retriever +curly-coated retriever +golden retriever +Labrador retriever +Chesapeake Bay retriever +German short-haired pointer +vizsla +English setter +Irish setter +Gordon setter +Brittany spaniel +clumber +English springer +Welsh springer spaniel +cocker spaniel +Sussex spaniel +Irish water spaniel +kuvasz +schipperke +groenendael +malinois +briard +kelpie +komondor +Old English sheepdog +Shetland sheepdog +collie +Border collie +Bouvier des Flandres +Rottweiler +German shepherd +Doberman +miniature pinscher +Greater Swiss Mountain dog +Bernese mountain dog +Appenzeller +EntleBucher +boxer +bull mastiff +Tibetan mastiff +French bulldog +Great Dane +Saint Bernard +Eskimo dog +malamute +Siberian husky +dalmatian +affenpinscher +basenji +pug +Leonberg +Newfoundland +Great Pyrenees +Samoyed +Pomeranian +chow +keeshond +Brabancon griffon +Pembroke +Cardigan +toy poodle +miniature poodle +standard poodle +Mexican hairless +timber wolf +white wolf +red wolf +coyote +dingo +dhole +African hunting dog +hyena +red fox +kit fox +Arctic fox +grey fox +tabby +tiger cat +Persian cat +Siamese cat +Egyptian cat +cougar +lynx +leopard +snow leopard +jaguar +lion +tiger +cheetah +brown bear +American black bear +ice bear +sloth bear +mongoose +meerkat +tiger beetle +ladybug +ground beetle +long-horned beetle +leaf beetle +dung beetle +rhinoceros beetle +weevil +fly +bee +ant +grasshopper +cricket +walking stick +cockroach +mantis +cicada +leafhopper +lacewing +dragonfly +damselfly +admiral +ringlet +monarch +cabbage butterfly +sulphur butterfly +lycaenid +starfish +sea urchin +sea cucumber +wood rabbit +hare +Angora +hamster +porcupine +fox squirrel +marmot +beaver +guinea pig +sorrel +zebra +hog +wild boar +warthog +hippopotamus +ox +water buffalo +bison +ram +bighorn +ibex +hartebeest +impala +gazelle +Arabian camel +llama +weasel +mink +polecat +black-footed ferret +otter +skunk +badger +armadillo +three-toed sloth +orangutan +gorilla +chimpanzee +gibbon +siamang +guenon +patas +baboon +macaque +langur +colobus +proboscis monkey +marmoset +capuchin +howler monkey +titi +spider monkey +squirrel monkey +Madagascar cat +indri +Indian elephant +African elephant +lesser panda +giant panda +barracouta +eel +coho +rock beauty +anemone fish +sturgeon +gar +lionfish +puffer +abacus +abaya +academic gown +accordion +acoustic guitar +aircraft carrier +airliner +airship +altar +ambulance +amphibian +analog clock +apiary +apron +ashcan +assault rifle +backpack +bakery +balance beam +balloon +ballpoint +Band Aid +banjo +bannister +barbell +barber chair +barbershop +barn +barometer +barrel +barrow +baseball +basketball +bassinet +bassoon +bathing cap +bath towel +bathtub +beach wagon +beacon +beaker +bearskin +beer bottle +beer glass +bell cote +bib +bicycle-built-for-two +bikini +binder +binoculars +birdhouse +boathouse +bobsled +bolo tie +bonnet +bookcase +bookshop +bottlecap +bow +bow tie +brass +brassiere +breakwater +breastplate +broom +bucket +buckle +bulletproof vest +bullet train +butcher shop +cab +caldron +candle +cannon +canoe +can opener +cardigan +car mirror +carousel +carpenter's kit +carton +car wheel +cash machine +cassette +cassette player +castle +catamaran +CD player +cello +cellular telephone +chain +chainlink fence +chain mail +chain saw +chest +chiffonier +chime +china cabinet +Christmas stocking +church +cinema +cleaver +cliff dwelling +cloak +clog +cocktail shaker +coffee mug +coffeepot +coil +combination lock +computer keyboard +confectionery +container ship +convertible +corkscrew +cornet +cowboy boot +cowboy hat +cradle +crane +crash helmet +crate +crib +Crock Pot +croquet ball +crutch +cuirass +dam +desk +desktop computer +dial telephone +diaper +digital clock +digital watch +dining table +dishrag +dishwasher +disk brake +dock +dogsled +dome +doormat +drilling platform +drum +drumstick +dumbbell +Dutch oven +electric fan +electric guitar +electric locomotive +entertainment center +envelope +espresso maker +face powder +feather boa +file +fireboat +fire engine +fire screen +flagpole +flute +folding chair +football helmet +forklift +fountain +fountain pen +four-poster +freight car +French horn +frying pan +fur coat +garbage truck +gasmask +gas pump +goblet +go-kart +golf ball +golfcart +gondola +gong +gown +grand piano +greenhouse +grille +grocery store +guillotine +hair slide +hair spray +half track +hammer +hamper +hand blower +hand-held computer +handkerchief +hard disc +harmonica +harp +harvester +hatchet +holster +home theater +honeycomb +hook +hoopskirt +horizontal bar +horse cart +hourglass +iPod +iron +jack-o'-lantern +jean +jeep +jersey +jigsaw puzzle +jinrikisha +joystick +kimono +knee pad +knot +lab coat +ladle +lampshade +laptop +lawn mower +lens cap +letter opener +library +lifeboat +lighter +limousine +liner +lipstick +Loafer +lotion +loudspeaker +loupe +lumbermill +magnetic compass +mailbag +mailbox +maillot +maillot +manhole cover +maraca +marimba +mask +matchstick +maypole +maze +measuring cup +medicine chest +megalith +microphone +microwave +military uniform +milk can +minibus +miniskirt +minivan +missile +mitten +mixing bowl +mobile home +Model T +modem +monastery +monitor +moped +mortar +mortarboard +mosque +mosquito net +motor scooter +mountain bike +mountain tent +mouse +mousetrap +moving van +muzzle +nail +neck brace +necklace +nipple +notebook +obelisk +oboe +ocarina +odometer +oil filter +organ +oscilloscope +overskirt +oxcart +oxygen mask +packet +paddle +paddlewheel +padlock +paintbrush +pajama +palace +panpipe +paper towel +parachute +parallel bars +park bench +parking meter +passenger car +patio +pay-phone +pedestal +pencil box +pencil sharpener +perfume +Petri dish +photocopier +pick +pickelhaube +picket fence +pickup +pier +piggy bank +pill bottle +pillow +ping-pong ball +pinwheel +pirate +pitcher +plane +planetarium +plastic bag +plate rack +plow +plunger +Polaroid camera +pole +police van +poncho +pool table +pop bottle +pot +potter's wheel +power drill +prayer rug +printer +prison +projectile +projector +puck +punching bag +purse +quill +quilt +racer +racket +radiator +radio +radio telescope +rain barrel +recreational vehicle +reel +reflex camera +refrigerator +remote control +restaurant +revolver +rifle +rocking chair +rotisserie +rubber eraser +rugby ball +rule +running shoe +safe +safety pin +saltshaker +sandal +sarong +sax +scabbard +scale +school bus +schooner +scoreboard +screen +screw +screwdriver +seat belt +sewing machine +shield +shoe shop +shoji +shopping basket +shopping cart +shovel +shower cap +shower curtain +ski +ski mask +sleeping bag +slide rule +sliding door +slot +snorkel +snowmobile +snowplow +soap dispenser +soccer ball +sock +solar dish +sombrero +soup bowl +space bar +space heater +space shuttle +spatula +speedboat +spider web +spindle +sports car +spotlight +stage +steam locomotive +steel arch bridge +steel drum +stethoscope +stole +stone wall +stopwatch +stove +strainer +streetcar +stretcher +studio couch +stupa +submarine +suit +sundial +sunglass +sunglasses +sunscreen +suspension bridge +swab +sweatshirt +swimming trunks +swing +switch +syringe +table lamp +tank +tape player +teapot +teddy +television +tennis ball +thatch +theater curtain +thimble +thresher +throne +tile roof +toaster +tobacco shop +toilet seat +torch +totem pole +tow truck +toyshop +tractor +trailer truck +tray +trench coat +tricycle +trimaran +tripod +triumphal arch +trolleybus +trombone +tub +turnstile +typewriter keyboard +umbrella +unicycle +upright +vacuum +vase +vault +velvet +vending machine +vestment +viaduct +violin +volleyball +waffle iron +wall clock +wallet +wardrobe +warplane +washbasin +washer +water bottle +water jug +water tower +whiskey jug +whistle +wig +window screen +window shade +Windsor tie +wine bottle +wing +wok +wooden spoon +wool +worm fence +wreck +yawl +yurt +web site +comic book +crossword puzzle +street sign +traffic light +book jacket +menu +plate +guacamole +consomme +hot pot +trifle +ice cream +ice lolly +French loaf +bagel +pretzel +cheeseburger +hotdog +mashed potato +head cabbage +broccoli +cauliflower +zucchini +spaghetti squash +acorn squash +butternut squash +cucumber +artichoke +bell pepper +cardoon +mushroom +Granny Smith +strawberry +orange +lemon +fig +pineapple +banana +jackfruit +custard apple +pomegranate +hay +carbonara +chocolate sauce +dough +meat loaf +pizza +potpie +burrito +red wine +espresso +cup +eggnog +alp +bubble +cliff +coral reef +geyser +lakeside +promontory +sandbar +seashore +valley +volcano +ballplayer +groom +scuba diver +rapeseed +daisy +yellow lady's slipper +corn +acorn +hip +buckeye +coral fungus +agaric +gyromitra +stinkhorn +earthstar +hen-of-the-woods +bolete +ear +toilet tissue diff --git a/api/functions/image-classification/src/models/mobilenet_v1_1.0_224/mobilenet_v1_1.0_224_quant.tflite b/api/functions/image-classification/src/models/mobilenet_v1_1.0_224/mobilenet_v1_1.0_224_quant.tflite new file mode 100644 index 0000000..437640b Binary files /dev/null and b/api/functions/image-classification/src/models/mobilenet_v1_1.0_224/mobilenet_v1_1.0_224_quant.tflite differ diff --git a/api/functions/image-grayscale/Cargo.lock b/api/functions/image-grayscale/Cargo.lock deleted file mode 100644 index 7f1dbf8..0000000 --- a/api/functions/image-grayscale/Cargo.lock +++ /dev/null @@ -1,177 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -[[package]] -name = "adler32" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" - -[[package]] -name = "autocfg" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" - -[[package]] -name = "bitflags" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" - -[[package]] -name = "bytemuck" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9966d2ab714d0f785dbac0a0396251a35280aeb42413281617d0209ab4898435" - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "color_quant" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" - -[[package]] -name = "crc32fast" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "deflate" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73770f8e1fe7d64df17ca66ad28994a0a623ea497fa69486e14984e715c5d174" -dependencies = [ - "adler32", - "byteorder", -] - -[[package]] -name = "gif" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a668f699973d0f573d15749b7002a9ac9e1f9c6b220e7b165601334c173d8de" -dependencies = [ - "color_quant", - "weezl", -] - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "image" -version = "0.23.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ffcb7e7244a9bf19d35bf2883b9c080c4ced3c07a9895572178cdb8f13f6a1" -dependencies = [ - "bytemuck", - "byteorder", - "color_quant", - "gif", - "jpeg-decoder", - "num-iter", - "num-rational", - "num-traits", - "png", -] - -[[package]] -name = "jpeg-decoder" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229d53d58899083193af11e15917b5640cd40b29ff475a1fe4ef725deb02d0f2" - -[[package]] -name = "miniz_oxide" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435" -dependencies = [ - "adler32", -] - -[[package]] -name = "num-integer" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-iter" -version = "0.1.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" -dependencies = [ - "autocfg", -] - -[[package]] -name = "png" -version = "0.16.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3287920cb847dee3de33d301c463fba14dda99db24214ddf93f83d3021f4c6" -dependencies = [ - "bitflags", - "crc32fast", - "deflate", - "miniz_oxide", -] - -[[package]] -name = "wasi_netlify_example" -version = "0.1.0" -dependencies = [ - "hex", - "image", -] - -[[package]] -name = "weezl" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b77fdfd5a253be4ab714e4ffa3c49caf146b4de743e97510c0656cf90f1e8e" diff --git a/api/functions/image-grayscale/Cargo.toml b/api/functions/image-grayscale/Cargo.toml deleted file mode 100644 index d6da673..0000000 --- a/api/functions/image-grayscale/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "wasi_netlify_example" -version = "0.1.0" -authors = ["ubuntu"] -edition = "2018" - -[[bin]] -name = "grayscale" -path = "src/main.rs" - -[dependencies] -hex = "0.4" -image = { version = "0.23.0", default-features = false, features = ["jpeg", "png", "gif"] } - diff --git a/api/functions/image-grayscale/src/main.rs b/api/functions/image-grayscale/src/main.rs deleted file mode 100644 index 940f911..0000000 --- a/api/functions/image-grayscale/src/main.rs +++ /dev/null @@ -1,23 +0,0 @@ -use std::io::{self, Read, Write}; -use image::{ImageOutputFormat, ImageFormat}; - -fn main() { - let mut buf = Vec::new(); - io::stdin().read_to_end(&mut buf).unwrap(); - - let image_format_detected: ImageFormat = image::guess_format(&buf).unwrap(); - let img = image::load_from_memory(&buf).unwrap(); - let filtered = img.grayscale(); - let mut buf = vec![]; - match image_format_detected { - ImageFormat::Gif => { - filtered.write_to(&mut buf, ImageOutputFormat::Gif).unwrap(); - }, - _ => { - filtered.write_to(&mut buf, ImageOutputFormat::Png).unwrap(); - }, - }; - io::stdout().write_all(&buf).unwrap(); - io::stdout().flush().unwrap(); -} - diff --git a/api/grayscale.wasm b/api/grayscale.wasm deleted file mode 100755 index f481801..0000000 Binary files a/api/grayscale.wasm and /dev/null differ diff --git a/api/hello.js b/api/hello.js index 30a534f..5ebd29c 100644 --- a/api/hello.js +++ b/api/hello.js @@ -3,7 +3,11 @@ const path = require('path'); function _runWasm(reqBody) { return new Promise(resolve => { - const wasmedge = spawn(path.join(__dirname, 'wasmedge'), [path.join(__dirname, 'grayscale.so')]); + const wasmedge = spawn( + path.join(__dirname, 'wasmedge-tensorflow-lite'), + [path.join(__dirname, 'classify.so')], + {env: {'LD_LIBRARY_PATH': __dirname}} + ); let d = []; wasmedge.stdout.on('data', (data) => { @@ -11,8 +15,7 @@ function _runWasm(reqBody) { }); wasmedge.on('close', (code) => { - let buf = Buffer.concat(d); - resolve(buf); + resolve(d.join('')); }); wasmedge.stdin.write(reqBody); @@ -24,7 +27,7 @@ exports.handler = async function(event, context) { var typedArray = new Uint8Array(event.body.match(/[\da-f]{2}/gi).map(function (h) { return parseInt(h, 16); })); - let buf = await _runWasm(typedArray); + let result = await _runWasm(typedArray); return { statusCode: 200, headers: { @@ -32,6 +35,6 @@ exports.handler = async function(event, context) { "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Methods": "DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT" }, - body: buf.toString('hex') + body: result }; } diff --git a/api/pre.sh b/api/pre.sh index b1b9bc0..4ca7e7d 100755 --- a/api/pre.sh +++ b/api/pre.sh @@ -1,18 +1,21 @@ #!/bin/bash # get wasmedge & wasmedgec -curl -sSfL https://github.com/WasmEdge/WasmEdge/releases/download/0.8.2-rc.2/WasmEdge-0.8.2-rc.2-manylinux2014_x86_64.tar.gz -o ./WasmEdge.tar.gz -tar --strip-components 2 -xzvf WasmEdge.tar.gz WasmEdge-0.8.2-rc.2-Linux/bin -rm WasmEdge.tar.gz +curl -L https://github.com/second-state/WasmEdge-tensorflow-tools/releases/download/0.8.2-rc2/WasmEdge-tensorflow-tools-0.8.2-rc2-manylinux2014_x86_64.tar.gz -o ./WasmEdge-tensorflow-tools-0.8.2-rc2-manylinux2014_x86_64.tar.gz +tar xzvf WasmEdge-tensorflow-tools-0.8.2-rc2-manylinux2014_x86_64.tar.gz wasmedge-tensorflow-lite +tar xzvf WasmEdge-tensorflow-tools-0.8.2-rc2-manylinux2014_x86_64.tar.gz wasmedgec-tensorflow +rm WasmEdge-tensorflow-tools-0.8.2-rc2-manylinux2014_x86_64.tar.gz + +curl -L https://github.com/second-state/WasmEdge-tensorflow-deps/releases/download/0.8.0/WasmEdge-tensorflow-deps-TFLite-0.8.0-manylinux2014_x86_64.tar.gz -o ./WasmEdge-tensorflow-deps-TFLite-0.8.0-manylinux2014_x86_64.tar.gz +tar xzvf WasmEdge-tensorflow-deps-TFLite-0.8.0-manylinux2014_x86_64.tar.gz +rm WasmEdge-tensorflow-deps-TFLite-0.8.0-manylinux2014_x86_64.tar.gz # compile all .wasm to .so for file in *.wasm; do [ -f "$file" ] || continue - ./wasmedgec --generic-binary "$file" "${file/.wasm/.so}" + ./wasmedgec-tensorflow --generic-binary "$file" "${file/.wasm/.so}" rm "$file" done # clean -rm wasmedgec - -ls -l +rm wasmedgec-tensorflow \ No newline at end of file diff --git a/docs/images/1.repo.png b/docs/images/1.repo.png new file mode 100644 index 0000000..ab0caae Binary files /dev/null and b/docs/images/1.repo.png differ diff --git a/docs/images/10.page.png b/docs/images/10.page.png new file mode 100644 index 0000000..b770eaf Binary files /dev/null and b/docs/images/10.page.png differ diff --git a/docs/images/2.push.png b/docs/images/2.push.png new file mode 100644 index 0000000..e37cba4 Binary files /dev/null and b/docs/images/2.push.png differ diff --git a/docs/images/3.function.png b/docs/images/3.function.png new file mode 100644 index 0000000..0b9b007 Binary files /dev/null and b/docs/images/3.function.png differ diff --git a/docs/images/4.trigger.png b/docs/images/4.trigger.png new file mode 100644 index 0000000..c2b1c27 Binary files /dev/null and b/docs/images/4.trigger.png differ diff --git a/docs/images/5.api.png b/docs/images/5.api.png new file mode 100644 index 0000000..9cb2ca2 Binary files /dev/null and b/docs/images/5.api.png differ diff --git a/docs/images/6.link.png b/docs/images/6.link.png new file mode 100644 index 0000000..bc18e1e Binary files /dev/null and b/docs/images/6.link.png differ diff --git a/docs/images/7.CORS1.png b/docs/images/7.CORS1.png new file mode 100644 index 0000000..86d25d6 Binary files /dev/null and b/docs/images/7.CORS1.png differ diff --git a/docs/images/8.CORS2.png b/docs/images/8.CORS2.png new file mode 100644 index 0000000..f451f4c Binary files /dev/null and b/docs/images/8.CORS2.png differ diff --git a/docs/images/9.troubleshoot.png b/docs/images/9.troubleshoot.png new file mode 100644 index 0000000..8061c73 Binary files /dev/null and b/docs/images/9.troubleshoot.png differ diff --git a/docs/images/aws-lambda-wasmedge-runtime.gif b/docs/images/aws-lambda-wasmedge-runtime.gif new file mode 100644 index 0000000..5292ff8 Binary files /dev/null and b/docs/images/aws-lambda-wasmedge-runtime.gif differ diff --git a/docs/images/service_arch.png b/docs/images/service_arch.png new file mode 100644 index 0000000..c992579 Binary files /dev/null and b/docs/images/service_arch.png differ diff --git a/pages/index.js b/pages/index.js index ed0f02a..c004b1f 100644 --- a/pages/index.js +++ b/pages/index.js @@ -5,14 +5,14 @@ import styles from '../styles/Home.module.css' export default function Home() { const [enableWasm, setEnableWasm] = useState(false); const [origImg, setOrigImg] = useState(null); - const [resImg, setResImg] = useState(null); + const [res, setRes] = useState(null); const [loading, setLoading] = useState(false); return (
AWS Lambda Wasm Runtime - +
@@ -22,17 +22,13 @@ export default function Home() {
- - -
- {origImg && } -
+ + +
-
- -
- {resImg && } -
+
+
+ {origImg && }
@@ -43,7 +39,7 @@ export default function Home() { target="_blank" rel="noopener noreferrer" > - Powered by AWS Lambda + Powered by AWS Lambda
@@ -55,8 +51,8 @@ export default function Home() { return; } - if (!file.type.startsWith('image/png')) { - alert('Please select a png image.'); + if (!file.type.startsWith('image/jpeg')) { + alert('Please select a jpeg image.'); return; } @@ -69,31 +65,22 @@ export default function Home() { aImg.src = e.target.result; setOrigImg(aImg); setEnableWasm(true); + setRes(''); }; })(img); reader.readAsDataURL(file); } function runWasm(e) { - const img = document.createElement('img'); - const reader = new FileReader(); reader.onload = function(e) { setLoading(true); var oReq = new XMLHttpRequest(); oReq.open("POST", process.env.NEXT_PUBLIC_FUNCTION_URL, true); - oReq.onload = (function(bImg) { - return function (oEvent) { + oReq.onload = function() { setLoading(false); - const typedArray = new Uint8Array(oReq.response.match(/[\da-f]{2}/gi).map(function (h) { - return parseInt(h, 16); - })); - const b = new Blob([typedArray.buffer], {type: 'image/png'}); - bImg.src = URL.createObjectURL(b); - setResImg(bImg); - URL.revokeObjectURL(b); - }; - })(img); + setRes(oReq.response); + }; oReq.send(buf2hex(e.target.result)); }; reader.readAsArrayBuffer(origImg.file); diff --git a/styles/Home.module.css b/styles/Home.module.css index 7ffa18b..fa6fca1 100644 --- a/styles/Home.module.css +++ b/styles/Home.module.css @@ -89,25 +89,11 @@ input.visually-hidden:focus-within + label { .operating { margin: 2rem 0; - display: flex; - justify-content: center; - align-items: flex-start; - width: 100%; } .operating > div { width: 100%; - display: flex; - flex-direction: column; - justify-content: flex-start; - align-items: flex-end; - margin-right: 2rem; - -} - -.operating > div:last-child { - align-items: flex-start; - margin-left: 2rem; + text-align: center; } .operating button { @@ -116,6 +102,7 @@ input.visually-hidden:focus-within + label { border-radius: 5px; color: white; padding: 5px 10px; + margin-left: 10px; cursor: pointer; border: 0; } @@ -147,5 +134,15 @@ input.visually-hidden:focus-within + label { } .thumb img { - max-width: 100%; + max-width: 800px; +} + +.infer { + margin: 1rem 0; + font-size: 1.2rem; +} + +.infer a { + color: #1f6bc3; + text-decoration: underline; }