Pens from Jason Mayes https://codepen.io/jasonmayes/ en nospam@codepen.io Copyright 2024 2024-03-04T00:30:15-07:00 Web AI Universal Sentence Encoder semantic similarity demo https://codepen.io/jasonmayes/pen/xxexzvg https://codepen.io/jasonmayes/pen/xxexzvg Jason Mayes

See the Code - See it Full Page - See Details

For a given chunk of text, split the text into sentences and then calculate the semantic similarity of each sentence with some target sentence. All AI inference happens entirely client side in the browser on your machine. No cloud server used as using TensorFlow.js Universal Sentence Encoder to compute sentence embedding vectors.

]]>
Web AI Universal Sentence Encoder semantic similarity demo 2024-03-04T00:30:15-07:00
Transfer Learning with MobileNet v3 in TensorFlow.js using saved graph model from TFHub. https://codepen.io/jasonmayes/pen/rNGPxER https://codepen.io/jasonmayes/pen/rNGPxER Jason Mayes

See the Code - See it Full Page - See Details

Learn how to make your very own Teachable Machine that can use the power of transfer learning to perform image recognition live in the browser powered by TensorFlow.js

]]>
Transfer Learning with MobileNet v3 in TensorFlow.js using saved graph model from TFHub. 2022-01-15T04:06:18-07:00
TensorFlow.js Fashion MNIST classifier https://codepen.io/jasonmayes/pen/poWKOyo https://codepen.io/jasonmayes/pen/poWKOyo Jason Mayes

See the Code - See it Full Page - See Details

This experiment shows how you can use the power of Machine Learning directly in your browser to train and use a simple Neural Network with 3 layers to classify clothing items from the Fashion MNIST dataset.

]]>
TensorFlow.js Fashion MNIST classifier 2022-01-06T05:36:01-07:00
TensorFlow Hub Load Raw TFJS MoveNet Model https://codepen.io/jasonmayes/pen/abLKore https://codepen.io/jasonmayes/pen/abLKore Jason Mayes

See the Code - See it Full Page - See Details

Demo to show how to load the MoveNet raw model from TF-Hub and perform the pre and post processing manually yourself! For educational purposes only. If you want to use MoveNet in production please use the official easy to use version in just a few lines of code which has a lot more optimizations than this simple demo which is just to show how to load a raw TF-hub model in TensorFlow.js.

]]>
TensorFlow Hub Load Raw TFJS MoveNet Model 2022-01-04T23:08:09-07:00
Single neuron with single input linear regression to predict house price from house size using TensorFlow.js https://codepen.io/jasonmayes/pen/QWqxLJQ https://codepen.io/jasonmayes/pen/QWqxLJQ Jason Mayes

See the Code - See it Full Page - See Details

Single neuron with single input linear regression to predict house price from house size using TensorFlow.js Learns to fit a line of best fit to some fictional house data to predict price given square feet.

]]>
Single neuron with single input linear regression to predict house price from house size using TensorFlow.js 2022-01-04T23:10:12-07:00
TensorFlow.js Multiple Neuron Non Linear Regression to learn y = x ^ 2 https://codepen.io/jasonmayes/pen/NWazKOa https://codepen.io/jasonmayes/pen/NWazKOa Jason Mayes

See the Code - See it Full Page - See Details

TensorFlow.js Multiple Neuron Non Linear Regression to learn y = x ^ 2 Learning from non linear data with activation functions and multiple neurons.

]]>
TensorFlow.js Multiple Neuron Non Linear Regression to learn y = x ^ 2 2022-01-04T23:10:26-07:00
Single neuron multiple input linear regression using TensorFlow.js https://codepen.io/jasonmayes/pen/bGoaPwP https://codepen.io/jasonmayes/pen/bGoaPwP Jason Mayes

See the Code - See it Full Page - See Details

Example showing how to train a custom model to predict house prices given sqft and bedrooms (multiple inputs) using a single artificial neuron without activation function using TensorFlow.js

]]>
Single neuron multiple input linear regression using TensorFlow.js 2022-01-04T22:45:55-07:00
Play Local Video and Classify with TensorFlow.js https://codepen.io/jasonmayes/pen/PojMRMy https://codepen.io/jasonmayes/pen/PojMRMy Jason Mayes

See the Code - See it Full Page - See Details

Learn how to play a local video from your computer instead of a webcam stream and classify a frame using TensorFlow.js

]]>
Play Local Video and Classify with TensorFlow.js 2021-10-06T20:45:52-07:00
Average word embedding vocab file to JS converter https://codepen.io/jasonmayes/pen/BaWyPaB https://codepen.io/jasonmayes/pen/BaWyPaB Jason Mayes

See the Code - See it Full Page - See Details

Sample code to take a vocab file produced by Model Maker's average word embedding trained model and reformat this to be more friendly for JS consumption.

]]>
Average word embedding vocab file to JS converter 2021-05-07T20:47:19-07:00
TensorFlow.js Smart Pet Cam https://codepen.io/jasonmayes/pen/KKaLwPV https://codepen.io/jasonmayes/pen/KKaLwPV Jason Mayes

See the Code - See it Full Page - See Details

Give your old smartphone a new life! Check if your doggo (or other pet) has been a good boi (or gal) whilst you are out of the house. Get alerted when said pet goes near a common object of your choice like a bed, couch, TV etc. Made with TensorFlow.js so runs entirely in browser.

]]>
TensorFlow.js Smart Pet Cam 2021-04-28T19:20:05-07:00