1 Star 0 Fork 0

极客工坊/tfjs-examples

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
.vscode
abalone-node
addition-rnn-webworker
addition-rnn
baseball-node
boston-housing
cart-pole
chrome-extension
dist
src
README.md
install.png
package.json
usage.png
yarn.lock
custom-layer
data-csv
data-generator
date-conversion-attention
electron
fashion-mnist-vae
firebase-object-detection-node
getting-started
intent-classifier
interactive-visualizers
iris-fitDataset
iris
jena-weather
lstm-text-generation
mnist-acgan
mnist-core
mnist-node
mnist-transfer-cnn
mnist
mobilenet
polynomial-regression-core
polynomial-regression
quantization
sentiment
shared
simple-object-detection
snake-dqn
translation
tsne-mnist-canvas
visualize-convnet
webcam-transfer-learning
website-phishing
.gitignore
CONTRIBUTING.md
LICENSE
README.md
cloudbuild.yml
deploy.sh
package.json
presubmit.ts
test_util.js
update-tfjs-version
yarn.lock
克隆/下载
贡献代码
同步代码
Loading...
README

TensorFlow.js Deployment Example : Browser Extension

This example creates a Chrome extension, enabling users to right-click on images within a web page, and perform multi-class object detection on them. The extension will will apply a MobileNetV2 classifier to the image, and then print the predicted class on top of the image.

To build the extension, use the command:

yarn
yarn build

To install the unpacked extension in chrome, follow the instructions here. Briefly, navigate to chrome://extensions, make sure that the Developer mode switch is turned on in the upper right, and click Load Unpacked. Then select the appropriate directory (the dist directory containing manifest.json);

If it worked you should see an icon for the TF.js mobilenet Chrome extension.

install page illustration

Using the extension

Once the extension is installed, you should be able to classify images in the browser. To do so, navigate to a site with images on it, such as the Google image search page for the term "tiger" used here. Then right click on the image you wish to classify. You should see a menu option for Classify image with TensorFlow.js. Clicking that image should cause the extension to execute the model on the image, and then add some text over the image indicating the prediction.

usage

Removing the extension

To remove the extension, click Remove on the extension page, or use the Remove from Chrome... menu option when right clicking the icon.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/geekworkshop/tfjs-examples.git
git@gitee.com:geekworkshop/tfjs-examples.git
geekworkshop
tfjs-examples
tfjs-examples
master

搜索帮助