Make your own "Teachable Machine" using Transfer Learning with MobileNet v3 in TensorFlow.js using saved graph model from TFHub.

MobileNet v2 loaded successfully!

  1. First enable webcam and allow access when asked.
  2. Now find an object, point cam at it, click and hold gather class 1 data button to gather at least 30 samples.
  3. Repeat for class 2 with a different object of interest. Get similar number of samples.
  4. Click train and predict and wait while the model is trained live in your browser. No data is sent to server.
  5. Once trained you will see live predictions appear above the video for what it thinks it sees.

__________________________________________________________________________________________________

Layer (type) Output shape Param # Receives inputs

==================================================================================================

input_2 (InputLayer) [null,224,224,3] 0

__________________________________________________________________________________________________

Conv1 (Conv2D) [null,112,112,32] 864 input_2[0][0]

__________________________________________________________________________________________________

bn_Conv1 (BatchNormalization) [null,112,112,32] 128 Conv1[0][0]

__________________________________________________________________________________________________

Conv1_relu (ReLU) [null,112,112,32] 0 bn_Conv1[0][0]

__________________________________________________________________________________________________

expanded_conv_depthwise (Depthw [null,112,112,32] 288 Conv1_relu[0][0]

__________________________________________________________________________________________________

expanded_conv_depthwise_BN (Bat [null,112,112,32] 128 expanded_conv_depthwise[0][0]

__________________________________________________________________________________________________

expanded_conv_depthwise_relu (R [null,112,112,32] 0 expanded_conv_depthwise_BN[0][0]

__________________________________________________________________________________________________

expanded_conv_project (Conv2D) [null,112,112,16] 512 expanded_conv_depthwise_relu[0][0

__________________________________________________________________________________________________

expanded_conv_project_BN (Batch [null,112,112,16] 64 expanded_conv_project[0][0]

__________________________________________________________________________________________________

block_1_expand (Conv2D) [null,112,112,96] 1536 expanded_conv_project_BN[0][0]

__________________________________________________________________________________________________

block_1_expand_BN (BatchNormali [null,112,112,96] 384 block_1_expand[0][0]

__________________________________________________________________________________________________

block_1_expand_relu (ReLU) [null,112,112,96] 0 block_1_expand_BN[0][0]

__________________________________________________________________________________________________

block_1_pad (ZeroPadding2D) [null,113,113,96] 0 block_1_expand_relu[0][0]

__________________________________________________________________________________________________

block_1_depthwise (DepthwiseCon [null,56,56,96] 864 block_1_pad[0][0]

__________________________________________________________________________________________________

block_1_depthwise_BN (BatchNorm [null,56,56,96] 384 block_1_depthwise[0][0]

__________________________________________________________________________________________________

block_1_depthwise_relu (ReLU) [null,56,56,96] 0 block_1_depthwise_BN[0][0]

__________________________________________________________________________________________________

block_1_project (Conv2D) [null,56,56,24] 2304 block_1_depthwise_relu[0][0]

__________________________________________________________________________________________________

block_1_project_BN (BatchNormal [null,56,56,24] 96 block_1_project[0][0]

__________________________________________________________________________________________________

block_2_expand (Conv2D) [null,56,56,144] 3456 block_1_project_BN[0][0]

__________________________________________________________________________________________________

block_2_expand_BN (BatchNormali [null,56,56,144] 576 block_2_expand[0][0]

__________________________________________________________________________________________________

block_2_expand_relu (ReLU) [null,56,56,144] 0 block_2_expand_BN[0][0]

__________________________________________________________________________________________________

block_2_depthwise (DepthwiseCon [null,56,56,144] 1296 block_2_expand_relu[0][0]

__________________________________________________________________________________________________

block_2_depthwise_BN (BatchNorm [null,56,56,144] 576 block_2_depthwise[0][0]

__________________________________________________________________________________________________

block_2_depthwise_relu (ReLU) [null,56,56,144] 0 block_2_depthwise_BN[0][0]

__________________________________________________________________________________________________

block_2_project (Conv2D) [null,56,56,24] 3456 block_2_depthwise_relu[0][0]

__________________________________________________________________________________________________

block_2_project_BN (BatchNormal [null,56,56,24] 96 block_2_project[0][0]

__________________________________________________________________________________________________

block_2_add (Add) [null,56,56,24] 0 block_1_project_BN[0][0]

block_2_project_BN[0][0]

__________________________________________________________________________________________________

block_3_expand (Conv2D) [null,56,56,144] 3456 block_2_add[0][0]

__________________________________________________________________________________________________

block_3_expand_BN (BatchNormali [null,56,56,144] 576 block_3_expand[0][0]

__________________________________________________________________________________________________

block_3_expand_relu (ReLU) [null,56,56,144] 0 block_3_expand_BN[0][0]

__________________________________________________________________________________________________

block_3_pad (ZeroPadding2D) [null,57,57,144] 0 block_3_expand_relu[0][0]

__________________________________________________________________________________________________

block_3_depthwise (DepthwiseCon [null,28,28,144] 1296 block_3_pad[0][0]

__________________________________________________________________________________________________

block_3_depthwise_BN (BatchNorm [null,28,28,144] 576 block_3_depthwise[0][0]

__________________________________________________________________________________________________

block_3_depthwise_relu (ReLU) [null,28,28,144] 0 block_3_depthwise_BN[0][0]

__________________________________________________________________________________________________

block_3_project (Conv2D) [null,28,28,32] 4608 block_3_depthwise_relu[0][0]

__________________________________________________________________________________________________

block_3_project_BN (BatchNormal [null,28,28,32] 128 block_3_project[0][0]

__________________________________________________________________________________________________

block_4_expand (Conv2D) [null,28,28,192] 6144 block_3_project_BN[0][0]

__________________________________________________________________________________________________

block_4_expand_BN (BatchNormali [null,28,28,192] 768 block_4_expand[0][0]

__________________________________________________________________________________________________

block_4_expand_relu (ReLU) [null,28,28,192] 0 block_4_expand_BN[0][0]

__________________________________________________________________________________________________

block_4_depthwise (DepthwiseCon [null,28,28,192] 1728 block_4_expand_relu[0][0]

__________________________________________________________________________________________________

block_4_depthwise_BN (BatchNorm [null,28,28,192] 768 block_4_depthwise[0][0]

__________________________________________________________________________________________________

block_4_depthwise_relu (ReLU) [null,28,28,192] 0 block_4_depthwise_BN[0][0]

__________________________________________________________________________________________________

block_4_project (Conv2D) [null,28,28,32] 6144 block_4_depthwise_relu[0][0]

__________________________________________________________________________________________________

block_4_project_BN (BatchNormal [null,28,28,32] 128 block_4_project[0][0]

__________________________________________________________________________________________________

block_4_add (Add) [null,28,28,32] 0 block_3_project_BN[0][0]

block_4_project_BN[0][0]

__________________________________________________________________________________________________

block_5_expand (Conv2D) [null,28,28,192] 6144 block_4_add[0][0]

__________________________________________________________________________________________________

block_5_expand_BN (BatchNormali [null,28,28,192] 768 block_5_expand[0][0]

__________________________________________________________________________________________________

block_5_expand_relu (ReLU) [null,28,28,192] 0 block_5_expand_BN[0][0]

__________________________________________________________________________________________________

block_5_depthwise (DepthwiseCon [null,28,28,192] 1728 block_5_expand_relu[0][0]

__________________________________________________________________________________________________

block_5_depthwise_BN (BatchNorm [null,28,28,192] 768 block_5_depthwise[0][0]

__________________________________________________________________________________________________

block_5_depthwise_relu (ReLU) [null,28,28,192] 0 block_5_depthwise_BN[0][0]

__________________________________________________________________________________________________

block_5_project (Conv2D) [null,28,28,32] 6144 block_5_depthwise_relu[0][0]

__________________________________________________________________________________________________

block_5_project_BN (BatchNormal [null,28,28,32] 128 block_5_project[0][0]

__________________________________________________________________________________________________

block_5_add (Add) [null,28,28,32] 0 block_4_add[0][0]

block_5_project_BN[0][0]

__________________________________________________________________________________________________

block_6_expand (Conv2D) [null,28,28,192] 6144 block_5_add[0][0]

__________________________________________________________________________________________________

block_6_expand_BN (BatchNormali [null,28,28,192] 768 block_6_expand[0][0]

__________________________________________________________________________________________________

block_6_expand_relu (ReLU) [null,28,28,192] 0 block_6_expand_BN[0][0]

__________________________________________________________________________________________________

block_6_pad (ZeroPadding2D) [null,29,29,192] 0 block_6_expand_relu[0][0]

__________________________________________________________________________________________________

block_6_depthwise (DepthwiseCon [null,14,14,192] 1728 block_6_pad[0][0]

__________________________________________________________________________________________________

block_6_depthwise_BN (BatchNorm [null,14,14,192] 768 block_6_depthwise[0][0]

__________________________________________________________________________________________________

block_6_depthwise_relu (ReLU) [null,14,14,192] 0 block_6_depthwise_BN[0][0]

__________________________________________________________________________________________________

block_6_project (Conv2D) [null,14,14,64] 12288 block_6_depthwise_relu[0][0]

__________________________________________________________________________________________________

block_6_project_BN (BatchNormal [null,14,14,64] 256 block_6_project[0][0]

__________________________________________________________________________________________________

block_7_expand (Conv2D) [null,14,14,384] 24576 block_6_project_BN[0][0]

__________________________________________________________________________________________________

block_7_expand_BN (BatchNormali [null,14,14,384] 1536 block_7_expand[0][0]

__________________________________________________________________________________________________

block_7_expand_relu (ReLU) [null,14,14,384] 0 block_7_expand_BN[0][0]

__________________________________________________________________________________________________

block_7_depthwise (DepthwiseCon [null,14,14,384] 3456 block_7_expand_relu[0][0]

__________________________________________________________________________________________________

block_7_depthwise_BN (BatchNorm [null,14,14,384] 1536 block_7_depthwise[0][0]

__________________________________________________________________________________________________

block_7_depthwise_relu (ReLU) [null,14,14,384] 0 block_7_depthwise_BN[0][0]

__________________________________________________________________________________________________

block_7_project (Conv2D) [null,14,14,64] 24576 block_7_depthwise_relu[0][0]

__________________________________________________________________________________________________

block_7_project_BN (BatchNormal [null,14,14,64] 256 block_7_project[0][0]

__________________________________________________________________________________________________

block_7_add (Add) [null,14,14,64] 0 block_6_project_BN[0][0]

block_7_project_BN[0][0]

__________________________________________________________________________________________________

block_8_expand (Conv2D) [null,14,14,384] 24576 block_7_add[0][0]

__________________________________________________________________________________________________

block_8_expand_BN (BatchNormali [null,14,14,384] 1536 block_8_expand[0][0]

__________________________________________________________________________________________________

block_8_expand_relu (ReLU) [null,14,14,384] 0 block_8_expand_BN[0][0]

__________________________________________________________________________________________________

block_8_depthwise (DepthwiseCon [null,14,14,384] 3456 block_8_expand_relu[0][0]

__________________________________________________________________________________________________

block_8_depthwise_BN (BatchNorm [null,14,14,384] 1536 block_8_depthwise[0][0]

__________________________________________________________________________________________________

block_8_depthwise_relu (ReLU) [null,14,14,384] 0 block_8_depthwise_BN[0][0]

__________________________________________________________________________________________________

block_8_project (Conv2D) [null,14,14,64] 24576 block_8_depthwise_relu[0][0]

__________________________________________________________________________________________________

block_8_project_BN (BatchNormal [null,14,14,64] 256 block_8_project[0][0]

__________________________________________________________________________________________________

block_8_add (Add) [null,14,14,64] 0 block_7_add[0][0]

block_8_project_BN[0][0]

__________________________________________________________________________________________________

block_9_expand (Conv2D) [null,14,14,384] 24576 block_8_add[0][0]

__________________________________________________________________________________________________

block_9_expand_BN (BatchNormali [null,14,14,384] 1536 block_9_expand[0][0]

__________________________________________________________________________________________________

block_9_expand_relu (ReLU) [null,14,14,384] 0 block_9_expand_BN[0][0]

__________________________________________________________________________________________________

block_9_depthwise (DepthwiseCon [null,14,14,384] 3456 block_9_expand_relu[0][0]

__________________________________________________________________________________________________

block_9_depthwise_BN (BatchNorm [null,14,14,384] 1536 block_9_depthwise[0][0]

__________________________________________________________________________________________________

block_9_depthwise_relu (ReLU) [null,14,14,384] 0 block_9_depthwise_BN[0][0]

__________________________________________________________________________________________________

block_9_project (Conv2D) [null,14,14,64] 24576 block_9_depthwise_relu[0][0]

__________________________________________________________________________________________________

block_9_project_BN (BatchNormal [null,14,14,64] 256 block_9_project[0][0]

__________________________________________________________________________________________________

block_9_add (Add) [null,14,14,64] 0 block_8_add[0][0]

block_9_project_BN[0][0]

__________________________________________________________________________________________________

block_10_expand (Conv2D) [null,14,14,384] 24576 block_9_add[0][0]

__________________________________________________________________________________________________

block_10_expand_BN (BatchNormal [null,14,14,384] 1536 block_10_expand[0][0]

__________________________________________________________________________________________________

block_10_expand_relu (ReLU) [null,14,14,384] 0 block_10_expand_BN[0][0]

__________________________________________________________________________________________________

block_10_depthwise (DepthwiseCo [null,14,14,384] 3456 block_10_expand_relu[0][0]

__________________________________________________________________________________________________

block_10_depthwise_BN (BatchNor [null,14,14,384] 1536 block_10_depthwise[0][0]

__________________________________________________________________________________________________

block_10_depthwise_relu (ReLU) [null,14,14,384] 0 block_10_depthwise_BN[0][0]

__________________________________________________________________________________________________

block_10_project (Conv2D) [null,14,14,96] 36864 block_10_depthwise_relu[0][0]

__________________________________________________________________________________________________

block_10_project_BN (BatchNorma [null,14,14,96] 384 block_10_project[0][0]

__________________________________________________________________________________________________

block_11_expand (Conv2D) [null,14,14,576] 55296 block_10_project_BN[0][0]

__________________________________________________________________________________________________

block_11_expand_BN (BatchNormal [null,14,14,576] 2304 block_11_expand[0][0]

__________________________________________________________________________________________________

block_11_expand_relu (ReLU) [null,14,14,576] 0 block_11_expand_BN[0][0]

__________________________________________________________________________________________________

block_11_depthwise (DepthwiseCo [null,14,14,576] 5184 block_11_expand_relu[0][0]

__________________________________________________________________________________________________

block_11_depthwise_BN (BatchNor [null,14,14,576] 2304 block_11_depthwise[0][0]

__________________________________________________________________________________________________

block_11_depthwise_relu (ReLU) [null,14,14,576] 0 block_11_depthwise_BN[0][0]

__________________________________________________________________________________________________

block_11_project (Conv2D) [null,14,14,96] 55296 block_11_depthwise_relu[0][0]

__________________________________________________________________________________________________

block_11_project_BN (BatchNorma [null,14,14,96] 384 block_11_project[0][0]

__________________________________________________________________________________________________

block_11_add (Add) [null,14,14,96] 0 block_10_project_BN[0][0]

block_11_project_BN[0][0]

__________________________________________________________________________________________________

block_12_expand (Conv2D) [null,14,14,576] 55296 block_11_add[0][0]

__________________________________________________________________________________________________

block_12_expand_BN (BatchNormal [null,14,14,576] 2304 block_12_expand[0][0]

__________________________________________________________________________________________________

block_12_expand_relu (ReLU) [null,14,14,576] 0 block_12_expand_BN[0][0]

__________________________________________________________________________________________________

block_12_depthwise (DepthwiseCo [null,14,14,576] 5184 block_12_expand_relu[0][0]

__________________________________________________________________________________________________

block_12_depthwise_BN (BatchNor [null,14,14,576] 2304 block_12_depthwise[0][0]

__________________________________________________________________________________________________

block_12_depthwise_relu (ReLU) [null,14,14,576] 0 block_12_depthwise_BN[0][0]

__________________________________________________________________________________________________

block_12_project (Conv2D) [null,14,14,96] 55296 block_12_depthwise_relu[0][0]

__________________________________________________________________________________________________

block_12_project_BN (BatchNorma [null,14,14,96] 384 block_12_project[0][0]

__________________________________________________________________________________________________

block_12_add (Add) [null,14,14,96] 0 block_11_add[0][0]

block_12_project_BN[0][0]

__________________________________________________________________________________________________

block_13_expand (Conv2D) [null,14,14,576] 55296 block_12_add[0][0]

__________________________________________________________________________________________________

block_13_expand_BN (BatchNormal [null,14,14,576] 2304 block_13_expand[0][0]

__________________________________________________________________________________________________

block_13_expand_relu (ReLU) [null,14,14,576] 0 block_13_expand_BN[0][0]

__________________________________________________________________________________________________

block_13_pad (ZeroPadding2D) [null,15,15,576] 0 block_13_expand_relu[0][0]

__________________________________________________________________________________________________

block_13_depthwise (DepthwiseCo [null,7,7,576] 5184 block_13_pad[0][0]

__________________________________________________________________________________________________

block_13_depthwise_BN (BatchNor [null,7,7,576] 2304 block_13_depthwise[0][0]

__________________________________________________________________________________________________

block_13_depthwise_relu (ReLU) [null,7,7,576] 0 block_13_depthwise_BN[0][0]

__________________________________________________________________________________________________

block_13_project (Conv2D) [null,7,7,160] 92160 block_13_depthwise_relu[0][0]

__________________________________________________________________________________________________

block_13_project_BN (BatchNorma [null,7,7,160] 640 block_13_project[0][0]

__________________________________________________________________________________________________

block_14_expand (Conv2D) [null,7,7,960] 153600 block_13_project_BN[0][0]

__________________________________________________________________________________________________

block_14_expand_BN (BatchNormal [null,7,7,960] 3840 block_14_expand[0][0]

__________________________________________________________________________________________________

block_14_expand_relu (ReLU) [null,7,7,960] 0 block_14_expand_BN[0][0]

__________________________________________________________________________________________________

block_14_depthwise (DepthwiseCo [null,7,7,960] 8640 block_14_expand_relu[0][0]

__________________________________________________________________________________________________

block_14_depthwise_BN (BatchNor [null,7,7,960] 3840 block_14_depthwise[0][0]

__________________________________________________________________________________________________

block_14_depthwise_relu (ReLU) [null,7,7,960] 0 block_14_depthwise_BN[0][0]

__________________________________________________________________________________________________

block_14_project (Conv2D) [null,7,7,160] 153600 block_14_depthwise_relu[0][0]

__________________________________________________________________________________________________

block_14_project_BN (BatchNorma [null,7,7,160] 640 block_14_project[0][0]

__________________________________________________________________________________________________

block_14_add (Add) [null,7,7,160] 0 block_13_project_BN[0][0]

block_14_project_BN[0][0]

__________________________________________________________________________________________________

block_15_expand (Conv2D) [null,7,7,960] 153600 block_14_add[0][0]

__________________________________________________________________________________________________

block_15_expand_BN (BatchNormal [null,7,7,960] 3840 block_15_expand[0][0]

__________________________________________________________________________________________________

block_15_expand_relu (ReLU) [null,7,7,960] 0 block_15_expand_BN[0][0]

__________________________________________________________________________________________________

block_15_depthwise (DepthwiseCo [null,7,7,960] 8640 block_15_expand_relu[0][0]

__________________________________________________________________________________________________

block_15_depthwise_BN (BatchNor [null,7,7,960] 3840 block_15_depthwise[0][0]

__________________________________________________________________________________________________

block_15_depthwise_relu (ReLU) [null,7,7,960] 0 block_15_depthwise_BN[0][0]

__________________________________________________________________________________________________

block_15_project (Conv2D) [null,7,7,160] 153600 block_15_depthwise_relu[0][0]

__________________________________________________________________________________________________

block_15_project_BN (BatchNorma [null,7,7,160] 640 block_15_project[0][0]

__________________________________________________________________________________________________

block_15_add (Add) [null,7,7,160] 0 block_14_add[0][0]

block_15_project_BN[0][0]

__________________________________________________________________________________________________

block_16_expand (Conv2D) [null,7,7,960] 153600 block_15_add[0][0]

__________________________________________________________________________________________________

block_16_expand_BN (BatchNormal [null,7,7,960] 3840 block_16_expand[0][0]

__________________________________________________________________________________________________

block_16_expand_relu (ReLU) [null,7,7,960] 0 block_16_expand_BN[0][0]

__________________________________________________________________________________________________

block_16_depthwise (DepthwiseCo [null,7,7,960] 8640 block_16_expand_relu[0][0]

__________________________________________________________________________________________________

block_16_depthwise_BN (BatchNor [null,7,7,960] 3840 block_16_depthwise[0][0]

__________________________________________________________________________________________________

block_16_depthwise_relu (ReLU) [null,7,7,960] 0 block_16_depthwise_BN[0][0]

__________________________________________________________________________________________________

block_16_project (Conv2D) [null,7,7,320] 307200 block_16_depthwise_relu[0][0]

__________________________________________________________________________________________________

block_16_project_BN (BatchNorma [null,7,7,320] 1280 block_16_project[0][0]

__________________________________________________________________________________________________

Conv_1 (Conv2D) [null,7,7,1280] 409600 block_16_project_BN[0][0]

__________________________________________________________________________________________________

Conv_1_bn (BatchNormalization) [null,7,7,1280] 5120 Conv_1[0][0]

__________________________________________________________________________________________________

out_relu (ReLU) [null,7,7,1280] 0 Conv_1_bn[0][0]

__________________________________________________________________________________________________

global_average_pooling2d_1 (Glo [null,1280] 0 out_relu[0][0]

__________________________________________________________________________________________________

predictions (Dense) [null,1000] 1281000 global_average_pooling2d_1[0][0]

==================================================================================================

Total params: 3538984

Trainable params: 3504872

Non-trainable params: 34112

__________________________________________________________________________________________________