skywrace

feat: Verify train and streaming are all workable

# Installation
<!-- 1. Create conda env -->
> This setup is tested only in Apple Silicon(M1).
<!-- ```bash -->
<!-- ~$ conda env create --name {any_names_you_want} --file environment.yaml -->
<!-- ``` -->
1. Create conda env
<!-- 2. Activate conda env -->
```bash
~$ conda env create --name {any_names_you_want} --file environment.yaml
```
<!-- ```bash -->
<!-- ~$ conda activate {any_names_you_want} -->
<!-- ``` -->
2. Activate conda env
<!-- 3. Install some packages manually -->
```bash
~$ conda activate {any_names_you_want}
```
<!-- ```bash -->
<!-- ~$ pip install pygame -->
<!-- ``` -->
3. Install some packages manually
```bash
~$ pip install -r requirements.txt
```
# Dataset
......
name: drowsiness_detector
channels:
- apple
- defaults
- conda-forge
dependencies:
- aom=3.3.0=h07bb92c_1
- appnope=0.1.2=py39hca03da5_1001
- asttokens=2.0.5=pyhd3eb1b0_0
- backcall=0.2.0=pyhd3eb1b0_0
- blas=2.114=openblas
- blas-devel=3.9.0=14_osxarm64_openblas
- brotli=1.0.7=hc377ac9_0
- 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
- cycler=0.11.0=pyhd3eb1b0_0
- debugpy=1.5.1=py39hc377ac9_0
- decorator=5.1.1=pyhd3eb1b0_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
- 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
- graphite2=1.3.14=h0e5e14a_0
- grpcio=1.42.0=py39h95c9599_0
- h5py=3.6.0=py39h7fe8675_0
- harfbuzz=4.2.1=hd36a07e_0
- hdf5=1.12.1=h5aa262f_1
- icu=70.1=h6b3803e_0
- ipykernel=6.9.1=py39hca03da5_0
- ipython=8.3.0=py39hca03da5_0
- jasper=2.0.33=hba35424_0
- jbig=2.1=h1a28f6b_0
- jedi=0.18.1=py39hca03da5_1
- jpeg=9e=h1a28f6b_0
- jupyter_client=7.2.2=py39hca03da5_0
- jupyter_core=4.10.0=py39hca03da5_0
- kiwisolver=1.3.2=py39hc377ac9_0
- krb5=1.19.2=h3b8d789_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
- libcxx=14.0.3=h6a5c8ee_0
- libdeflate=1.8=h1a28f6b_5
- libedit=3.1.20210910=h1a28f6b_0
- libev=4.33=h1a28f6b_1
- libffi=3.4.2=hc377ac9_2
- libgfortran=5.0.0=11_1_0_h6a59814_26
- libgfortran5=11.1.0=h6a59814_26
- libglib=2.70.2=h67e64d8_4
- libiconv=1.16=h1a28f6b_2
- 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
- libopenblas=0.3.20=openmp_h2209c59_0
- libopencv=4.5.5=py39h86e1ac9_9
- libpng=1.6.37=hb8d0fd4_0
- libprotobuf=3.20.1=h332123e_0
- libsodium=1.0.18=h1a28f6b_0
- libssh2=1.10.0=hf27765b_0
- libtasn1=4.16.0=h1a28f6b_0
- libtiff=4.3.0=h74060c4_2
- libunistring=0.9.10=h1a28f6b_0
- libvpx=1.11.0=hc377ac9_0
- libwebp=1.2.2=h68602c7_0
- libwebp-base=1.2.2=h1a28f6b_0
- libxml2=2.9.14=h035c1df_0
- libzlib=1.2.11=h90dfc92_1014
- llvm-openmp=14.0.3=hd125106_0
- lz4-c=1.9.3=hc377ac9_0
- matplotlib=3.5.1=py39hca03da5_1
- matplotlib-base=3.5.1=py39hc377ac9_1
- matplotlib-inline=0.1.2=pyhd3eb1b0_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
- 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
- parso=0.8.3=pyhd3eb1b0_0
- pcre=8.45=hc377ac9_0
- pexpect=4.8.0=pyhd3eb1b0_3
- pickleshare=0.7.5=pyhd3eb1b0_1003
- pillow=9.0.1=py39h4d1bdd5_0
- pip=21.2.4=py39hca03da5_0
- pixman=0.40.0=h1a28f6b_0
- prompt-toolkit=3.0.20=pyhd3eb1b0_0
- ptyprocess=0.7.0=pyhd3eb1b0_2
- pure_eval=0.2.2=pyhd3eb1b0_0
- py-opencv=4.5.5=py39hfa6204d_9
- pygments=2.11.2=pyhd3eb1b0_0
- pyparsing=3.0.4=pyhd3eb1b0_0
- python=3.9.12=hfc7342c_1_cpython
- python-dateutil=2.8.2=pyhd3eb1b0_0
- python_abi=3.9=2_cp39
- pyzmq=22.3.0=py39hc377ac9_2
- readline=8.1.2=h1a28f6b_1
- scipy=1.7.3=py39h2f0f56f_0
- setuptools=61.2.0=py39hca03da5_0
- sqlite=3.38.2=h1058600_0
- stack_data=0.2.0=pyhd3eb1b0_0
- svt-av1=0.9.1=h07bb92c_0
- tensorflow-deps=2.8.0=0
- tk=8.6.12=he1e0b03_0
- tornado=6.1=py39h1a28f6b_0
- traitlets=5.1.1=pyhd3eb1b0_0
- tzdata=2022a=hda174b7_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
- zeromq=4.3.4=hc377ac9_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
- 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-macos==2.8.0
- tensorflow-metal==0.4.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
......@@ -34,7 +34,8 @@ def main():
eye = eye/255
eye = eye.reshape(24, 24, -1)
eye = np.expand_dims(eye, axis=0)
pred = model.predict_classes(eye)
prob = model.predict(eye, verbose=0)
pred = prob.argmax(axis=-1)
return True if pred[0] == 1 else False
while True:
......
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