skywrace

Merge branch 'feat/convert-keras-model-to-tensorjs-model' into 'master'

feat: Convert keras model to tensorjs model



See merge request !1
......@@ -8,9 +8,9 @@
* @format
*/
import {NativeBaseProvider} from 'native-base';
import {NativeBaseProvider, Text} from 'native-base';
import React, {useLayoutEffect} from 'react';
import {SafeAreaView} from 'react-native';
import {StyleSheet} from 'react-native';
import {Camera, useCameraDevices} from 'react-native-vision-camera';
const App = () => {
......@@ -37,9 +37,11 @@ const App = () => {
return (
<NativeBaseProvider>
<SafeAreaView>
{device && <Camera isActive device={device} />}
</SafeAreaView>
{device ? (
<Camera isActive device={device} style={StyleSheet.absoluteFill} />
) : (
<Text>Loading camera..</Text>
)}
</NativeBaseProvider>
);
};
......
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1210"
LastUpgradeVersion = "1340"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
......
No preview for this file type
No preview for this file type
{"format": "layers-model", "generatedBy": "keras v2.8.0", "convertedBy": "TensorFlow.js Converter v3.18.0", "modelTopology": {"keras_version": "2.8.0", "backend": "tensorflow", "model_config": {"class_name": "Sequential", "config": {"name": "sequential_1", "layers": [{"class_name": "InputLayer", "config": {"batch_input_shape": [null, 24, 24, 1], "dtype": "float32", "sparse": false, "ragged": false, "name": "conv2d_3_input"}}, {"class_name": "Conv2D", "config": {"name": "conv2d_3", "trainable": true, "batch_input_shape": [null, 24, 24, 1], "dtype": "float32", "filters": 32, "kernel_size": [3, 3], "strides": [1, 1], "padding": "valid", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "relu", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "MaxPooling2D", "config": {"name": "max_pooling2d_3", "trainable": true, "dtype": "float32", "pool_size": [2, 2], "padding": "valid", "strides": [1, 1], "data_format": "channels_last"}}, {"class_name": "Conv2D", "config": {"name": "conv2d_4", "trainable": true, "dtype": "float32", "filters": 32, "kernel_size": [3, 3], "strides": [1, 1], "padding": "valid", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "relu", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "MaxPooling2D", "config": {"name": "max_pooling2d_4", "trainable": true, "dtype": "float32", "pool_size": [2, 2], "padding": "valid", "strides": [1, 1], "data_format": "channels_last"}}, {"class_name": "Conv2D", "config": {"name": "conv2d_5", "trainable": true, "dtype": "float32", "filters": 64, "kernel_size": [3, 3], "strides": [1, 1], "padding": "valid", "data_format": "channels_last", "dilation_rate": [1, 1], "groups": 1, "activation": "relu", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "MaxPooling2D", "config": {"name": "max_pooling2d_5", "trainable": true, "dtype": "float32", "pool_size": [2, 2], "padding": "valid", "strides": [1, 1], "data_format": "channels_last"}}, {"class_name": "Dropout", "config": {"name": "dropout_2", "trainable": true, "dtype": "float32", "rate": 0.25, "noise_shape": null, "seed": null}}, {"class_name": "Flatten", "config": {"name": "flatten_1", "trainable": true, "dtype": "float32", "data_format": "channels_last"}}, {"class_name": "Dense", "config": {"name": "dense_2", "trainable": true, "dtype": "float32", "units": 128, "activation": "relu", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "Dropout", "config": {"name": "dropout_3", "trainable": true, "dtype": "float32", "rate": 0.5, "noise_shape": null, "seed": null}}, {"class_name": "Dense", "config": {"name": "dense_3", "trainable": true, "dtype": "float32", "units": 2, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "GlorotUniform", "config": {"seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}]}}, "training_config": {"loss": "categorical_crossentropy", "metrics": [[{"class_name": "MeanMetricWrapper", "config": {"name": "accuracy", "dtype": "float32", "fn": "categorical_accuracy"}}]], "weighted_metrics": null, "loss_weights": null, "optimizer_config": {"class_name": "Adam", "config": {"name": "Adam", "learning_rate": 0.0010000000474974513, "decay": 0.0, "beta_1": 0.8999999761581421, "beta_2": 0.9990000128746033, "epsilon": 1e-07, "amsgrad": false}}}}, "weightsManifest": [{"paths": ["group1-shard1of2.bin", "group1-shard2of2.bin"], "weights": [{"name": "conv2d_3/kernel", "shape": [3, 3, 1, 32], "dtype": "float32"}, {"name": "conv2d_3/bias", "shape": [32], "dtype": "float32"}, {"name": "conv2d_4/kernel", "shape": [3, 3, 32, 32], "dtype": "float32"}, {"name": "conv2d_4/bias", "shape": [32], "dtype": "float32"}, {"name": "conv2d_5/kernel", "shape": [3, 3, 32, 64], "dtype": "float32"}, {"name": "conv2d_5/bias", "shape": [64], "dtype": "float32"}, {"name": "dense_2/kernel", "shape": [14400, 128], "dtype": "float32"}, {"name": "dense_2/bias", "shape": [128], "dtype": "float32"}, {"name": "dense_3/kernel", "shape": [128, 2], "dtype": "float32"}, {"name": "dense_3/bias", "shape": [2], "dtype": "float32"}]}]}
\ No newline at end of file
......@@ -4,39 +4,58 @@ channels:
- defaults
- conda-forge
dependencies:
- abseil-cpp=20210324.2=hc377ac9_0
- aiohttp=3.8.1=py39h1a28f6b_1
- aiosignal=1.2.0=pyhd3eb1b0_0
- aom=3.3.0=h07bb92c_1
- appnope=0.1.2=py39hca03da5_1001
- asttokens=2.0.5=pyhd3eb1b0_0
- astunparse=1.6.3=py_0
- async-timeout=4.0.1=pyhd3eb1b0_0
- attrs=21.4.0=pyhd3eb1b0_0
- backcall=0.2.0=pyhd3eb1b0_0
- blas=2.114=openblas
- blas-devel=3.9.0=14_osxarm64_openblas
- blinker=1.4=py39hca03da5_0
- brotli=1.0.7=hc377ac9_0
- brotlipy=0.7.0=py39h1a28f6b_1002
- bzip2=1.0.8=h620ffc9_4
- c-ares=1.18.1=h1a28f6b_0
- ca-certificates=2022.4.26=hca03da5_0
- cairo=1.16.0=h0ab239c_1
- certifi=2021.10.8=py39hca03da5_2
- certifi=2022.5.18.1=py39hca03da5_0
- cffi=1.15.0=py39h22df2f2_1
- click=8.0.4=py39hca03da5_0
- cryptography=3.4.7=py39h9dbe03d_0
- cycler=0.11.0=pyhd3eb1b0_0
- dataclasses=0.8=pyh6d0b6a4_7
- debugpy=1.5.1=py39hc377ac9_0
- decorator=5.1.1=pyhd3eb1b0_0
- dlib=19.24.0=py39he4b90f5_0
- entrypoints=0.4=py39hca03da5_0
- executing=0.8.3=pyhd3eb1b0_0
- ffmpeg=4.4.1=heb85afd_3
- fontconfig=2.13.1=h1f4a5ec_0
- fonttools=4.25.0=pyhd3eb1b0_0
- freetype=2.11.0=h1192e45_0
- frozenlist=1.2.0=py39h1a28f6b_0
- gast=0.5.3=pyhd3eb1b0_0
- gettext=0.21.0=h826f4ad_0
- giflib=5.2.1=h1a28f6b_0
- glib=2.70.2=hccf11d3_4
- glib-tools=2.70.2=hccf11d3_4
- gmp=6.2.1=hc377ac9_0
- gnutls=3.6.15=h887c41c_0
- google-pasta=0.2.0=pyhd3eb1b0_0
- graphite2=1.3.14=h0e5e14a_0
- grpcio=1.42.0=py39h95c9599_0
- grpc-cpp=1.45.2=h42cd831_3
- grpcio=1.45.0=py39hcf421d0_0
- h5py=3.6.0=py39h7fe8675_0
- harfbuzz=4.2.1=hd36a07e_0
- hdf5=1.12.1=h5aa262f_1
- icu=70.1=h6b3803e_0
- idna=3.3=pyhd3eb1b0_0
- importlib-metadata=4.11.3=py39hca03da5_0
- ipykernel=6.9.1=py39hca03da5_0
- ipython=8.3.0=py39hca03da5_0
- jasper=2.0.33=hba35424_0
......@@ -45,14 +64,16 @@ dependencies:
- jpeg=9e=h1a28f6b_0
- jupyter_client=7.2.2=py39hca03da5_0
- jupyter_core=4.10.0=py39hca03da5_0
- keras=2.8.0=pyhd8ed1ab_0
- keras-preprocessing=1.1.2=pyhd3eb1b0_0
- kiwisolver=1.3.2=py39hc377ac9_0
- krb5=1.19.2=h3b8d789_0
- krb5=1.19.3=hf9b2bbe_0
- lame=3.100=h1a28f6b_0
- lcms2=2.12=hba8e193_0
- lerc=3.0=hc377ac9_0
- libblas=3.9.0=14_osxarm64_openblas
- libcblas=3.9.0=14_osxarm64_openblas
- libcurl=7.82.0=hc6d1d07_0
- libcurl=7.83.1=h2fcd78c_0
- libcxx=14.0.3=h6a5c8ee_0
- libdeflate=1.8=h1a28f6b_5
- libedit=3.1.20210910=h1a28f6b_0
......@@ -65,7 +86,7 @@ dependencies:
- libidn2=2.3.1=h1a28f6b_0
- liblapack=3.9.0=14_osxarm64_openblas
- liblapacke=3.9.0=14_osxarm64_openblas
- libnghttp2=1.46.0=h95c9599_0
- libnghttp2=1.47.0=he723fca_0
- libopenblas=0.3.20=openmp_h2209c59_0
- libopencv=4.5.5=py39h86e1ac9_9
- libpng=1.6.37=hb8d0fd4_0
......@@ -85,17 +106,19 @@ dependencies:
- matplotlib=3.5.1=py39hca03da5_1
- matplotlib-base=3.5.1=py39hc377ac9_1
- matplotlib-inline=0.1.2=pyhd3eb1b0_2
- multidict=5.2.0=py39h1a28f6b_2
- munkres=1.1.4=py_0
- ncurses=6.3=h1a28f6b_2
- nest-asyncio=1.5.5=py39hca03da5_0
- nettle=3.7.3=h84b5d62_1
- numpy=1.21.5=py39h25ab29e_2
- numpy-base=1.21.5=py39h974a1f5_2
- oauthlib=3.2.0=pyhd3eb1b0_0
- openblas=0.3.20=openmp_h745f6c2_0
- opencv=4.5.5=py39hdf13c20_9
- openh264=2.1.1=h98b2900_0
- openssl=1.1.1o=h1a28f6b_0
- packaging=21.3=pyhd3eb1b0_0
- opt_einsum=3.3.0=pyhd3eb1b0_1
- parso=0.8.3=pyhd3eb1b0_0
- pcre=8.45=hc377ac9_0
- pexpect=4.8.0=pyhd3eb1b0_3
......@@ -107,68 +130,73 @@ dependencies:
- ptyprocess=0.7.0=pyhd3eb1b0_2
- pure_eval=0.2.2=pyhd3eb1b0_0
- py-opencv=4.5.5=py39hfa6204d_9
- pyasn1=0.4.8=pyhd3eb1b0_0
- pycparser=2.21=pyhd3eb1b0_0
- pygments=2.11.2=pyhd3eb1b0_0
- pyjwt=2.1.0=py39hca03da5_0
- pyopenssl=21.0.0=pyhd3eb1b0_1
- pyparsing=3.0.4=pyhd3eb1b0_0
- pysocks=1.7.1=py39hca03da5_0
- python=3.9.12=hfc7342c_1_cpython
- python-dateutil=2.8.2=pyhd3eb1b0_0
- python-flatbuffers=2.0=pyhd3eb1b0_0
- python_abi=3.9=2_cp39
- pyzmq=22.3.0=py39hc377ac9_2
- re2=2022.04.01=hc377ac9_0
- readline=8.1.2=h1a28f6b_1
- requests=2.27.1=pyhd3eb1b0_0
- scipy=1.7.3=py39h2f0f56f_0
- setuptools=61.2.0=py39hca03da5_0
- sqlite=3.38.2=h1058600_0
- snappy=1.1.9=hc377ac9_0
- sqlite=3.38.5=h40dfcc0_0
- stack_data=0.2.0=pyhd3eb1b0_0
- svt-av1=0.9.1=h07bb92c_0
- tensorboard=2.8.0=pyhd8ed1ab_1
- tensorflow=2.8.1=cpu_py39h2839aeb_0
- tensorflow-base=2.8.1=cpu_py39h84f6f83_0
- tensorflow-deps=2.8.0=0
- tensorflow-estimator=2.8.1=cpu_py39hfad2b03_0
- tk=8.6.12=he1e0b03_0
- tornado=6.1=py39h1a28f6b_0
- traitlets=5.1.1=pyhd3eb1b0_0
- typing_extensions=4.1.1=pyh06a4308_0
- tzdata=2022a=hda174b7_0
- urllib3=1.26.9=py39hca03da5_0
- wcwidth=0.2.5=pyhd3eb1b0_0
- wheel=0.37.1=pyhd3eb1b0_0
- x264=1!161.3030=h3422bc3_1
- x265=3.5=hbc6ce65_3
- xz=5.2.5=h1a28f6b_1
- yarl=1.6.3=py39h1a28f6b_1
- zeromq=4.3.4=hc377ac9_0
- zipp=3.8.0=py39hca03da5_0
- zlib=1.2.11=h90dfc92_1014
- zstd=1.5.2=h861e0a7_0
- pip:
- absl-py==1.0.0
- astunparse==1.6.3
- cachetools==5.0.0
- charset-normalizer==2.0.12
- flatbuffers==2.0
- gast==0.5.3
- google-auth==2.6.6
- google-auth-oauthlib==0.4.6
- google-pasta==0.2.0
- idna==3.3
- importlib-metadata==4.11.3
- imutils==0.5.4
- keras==2.8.0
- keras-preprocessing==1.1.2
- libclang==14.0.1
- markdown==3.3.7
- oauthlib==3.2.0
- opt-einsum==3.3.0
- packaging==20.9
- protobuf==3.20.1
- pyasn1==0.4.8
- pyasn1-modules==0.2.8
- pygame==2.1.2
- requests==2.27.1
- requests-oauthlib==1.3.1
- rsa==4.8
- six==1.15.0
- tensorboard==2.8.0
- tensorboard-data-server==0.6.1
- tensorboard-plugin-wit==1.8.1
- tensorflow-hub==0.12.0
- tensorflow-macos==2.8.0
- tensorflow-metal==0.4.0
- tensorflowjs==3.18.0
- termcolor==1.1.0
- tf-estimator-nightly==2.8.0.dev2021122109
- typing-extensions==4.2.0
- urllib3==1.26.9
- werkzeug==2.1.2
- wrapt==1.14.1
- zipp==3.8.0
prefix: /Users/skywrace/miniforge3/envs/drowsiness_detector
......
This file is too large to display.
This diff could not be displayed because it is too large.
absl-py==1.0.0
appnope @ file:///Users/ktietz/demo/mc3/conda-bld/appnope_1629146036738/work
asttokens @ file:///opt/conda/conda-bld/asttokens_1646925590279/work
astunparse==1.6.3
backcall @ file:///home/ktietz/src/ci/backcall_1611930011877/work
cachetools==5.0.0
certifi==2021.10.8
charset-normalizer==2.0.12
cycler @ file:///tmp/build/80754af9/cycler_1637851556182/work
debugpy @ file:///Users/builder/miniconda3/envs/prefect/conda-bld/debugpy_1637092214173/work
decorator @ file:///opt/conda/conda-bld/decorator_1643638310831/work
entrypoints @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_croot-jb01gaox/entrypoints_1650293758411/work
executing @ file:///opt/conda/conda-bld/executing_1646925071911/work
flatbuffers==2.0
fonttools==4.25.0
gast==0.5.3
google-auth==2.6.6
google-auth-oauthlib==0.4.6
google-pasta==0.2.0
grpcio @ file:///Users/builder/miniconda3/envs/prefect/conda-bld/grpcio_1637592348692/work
h5py @ file:///Users/builder/miniconda3/envs/prefect/conda-bld/h5py_1637162753555/work
idna==3.3
importlib-metadata==4.11.3
imutils==0.5.4
ipykernel @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_croot-4yxj69n0/ipykernel_1647009452031/work/dist/ipykernel-6.9.1-py3-none-any.whl
ipython @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_b42ce53b-9348-4ffe-874e-ee7a7d34be58zn88hkt_/croots/recipe/ipython_1651600151534/work
jedi @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/croot-f1t6hma6/jedi_1644315882177/work
jupyter-client @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_37f0874a-8189-43c8-984a-7cc5aa7f2a00vekz677y/croots/recipe/jupyter_client_1650622203010/work
jupyter-core @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_5839c60e-0f30-4a99-b0b9-2b009ec5fec40y9fo9ym/croots/recipe/jupyter_core_1651671230982/work
keras==2.8.0
Keras-Preprocessing==1.1.2
kiwisolver @ file:///Users/builder/miniconda3/envs/prefect/conda-bld/kiwisolver_1638569888412/work
libclang==14.0.1
Markdown==3.3.7
matplotlib @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_croot-_3usbnl1/matplotlib-suite_1647506475477/work
matplotlib-inline @ file:///tmp/build/80754af9/matplotlib-inline_1628242447089/work
munkres==1.1.4
nest-asyncio @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_croot-xymukih3/nest-asyncio_1649931465456/work
numpy @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_e99dd190-62ea-4b66-a328-d961062afa8ar4io6k3p/croots/recipe/numpy_and_numpy_base_1651563626935/work
oauthlib==3.2.0
opencv-python==4.5.5
opt-einsum==3.3.0
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
parso @ file:///opt/conda/conda-bld/parso_1641458642106/work
pexpect @ file:///tmp/build/80754af9/pexpect_1605563209008/work
pickleshare @ file:///tmp/build/80754af9/pickleshare_1606932040724/work
Pillow==9.0.1
prompt-toolkit @ file:///tmp/build/80754af9/prompt-toolkit_1633440160888/work
protobuf==3.20.1
ptyprocess @ file:///tmp/build/80754af9/ptyprocess_1609355006118/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl
pure-eval @ file:///opt/conda/conda-bld/pure_eval_1646925070566/work
pyasn1==0.4.8
pyasn1-modules==0.2.8
pygame==2.1.2
Pygments @ file:///opt/conda/conda-bld/pygments_1644249106324/work
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
python-dateutil @ file:///tmp/build/80754af9/python-dateutil_1626374649649/work
pyzmq @ file:///Users/builder/miniconda3/envs/prefect/conda-bld/pyzmq_1638447141825/work
requests==2.27.1
requests-oauthlib==1.3.1
rsa==4.8
scipy @ file:///Users/ktietz/ci_310/scipy_1644255974431/work
six==1.15.0
stack-data @ file:///opt/conda/conda-bld/stack_data_1646927590127/work
tensorboard==2.8.0
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.1
tensorflow-macos==2.8.0
tensorflow-metal==0.4.0
termcolor==1.1.0
tf-estimator-nightly==2.8.0.dev2021122109
tornado @ file:///Users/ktietz/demo/mc3/conda-bld/tornado_1628698929452/work
traitlets @ file:///tmp/build/80754af9/traitlets_1636710298902/work
typing_extensions==4.2.0
urllib3==1.26.9
wcwidth @ file:///Users/ktietz/demo/mc3/conda-bld/wcwidth_1629357192024/work
Werkzeug==2.1.2
wrapt==1.14.1
zipp==3.8.0