diff --git a/d3/KMeans/KMeans_GaussianClusterDemo/index.html b/d3/KMeans/KMeans_GaussianClusterDemo/index.html index eb005e44..43db9fb3 100644 --- a/d3/KMeans/KMeans_GaussianClusterDemo/index.html +++ b/d3/KMeans/KMeans_GaussianClusterDemo/index.html @@ -2,7 +2,7 @@ ml5.js kmeans example - +
diff --git a/javascript/BodyPix/BodyPix_Image/index.html b/javascript/BodyPix/BodyPix_Image/index.html index 68308fee..a4699a82 100644 --- a/javascript/BodyPix/BodyPix_Image/index.html +++ b/javascript/BodyPix/BodyPix_Image/index.html @@ -3,7 +3,7 @@ BodyPix with Webcam - + diff --git a/javascript/BodyPix/BodyPix_Webcam/index.html b/javascript/BodyPix/BodyPix_Webcam/index.html index 2ffa1db0..0873b01f 100644 --- a/javascript/BodyPix/BodyPix_Webcam/index.html +++ b/javascript/BodyPix/BodyPix_Webcam/index.html @@ -3,7 +3,7 @@ BodyPix with Webcam - + diff --git a/javascript/BodyPix/BodyPix_Webcam_Parts/index.html b/javascript/BodyPix/BodyPix_Webcam_Parts/index.html index 104cdff0..95742561 100644 --- a/javascript/BodyPix/BodyPix_Webcam_Parts/index.html +++ b/javascript/BodyPix/BodyPix_Webcam_Parts/index.html @@ -3,7 +3,7 @@ BodyPix with Webcam - + diff --git a/javascript/CVAE/CVAE_QuickDraw/index.html b/javascript/CVAE/CVAE_QuickDraw/index.html index 57824280..849ccd37 100644 --- a/javascript/CVAE/CVAE_QuickDraw/index.html +++ b/javascript/CVAE/CVAE_QuickDraw/index.html @@ -5,7 +5,7 @@ CVAE with quick_draw - + diff --git a/javascript/CharRNN/CharRNN_Interactive/index.html b/javascript/CharRNN/CharRNN_Interactive/index.html index 012746db..ffee2cc2 100644 --- a/javascript/CharRNN/CharRNN_Interactive/index.html +++ b/javascript/CharRNN/CharRNN_Interactive/index.html @@ -3,7 +3,7 @@ Interactive CharRNN Text Generation Example - + @@ -12,9 +12,9 @@

Interactive CharRNN Text Generation Example

This example uses a pre-trained model on a corpus of Virginia Woolf


length: - 20 + 20
temperature: - 0.5 + 0.5

Loading Model

diff --git a/javascript/CharRNN/CharRNN_Text/index.html b/javascript/CharRNN/CharRNN_Text/index.html index 533790a5..8dfed0f9 100644 --- a/javascript/CharRNN/CharRNN_Text/index.html +++ b/javascript/CharRNN/CharRNN_Text/index.html @@ -3,7 +3,7 @@ LSTM Text Generation Example - + @@ -11,12 +11,12 @@

LSTM Text Generation Example

This example uses a pre-trained model on a corpus of Virginia Woolf

seed text: - +

length: - 100

+ 100

temperature: - 0.5

+ 0.5

Loading Model

diff --git a/javascript/CharRNN/CharRNN_Text_Stateful/index.html b/javascript/CharRNN/CharRNN_Text_Stateful/index.html index 91bd97bc..f001524d 100644 --- a/javascript/CharRNN/CharRNN_Text_Stateful/index.html +++ b/javascript/CharRNN/CharRNN_Text_Stateful/index.html @@ -3,7 +3,7 @@ Stateful CharRNN Text Generation Example - + @@ -15,10 +15,10 @@

Stateful CharRNN Text Generation Example

Instead of feeding every single character every frame to predict the next character, we feed only the last character, and instruct the CharRNN to remember its internal state.

This example uses a pre-trained model on a corpus of Virginia Woolf

seed text: - +

temperature: - 0.5 + 0.5

Loading Model

diff --git a/javascript/DCGAN/DCGAN_Random/index.html b/javascript/DCGAN/DCGAN_Random/index.html index 0c53d340..6dad69c7 100644 --- a/javascript/DCGAN/DCGAN_Random/index.html +++ b/javascript/DCGAN/DCGAN_Random/index.html @@ -5,7 +5,7 @@ DCGAN Example - + diff --git a/javascript/FaceApi/FaceApi_Image_Landmarks/index.html b/javascript/FaceApi/FaceApi_Image_Landmarks/index.html index ba54bdcf..5e543f66 100644 --- a/javascript/FaceApi/FaceApi_Image_Landmarks/index.html +++ b/javascript/FaceApi/FaceApi_Image_Landmarks/index.html @@ -3,7 +3,7 @@ FaceApi Landmarks Demo - + diff --git a/javascript/FaceApi/FaceApi_Video_Landmarks/index.html b/javascript/FaceApi/FaceApi_Video_Landmarks/index.html index ba54bdcf..5e543f66 100644 --- a/javascript/FaceApi/FaceApi_Video_Landmarks/index.html +++ b/javascript/FaceApi/FaceApi_Video_Landmarks/index.html @@ -3,7 +3,7 @@ FaceApi Landmarks Demo - + diff --git a/javascript/FaceApi/FaceApi_Video_Landmarks_LocalModels/index.html b/javascript/FaceApi/FaceApi_Video_Landmarks_LocalModels/index.html index 1a5c2d52..36930bd2 100644 --- a/javascript/FaceApi/FaceApi_Video_Landmarks_LocalModels/index.html +++ b/javascript/FaceApi/FaceApi_Video_Landmarks_LocalModels/index.html @@ -4,7 +4,7 @@ FaceApi Landmarks Demo With Local Models - + diff --git a/javascript/FeatureExtractor/FeatureExtractor_Image_Classification/index.html b/javascript/FeatureExtractor/FeatureExtractor_Image_Classification/index.html index 529f5777..71316ba6 100755 --- a/javascript/FeatureExtractor/FeatureExtractor_Image_Classification/index.html +++ b/javascript/FeatureExtractor/FeatureExtractor_Image_Classification/index.html @@ -5,7 +5,7 @@ Image Classification using Feature Extraction with MobileNet - + diff --git a/javascript/FeatureExtractor/FeatureExtractor_Image_Regression/index.html b/javascript/FeatureExtractor/FeatureExtractor_Image_Regression/index.html index eac758b7..2d281e35 100755 --- a/javascript/FeatureExtractor/FeatureExtractor_Image_Regression/index.html +++ b/javascript/FeatureExtractor/FeatureExtractor_Image_Regression/index.html @@ -3,7 +3,7 @@ Image Regression using Feature Extraction with MobileNet. - + @@ -17,7 +17,7 @@

(Train a Neural Network to move the red square)

Loading base model... | Loading video...

- +


diff --git a/javascript/ImageClassification/ImageClassification/index.html b/javascript/ImageClassification/ImageClassification/index.html index 00b20ba2..82f6c3a0 100755 --- a/javascript/ImageClassification/ImageClassification/index.html +++ b/javascript/ImageClassification/ImageClassification/index.html @@ -3,13 +3,13 @@ Image Classification Example - +

Image classification using MobileNet

The MobileNet model labeled this as ... with a confidence of ....

- + diff --git a/javascript/ImageClassification/ImageClassification_DoodleNet_Canvas/index.html b/javascript/ImageClassification/ImageClassification_DoodleNet_Canvas/index.html index 14e24d59..946f5acb 100755 --- a/javascript/ImageClassification/ImageClassification_DoodleNet_Canvas/index.html +++ b/javascript/ImageClassification/ImageClassification_DoodleNet_Canvas/index.html @@ -3,7 +3,7 @@ Canvas Image Classification using DoodleNet - + diff --git a/javascript/ImageClassification/ImageClassification_DoodleNet_Video/index.html b/javascript/ImageClassification/ImageClassification_DoodleNet_Video/index.html index d11248cd..58023b95 100755 --- a/javascript/ImageClassification/ImageClassification_DoodleNet_Video/index.html +++ b/javascript/ImageClassification/ImageClassification_DoodleNet_Video/index.html @@ -3,7 +3,7 @@ Webcam Image Classification using DoodleNet - + diff --git a/javascript/ImageClassification/ImageClassification_MultipleImages/index.html b/javascript/ImageClassification/ImageClassification_MultipleImages/index.html index d781092a..206311de 100755 --- a/javascript/ImageClassification/ImageClassification_MultipleImages/index.html +++ b/javascript/ImageClassification/ImageClassification_MultipleImages/index.html @@ -3,7 +3,7 @@ Multiple Image classification using MobileNet - + diff --git a/javascript/ImageClassification/ImageClassification_Video/index.html b/javascript/ImageClassification/ImageClassification_Video/index.html index 2d65e13a..61d4e060 100755 --- a/javascript/ImageClassification/ImageClassification_Video/index.html +++ b/javascript/ImageClassification/ImageClassification_Video/index.html @@ -5,7 +5,7 @@ Webcam Image Classification using MobileNet - + diff --git a/javascript/ImageClassification/ImageClassification_VideoScavengerHunt/index.html b/javascript/ImageClassification/ImageClassification_VideoScavengerHunt/index.html index 153e7aa2..91d95944 100755 --- a/javascript/ImageClassification/ImageClassification_VideoScavengerHunt/index.html +++ b/javascript/ImageClassification/ImageClassification_VideoScavengerHunt/index.html @@ -3,7 +3,7 @@ Webcam Image Classification with Speech Output using MobileNet - + diff --git a/javascript/ImageClassification/ImageClassification_VideoSound/index.html b/javascript/ImageClassification/ImageClassification_VideoSound/index.html index 544e9807..3fda7cd9 100755 --- a/javascript/ImageClassification/ImageClassification_VideoSound/index.html +++ b/javascript/ImageClassification/ImageClassification_VideoSound/index.html @@ -3,7 +3,7 @@ Webcam Image Classification with Speech Output using MobileNet - + diff --git a/javascript/ImageClassification/ImageClassification_Video_Load/index.html b/javascript/ImageClassification/ImageClassification_Video_Load/index.html index 9827ec75..12e9125c 100755 --- a/javascript/ImageClassification/ImageClassification_Video_Load/index.html +++ b/javascript/ImageClassification/ImageClassification_Video_Load/index.html @@ -3,7 +3,7 @@ Webcam Image Classification using a pre-trianed customized model - + diff --git a/javascript/KNNClassification/KNNClassification_PoseNet/index.html b/javascript/KNNClassification/KNNClassification_PoseNet/index.html index c7186876..a1db06f2 100755 --- a/javascript/KNNClassification/KNNClassification_PoseNet/index.html +++ b/javascript/KNNClassification/KNNClassification_PoseNet/index.html @@ -3,7 +3,7 @@ PoseNet with KNN Classification on Webcam Images - + diff --git a/javascript/KNNClassification/KNNClassification_Video/index.html b/javascript/KNNClassification/KNNClassification_Video/index.html index 1255e648..097b286c 100755 --- a/javascript/KNNClassification/KNNClassification_Video/index.html +++ b/javascript/KNNClassification/KNNClassification_Video/index.html @@ -3,7 +3,7 @@ KNN Classification on Webcam Images with mobileNet. - + diff --git a/javascript/KNNClassification/KNNClassification_VideoSound/index.html b/javascript/KNNClassification/KNNClassification_VideoSound/index.html index 07292ad2..c9ace5f0 100755 --- a/javascript/KNNClassification/KNNClassification_VideoSound/index.html +++ b/javascript/KNNClassification/KNNClassification_VideoSound/index.html @@ -5,7 +5,7 @@ KNN Classification on Webcam Images with Speech Output Using mobileNet. - + diff --git a/javascript/KNNClassification/KNNClassification_VideoSquare/index.html b/javascript/KNNClassification/KNNClassification_VideoSquare/index.html index 2613f26d..671e9c59 100755 --- a/javascript/KNNClassification/KNNClassification_VideoSquare/index.html +++ b/javascript/KNNClassification/KNNClassification_VideoSquare/index.html @@ -3,7 +3,7 @@ KNN Classification on Webcam Images with mobileNet - + diff --git a/javascript/PitchDetection/PitchDetection/index.html b/javascript/PitchDetection/PitchDetection/index.html index cb3353de..011bb5b0 100644 --- a/javascript/PitchDetection/PitchDetection/index.html +++ b/javascript/PitchDetection/PitchDetection/index.html @@ -4,7 +4,7 @@ Pitch Detection - + diff --git a/javascript/PitchDetection/PitchDetection_Game/index.html b/javascript/PitchDetection/PitchDetection_Game/index.html index 71a1e277..bf3f5618 100644 --- a/javascript/PitchDetection/PitchDetection_Game/index.html +++ b/javascript/PitchDetection/PitchDetection_Game/index.html @@ -3,7 +3,7 @@ Pitch Tone Game - + diff --git a/javascript/PitchDetection/PitchDetection_Piano/index.html b/javascript/PitchDetection/PitchDetection_Piano/index.html index 423ba397..50994aaf 100644 --- a/javascript/PitchDetection/PitchDetection_Piano/index.html +++ b/javascript/PitchDetection/PitchDetection_Piano/index.html @@ -4,7 +4,7 @@ Pitch Detect Piano - + diff --git a/javascript/Pix2Pix/Pix2Pix_callback/index.html b/javascript/Pix2Pix/Pix2Pix_callback/index.html index 1839a903..c1430e77 100644 --- a/javascript/Pix2Pix/Pix2Pix_callback/index.html +++ b/javascript/Pix2Pix/Pix2Pix_callback/index.html @@ -3,7 +3,7 @@ Pix2Pix Edges2Pikachu Example - + @@ -16,8 +16,8 @@

Pix2Pix Edges2Pichaku Example

4. You could click the "Clear" button to clear the canvas and draw again.

Loading Model... Please wait...

- input image - output image + input image + output image
diff --git a/javascript/Pix2Pix/Pix2Pix_promise/index.html b/javascript/Pix2Pix/Pix2Pix_promise/index.html index 1839a903..c1430e77 100644 --- a/javascript/Pix2Pix/Pix2Pix_promise/index.html +++ b/javascript/Pix2Pix/Pix2Pix_promise/index.html @@ -3,7 +3,7 @@ Pix2Pix Edges2Pikachu Example - + @@ -16,8 +16,8 @@

Pix2Pix Edges2Pichaku Example

4. You could click the "Clear" button to clear the canvas and draw again.

Loading Model... Please wait...

- input image - output image + input image + output image
diff --git a/javascript/PoseNet/PoseNet_image_single/index.html b/javascript/PoseNet/PoseNet_image_single/index.html index 67b76c6e..88119385 100644 --- a/javascript/PoseNet/PoseNet_image_single/index.html +++ b/javascript/PoseNet/PoseNet_image_single/index.html @@ -3,14 +3,14 @@ PoseNet example on image with single detection - +

PoseNet example on image with single detection

Loading model...

- +

image via: Pexels

diff --git a/javascript/PoseNet/PoseNet_part_selection/index.html b/javascript/PoseNet/PoseNet_part_selection/index.html index a7649485..324e6708 100755 --- a/javascript/PoseNet/PoseNet_part_selection/index.html +++ b/javascript/PoseNet/PoseNet_part_selection/index.html @@ -4,7 +4,7 @@ PoseNet Part Selection - + diff --git a/javascript/PoseNet/PoseNet_webcam/index.html b/javascript/PoseNet/PoseNet_webcam/index.html index 1b260246..335da69e 100755 --- a/javascript/PoseNet/PoseNet_webcam/index.html +++ b/javascript/PoseNet/PoseNet_webcam/index.html @@ -4,7 +4,7 @@ PoseNet Example - + diff --git a/javascript/Sentiment/Sentiment_Interactive/index.html b/javascript/Sentiment/Sentiment_Interactive/index.html index 052e0337..4f561cc8 100644 --- a/javascript/Sentiment/Sentiment_Interactive/index.html +++ b/javascript/Sentiment/Sentiment_Interactive/index.html @@ -1,7 +1,7 @@ ml5 - Sentiment - + @@ -12,7 +12,7 @@

Sentiment Analysis Demo

maximum of 200 words and only the 20,000 most common words in the reviews are used.

- +

sentiment score:

diff --git a/javascript/Sentiment/index.html b/javascript/Sentiment/index.html index 3cd66d9e..9f8420c4 100644 --- a/javascript/Sentiment/index.html +++ b/javascript/Sentiment/index.html @@ -2,7 +2,7 @@ ml5 - Sentiment - + @@ -27,7 +27,7 @@

- +

diff --git a/javascript/SketchRNN/SketchRNN_basic/index.html b/javascript/SketchRNN/SketchRNN_basic/index.html index 55271be4..2fc2714a 100644 --- a/javascript/SketchRNN/SketchRNN_basic/index.html +++ b/javascript/SketchRNN/SketchRNN_basic/index.html @@ -2,7 +2,7 @@ SketchRNN - + diff --git a/javascript/SketchRNN/SketchRNN_interactive/index.html b/javascript/SketchRNN/SketchRNN_interactive/index.html index 3f2d0238..710bec13 100644 --- a/javascript/SketchRNN/SketchRNN_interactive/index.html +++ b/javascript/SketchRNN/SketchRNN_interactive/index.html @@ -2,7 +2,7 @@ SketchRNN - + diff --git a/javascript/SoundClassification/SoundClassification_speechcommand/index.html b/javascript/SoundClassification/SoundClassification_speechcommand/index.html index 370833c6..7f331050 100755 --- a/javascript/SoundClassification/SoundClassification_speechcommand/index.html +++ b/javascript/SoundClassification/SoundClassification_speechcommand/index.html @@ -3,7 +3,7 @@ Sound classification using SpeechCommands18w - + diff --git a/javascript/SoundClassification/SoundClassification_speechcommand_load/index.html b/javascript/SoundClassification/SoundClassification_speechcommand_load/index.html index 1d0da04c..50c19025 100755 --- a/javascript/SoundClassification/SoundClassification_speechcommand_load/index.html +++ b/javascript/SoundClassification/SoundClassification_speechcommand_load/index.html @@ -3,7 +3,7 @@ Sound classification using pre-trained custom model - + diff --git a/javascript/StyleTransfer/StyleTransfer_Image/index.html b/javascript/StyleTransfer/StyleTransfer_Image/index.html index 6aaa7206..546572e5 100644 --- a/javascript/StyleTransfer/StyleTransfer_Image/index.html +++ b/javascript/StyleTransfer/StyleTransfer_Image/index.html @@ -3,7 +3,7 @@ Style Transfer Image Example with Promises - + @@ -13,16 +13,16 @@

Style Transfer Image Example

Loading Models...

Input Image:

- input img + input img diff --git a/javascript/StyleTransfer/StyleTransfer_Video/index.html b/javascript/StyleTransfer/StyleTransfer_Video/index.html index 7e20a8b2..616b21c7 100644 --- a/javascript/StyleTransfer/StyleTransfer_Video/index.html +++ b/javascript/StyleTransfer/StyleTransfer_Video/index.html @@ -2,7 +2,7 @@ Style Transfer Mirror Example - + @@ -11,8 +11,8 @@

Style Transfer Mirror Example

Sytle: Udnie (Young American Girl, The Dance), 1913 - Francis Picabia

Loading model...

- - + +
diff --git a/javascript/UNET/UNET_webcam/index.html b/javascript/UNET/UNET_webcam/index.html index 1724a85a..76a5bf04 100755 --- a/javascript/UNET/UNET_webcam/index.html +++ b/javascript/UNET/UNET_webcam/index.html @@ -2,14 +2,14 @@ UNET example - +

UNET example

- + \ No newline at end of file diff --git a/javascript/Word2Vec/Word2Vec_Interactive/index.html b/javascript/Word2Vec/Word2Vec_Interactive/index.html index 78108626..f6aaa347 100755 --- a/javascript/Word2Vec/Word2Vec_Interactive/index.html +++ b/javascript/Word2Vec/Word2Vec_Interactive/index.html @@ -5,7 +5,7 @@ Word2Vec example Using a pre-trained model on common English words. - + @@ -17,7 +17,7 @@

Word2Vec example Using a pre-trained model on common English words.

- +

@@ -26,8 +26,8 @@

Word2Vec example Using a pre-trained model on common English words.

Between - and - + and +

@@ -35,9 +35,9 @@

Word2Vec example Using a pre-trained model on common English words.

- is to - as - + is to + as +

diff --git a/javascript/YOLO/YOLO_single_image/index.html b/javascript/YOLO/YOLO_single_image/index.html index 64a12a22..1718d040 100644 --- a/javascript/YOLO/YOLO_single_image/index.html +++ b/javascript/YOLO/YOLO_single_image/index.html @@ -5,7 +5,7 @@ YOLO with image - + diff --git a/javascript/YOLO/YOLO_webcam/index.html b/javascript/YOLO/YOLO_webcam/index.html index 16702a5e..79254974 100644 --- a/javascript/YOLO/YOLO_webcam/index.html +++ b/javascript/YOLO/YOLO_webcam/index.html @@ -5,7 +5,7 @@ Real time Object Detection using YOLO - + diff --git a/p5js/BodyPix/BodyPix_Image/index.html b/p5js/BodyPix/BodyPix_Image/index.html index f78294f0..1d976c20 100644 --- a/p5js/BodyPix/BodyPix_Image/index.html +++ b/p5js/BodyPix/BodyPix_Image/index.html @@ -5,7 +5,7 @@ BodyPix with Webcam - + diff --git a/p5js/BodyPix/BodyPix_Preload/index.html b/p5js/BodyPix/BodyPix_Preload/index.html index f78294f0..1d976c20 100644 --- a/p5js/BodyPix/BodyPix_Preload/index.html +++ b/p5js/BodyPix/BodyPix_Preload/index.html @@ -5,7 +5,7 @@ BodyPix with Webcam - + diff --git a/p5js/BodyPix/BodyPix_Webcam/index.html b/p5js/BodyPix/BodyPix_Webcam/index.html index 563533a2..73b81e9e 100644 --- a/p5js/BodyPix/BodyPix_Webcam/index.html +++ b/p5js/BodyPix/BodyPix_Webcam/index.html @@ -5,7 +5,7 @@ BodyPix with Webcam - + diff --git a/p5js/BodyPix/BodyPix_Webcam_Parts/index.html b/p5js/BodyPix/BodyPix_Webcam_Parts/index.html index 8c8cc880..b9d8d5b9 100644 --- a/p5js/BodyPix/BodyPix_Webcam_Parts/index.html +++ b/p5js/BodyPix/BodyPix_Webcam_Parts/index.html @@ -5,7 +5,7 @@ BodyPix with Webcam - + diff --git a/p5js/BodyPix/BodyPix_p5Instance/index.html b/p5js/BodyPix/BodyPix_p5Instance/index.html index f3898427..9f4cdc4e 100644 --- a/p5js/BodyPix/BodyPix_p5Instance/index.html +++ b/p5js/BodyPix/BodyPix_p5Instance/index.html @@ -5,7 +5,7 @@ BodyPix with Webcam - + diff --git a/p5js/CVAE/CVAE_QuickDraw/index.html b/p5js/CVAE/CVAE_QuickDraw/index.html index ac9789d3..c1505530 100644 --- a/p5js/CVAE/CVAE_QuickDraw/index.html +++ b/p5js/CVAE/CVAE_QuickDraw/index.html @@ -7,7 +7,7 @@ CVAE with quick_draw - + diff --git a/p5js/CharRNN/CharRNN_Interactive/index.html b/p5js/CharRNN/CharRNN_Interactive/index.html index 130357f9..58989611 100644 --- a/p5js/CharRNN/CharRNN_Interactive/index.html +++ b/p5js/CharRNN/CharRNN_Interactive/index.html @@ -6,7 +6,7 @@ - + @@ -18,9 +18,9 @@

Interactive CharRNN Text Generation Example using p5.js

This example uses a pre-trained model on a corpus of Virginia Woolf


length: - 20 + 20
temperature: - 0.5 + 0.5

Loading Model

diff --git a/p5js/CharRNN/CharRNN_Text/index.html b/p5js/CharRNN/CharRNN_Text/index.html index 1502ec6c..9e089128 100644 --- a/p5js/CharRNN/CharRNN_Text/index.html +++ b/p5js/CharRNN/CharRNN_Text/index.html @@ -6,7 +6,7 @@ - + @@ -14,12 +14,12 @@

LSTM Text Generation Example

This example uses a pre-trained model on a corpus of Virginia Woolf

seed text: - +

length: - 100

+ 100

temperature: - 0.5

+ 0.5

Loading Model

diff --git a/p5js/CharRNN/CharRNN_Text_Stateful/index.html b/p5js/CharRNN/CharRNN_Text_Stateful/index.html index b611ffa4..0d87365a 100644 --- a/p5js/CharRNN/CharRNN_Text_Stateful/index.html +++ b/p5js/CharRNN/CharRNN_Text_Stateful/index.html @@ -6,7 +6,7 @@ - + @@ -18,10 +18,10 @@

Stateful CharRNN Text Generation Example using p5.js

Instead of feeding every single character every frame to predict the next character, we feed only the last character, and instruct the CharRNN to remember its internal state.

This example uses a pre-trained model on a corpus of Virginia Woolf

seed text: - +

temperature: - 0.5 + 0.5

Loading Model

diff --git a/p5js/DCGAN/DCGAN_LatentVector_RandomWalk/index.html b/p5js/DCGAN/DCGAN_LatentVector_RandomWalk/index.html index 4d9ac76f..aaa3cf54 100644 --- a/p5js/DCGAN/DCGAN_LatentVector_RandomWalk/index.html +++ b/p5js/DCGAN/DCGAN_LatentVector_RandomWalk/index.html @@ -9,7 +9,7 @@ - + diff --git a/p5js/DCGAN/DCGAN_LatentVector_Slider/index.html b/p5js/DCGAN/DCGAN_LatentVector_Slider/index.html index 4d9ac76f..aaa3cf54 100644 --- a/p5js/DCGAN/DCGAN_LatentVector_Slider/index.html +++ b/p5js/DCGAN/DCGAN_LatentVector_Slider/index.html @@ -9,7 +9,7 @@ - + diff --git a/p5js/DCGAN/DCGAN_Random/index.html b/p5js/DCGAN/DCGAN_Random/index.html index a3ef5139..98a6b312 100644 --- a/p5js/DCGAN/DCGAN_Random/index.html +++ b/p5js/DCGAN/DCGAN_Random/index.html @@ -9,7 +9,7 @@ - + diff --git a/p5js/FaceApi/FaceApi_Image_Landmarks/index.html b/p5js/FaceApi/FaceApi_Image_Landmarks/index.html index b07e6b3e..38b3a701 100644 --- a/p5js/FaceApi/FaceApi_Image_Landmarks/index.html +++ b/p5js/FaceApi/FaceApi_Image_Landmarks/index.html @@ -5,7 +5,7 @@ FaceApi Landmarks Demo - + diff --git a/p5js/FaceApi/FaceApi_Video_Landmarks/index.html b/p5js/FaceApi/FaceApi_Video_Landmarks/index.html index b07e6b3e..38b3a701 100644 --- a/p5js/FaceApi/FaceApi_Video_Landmarks/index.html +++ b/p5js/FaceApi/FaceApi_Video_Landmarks/index.html @@ -5,7 +5,7 @@ FaceApi Landmarks Demo - + diff --git a/p5js/FaceApi/FaceApi_Video_Landmarks_LocalModels/index.html b/p5js/FaceApi/FaceApi_Video_Landmarks_LocalModels/index.html index 9933b37e..8a8ce9ff 100644 --- a/p5js/FaceApi/FaceApi_Video_Landmarks_LocalModels/index.html +++ b/p5js/FaceApi/FaceApi_Video_Landmarks_LocalModels/index.html @@ -5,7 +5,7 @@ FaceApi Landmarks Demo With Local Models - + diff --git a/p5js/FeatureExtractor/FeatureExtractor_Image_Classification/index.html b/p5js/FeatureExtractor/FeatureExtractor_Image_Classification/index.html index 5b96a612..23e97e06 100755 --- a/p5js/FeatureExtractor/FeatureExtractor_Image_Classification/index.html +++ b/p5js/FeatureExtractor/FeatureExtractor_Image_Classification/index.html @@ -6,7 +6,7 @@ - + @@ -29,7 +29,7 @@

Image Classification using Feature Extractor with MobileNet

| - +

diff --git a/p5js/FeatureExtractor/FeatureExtractor_Image_Regression/index.html b/p5js/FeatureExtractor/FeatureExtractor_Image_Regression/index.html index 36a6fa45..8f664e4a 100755 --- a/p5js/FeatureExtractor/FeatureExtractor_Image_Regression/index.html +++ b/p5js/FeatureExtractor/FeatureExtractor_Image_Regression/index.html @@ -7,7 +7,7 @@ - + @@ -19,7 +19,7 @@

(Train a Neural Network to move the red square)

Loading base model... | Loading video...

- +


diff --git a/p5js/ImageClassification/ImageClassification/index.html b/p5js/ImageClassification/ImageClassification/index.html index 0c9040bb..4dd116bd 100755 --- a/p5js/ImageClassification/ImageClassification/index.html +++ b/p5js/ImageClassification/ImageClassification/index.html @@ -6,7 +6,7 @@ - + diff --git a/p5js/ImageClassification/ImageClassification_DoodleNet_Canvas/index.html b/p5js/ImageClassification/ImageClassification_DoodleNet_Canvas/index.html index 6f476178..e19a4d4a 100755 --- a/p5js/ImageClassification/ImageClassification_DoodleNet_Canvas/index.html +++ b/p5js/ImageClassification/ImageClassification_DoodleNet_Canvas/index.html @@ -7,7 +7,7 @@ - + diff --git a/p5js/ImageClassification/ImageClassification_DoodleNet_Video/index.html b/p5js/ImageClassification/ImageClassification_DoodleNet_Video/index.html index e0af5804..255907f3 100755 --- a/p5js/ImageClassification/ImageClassification_DoodleNet_Video/index.html +++ b/p5js/ImageClassification/ImageClassification_DoodleNet_Video/index.html @@ -7,7 +7,7 @@ - + diff --git a/p5js/ImageClassification/ImageClassification_MultipleImages/index.html b/p5js/ImageClassification/ImageClassification_MultipleImages/index.html index dafffed2..9e1ccb58 100755 --- a/p5js/ImageClassification/ImageClassification_MultipleImages/index.html +++ b/p5js/ImageClassification/ImageClassification_MultipleImages/index.html @@ -7,7 +7,7 @@ - + diff --git a/p5js/ImageClassification/ImageClassification_Video/index.html b/p5js/ImageClassification/ImageClassification_Video/index.html index 516e3abf..a35df086 100755 --- a/p5js/ImageClassification/ImageClassification_Video/index.html +++ b/p5js/ImageClassification/ImageClassification_Video/index.html @@ -7,7 +7,7 @@ - + diff --git a/p5js/ImageClassification/ImageClassification_VideoScavengerHunt/index.html b/p5js/ImageClassification/ImageClassification_VideoScavengerHunt/index.html index 001d51f9..6e39f5ea 100755 --- a/p5js/ImageClassification/ImageClassification_VideoScavengerHunt/index.html +++ b/p5js/ImageClassification/ImageClassification_VideoScavengerHunt/index.html @@ -7,7 +7,7 @@ - + diff --git a/p5js/ImageClassification/ImageClassification_VideoSound/index.html b/p5js/ImageClassification/ImageClassification_VideoSound/index.html index 8443d425..f6c7f388 100755 --- a/p5js/ImageClassification/ImageClassification_VideoSound/index.html +++ b/p5js/ImageClassification/ImageClassification_VideoSound/index.html @@ -7,7 +7,7 @@ - + diff --git a/p5js/ImageClassification/ImageClassification_VideoSoundTranslate/index.html b/p5js/ImageClassification/ImageClassification_VideoSoundTranslate/index.html index 77fa8eaa..773e0642 100755 --- a/p5js/ImageClassification/ImageClassification_VideoSoundTranslate/index.html +++ b/p5js/ImageClassification/ImageClassification_VideoSoundTranslate/index.html @@ -8,7 +8,7 @@ - + diff --git a/p5js/ImageClassification/ImageClassification_Video_Load/index.html b/p5js/ImageClassification/ImageClassification_Video_Load/index.html index e93259b3..24196a9d 100755 --- a/p5js/ImageClassification/ImageClassification_Video_Load/index.html +++ b/p5js/ImageClassification/ImageClassification_Video_Load/index.html @@ -7,7 +7,7 @@ - + diff --git a/p5js/KMeans/KMeans_imageSegmentation/index.html b/p5js/KMeans/KMeans_imageSegmentation/index.html index 34985a75..5bfedcf8 100644 --- a/p5js/KMeans/KMeans_imageSegmentation/index.html +++ b/p5js/KMeans/KMeans_imageSegmentation/index.html @@ -5,7 +5,7 @@ Kmeans image segmentation - + diff --git a/p5js/KNNClassification/KNNClassification_PoseNet/index.html b/p5js/KNNClassification/KNNClassification_PoseNet/index.html index 87e30052..0ec4c89f 100755 --- a/p5js/KNNClassification/KNNClassification_PoseNet/index.html +++ b/p5js/KNNClassification/KNNClassification_PoseNet/index.html @@ -6,7 +6,7 @@ - + diff --git a/p5js/KNNClassification/KNNClassification_Video/index.html b/p5js/KNNClassification/KNNClassification_Video/index.html index c77e4ab4..ddd89849 100755 --- a/p5js/KNNClassification/KNNClassification_Video/index.html +++ b/p5js/KNNClassification/KNNClassification_Video/index.html @@ -6,7 +6,7 @@ - + diff --git a/p5js/KNNClassification/KNNClassification_VideoSound/index.html b/p5js/KNNClassification/KNNClassification_VideoSound/index.html index bbbe8e3a..d78e426c 100755 --- a/p5js/KNNClassification/KNNClassification_VideoSound/index.html +++ b/p5js/KNNClassification/KNNClassification_VideoSound/index.html @@ -7,7 +7,7 @@ - + diff --git a/p5js/KNNClassification/KNNClassification_VideoSquare/index.html b/p5js/KNNClassification/KNNClassification_VideoSquare/index.html index 20cc689c..28fe0575 100755 --- a/p5js/KNNClassification/KNNClassification_VideoSquare/index.html +++ b/p5js/KNNClassification/KNNClassification_VideoSquare/index.html @@ -6,7 +6,7 @@ - + diff --git a/p5js/NeuralNetwork/NeuralNetwork_Simple-Classification/index.html b/p5js/NeuralNetwork/NeuralNetwork_Simple-Classification/index.html index 6c2a41d5..9e9fa232 100755 --- a/p5js/NeuralNetwork/NeuralNetwork_Simple-Classification/index.html +++ b/p5js/NeuralNetwork/NeuralNetwork_Simple-Classification/index.html @@ -6,13 +6,13 @@ - +

Neural Network Simple Classification

- + diff --git a/p5js/NeuralNetwork/NeuralNetwork_Simple-Regression/index.html b/p5js/NeuralNetwork/NeuralNetwork_Simple-Regression/index.html index f89deabb..9af42678 100755 --- a/p5js/NeuralNetwork/NeuralNetwork_Simple-Regression/index.html +++ b/p5js/NeuralNetwork/NeuralNetwork_Simple-Regression/index.html @@ -6,13 +6,13 @@ - +

Neural Network Simple Regression

- + diff --git a/p5js/NeuralNetwork/NeuralNetwork_XOR/index.html b/p5js/NeuralNetwork/NeuralNetwork_XOR/index.html index 57107598..eb59b49f 100644 --- a/p5js/NeuralNetwork/NeuralNetwork_XOR/index.html +++ b/p5js/NeuralNetwork/NeuralNetwork_XOR/index.html @@ -6,7 +6,7 @@ - + diff --git a/p5js/NeuralNetwork/NeuralNetwork_basics/index.html b/p5js/NeuralNetwork/NeuralNetwork_basics/index.html index b75834e3..f30b8119 100755 --- a/p5js/NeuralNetwork/NeuralNetwork_basics/index.html +++ b/p5js/NeuralNetwork/NeuralNetwork_basics/index.html @@ -6,13 +6,13 @@ - +

Neural Network

- + diff --git a/p5js/NeuralNetwork/NeuralNetwork_co2net/index.html b/p5js/NeuralNetwork/NeuralNetwork_co2net/index.html index 8a7aaa38..3094a8ae 100755 --- a/p5js/NeuralNetwork/NeuralNetwork_co2net/index.html +++ b/p5js/NeuralNetwork/NeuralNetwork_co2net/index.html @@ -6,7 +6,7 @@ - + diff --git a/p5js/NeuralNetwork/NeuralNetwork_color_classifier/index.html b/p5js/NeuralNetwork/NeuralNetwork_color_classifier/index.html index ee3c511a..c0652847 100644 --- a/p5js/NeuralNetwork/NeuralNetwork_color_classifier/index.html +++ b/p5js/NeuralNetwork/NeuralNetwork_color_classifier/index.html @@ -6,7 +6,7 @@ - + diff --git a/p5js/NeuralNetwork/NeuralNetwork_load_model/index.html b/p5js/NeuralNetwork/NeuralNetwork_load_model/index.html index ee3c511a..c0652847 100644 --- a/p5js/NeuralNetwork/NeuralNetwork_load_model/index.html +++ b/p5js/NeuralNetwork/NeuralNetwork_load_model/index.html @@ -6,7 +6,7 @@ - + diff --git a/p5js/NeuralNetwork/NeuralNetwork_load_saved_data/index.html b/p5js/NeuralNetwork/NeuralNetwork_load_saved_data/index.html index 21dd7376..25e015ce 100755 --- a/p5js/NeuralNetwork/NeuralNetwork_load_saved_data/index.html +++ b/p5js/NeuralNetwork/NeuralNetwork_load_saved_data/index.html @@ -6,7 +6,7 @@ - + @@ -14,7 +14,7 @@

Neural Network

Step 1: load data

- +

Step 2: train the model

Step 3: see the label change as you move across the canvas

diff --git a/p5js/NeuralNetwork/NeuralNetwork_lowres_pixels/index.html b/p5js/NeuralNetwork/NeuralNetwork_lowres_pixels/index.html index af14f4d4..dc7233c1 100755 --- a/p5js/NeuralNetwork/NeuralNetwork_lowres_pixels/index.html +++ b/p5js/NeuralNetwork/NeuralNetwork_lowres_pixels/index.html @@ -7,7 +7,7 @@ - + @@ -15,7 +15,7 @@

Pixel Prediction

- Training frequency: + Training frequency:

diff --git a/p5js/NeuralNetwork/NeuralNetwork_multiple-layers/index.html b/p5js/NeuralNetwork/NeuralNetwork_multiple-layers/index.html index 5ef9bcb2..91429d87 100644 --- a/p5js/NeuralNetwork/NeuralNetwork_multiple-layers/index.html +++ b/p5js/NeuralNetwork/NeuralNetwork_multiple-layers/index.html @@ -7,7 +7,7 @@ - + diff --git a/p5js/NeuralNetwork/NeuralNetwork_musical_face/index.html b/p5js/NeuralNetwork/NeuralNetwork_musical_face/index.html index a21135a9..4ebb72c2 100755 --- a/p5js/NeuralNetwork/NeuralNetwork_musical_face/index.html +++ b/p5js/NeuralNetwork/NeuralNetwork_musical_face/index.html @@ -7,7 +7,7 @@ - + @@ -16,7 +16,7 @@

Face Prediction

Training frequency: 440 - +

diff --git a/p5js/NeuralNetwork/NeuralNetwork_musical_mouse/index.html b/p5js/NeuralNetwork/NeuralNetwork_musical_mouse/index.html index 88618c38..8f13af41 100755 --- a/p5js/NeuralNetwork/NeuralNetwork_musical_mouse/index.html +++ b/p5js/NeuralNetwork/NeuralNetwork_musical_mouse/index.html @@ -7,7 +7,7 @@ - + @@ -15,7 +15,7 @@

Neural Network Musical Mouse

- Training frequency: + Training frequency:

diff --git a/p5js/NeuralNetwork/NeuralNetwork_pose_classifier/index.html b/p5js/NeuralNetwork/NeuralNetwork_pose_classifier/index.html index 402faa1d..5e323e0b 100755 --- a/p5js/NeuralNetwork/NeuralNetwork_pose_classifier/index.html +++ b/p5js/NeuralNetwork/NeuralNetwork_pose_classifier/index.html @@ -6,7 +6,7 @@ - + diff --git a/p5js/NeuralNetwork/NeuralNetwork_titanic/index.html b/p5js/NeuralNetwork/NeuralNetwork_titanic/index.html index 20f73d99..99143bc7 100644 --- a/p5js/NeuralNetwork/NeuralNetwork_titanic/index.html +++ b/p5js/NeuralNetwork/NeuralNetwork_titanic/index.html @@ -6,7 +6,7 @@ - + @@ -15,10 +15,10 @@

Titanic - Neural Network

- age:
- fare:
- fare_class:
- sex:
+ age:
+ fare:
+ fare_class:
+ sex:

diff --git a/p5js/NeuralNetwork/NeuralNetwork_xy_classifier/index.html b/p5js/NeuralNetwork/NeuralNetwork_xy_classifier/index.html index 0860717e..e8822d22 100755 --- a/p5js/NeuralNetwork/NeuralNetwork_xy_classifier/index.html +++ b/p5js/NeuralNetwork/NeuralNetwork_xy_classifier/index.html @@ -7,7 +7,7 @@ - + diff --git a/p5js/PitchDetection/PitchDetection/index.html b/p5js/PitchDetection/PitchDetection/index.html index 532c76ba..7bcdffee 100644 --- a/p5js/PitchDetection/PitchDetection/index.html +++ b/p5js/PitchDetection/PitchDetection/index.html @@ -7,7 +7,7 @@ - + diff --git a/p5js/PitchDetection/PitchDetection_Game/index.html b/p5js/PitchDetection/PitchDetection_Game/index.html index 1f34de95..ed2b6e79 100644 --- a/p5js/PitchDetection/PitchDetection_Game/index.html +++ b/p5js/PitchDetection/PitchDetection_Game/index.html @@ -7,7 +7,7 @@ - + diff --git a/p5js/PitchDetection/PitchDetection_Piano/index.html b/p5js/PitchDetection/PitchDetection_Piano/index.html index 62132525..d2f02b2a 100644 --- a/p5js/PitchDetection/PitchDetection_Piano/index.html +++ b/p5js/PitchDetection/PitchDetection_Piano/index.html @@ -7,7 +7,7 @@ - + diff --git a/p5js/Pix2Pix/Pix2Pix_callback/index.html b/p5js/Pix2Pix/Pix2Pix_callback/index.html index 60813091..4e85720a 100644 --- a/p5js/Pix2Pix/Pix2Pix_callback/index.html +++ b/p5js/Pix2Pix/Pix2Pix_callback/index.html @@ -6,7 +6,7 @@ - + diff --git a/p5js/Pix2Pix/Pix2Pix_promise/index.html b/p5js/Pix2Pix/Pix2Pix_promise/index.html index 35da6008..b4306dd0 100644 --- a/p5js/Pix2Pix/Pix2Pix_promise/index.html +++ b/p5js/Pix2Pix/Pix2Pix_promise/index.html @@ -6,7 +6,7 @@ - + diff --git a/p5js/PoseNet/PoseNet_image_single/index.html b/p5js/PoseNet/PoseNet_image_single/index.html index 952f9ecb..9c761391 100644 --- a/p5js/PoseNet/PoseNet_image_single/index.html +++ b/p5js/PoseNet/PoseNet_image_single/index.html @@ -6,7 +6,7 @@ - + diff --git a/p5js/PoseNet/PoseNet_part_selection/index.html b/p5js/PoseNet/PoseNet_part_selection/index.html index 65cd89ba..6b330e0b 100755 --- a/p5js/PoseNet/PoseNet_part_selection/index.html +++ b/p5js/PoseNet/PoseNet_part_selection/index.html @@ -7,7 +7,7 @@ - + diff --git a/p5js/PoseNet/PoseNet_webcam/index.html b/p5js/PoseNet/PoseNet_webcam/index.html index b4b3b2fa..341cab28 100755 --- a/p5js/PoseNet/PoseNet_webcam/index.html +++ b/p5js/PoseNet/PoseNet_webcam/index.html @@ -6,7 +6,7 @@ - + diff --git a/p5js/Sentiment/Sentiment_Interactive/index.html b/p5js/Sentiment/Sentiment_Interactive/index.html index 3ebab2a2..f2f1e261 100644 --- a/p5js/Sentiment/Sentiment_Interactive/index.html +++ b/p5js/Sentiment/Sentiment_Interactive/index.html @@ -3,7 +3,7 @@ ml5 - Sentiment - + diff --git a/p5js/SketchRNN/SketchRNN_basic/index.html b/p5js/SketchRNN/SketchRNN_basic/index.html index 9fdf800b..b68fd074 100644 --- a/p5js/SketchRNN/SketchRNN_basic/index.html +++ b/p5js/SketchRNN/SketchRNN_basic/index.html @@ -5,7 +5,7 @@ - + diff --git a/p5js/SketchRNN/SketchRNN_interactive/index.html b/p5js/SketchRNN/SketchRNN_interactive/index.html index 286be2c4..8f75eefc 100644 --- a/p5js/SketchRNN/SketchRNN_interactive/index.html +++ b/p5js/SketchRNN/SketchRNN_interactive/index.html @@ -5,7 +5,7 @@ - + diff --git a/p5js/SoundClassification/SoundClassification_speechcommand/index.html b/p5js/SoundClassification/SoundClassification_speechcommand/index.html index 526ee91b..96f0e6f6 100755 --- a/p5js/SoundClassification/SoundClassification_speechcommand/index.html +++ b/p5js/SoundClassification/SoundClassification_speechcommand/index.html @@ -6,7 +6,7 @@ - + diff --git a/p5js/SoundClassification/SoundClassification_speechcommand_load/index.html b/p5js/SoundClassification/SoundClassification_speechcommand_load/index.html index ac4f8bd3..f09c699e 100755 --- a/p5js/SoundClassification/SoundClassification_speechcommand_load/index.html +++ b/p5js/SoundClassification/SoundClassification_speechcommand_load/index.html @@ -6,7 +6,7 @@ - + diff --git a/p5js/StyleTransfer/StyleTransfer_Image/index.html b/p5js/StyleTransfer/StyleTransfer_Image/index.html index 70a53f6c..9c1ee90a 100644 --- a/p5js/StyleTransfer/StyleTransfer_Image/index.html +++ b/p5js/StyleTransfer/StyleTransfer_Image/index.html @@ -6,7 +6,7 @@ - + @@ -17,16 +17,16 @@

Style Transfer Image Example using p5.js

Loading Models...

Input Image:

- input img + input img diff --git a/p5js/StyleTransfer/StyleTransfer_Video/index.html b/p5js/StyleTransfer/StyleTransfer_Video/index.html index 4377290e..102c0340 100644 --- a/p5js/StyleTransfer/StyleTransfer_Video/index.html +++ b/p5js/StyleTransfer/StyleTransfer_Video/index.html @@ -5,7 +5,7 @@ - + @@ -16,7 +16,7 @@

Style Transfer Mirror Example using p5.js

Sytle: Udnie (Young American Girl, The Dance), 1913 - Francis Picabia

Loading model...

- +

diff --git a/p5js/TeachableMachine/ImageModel_TM/index.html b/p5js/TeachableMachine/ImageModel_TM/index.html new file mode 100644 index 00000000..da58c8eb --- /dev/null +++ b/p5js/TeachableMachine/ImageModel_TM/index.html @@ -0,0 +1,19 @@ + + + + + Webcam Image Classification using a pre-trained customized model and p5.js + + + + + + +

Teachable Machine

+

This is a demonstration of image classification using a model trained with Google's Teachable + Machine project. If you cover the camera, this model will classify the image as "nighttime," otherwise will classify + anything else as "daytime."

+ + + + \ No newline at end of file diff --git a/p5js/TeachableMachine/ImageModel_TM/sketch.js b/p5js/TeachableMachine/ImageModel_TM/sketch.js new file mode 100644 index 00000000..c4f2cff1 --- /dev/null +++ b/p5js/TeachableMachine/ImageModel_TM/sketch.js @@ -0,0 +1,70 @@ +// Copyright (c) 2019 ml5 +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +/* === +ml5 Example +Webcam Image Classification using a pre-trained customized model and p5.js +This example uses p5 preload function to create the classifier +=== */ + +// Classifier Variable +let classifier; +// Model URL +let imageModelURL = 'https://storage.googleapis.com/teachable-machine-pubilshed-models/fa542ec0-b94b-4aa9-add4-c256963b0720/model.json'; + +// Video +let video; +let flippedVideo; +// To store the classification +let label = ""; + +// Load the model first +function preload() { + classifier = ml5.imageClassifier(imageModelURL); +} + +function setup() { + createCanvas(320, 260); + // Create the video + video = createCapture(VIDEO); + video.size(320, 240); + video.hide(); + + flippedVideo = ml5.flipImage(video) + // Start classifying + classifyVideo(); +} + +function draw() { + background(0); + // Draw the video + image(flippedVideo, 0, 0); + + // Draw the label + fill(255); + textSize(16); + textAlign(CENTER); + text(label, width / 2, height - 4); +} + +// Get a prediction for the current video frame +function classifyVideo() { + flippedVideo = ml5.flipImage(video) + classifier.classify(flippedVideo, gotResult); +} + +// When we get a result +function gotResult(error, results) { + // If there is an error + if (error) { + console.error(error); + return; + } + // The results are in an array ordered by confidence. + // console.log(results[0]); + label = results[0].label; + // Classifiy again! + classifyVideo(); +} \ No newline at end of file diff --git a/p5js/TeachableMachine/SoundModel_TM/index.html b/p5js/TeachableMachine/SoundModel_TM/index.html new file mode 100644 index 00000000..636443ad --- /dev/null +++ b/p5js/TeachableMachine/SoundModel_TM/index.html @@ -0,0 +1,19 @@ + + + + + Webcam Image Classification using a pre-trained customized model and p5.js + + + + + + +

Teachable Machine

+

This is a demonstration of sound classification using a model trained with Google's Teachable Machine project. If + you clap, this model will classify the sound as "clap." (Until a clap is detected the canvas displays "listening.") +

+ + + + \ No newline at end of file diff --git a/p5js/TeachableMachine/SoundModel_TM/sketch.js b/p5js/TeachableMachine/SoundModel_TM/sketch.js new file mode 100644 index 00000000..50a365c5 --- /dev/null +++ b/p5js/TeachableMachine/SoundModel_TM/sketch.js @@ -0,0 +1,53 @@ +// Copyright (c) 2019 ml5 +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +/* === +ml5 Example +Webcam Image Classification using a pre-trained customized model and p5.js +This example uses p5 preload function to create the classifier +=== */ + +// Global variable to store the classifier +let classifier; + +// Label (start by showing listening) +let label = "listening"; + +// Teachable Machine model URL: +let soundModelURL = 'https://storage.googleapis.com/tm-speech-commands/eye-test-sound-yining/model.json'; + + +function preload() { + // Load the model + classifier = ml5.soundClassifier(soundModelURL); +} + +function setup() { + createCanvas(320, 240); + // Start classifying + // The sound model will continuously listen to the microphone + classifier.classify(gotResult); +} + +function draw() { + background(0); + // Draw the label in the canvas + fill(255); + textSize(32); + textAlign(CENTER, CENTER); + text(label, width / 2, height / 2); +} + + +// The model recognizing a sound will trigger this event +function gotResult(error, results) { + if (error) { + console.error(error); + return; + } + // The results are in an array ordered by confidence. + // console.log(results[0]); + label = results[0].label; +} \ No newline at end of file diff --git a/p5js/UNET/UNET_webcam/index.html b/p5js/UNET/UNET_webcam/index.html index 60218500..6456650e 100755 --- a/p5js/UNET/UNET_webcam/index.html +++ b/p5js/UNET/UNET_webcam/index.html @@ -4,7 +4,7 @@ UNET example with p5.js - + diff --git a/p5js/Word2Vec/Word2Vec_Interactive/index.html b/p5js/Word2Vec/Word2Vec_Interactive/index.html index c01e582e..3992eb2e 100755 --- a/p5js/Word2Vec/Word2Vec_Interactive/index.html +++ b/p5js/Word2Vec/Word2Vec_Interactive/index.html @@ -8,7 +8,7 @@ - + @@ -20,7 +20,7 @@

Word2Vec example with p5.js. Using a pre-trained model on common English wor

- +

@@ -29,8 +29,8 @@

Word2Vec example with p5.js. Using a pre-trained model on common English wor

Between - and - + and +

@@ -38,9 +38,9 @@

Word2Vec example with p5.js. Using a pre-trained model on common English wor

- is to - as - + is to + as +

diff --git a/p5js/YOLO/YOLO_single_image/index.html b/p5js/YOLO/YOLO_single_image/index.html index 6d7d1f35..6d37271f 100644 --- a/p5js/YOLO/YOLO_single_image/index.html +++ b/p5js/YOLO/YOLO_single_image/index.html @@ -9,7 +9,7 @@ - + diff --git a/p5js/YOLO/YOLO_webcam/index.html b/p5js/YOLO/YOLO_webcam/index.html index ef10804a..c246ca61 100644 --- a/p5js/YOLO/YOLO_webcam/index.html +++ b/p5js/YOLO/YOLO_webcam/index.html @@ -7,7 +7,7 @@ - + diff --git a/package.json b/package.json index 82cde6a0..7f9d1b39 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ml5-examples", - "version": "0.4.0", + "version": "0.4.1", "description": "ml5-examples repo", "main": "index.js", "scripts": { @@ -8,7 +8,8 @@ "test": "echo \"Error: no test specified\" && exit 1", "update:ml5": "node scripts/update-ml5-reference.js", "update:ml5-dev": "NODE_ENV=dev node scripts/update-ml5-reference.js", - "create:example-index": "node scripts/create-examples-index.js" + "create:example-index": "node scripts/create-examples-index.js", + "merge:release:ours": "git merge --strategy-option ours release" }, "repository": { "type": "git", diff --git a/public/index.html b/public/index.html index 7929ddda..1d010f81 100644 --- a/public/index.html +++ b/public/index.html @@ -8,13 +8,13 @@ > - +

ml5 examples

Index page for ml5 examples.

- +
\ No newline at end of file