diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-02-10 16:38:59 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-02-10 16:38:59 +0100 |
| commit | e6004394a3cf47fb1514955b9a4dc283268a28ae (patch) | |
| tree | c40bbd302dcf7f0068e64fbc7b5395b46a976e7f | |
| parent | efadb39172eb36b4ffebeaa5169219c7954a263b (diff) | |
| parent | c07efd085b4148254f51e912282ec644c3c71d81 (diff) | |
Merge branch 'master' of github.com:adamhrv/megapixels_dev
| -rw-r--r-- | environment.yml | 308 | ||||
| -rw-r--r-- | environment_bkup_20190209.yml | 305 | ||||
| -rw-r--r-- | megapixels/commands/datasets/ijb_screenshot.py | 105 | ||||
| -rw-r--r-- | megapixels/commands/datasets/ijb_screenshot_mt.py | 156 | ||||
| -rw-r--r-- | megapixels/commands/demo/face_3ddfa.py | 3 | ||||
| -rw-r--r-- | megapixels/commands/processor/_old_files_to_face_rois.py | 2 | ||||
| -rw-r--r-- | megapixels/commands/visualize/weasyprinter.py | 54 | ||||
| -rw-r--r-- | notes/frameworks/cairo.md | 21 | ||||
| -rw-r--r-- | notes/frameworks/dlib.md | 17 | ||||
| -rw-r--r-- | notes/frameworks/jupyter.md | 6 |
10 files changed, 793 insertions, 184 deletions
diff --git a/environment.yml b/environment.yml index 814b2fad..b3d28c7e 100644 --- a/environment.yml +++ b/environment.yml @@ -1,195 +1,153 @@ name: megapixels channels: - - caffe2 - pytorch - conda-forge - defaults dependencies: - - caffe2-cuda9.0-cudnn7=0.8.dev=py36_2018.05.14 + - atk=2.25.90=hb9dd440_1002 + - attrs=18.2.0=py_0 + - backcall=0.1.0=py_0 + - blas=1.0=mkl + - bleach=3.1.0=py_0 - ca-certificates=2018.11.29=ha4d7672_0 + - cairo=1.16.0=ha4e643d_1000 - certifi=2018.11.29=py36_1000 - - nodejs=10.8.0=hfc679d8_1 - - openssl=1.0.2p=h470a237_1 - - _nb_ext_conf=0.4.0=py36_1 - - anaconda-client=1.6.14=py36_0 - - asn1crypto=0.24.0=py36_0 - - backcall=0.1.0=py36_0 - - blas=1.0=mkl - - bleach=2.1.3=py36_0 - - bzip2=1.0.6=h14c3975_5 - - cairo=1.14.12=h7636065_2 - - cffi=1.11.5=py36h9745a5d_0 - - chardet=3.0.4=py36h0f667ec_1 - - clyent=1.2.2=py36h7e57e65_1 - - cryptography=2.2.2=py36h14c3975_0 + - cffi=1.11.5=py36h9745a5d_1001 - cudatoolkit=9.0=h13b8566_0 - - dbus=1.13.2=h714fa37_1 - - decorator=4.3.0=py36_0 - - entrypoints=0.2.3=py36h1aec115_2 - - expat=2.2.5=he0dffb1_0 - - ffmpeg=3.4=h7264315_0 - - fontconfig=2.12.6=h49f89f6_0 - - freetype=2.8=hab7d2ae_1 - - future=0.16.0=py36_1 - - gflags=2.2.1=hf484d3e_0 - - glib=2.56.1=h000015b_0 - - glog=0.3.5=hf484d3e_1 - - gmp=6.1.2=h6c8ec71_1 - - graphite2=1.3.11=h16798f4_2 - - gst-plugins-base=1.14.0=hbbd80ab_1 - - gstreamer=1.14.0=hb453b48_1 - - harfbuzz=1.7.6=h5f0a787_1 - - hdf5=1.10.1=h9caa474_1 - - html5lib=1.0.1=py36h2f9c1c0_0 - - icu=58.2=h9c2bf20_1 - - idna=2.7=py36_0 - - intel-openmp=2018.0.3=0 - - ipykernel=4.8.2=py36_0 - - ipython=6.4.0=py36_0 - - ipython_genutils=0.2.0=py36hb52b0d5_0 - - ipywidgets=7.2.1=py36_0 - - jasper=1.900.1=hd497a04_4 - - jedi=0.12.0=py36_1 - - jinja2=2.10=py36ha16c418_0 - - jpeg=9b=h024ee3a_2 - - jsonschema=2.6.0=py36h006f8b5_0 - - jupyter=1.0.0=py36_4 - - jupyter_client=5.2.3=py36_0 - - jupyter_console=5.2.0=py36he59e554_1 - - jupyter_core=4.4.0=py36h7c827e3_0 - - libedit=3.1.20170329=h6b74fdf_2 - - libffi=3.2.1=hd88cf55_4 - - libgcc-ng=7.2.0=hdf63c60_3 + - dbus=1.13.0=h4e0c4b3_1000 + - decorator=4.3.2=py_0 + - entrypoints=0.3=py36_1000 + - expat=2.2.5=hf484d3e_1002 + - fontconfig=2.13.1=h2176d3f_1000 + - freetype=2.9.1=h94bbf69_1005 + - gdk-pixbuf=2.36.12=h49783d7_1002 + - gettext=0.19.8.1=h9745a5d_1001 + - glib=2.58.2=hf63aee3_1001 + - gobject-introspection=1.58.2=py36h2da5eee_1000 + - graphite2=1.3.13=hf484d3e_1000 + - gstreamer=1.14.4=h66beb1c_1001 + - gtk2=2.24.31=hb68c50a_1001 + - harfbuzz=2.3.1=h6824563_0 + - icu=58.2=hf484d3e_1000 + - ipykernel=5.1.0=py36h24bf2e0_1002 + - ipython=7.2.0=py36h24bf2e0_1000 + - ipython_genutils=0.2.0=py_1 + - ipywidgets=7.4.2=py_0 + - jedi=0.13.2=py36_1000 + - jinja2=2.10=py_1 + - jpeg=9c=h14c3975_1001 + - jsonschema=3.0.0a3=py36_1000 + - jupyter=1.0.0=py_1 + - jupyter_client=5.2.4=py_1 + - jupyter_console=6.0.0=py_0 + - jupyter_core=4.4.0=py_0 + - libffi=3.2.1=hf484d3e_1005 + - libgcc-ng=7.3.0=hdf63c60_0 - libgfortran-ng=7.2.0=hdf63c60_3 - - libopus=1.2.1=hb9ed12e_0 - - libpng=1.6.34=hb9fc6fc_0 - - libprotobuf=3.5.2=h6f1eeef_0 - - libsodium=1.0.16=h1bed415_0 - - libstdcxx-ng=7.2.0=hdf63c60_3 - - libtiff=4.0.9=he85c1e1_1 - - libuuid=1.0.3=h1bed415_2 - - libvpx=1.6.1=h888fd40_0 - - libxcb=1.13=h1bed415_1 - - libxml2=2.9.8=h26e45fe_1 - - markupsafe=1.0=py36hd9260cd_1 - - mistune=0.8.3=py36h14c3975_1 - - mkl=2018.0.3=1 - - mkl_fft=1.0.1=py36h3010b51_0 - - mkl_random=1.0.1=py36h629b387_0 - - nb_anacondacloud=1.4.0=py36_0 - - nb_conda=2.2.1=py36h8118bb2_0 - - nb_conda_kernels=2.1.0=py36_0 - - nbconvert=5.3.1=py36hb41ffb7_0 - - nbformat=4.4.0=py36h31c9010_0 - - nbpresent=3.0.2=py36h5f95a39_1 - - ncurses=6.1=hf484d3e_0 - - ninja=1.8.2=py36h6bb024c_1 - - notebook=5.5.0=py36_0 - - numpy=1.14.5=py36hcd700cb_0 - - numpy-base=1.14.5=py36hdbf6ddf_0 - - olefile=0.45.1=py36_0 - - opencv=3.3.1=py36h0a11808_0 - - pandoc=2.2.1=h629c226_0 - - pandocfilters=1.4.2=py36ha6701b7_1 - - parso=0.2.1=py36_0 - - pcre=8.42=h439df22_0 - - pexpect=4.6.0=py36_0 - - pickleshare=0.7.4=py36h63277f8_0 - - pillow=5.1.0=py36h3deb7b8_0 - - pip=10.0.1=py36_0 - - pixman=0.34.0=hceecf20_3 - - prompt_toolkit=1.0.15=py36h17d85b1_0 - - protobuf=3.5.2=py36hf484d3e_0 - - ptyprocess=0.6.0=py36_0 - - pycparser=2.18=py36hf9f622e_1 - - pygments=2.2.0=py36h0d3125c_0 - - pyopenssl=18.0.0=py36_0 - - pyqt=5.9.2=py36h751905a_0 - - pysocks=1.6.8=py36_0 - - python=3.6.5=hc3d631a_2 - - python-dateutil=2.7.3=py36_0 - - pytz=2018.4=py36_0 - - pyyaml=3.12=py36hafb9ca4_1 - - pyzmq=17.0.0=py36h14c3975_0 - - qt=5.9.5=h7e424d6_0 - - qtconsole=4.3.1=py36h8f73b5b_0 - - readline=7.0=ha6073c6_4 - - requests=2.19.1=py36_0 - - send2trash=1.5.0=py36_0 - - setuptools=39.2.0=py36_0 - - simplegeneric=0.8.1=py36_2 - - sip=4.19.8=py36hf484d3e_0 - - six=1.11.0=py36h372c433_1 - - sqlite=3.24.0=h84994c4_0 - - terminado=0.8.1=py36_1 - - testpath=0.3.1=py36h8cadb63_0 - - tk=8.6.7=hc745277_3 - - tornado=5.0.2=py36_0 - - traitlets=4.3.2=py36h674d592_0 - - urllib3=1.23=py36_0 - - wcwidth=0.1.7=py36hdf4376a_0 - - webencodings=0.5.1=py36h800622e_1 - - wheel=0.31.1=py36_0 - - widgetsnbextension=3.2.1=py36_0 - - xz=5.2.4=h14c3975_4 - - yaml=0.1.7=had09818_2 - - zeromq=4.2.5=h439df22_0 - - zlib=1.2.11=ha838bed_2 - - cuda90=1.0=h6433d27_0 - - pytorch=1.0.0=py3.6_cuda9.0.176_cudnn7.4.1_1 + - libiconv=1.15=h14c3975_1004 + - libpng=1.6.36=h84994c4_1000 + - libsodium=1.0.16=h14c3975_1001 + - libstdcxx-ng=7.3.0=hdf63c60_0 + - libtiff=4.0.10=h648cc4a_1001 + - libuuid=2.32.1=h14c3975_1000 + - libxcb=1.13=h14c3975_1002 + - libxml2=2.9.8=h143f9aa_1005 + - markupsafe=1.1.0=py36h14c3975_1000 + - mistune=0.8.4=py36h14c3975_1000 + - mkl_fft=1.0.10=py36h14c3975_1 + - mkl_random=1.0.2=py36h637b7d7_2 + - nb_conda=2.2.1=py36_0 + - nb_conda_kernels=2.2.0=py36_1000 + - nbconvert=5.3.1=py_1 + - nbformat=4.4.0=py_1 + - ncurses=6.1=hf484d3e_1002 + - ninja=1.9.0=h6bb024c_0 + - notebook=5.7.4=py36_1000 + - numpy-base=1.15.4=py36hde5b4d6_0 + - olefile=0.46=py_0 + - openssl=1.1.1a=h14c3975_1000 + - pandoc=2.6=1 + - pandocfilters=1.4.2=py_1 + - pango=1.40.14=h4ea9474_1004 + - parso=0.3.3=py_0 + - pcre=8.41=hf484d3e_1003 + - pexpect=4.6.0=py36_1000 + - pickleshare=0.7.5=py36_1000 + - pip=19.0.2=py36_0 + - pixman=0.34.0=h14c3975_1003 + - prometheus_client=0.5.0=py_0 + - prompt_toolkit=2.0.8=py_0 + - pthread-stubs=0.4=h14c3975_1001 + - ptyprocess=0.6.0=py36_1000 + - pycparser=2.19=py_0 + - pygments=2.3.1=py_0 + - pyqt=4.11.4=py36_3 + - pyrsistent=0.14.10=py36h14c3975_0 + - python=3.6.8=h0371630_0 + - python-dateutil=2.8.0=py_0 + - pytorch=1.0.1=py3.6_cuda9.0.176_cudnn7.4.2_2 + - pyzmq=17.1.2=py36h6afc9c9_1001 + - qt=4.8.7=2 + - qtconsole=4.4.3=py_0 + - readline=7.0=hf8c457e_1001 + - send2trash=1.5.0=py_0 + - setuptools=40.7.3=py36_0 + - sip=4.18=py36_1 + - six=1.12.0=py36_1000 + - sqlite=3.26.0=h67949de_1000 + - terminado=0.8.1=py36_1001 + - testpath=0.4.2=py36_1000 + - tk=8.6.9=h84994c4_1000 - torchvision=0.2.1=py_2 + - tornado=5.1.1=py36h14c3975_1000 + - traitlets=4.3.2=py36_1000 + - wcwidth=0.1.7=py_1 + - webencodings=0.5.1=py_1 + - wheel=0.32.3=py36_0 + - widgetsnbextension=3.4.2=py36_1000 + - xorg-kbproto=1.0.7=h14c3975_1002 + - xorg-libice=1.0.9=h14c3975_1004 + - xorg-libsm=1.2.3=h4937e3b_1000 + - xorg-libx11=1.6.7=h14c3975_1000 + - xorg-libxau=1.0.8=h14c3975_1006 + - xorg-libxdmcp=1.1.2=h14c3975_1007 + - xorg-libxext=1.3.3=h14c3975_1004 + - xorg-libxrender=0.9.10=h14c3975_1002 + - xorg-libxt=1.1.5=h14c3975_1002 + - xorg-renderproto=0.11.1=h14c3975_1002 + - xorg-xextproto=7.3.0=h14c3975_1002 + - xorg-xproto=7.0.31=h14c3975_1007 + - xz=5.2.4=h14c3975_1001 + - zeromq=4.2.5=hf484d3e_1006 + - zlib=1.2.11=h14c3975_1004 - pip: - - absl-py==0.2.2 - - astor==0.7.1 - - audioread==2.1.6 - - blocksparse==1.0.0 - click==7.0 - - cloudpickle==0.5.3 - - colorlog==3.1.4 + - cloudpickle==0.7.0 + - cmake==3.13.3 + - colorlog==4.0.2 - cycler==0.10.0 - - cython==0.28.3 - - dask==0.18.1 - - dlib==19.16.99 - - face-alignment==1.0.0 - - flask==1.0.2 - - flask-cors==3.0.6 - - gast==0.2.0 - - grpcio==1.13.0 - - h5py==2.8.0 - - horovod==0.13.8 + - dask==1.1.1 + - dlib==19.16.0 - imagehash==4.0 - - imageio==2.3.0 - - imutils==0.4.6 - - itsdangerous==0.24 - - joblib==0.12.5 - - keras==2.2.0 - - keras-applications==1.0.2 - - keras-preprocessing==1.0.1 + - imutils==0.5.2 + - intel-openmp==2019.0 - kiwisolver==1.0.1 - - librosa==0.6.2 - - llvmlite==0.25.0 - - markdown==2.6.11 - - matplotlib==2.2.2 - - moviepy==0.2.3.5 - - networkx==2.1 - - numba==0.40.1 - - opencv-python==3.4.5.20 - - pandas==0.23.4 - - pymediainfo==2.3.0 - - pyparsing==2.2.0 + - matplotlib==3.0.2 + - mkl==2019.0 + - networkx==2.2 + - numpy==1.16.1 + - opencv-python==4.0.0.21 + - pandas==0.24.1 + - pillow==5.4.1 + - pymediainfo==3.0 + - pyparsing==2.3.1 - python-dotenv==0.10.1 - - pywavelets==0.5.2 - - resampy==0.2.1 - - scikit-image==0.14.0 - - scikit-learn==0.20.1 - - scipy==1.1.0 - - tensorboard==1.8.0 - - tensorflow-gpu==1.8.0 - - termcolor==1.1.0 + - pytz==2018.9 + - pywavelets==1.0.1 + - scikit-image==0.14.2 + - scikit-learn==0.20.2 + - scipy==1.2.1 - toolz==0.9.0 - - toposort==1.5 - - torch==1.0.0 - - tqdm==4.23.4 - - werkzeug==0.14.1 + - tqdm==4.31.0 prefix: /home/adam/anaconda3/envs/megapixels diff --git a/environment_bkup_20190209.yml b/environment_bkup_20190209.yml new file mode 100644 index 00000000..2b41c345 --- /dev/null +++ b/environment_bkup_20190209.yml @@ -0,0 +1,305 @@ +name: megapixels +channels: + - 1adrianb + - alexbw + - anaconda + - pytorch + - conda-forge + - defaults +dependencies: + - face_alignment=1.0.0=py_1 + - lua=5.3.2=1 + - lua-cwrap=0.1=lua5.3_2 + - lua-paths=0.1=lua5.3_1 + - lua-torch=7.0.3=lua5.3_0 + - luarocks=2.2.1=lua5.3_0 + - glib=2.56.2=hd408876_0 + - libgcc=7.2.0=h69d50b8_2 + - libpng=1.6.35=hbc83047_0 + - matplotlib=2.2.2=py36hb69df0a_2 + - pyqt=5.6.0=py36_2 + - qt=5.6.3=h8bf5577_3 + - sqlite=3.25.3=h7b6447c_0 + - tk=8.6.8=hbc83047_0 + - bokeh=1.0.2=py36_1000 + - boost=1.68.0=py36h3e44d54_1 + - boost-cpp=1.68.0=h3a22d5f_0 + - ca-certificates=2018.11.29=ha4d7672_0 + - certifi=2018.11.29=py36_1000 + - click=7.0=py_0 + - cloudpickle=0.6.1=py_0 + - cryptography=2.3.1=py36hdffb7b8_0 + - cryptography-vectors=2.3.1=py36_1000 + - cycler=0.10.0=py_1 + - cytoolz=0.9.0.1=py36h470a237_1 + - dask=1.0.0=py_0 + - dask-core=1.0.0=py_0 + - distributed=1.25.0=py36_1000 + - expat=2.2.5=hfc679d8_2 + - ffmpeg=4.0.2=ha0c5888_2 + - fontconfig=2.13.1=h65d0f4c_0 + - freeglut=3.0.0=hfc679d8_5 + - freetype=2.9.1=h6debe1e_4 + - gflags=2.2.2=hfc679d8_0 + - glog=0.3.5=hfc679d8_1 + - gnutls=3.5.19=h2a4e5f8_1 + - h5py=2.8.0=py36h7eb728f_3 + - heapdict=1.0.0=py36_1000 + - imageio=2.4.1=py36_1000 + - kiwisolver=1.0.1=py36h2d50403_2 + - krb5=1.16.2=hc83ff2d_1000 + - leveldb=1.20=h00d4201_1 + - libcurl=7.63.0=h01ee5af_1000 + - libglu=9.0.0=hfc679d8_0 + - libgpuarray=0.7.6=h470a237_3 + - libiconv=1.15=h470a237_3 + - libssh2=1.8.0=h1ad7b7a_1003 + - libuuid=2.32.1=h470a237_2 + - lmdb=0.9.22=h470a237_0 + - locket=0.2.0=py_2 + - mako=1.0.7=py_1 + - mkl_fft=1.0.10=py36_0 + - mpi=1.0=openmpi + - msgpack-python=0.6.0=py36h2d50403_0 + - nettle=3.3=0 + - networkx=2.2=py_1 + - openh264=1.8.0=hd28b015_0 + - openmpi=3.1.0=h26a2512_3 + - openssl=1.0.2p=h14c3975_1002 + - packaging=18.0=py_0 + - pandas=0.23.4=py36hf8a1672_0 + - partd=0.3.9=py_0 + - psutil=5.4.8=py36h470a237_0 + - pygpu=0.7.6=py36h7eb728f_0 + - pyparsing=2.3.0=py_0 + - python=3.6.6=h5001a0f_3 + - python-gflags=3.1.2=py_0 + - python-leveldb=0.193=py36_0 + - pywavelets=1.0.1=py36h7eb728f_0 + - sip=4.19.8=py36hfc679d8_0 + - snappy=1.1.7=hfc679d8_2 + - sortedcontainers=2.1.0=py_0 + - tblib=1.3.2=py_1 + - theano=1.0.3=py36hfc679d8_1 + - toolchain=2.3.0=0 + - toolchain_c_linux-64=2.3.0=0 + - toolchain_cxx_linux-64=2.3.0=0 + - toolz=0.9.0=py_1 + - tqdm=4.28.1=py_0 + - x264=1!152.20180717=h470a237_1 + - zict=0.1.3=py_0 + - _nb_ext_conf=0.4.0=py36_1 + - anaconda-client=1.6.14=py36_0 + - asn1crypto=0.24.0=py36_0 + - backcall=0.1.0=py36_0 + - blas=1.0=mkl + - bleach=2.1.3=py36_0 + - bzip2=1.0.6=h14c3975_5 + - caffe=1.0=py36h7073e3f_4 + - cairo=1.14.12=h8948797_3 + - cffi=1.11.5=py36h9745a5d_0 + - chardet=3.0.4=py36h0f667ec_1 + - clyent=1.2.2=py36h7e57e65_1 + - cudatoolkit=9.0=h13b8566_0 + - dbus=1.13.2=h714fa37_1 + - decorator=4.3.0=py36_0 + - entrypoints=0.2.3=py36h1aec115_2 + - gmp=6.1.2=h6c8ec71_1 + - graphite2=1.3.11=h16798f4_2 + - gst-plugins-base=1.14.0=hbbd80ab_1 + - gstreamer=1.14.0=hb453b48_1 + - harfbuzz=1.8.8=hffaf4a1_0 + - hdf5=1.10.2=hba1933b_1 + - html5lib=1.0.1=py36h2f9c1c0_0 + - icu=58.2=h9c2bf20_1 + - idna=2.7=py36_0 + - intel-openmp=2018.0.3=0 + - ipykernel=4.8.2=py36_0 + - ipython=6.4.0=py36_0 + - ipython_genutils=0.2.0=py36hb52b0d5_0 + - ipywidgets=7.2.1=py36_0 + - jasper=2.0.14=h07fcdf6_1 + - jedi=0.12.0=py36_1 + - jinja2=2.10=py36ha16c418_0 + - jpeg=9b=h024ee3a_2 + - jsonschema=2.6.0=py36h006f8b5_0 + - jupyter_client=5.2.3=py36_0 + - jupyter_core=4.4.0=py36h7c827e3_0 + - libboost=1.67.0=h46d08c1_4 + - libedit=3.1.20170329=h6b74fdf_2 + - libffi=3.2.1=hd88cf55_4 + - libgcc-ng=8.2.0=hdf63c60_1 + - libgfortran=3.0.0=1 + - libgfortran-ng=7.2.0=hdf63c60_3 + - libopencv=3.4.2=hb342d67_1 + - libopus=1.2.1=hb9ed12e_0 + - libprotobuf=3.6.1=hd408876_0 + - libsodium=1.0.16=h1bed415_0 + - libstdcxx-ng=8.2.0=hdf63c60_1 + - libtiff=4.0.9=he85c1e1_1 + - libvpx=1.7.0=h439df22_0 + - libxcb=1.13=h1bed415_1 + - libxml2=2.9.8=h26e45fe_1 + - markupsafe=1.0=py36hd9260cd_1 + - mistune=0.8.3=py36h14c3975_1 + - mkl=2018.0.3=1 + - mkl-rt=11.1=p0 + - mkl-service=1.1.2=py36h90e4bf4_5 + - mkl_random=1.0.1=py36h629b387_0 + - nb_anacondacloud=1.4.0=py36_0 + - nb_conda=2.2.1=py36h8118bb2_0 + - nb_conda_kernels=2.1.0=py36_0 + - nbconvert=5.3.1=py36hb41ffb7_0 + - nbformat=4.4.0=py36h31c9010_0 + - nbpresent=3.0.2=py36h5f95a39_1 + - ncurses=6.1=hf484d3e_0 + - ninja=1.8.2=py36h6bb024c_1 + - notebook=5.5.0=py36_0 + - numpy=1.15.4=py36h1d66e8a_0 + - numpy-base=1.15.4=py36h81de0dd_0 + - olefile=0.45.1=py36_0 + - opencv=3.4.1=py36h6fd60c2_1 + - pandoc=2.2.1=h629c226_0 + - pandocfilters=1.4.2=py36ha6701b7_1 + - parso=0.2.1=py36_0 + - pcre=8.42=h439df22_0 + - pexpect=4.6.0=py36_0 + - pickleshare=0.7.4=py36h63277f8_0 + - pillow=5.2.0=py36heded4f4_0 + - pip=10.0.1=py36_0 + - pixman=0.34.0=hceecf20_3 + - prompt_toolkit=1.0.15=py36h17d85b1_0 + - protobuf=3.6.1=py36he6710b0_0 + - ptyprocess=0.6.0=py36_0 + - py-boost=1.67.0=py36h04863e7_4 + - py-opencv=3.4.2=py36hb342d67_1 + - pycparser=2.18=py36hf9f622e_1 + - pygments=2.2.0=py36h0d3125c_0 + - pyopenssl=18.0.0=py36_0 + - pysocks=1.6.8=py36_0 + - python-dateutil=2.7.3=py36_0 + - pytz=2018.5=py36_0 + - pyyaml=3.12=py36hafb9ca4_1 + - pyzmq=17.0.0=py36h14c3975_0 + - readline=7.0=ha6073c6_4 + - requests=2.19.1=py36_0 + - scipy=1.1.0=py36hc49cb51_0 + - send2trash=1.5.0=py36_0 + - setuptools=39.2.0=py36_0 + - simplegeneric=0.8.1=py36_2 + - six=1.11.0=py36h372c433_1 + - terminado=0.8.1=py36_1 + - testpath=0.3.1=py36h8cadb63_0 + - tornado=5.0.2=py36_0 + - traitlets=4.3.2=py36h674d592_0 + - urllib3=1.23=py36_0 + - wcwidth=0.1.7=py36hdf4376a_0 + - webencodings=0.5.1=py36h800622e_1 + - wheel=0.31.1=py36_0 + - widgetsnbextension=3.2.1=py36_0 + - xz=5.2.4=h14c3975_4 + - yaml=0.1.7=had09818_2 + - zeromq=4.2.5=h439df22_0 + - zlib=1.2.11=ha838bed_2 + - cuda90=1.0=h6433d27_0 + - pytorch=0.4.1=py36_py35_py27__9.0.176_7.1.2_2 + - torchvision=0.2.1=py36_1 + - pip: + - absl-py==0.2.2 + - antlr4-python3-runtime==4.7.2 + - astor==0.7.1 + - beautifulsoup4==4.6.0 + - blocksparse==1.0.0 + - boto3==1.9.66 + - botocore==1.12.66 + - bs4==0.0.1 + - cachetools==2.1.0 + - cfgraph==0.2.1 + - colorama==0.4.0 + - colorlog==3.1.4 + - cython==0.28.4 + - dataclasses==0.6 + - dlib==19.16.0 + - docutils==0.14 + - exifread==2.1.2 + - face-recognition==1.2.3 + - face-recognition-models==0.3.0 + - flask==1.0.2 + - flask-cors==3.0.6 + - flask-sqlalchemy==2.3.2 + - flickr-api==0.6.1 + - future==0.16.0 + - gast==0.2.0 + - gdown==3.6.4 + - grpcio==1.13.0 + - horovod==0.13.8 + - html2text==2018.1.9 + - httplib2==0.12.0 + - imagehash==4.0 + - imutils==0.4.6 + - isodate==0.6.0 + - itsdangerous==0.24 + - jmespath==0.9.3 + - jonasz-master-thesis==0.1 + - jsonasobj==1.2.1 + - keras==2.2.0 + - keras-applications==1.0.6 + - keras-preprocessing==1.0.5 + - lasagne==0.2.dev1 + - lxml==4.2.5 + - markdown==2.6.11 + - moviepy==0.2.3.5 + - msgpack==0.6.0 + - mtcnn==0.0.8 + - mwoauth==0.3.3 + - nose==1.3.7 + - oauth2==1.9.0.post1 + - oauthlib==3.0.0 + - opencv-contrib-python==3.4.3.18 + - opencv-python==3.4.2.17 + - pdfminer.six==20170720 + - pyasn1==0.4.4 + - pyasn1-modules==0.2.2 + - pycryptodome==3.7.0 + - pycurl==7.43.0.2 + - pyglet==1.3.2 + - pyjsg==0.9.0 + - pyjwt==1.7.1 + - pymediainfo==2.3.0 + - pyopengl==3.1.0 + - pyserial==3.4 + - pyshex==0.6.1 + - pyshexc==0.5.4 + - python-dotenv==0.10.1 + - python-magic==0.4.15 + - python-slugify==1.2.5 + - pyusb==1.0.2 + - pywavefront==0.3.2 + - rdflib==4.2.2 + - rdflib-jsonld==0.4.0 + - requests-oauthlib==1.2.0 + - rsa==4.0 + - s3cmd==2.0.2 + - s3transfer==0.1.13 + - scikit-learn==0.20.1 + - selenium==3.13.0 + - shexjsg==0.5.6 + - simplejson==3.16.0 + - sparql-slurper==0.1.3 + - sparqlwrapper==1.8.2 + - sqlalchemy==1.2.15 + - tensorboard==1.10.0 + - tensorflow-gpu==1.10.0 + - termcolor==1.1.0 + - tflearn==0.3.2 + - toposort==1.5 + - torch==0.4.1.post2 + - unicode==2.6 + - unidecode==1.0.22 + - visvis==1.11.1 + - werkzeug==0.14.1 + - wikipedia-api==0.4.2 + - wptools==0.4.17 + - youtube-dl==2018.11.3 +prefix: /home/adam/anaconda3/envs/megapixels + diff --git a/megapixels/commands/datasets/ijb_screenshot.py b/megapixels/commands/datasets/ijb_screenshot.py new file mode 100644 index 00000000..e6940d88 --- /dev/null +++ b/megapixels/commands/datasets/ijb_screenshot.py @@ -0,0 +1,105 @@ +# Chrome +# wget https://chromedriver.storage.googleapis.com/73.0.3683.20/chromedriver_linux64.zip +# Firefox +# wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz +# PhantomJS +# npm install -g phantomjs + +import click + +from app.settings import app_cfg + +#/data_store/datasets/people/ijb_c/downloads/tars/IJB/IJB-C/license/cs3_media.csv + +@click.command() +@click.option('-i', '--input', 'opt_fp_in', required=True, + help='Input license data CSV') +@click.option('-o', '--output', 'opt_fp_out', required=True, + help='Output directory') +@click.pass_context +def cli(ctx, opt_fp_in, opt_fp_out): + """IJB-C screenshot sources""" + + import sys + from glob import glob + from os.path import join + from pathlib import Path + import time + + import pandas as pd + import cv2 as cv + from tqdm import tqdm + + from selenium import webdriver + from selenium.webdriver.support import expected_conditions as EC + from selenium.webdriver.support.wait import WebDriverWait + from selenium.webdriver.common.by import By + + from app.utils import file_utils, im_utils, logger_utils + + log = logger_utils.Logger.getLogger() + + chrome_options = webdriver.ChromeOptions() + chrome_options.add_argument('--no-sandbox') + chrome_options.add_argument('--headless') + chrome_options.add_argument('--disable-dev-shm-usage') + driver = webdriver.Chrome(chrome_options=chrome_options) + driver.set_window_size(1920,1080) + + df_licenses = pd.read_csv(opt_fp_in) + log.info(f'{len(df_licenses)} rows') + + for df_idx, df_license in tqdm(df_licenses.iterrows(), total=len(df_licenses)): + filepath = df_license['Media ID'] + if 'frames/' in filepath or 'img/' in filepath: + continue + url = df_license['Media URL'] + if not ('http://' in url or 'https://' in url): + url = 'http://' + url + log.debug(f'getting: {url}') + driver.get(url) + if 'youtube.com' in url: + try: + wait = WebDriverWait(driver,3).until(EC.visibility_of_element_located((By.CLASS_NAME,'ytd-video-secondary-info-renderer'))) + time.sleep(1) # wait for element + except Exception as e: + log.debug(f'error: {e}') + pass + else: + wait = WebDriverWait(driver,5) + time.sleep(1) # wait for element + + fp_media = filepath.replace(Path(filepath).suffix, '.png') + fp_out = join(opt_fp_out, fp_media) + file_utils.mkdirs(fp_out) + log.debug(f'save to: {fp_out}') + driver.get_screenshot_as_file(fp_out) + + driver.quit() + + + +#wait = WebDriverWait(driver,3).until(EC.presence_of_element_located((By.CLASS_NAME,'ytd-watch-next-secondary-results-renderer'))) +#wait = WebDriverWait(driver,3).until(EC.text_to_be_present_in_element_value((By.CLASS_NAME,'yt-next-continuation'), 'show')) +#wait = WebDriverWait(driver,10).until(EC.presence_of_element_located((By.CLASS_NAME,'ytd-video-secondary-info-renderer'))) +#driver.execute_script("document.getElementById('related').style.display = 'None';") + +''' +title_is +title_contains +presence_of_element_located +visibility_of_element_located +visibility_of +presence_of_all_elements_located +text_to_be_present_in_element +text_to_be_present_in_element_value +frame_to_be_available_and_switch_to_it +invisibility_of_element_located +element_to_be_clickable - it is Displayed and Enabled. +staleness_of +element_to_be_selected +element_located_to_be_selected +element_selection_state_to_be +element_located_selection_state_to_be +alert_is_present +'''
\ No newline at end of file diff --git a/megapixels/commands/datasets/ijb_screenshot_mt.py b/megapixels/commands/datasets/ijb_screenshot_mt.py new file mode 100644 index 00000000..616893c7 --- /dev/null +++ b/megapixels/commands/datasets/ijb_screenshot_mt.py @@ -0,0 +1,156 @@ +"""Create screenshots for YouTube.com URLs in the IJB dataset + +TODO +- grey out boxes in sidebar +- resize driver screenshot area to include author text + +Installing webdrivers: + +Chrome +wget https://chromedriver.storage.googleapis.com/73.0.3683.20/chromedriver_linux64.zip + +Firefox +wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz + +PhantomJS +npm install -g phantomjs +""" + +import click + +from app.settings import app_cfg + +#/data_store/datasets/people/ijb_c/downloads/tars/IJB/IJB-C/license/cs3_media.csv + +@click.command() +@click.option('-i', '--input', 'opt_fp_in', required=True, + help='Input license data CSV') +@click.option('-o', '--output', 'opt_fp_out', required=True, + help='Output directory') +@click.option('-t', '--threads', 'opt_threads', default=20, + help='Number of threads') +@click.pass_context +def cli(ctx, opt_fp_in, opt_fp_out, opt_threads): + """IJB-C screenshot sources""" + + import sys + from glob import glob + from os.path import join + from pathlib import Path + import time + from functools import partial + from multiprocessing.dummy import Pool as ThreadPool + + import pandas as pd + import cv2 as cv + from tqdm import tqdm + + from selenium import webdriver + from selenium.webdriver.support import expected_conditions as EC + from selenium.webdriver.support.wait import WebDriverWait + from selenium.webdriver.common.by import By + + from app.utils import file_utils, im_utils, logger_utils + + log = logger_utils.Logger.getLogger() + + chrome_options = webdriver.ChromeOptions() + chrome_options.add_argument('--no-sandbox') + chrome_options.add_argument('--headless') + chrome_options.add_argument('--disable-dev-shm-usage') + + + def pool_process(route, chrome_options): + # Threaded image resize function + try: + pbar.update(1) + + driver = webdriver.Chrome(chrome_options=chrome_options) + driver.set_window_size(1920,1080) + + url = route['url'] + fp_out = route['dst'] + log.debug(f'url: {url}, dst: {fp_out}') + driver.get(url) + + if 'youtube.com' in url: + try: + wait = WebDriverWait(driver,30).until(EC.visibility_of_element_located((By.CLASS_NAME,'ytd-video-secondary-info-renderer'))) + except Exception as e: + log.debug(f'error: {e}') + pass + else: + wait = WebDriverWait(driver,10) + time.sleep(1) # wait for element + + time.sleep(10) # wait for element + file_utils.mkdirs(fp_out) + log.debug(f'save to: {fp_out}') + driver.get_screenshot_as_file(fp_out) + driver.quit() + + return True + except: + return False + + # load + routes = [] + df_licenses = pd.read_csv(opt_fp_in) + log.info(f'{len(df_licenses)} rows') + for df_idx, df_license in tqdm(df_licenses.iterrows(), total=len(df_licenses)): + filepath = df_license['Media ID'] + if not 'video/' in filepath: + continue + url = str(df_license['Media URL']) + if not ('http://' in url or 'https://' in url): + url = 'http://' + url + fp_media = filepath.replace(Path(filepath).suffix, '.png') + fp_out = join(opt_fp_out, fp_media) + obj = {'url': url, 'dst': fp_out} + routes.append(obj) + + # setup multithreading + for route in routes: + log.debug(f'url: {route["url"]}, dst: {route["dst"]}') + + return + results = [] + pbar = tqdm(total=len(routes)) + pool_process = partial(pool_process, chrome_options=chrome_options) + pool = ThreadPool(opt_threads) + with tqdm(total=len(routes)) as pbar: + results = pool.map(pool_process, routes) + pbar.close() + + + + + + + + + +#wait = WebDriverWait(driver,3).until(EC.presence_of_element_located((By.CLASS_NAME,'ytd-watch-next-secondary-results-renderer'))) +#wait = WebDriverWait(driver,3).until(EC.text_to_be_present_in_element_value((By.CLASS_NAME,'yt-next-continuation'), 'show')) +#wait = WebDriverWait(driver,10).until(EC.presence_of_element_located((By.CLASS_NAME,'ytd-video-secondary-info-renderer'))) +#driver.execute_script("document.getElementById('related').style.display = 'None';") + +''' +title_is +title_contains +presence_of_element_located +visibility_of_element_located +visibility_of +presence_of_all_elements_located +text_to_be_present_in_element +text_to_be_present_in_element_value +frame_to_be_available_and_switch_to_it +invisibility_of_element_located +element_to_be_clickable - it is Displayed and Enabled. +staleness_of +element_to_be_selected +element_located_to_be_selected +element_selection_state_to_be +element_located_selection_state_to_be +alert_is_present +'''
\ No newline at end of file diff --git a/megapixels/commands/demo/face_3ddfa.py b/megapixels/commands/demo/face_3ddfa.py index 90359159..23bbcf7e 100644 --- a/megapixels/commands/demo/face_3ddfa.py +++ b/megapixels/commands/demo/face_3ddfa.py @@ -300,6 +300,9 @@ def cli(ctx, opt_fp_in, opt_dir_out, opt_gpu, opt_bbox_init, fp_out = join(fpp_out, f'{fpp_in.stem}.obj') write_obj_with_colors(fp_out, vertices_orig, triangles, colors) + fp_out = join(fpp_out, f'{fpp_in.stem}.txt') + np.savetxt(fp_out, pts68, fmt='%.3f') + # ---------------------------------------------------------------------------- # display diff --git a/megapixels/commands/processor/_old_files_to_face_rois.py b/megapixels/commands/processor/_old_files_to_face_rois.py index d92cbd74..895f4718 100644 --- a/megapixels/commands/processor/_old_files_to_face_rois.py +++ b/megapixels/commands/processor/_old_files_to_face_rois.py @@ -1,4 +1,4 @@ -""" + """ Crop images to prepare for training """ diff --git a/megapixels/commands/visualize/weasyprinter.py b/megapixels/commands/visualize/weasyprinter.py new file mode 100644 index 00000000..4e9cd1ac --- /dev/null +++ b/megapixels/commands/visualize/weasyprinter.py @@ -0,0 +1,54 @@ +""" +Crop images to prepare for training +""" + +import click +# from PIL import Image, ImageOps, ImageFilter, ImageDraw + +from app.settings import types +from app.utils import click_utils +from app.settings import app_cfg as cfg + +color_filters = {'color': 1, 'gray': 2, 'all': 3} + +@click.command() +@click.option('--html', 'opt_fp_in_html', required=True, + help='Input HTML') +@click.option('--css', 'opt_fp_in_css', required=True, + help='Input CSS') +@click.option('-o', '--output', 'opt_fp_out', required=True, + help='Output PDF') +@click.option('-f', '--force', 'opt_force', is_flag=True, + help='Force overwrite file') +@click.pass_context +def cli(ctx, opt_fp_in_html, opt_fp_in_css, opt_fp_out, opt_force): + """Generates PDF files from HTML, CSS""" + + import sys + import os + from os.path import join + from pathlib import Path + + from tqdm import tqdm + import numpy as np + import pandas as pd + from weasyprint import HTML, CSS + from weasyprint.fonts import FontConfiguration + + from app.utils import logger_utils, file_utils, im_utils, display_utils, draw_utils + from app.utils import plot_utils + from app.models.data_store import DataStore + + # ------------------------------------------------- + # init here + + log = logger_utils.Logger.getLogger() + + + font_config = FontConfiguration() + html = HTML(filename=opt_fp_in_html) + css = CSS(filename=opt_fp_in_css) + document = html.render(stylesheets=[css], font_config=font_config) + document.resolve_links() + document.make_bookmark_tree() + document.write_pdf(opt_fp_out)
\ No newline at end of file diff --git a/notes/frameworks/cairo.md b/notes/frameworks/cairo.md index 3eeb2159..4022ae54 100644 --- a/notes/frameworks/cairo.md +++ b/notes/frameworks/cairo.md @@ -1,8 +1,6 @@ # Cairo -WeasyPrint relies on Cairo>1.14.~ but cairo=1.15.* didn't install correctly. Cairo 1.16.0 tested and works as of Feb 9 - -Install cairo on Ubuntu 16.04 for WeasyPrint +Requires cairo built form source. The conda builds dont' work: unable to render background-image css. On Ubuntu18+ might be able to install with apt. For Ubuntu 16.04 run: ``` wget https://www.cairographics.org/releases/cairo-1.16.0.tar.xz @@ -11,7 +9,18 @@ cd cairo-1.16.0 ./configure --prefix=$HOME/code/cairo make make install -export PKG_CONFIG_PATH=$HOME/code/cairo/lib/pkgconfig -export LD_LIBRARY_PATH=$HOME/code/cairo/lib +export PKG_CONFIG_PATH=$HOME/code/cairo/lib/pkgconfig:$PKG_CONFIG +export LD_LIBRARY_PATH=$HOME/code/cairo/lib:$LD_LIBRARY_PATH # pip install weasyprint -```
\ No newline at end of file +``` + +Virtualenv +- Works in virtualenv with python `mkvirtualenv weasycairo -p python3.6` +- Doesn't work in virtualenv w/o cairo local build paths, cairo is < 1.15.4 + +Conda +- Works in conda env with python 3.6 and cairo built on system with paths set +- doesn't work with conda build of 1.16 (both builds don't work) +- Doesnt work in megapixels conda env even with local cairo build + +WeasyPrint relies on Cairo>1.15.4. Locally built Cairo 1.16.0 tested and works as of Feb 9. But the conda installed Cairo 16 has issues
\ No newline at end of file diff --git a/notes/frameworks/dlib.md b/notes/frameworks/dlib.md index a497f761..decf182b 100644 --- a/notes/frameworks/dlib.md +++ b/notes/frameworks/dlib.md @@ -1,7 +1,20 @@ # dlib + +``` +git clone https://github.com/davisking/dlib.git +cd dlib +mkdir build +d build +cmake .. -DDLIB_USE_CUDA=1 -DUSE_AVX_INSTRUCTIONS=1 +cmake --build . +cd .. +python setup.py install --yes USE_AVX_INSTRUCTIONS --yes DLIB_USE_CUDA +python -c 'import dlib;print(f'dlib GPU installed: {dlib.DLIB_USE_CUDA})' +``` + - dlib==19.7 required for `face_recognition` - dlib==19.6 works for 3ddfa - - `libmkl_rt.so` is missing: `export LD_LIBRARY_PATH=/home/adam/anaconda3/lib/:$LD_LIBRARY_PATH` -- if `lib16..so` is missing: `apt install libboost-all-dev`
\ No newline at end of file +- if `lib16..so` is missing: `apt install libboost-all-dev` +- libmkl_rt.so canont open shared object file: <https://github.com/davisking/dlib/issues/587>
\ No newline at end of file diff --git a/notes/frameworks/jupyter.md b/notes/frameworks/jupyter.md new file mode 100644 index 00000000..787fa4b9 --- /dev/null +++ b/notes/frameworks/jupyter.md @@ -0,0 +1,6 @@ +# Jupyter + +- `conda install nb_conda nb_conda_kernels jupyter` +- add `python -m ipykernel install --user --name megapixels` +- remove `jupyter kernelspec remove weasycairo_ve_36` +- list `jupyter kernelspec list`
\ No newline at end of file |
