TensorFlow.js Example Hands-On Guide


[Read More] Come on, three lines of code for image classification.

Author Nick Bourdakos

Compile | Xiaowen

What is TensorFlow.js? What can it do?

In the official page, tensorflow.js is "a javascript library for training and deploying ML models in the browser and node.js".

And what can it do? Follow this article and try it out.

The Demo

Due to the version of WeChat, the demo cannot be loaded, you can move to. https://codesandbox.io/s/o4l6pnlkzz?from-embed

In this demo, we use a deep learning model called "MobileNet". MobileNet is a convolutional neural network, a model structure that excels in image classification.

The Code

Classifying images with MobileNet using tensorflow.js is very simple and requires only 3 lines of code.

mobilenet.load()
  .then(model => model.classify(myImage))
  .then(predictions => // Use predictions)

Final Thoughts

At the time of writing, TensorFlow provides five official patterns that are equally easy to use.

  • mobilenet: Classify images with labels from the ImageNet database.
  • posenet: Realtime pose detection. Blog post here.
  • coco-ssd: Object detection based on the TensorFlow object detection API.
  • speech-commands: Classify 1 second audio snippets from the speech commands dataset.
  • knn-classifier: Create a custom k-nearest neighbors classifier. Can be used for transfer learning.

However, if none of these models are enough, you can also create/training your own models.


Link to original article.

https://hackernoon.com/start-using-tensorflow-js-without-leaving-this-article-fb683ac509ed

-END-


Recommended>>
1、Introduction to rpm management
2、Solve the problem that the Gravatar avatar image path url parameter is invalid for the Seven Cows Cloud Storage cache acceleration
3、Where does AI invade SaaS to claim traditional CRM
4、Paper Notes Series NeuralNetworkSearch ASurvey
5、PHP development WeChat passive reply message encountered a big pitfall

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号