Skip to content

Commit 8072828

Browse files
committed
1. Move string resouce from source code to json.
2. Add CIFAR-100 dataset
1 parent 0d630dd commit 8072828

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1386
-564
lines changed

README.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,22 @@
22

33
This is a client web application to demonstrate a simple deployment of a classification network using tensorflow.js
44
<br />
5-
currently testing handwriting-number and photograpy possible
5+
currently test available on model trained by MNIST, CIFAR-100 and ImageNet.
6+
<br />
7+
<br />
8+
always welcome to issue & PR to fix the awkward and wrong parts of the text and complement for the lack of content.
9+
<br />
10+
edit the value of the html-key in /frontend/src/assets/strings/*.json.
11+
<br />
12+
String elements in the array are combined with line breaks and can contain html tags within the string.
13+
<br />
14+
<br />
15+
본문 중 어색한 부분, 잘못된 부분에 대한 내용 수정과 부족한 내용 보충을 위한 issue & PR은 언제나 환영입니다.
16+
<br />
17+
/frontend/src/assets/strings/*.json의 html-key의 value를 편집하면 됩니다.
18+
<br />
19+
배열의 문자열 엘리먼트들은 줄바꿈으로 결합되며 문자열안에 html 태그를 포함 할 수 있습니다.
20+
621

722
## Demo
823
you can online demo in [https://whwnsdlr1.github.io/tensorflow.js-classification-example](https://whwnsdlr1.github.io/tensorflow.js-classification-example).
@@ -12,13 +27,14 @@ or
1227
install project as below
1328
```
1429
git clone https://github.com/whwnsdlr1/tensorflow.js-classification-example
30+
cd tensorflow.js-classification-example/frontend
1531
yarn install
1632
yarn run serve
1733
```
1834
and access to http://localhost:port/tensorflow.js-classification-example
1935

2036
## Usage
21-
1. draw or upload image
37+
1. draw or upload image.
2238
2. run !
2339

2440
## Browser support - (tested)
@@ -47,5 +63,12 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
4763
- babel-eslint
4864
- eslint
4965
- eslint-plugin-vue
50-
- sitemap-webpack-plugin
51-
- vue-template-compiler
66+
- vue-template-compiler
67+
68+
## used sources
69+
### dataset
70+
- [MNIST](http://yann.lecun.com/exdb/mnist/)
71+
- [CIFAR](https://www.cs.toronto.edu/~kriz/cifar.html)
72+
- [ImageNet](http://www.image-net.org/)
73+
### images
74+
- [https://wikimedia.org/api/rest_v1/media/math/render/svg/bdc1f8eaa8064d15893f1ba6426f20ff8e7149c5](https://wikimedia.org/api/rest_v1/media/math/render/svg/bdc1f8eaa8064d15893f1ba6426f20ff8e7149c5)

docs/cifar/cifar.png

87.2 KB
Loading

docs/cifar/group1-shard1of1.bin

1.01 MB
Binary file not shown.

docs/cifar/model.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"format": "layers-model", "generatedBy": "keras v2.2.4-tf", "convertedBy": "TensorFlow.js Converter v1.3.1", "modelTopology": {"keras_version": "2.2.4-tf", "backend": "tensorflow", "model_config": {"class_name": "Model", "config": {"name": "CIFAR", "layers": [{"name": "0", "class_name": "InputLayer", "config": {"batch_input_shape": [null, 32, 32, 3], "dtype": "float32", "sparse": false, "name": "0"}, "inbound_nodes": []}, {"name": "1", "class_name": "Conv2D", "config": {"name": "1", "trainable": true, "dtype": "float32", "filters": 16, "kernel_size": [1, 1], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 2.0, "mode": "fan_in", "distribution": "truncated_normal", "seed": null, "dtype": "float32"}}, "bias_initializer": {"class_name": "Zeros", "config": {"dtype": "float32"}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["0", 0, 0, {}]]]}, {"name": "2", "class_name": "LeakyReLU", "config": {"name": "2", "trainable": true, "dtype": "float32", "alpha": 0.30000001192092896}, "inbound_nodes": [[["1", 0, 0, {}]]]}, {"name": "3", "class_name": "Conv2D", "config": {"name": "3", "trainable": true, "dtype": "float32", "filters": 16, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 2.0, "mode": "fan_in", "distribution": "truncated_normal", "seed": null, "dtype": "float32"}}, "bias_initializer": {"class_name": "Zeros", "config": {"dtype": "float32"}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["2", 0, 0, {}]]]}, {"name": "4", "class_name": "LeakyReLU", "config": {"name": "4", "trainable": true, "dtype": "float32", "alpha": 0.30000001192092896}, "inbound_nodes": [[["3", 0, 0, {}]]]}, {"name": "5", "class_name": "Conv2D", "config": {"name": "5", "trainable": true, "dtype": "float32", "filters": 64, "kernel_size": [1, 1], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 2.0, "mode": "fan_in", "distribution": "truncated_normal", "seed": null, "dtype": "float32"}}, "bias_initializer": {"class_name": "Zeros", "config": {"dtype": "float32"}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["4", 0, 0, {}]]]}, {"name": "6", "class_name": "LeakyReLU", "config": {"name": "6", "trainable": true, "dtype": "float32", "alpha": 0.30000001192092896}, "inbound_nodes": [[["5", 0, 0, {}]]]}, {"name": "7", "class_name": "MaxPooling2D", "config": {"name": "7", "trainable": true, "dtype": "float32", "pool_size": [2, 2], "padding": "valid", "strides": [2, 2], "data_format": "channels_last"}, "inbound_nodes": [[["6", 0, 0, {}]]]}, {"name": "8", "class_name": "Conv2D", "config": {"name": "8", "trainable": true, "dtype": "float32", "filters": 32, "kernel_size": [1, 1], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 2.0, "mode": "fan_in", "distribution": "truncated_normal", "seed": null, "dtype": "float32"}}, "bias_initializer": {"class_name": "Zeros", "config": {"dtype": "float32"}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["7", 0, 0, {}]]]}, {"name": "9", "class_name": "LeakyReLU", "config": {"name": "9", "trainable": true, "dtype": "float32", "alpha": 0.30000001192092896}, "inbound_nodes": [[["8", 0, 0, {}]]]}, {"name": "10", "class_name": "Conv2D", "config": {"name": "10", "trainable": true, "dtype": "float32", "filters": 32, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 2.0, "mode": "fan_in", "distribution": "truncated_normal", "seed": null, "dtype": "float32"}}, "bias_initializer": {"class_name": "Zeros", "config": {"dtype": "float32"}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["9", 0, 0, {}]]]}, {"name": "11", "class_name": "LeakyReLU", "config": {"name": "11", "trainable": true, "dtype": "float32", "alpha": 0.30000001192092896}, "inbound_nodes": [[["10", 0, 0, {}]]]}, {"name": "12", "class_name": "Conv2D", "config": {"name": "12", "trainable": true, "dtype": "float32", "filters": 128, "kernel_size": [1, 1], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 2.0, "mode": "fan_in", "distribution": "truncated_normal", "seed": null, "dtype": "float32"}}, "bias_initializer": {"class_name": "Zeros", "config": {"dtype": "float32"}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["11", 0, 0, {}]]]}, {"name": "13", "class_name": "LeakyReLU", "config": {"name": "13", "trainable": true, "dtype": "float32", "alpha": 0.30000001192092896}, "inbound_nodes": [[["12", 0, 0, {}]]]}, {"name": "14", "class_name": "MaxPooling2D", "config": {"name": "14", "trainable": true, "dtype": "float32", "pool_size": [2, 2], "padding": "valid", "strides": [2, 2], "data_format": "channels_last"}, "inbound_nodes": [[["13", 0, 0, {}]]]}, {"name": "15", "class_name": "Conv2D", "config": {"name": "15", "trainable": true, "dtype": "float32", "filters": 64, "kernel_size": [1, 1], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 2.0, "mode": "fan_in", "distribution": "truncated_normal", "seed": null, "dtype": "float32"}}, "bias_initializer": {"class_name": "Zeros", "config": {"dtype": "float32"}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["14", 0, 0, {}]]]}, {"name": "16", "class_name": "LeakyReLU", "config": {"name": "16", "trainable": true, "dtype": "float32", "alpha": 0.30000001192092896}, "inbound_nodes": [[["15", 0, 0, {}]]]}, {"name": "17", "class_name": "Conv2D", "config": {"name": "17", "trainable": true, "dtype": "float32", "filters": 64, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 2.0, "mode": "fan_in", "distribution": "truncated_normal", "seed": null, "dtype": "float32"}}, "bias_initializer": {"class_name": "Zeros", "config": {"dtype": "float32"}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["16", 0, 0, {}]]]}, {"name": "18", "class_name": "LeakyReLU", "config": {"name": "18", "trainable": true, "dtype": "float32", "alpha": 0.30000001192092896}, "inbound_nodes": [[["17", 0, 0, {}]]]}, {"name": "19", "class_name": "Conv2D", "config": {"name": "19", "trainable": true, "dtype": "float32", "filters": 256, "kernel_size": [1, 1], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 2.0, "mode": "fan_in", "distribution": "truncated_normal", "seed": null, "dtype": "float32"}}, "bias_initializer": {"class_name": "Zeros", "config": {"dtype": "float32"}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["18", 0, 0, {}]]]}, {"name": "20", "class_name": "LeakyReLU", "config": {"name": "20", "trainable": true, "dtype": "float32", "alpha": 0.30000001192092896}, "inbound_nodes": [[["19", 0, 0, {}]]]}, {"name": "21", "class_name": "AveragePooling2D", "config": {"name": "21", "trainable": true, "dtype": "float32", "pool_size": [8, 8], "padding": "valid", "strides": [8, 8], "data_format": "channels_last"}, "inbound_nodes": [[["20", 0, 0, {}]]]}, {"name": "22", "class_name": "Flatten", "config": {"name": "22", "trainable": true, "dtype": "float32", "data_format": "channels_last"}, "inbound_nodes": [[["21", 0, 0, {}]]]}, {"name": "23", "class_name": "Dropout", "config": {"name": "23", "trainable": true, "dtype": "float32", "rate": 0.5, "noise_shape": null, "seed": null}, "inbound_nodes": [[["22", 0, 0, {}]]]}, {"name": "24", "class_name": "Dense", "config": {"name": "24", "trainable": true, "dtype": "float32", "units": 512, "activation": "relu", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 2.0, "mode": "fan_in", "distribution": "truncated_normal", "seed": null, "dtype": "float32"}}, "bias_initializer": {"class_name": "Zeros", "config": {"dtype": "float32"}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["23", 0, 0, {}]]]}, {"name": "25", "class_name": "Dense", "config": {"name": "25", "trainable": true, "dtype": "float32", "units": 100, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 2.0, "mode": "fan_in", "distribution": "truncated_normal", "seed": null, "dtype": "float32"}}, "bias_initializer": {"class_name": "Zeros", "config": {"dtype": "float32"}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["24", 0, 0, {}]]]}], "input_layers": [["0", 0, 0]], "output_layers": [["25", 0, 0]]}}, "training_config": {"optimizer_config": {"class_name": "SGD", "config": {"name": "SGD", "learning_rate": 0.0010000000474974513, "decay": 0.0, "momentum": 0.8999999761581421, "nesterov": true}}, "loss": "sparse_categorical_crossentropy", "metrics": ["accuracy"], "weighted_metrics": null, "sample_weight_mode": null, "loss_weights": null}}, "weightsManifest": [{"paths": ["group1-shard1of1.bin"], "weights": [{"name": "1/kernel", "shape": [1, 1, 3, 16], "dtype": "float32"}, {"name": "1/bias", "shape": [16], "dtype": "float32"}, {"name": "10/kernel", "shape": [3, 3, 32, 32], "dtype": "float32"}, {"name": "10/bias", "shape": [32], "dtype": "float32"}, {"name": "12/kernel", "shape": [1, 1, 32, 128], "dtype": "float32"}, {"name": "12/bias", "shape": [128], "dtype": "float32"}, {"name": "15/kernel", "shape": [1, 1, 128, 64], "dtype": "float32"}, {"name": "15/bias", "shape": [64], "dtype": "float32"}, {"name": "17/kernel", "shape": [3, 3, 64, 64], "dtype": "float32"}, {"name": "17/bias", "shape": [64], "dtype": "float32"}, {"name": "19/kernel", "shape": [1, 1, 64, 256], "dtype": "float32"}, {"name": "19/bias", "shape": [256], "dtype": "float32"}, {"name": "24/kernel", "shape": [256, 512], "dtype": "float32"}, {"name": "24/bias", "shape": [512], "dtype": "float32"}, {"name": "25/kernel", "shape": [512, 100], "dtype": "float32"}, {"name": "25/bias", "shape": [100], "dtype": "float32"}, {"name": "3/kernel", "shape": [3, 3, 16, 16], "dtype": "float32"}, {"name": "3/bias", "shape": [16], "dtype": "float32"}, {"name": "5/kernel", "shape": [1, 1, 16, 64], "dtype": "float32"}, {"name": "5/bias", "shape": [64], "dtype": "float32"}, {"name": "8/kernel", "shape": [1, 1, 64, 32], "dtype": "float32"}, {"name": "8/bias", "shape": [32], "dtype": "float32"}]}]}

0 commit comments

Comments
 (0)