diff --git a/README.md b/README.md index a8f492fee..75791a18b 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ There are some implement details with paper description, which maybe different w - We used the ResNet block and channel concatenation style like vanilla `DDPM`. - We used the attention mechanism in low resolution feature(16×16) like vanilla `DDPM`. - We encoding the $\gamma$ as `FilM` strcutrue did in `WaveGrad`, and embedding it without affine transformation. +- We define posterior variance as $ \dfrac{1-\gamma_{t-1}}{1-\gamma_{t}} \beta_t $ rather than $\beta_t$, which have the similar results in vanilla paper. **If you just want to upscale `64x64px` -> `512x512px` images using the pre-trained model, check out [this google colab script](https://colab.research.google.com/drive/1G1txPI1GKueKH0cSi_DgQFKwfyJOXlhY?usp=sharing).** @@ -71,9 +72,7 @@ There are some implement details with paper description, which maybe different w ## Usage ### Environment ```python -# Copy the pytorch environment using the dependencies files, and you can choose the either of the following ways. -conda env create -f core/environment.yml -conda create --name pytorch --file core/environment.txt +pip install -r requirement.txt ``` ### Pretrained Model @@ -125,20 +124,27 @@ then you need to change the datasets config to your data path and image resoluti #### Own Data -You also can use your image data by following steps. -We have some examples in dataset folder. +You also can use your image data by following steps, and we have some examples in dataset folder. -At first, you should organize images layout like this: +At first, you should organize images layout like this, this step can be finished by `data/prepare_data.py` automatically: ```shell -# set the high/low resolution images, bicubic interpolation images path +# set the high/low resolution images, bicubic interpolation images path dataset/celebahq_16_128/ -├── hr_128 -├── lr_16 -└── sr_16_128 +├── hr_128 # it's same with sr_16_128 directory if you don't have ground-truth images. +├── lr_16 # vinilla low resolution images +└── sr_16_128 # images ready to super resolution ``` +```python +# super resolution from 16 to 128 +python data/prepare_data.py --path [dataset root] --out celebahq --size 16,128 -l +``` + +*Note: Above script can be used whether you have the vinilla high-resolution images or not.* + then you need to change the dataset config to your data path and image resolution: + ```json "datasets": { "train|val": { // train and validation part @@ -170,7 +176,7 @@ python eval.py -p [result root] ### Inference Alone -Set the HR (vanilla high resolution images), SR (images need processed) image path like step in `Own Data`. HR directory contexts can be copy from SR, and LR directory is unnecessary. +Set the image path like steps in `Own Data`, then run the script: ```python # run the script diff --git a/core/environment.txt b/core/environment.txt deleted file mode 100644 index d9d4f3985..000000000 --- a/core/environment.txt +++ /dev/null @@ -1,149 +0,0 @@ -# This file may be used to create an environment using: -# $ conda create --name --file -# platform: linux-64 -@EXPLICIT -https://repo.anaconda.com/pkgs/main/linux-64/_libgcc_mutex-0.1-main.conda -https://repo.anaconda.com/pkgs/main/linux-64/_tflow_select-2.3.0-eigen.conda -https://repo.anaconda.com/pkgs/main/linux-64/blas-1.0-mkl.conda -https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2020.12.5-ha878542_0.tar.bz2 -https://repo.anaconda.com/pkgs/main/linux-64/intel-openmp-2020.2-254.conda -https://repo.anaconda.com/pkgs/main/linux-64/ld_impl_linux-64-2.33.1-h53a641e_7.conda -https://repo.anaconda.com/pkgs/main/linux-64/libgfortran-ng-7.3.0-hdf63c60_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/libstdcxx-ng-9.1.0-hdf63c60_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/libgcc-ng-9.1.0-hdf63c60_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/mkl-2020.2-256.conda -https://repo.anaconda.com/pkgs/main/linux-64/c-ares-1.17.1-h27cfd23_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/cudatoolkit-10.2.89-hfd86e86_1.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/expat-2.2.9-he1b5a44_2.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/icu-58.2-hf484d3e_1000.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/jpeg-9b-h024ee3a_2.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/libblas-3.8.0-21_mkl.tar.bz2 -https://repo.anaconda.com/pkgs/main/linux-64/libffi-3.3-he6710b0_2.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/libuuid-2.32.1-h14c3975_1000.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/libuv-1.40.0-hd18ef5c_0.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/lz4-c-1.9.2-he1b5a44_3.tar.bz2 -https://repo.anaconda.com/pkgs/main/linux-64/ncurses-6.2-he6710b0_1.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/openssl-1.1.1l-h7f8727e_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/pcre-8.44-he1b5a44_0.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/pthread-stubs-0.4-h36c2ea0_1001.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/xorg-libxau-1.0.9-h14c3975_0.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/xorg-libxdmcp-1.1.3-h516909a_0.tar.bz2 -https://repo.anaconda.com/pkgs/main/linux-64/xz-5.2.5-h7b6447c_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/yaml-0.2.5-h516909a_0.tar.bz2 -https://repo.anaconda.com/pkgs/main/linux-64/zlib-1.2.11-h7b6447c_3.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/glib-2.66.1-h92f7085_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/hdf5-1.10.6-hb1b8bf9_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/libcblas-3.8.0-21_mkl.tar.bz2 -https://repo.anaconda.com/pkgs/main/linux-64/libedit-3.1.20191231-h14c3975_1.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/libpng-1.6.37-h21135ba_2.tar.bz2 -https://repo.anaconda.com/pkgs/main/linux-64/libprotobuf-3.13.0.1-hd408876_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/libxcb-1.13-h14c3975_1002.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/libxml2-2.9.10-hb55368b_3.conda -https://repo.anaconda.com/pkgs/main/linux-64/readline-8.0-h7b6447c_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/tk-8.6.10-hbc83047_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/zstd-1.4.5-h6597ccf_2.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/dbus-1.13.6-he372182_0.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/freetype-2.10.4-h7ca028e_0.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/gstreamer-1.14.0-hb31296c_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/libtiff-4.1.0-h2733197_1.conda -https://repo.anaconda.com/pkgs/main/linux-64/sqlite-3.33.0-h62c20be_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/fontconfig-2.13.1-he4413a7_1000.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/gst-plugins-base-1.14.0-hbbd80ab_1.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/lcms2-2.11-h396b838_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/python-3.7.9-h7579374_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/async-timeout-3.0.1-py37_0.conda -https://repo.anaconda.com/pkgs/main/noarch/attrs-20.3.0-pyhd3eb1b0_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/blinker-1.4-py37_0.conda -https://repo.anaconda.com/pkgs/main/noarch/cachetools-4.2.0-pyhd3eb1b0_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/chardet-3.0.4-py37h06a4308_1003.conda -https://repo.anaconda.com/pkgs/main/noarch/click-7.1.2-py_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/cloudpickle-1.6.0-py_0.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/decorator-4.4.2-py_0.tar.bz2 -https://repo.anaconda.com/pkgs/main/noarch/gast-0.3.3-py_0.conda -https://repo.anaconda.com/pkgs/main/noarch/idna-2.10-py_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/multidict-4.7.6-py37h7b6447c_1.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/ninja-1.10.2-py37hff7bd54_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/olefile-0.46-pyh9f0ad1d_1.tar.bz2 -https://repo.anaconda.com/pkgs/main/noarch/pyasn1-0.4.8-py_0.conda -https://repo.anaconda.com/pkgs/main/noarch/pycparser-2.20-py_2.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/pyparsing-2.4.7-pyh9f0ad1d_0.tar.bz2 -https://repo.anaconda.com/pkgs/main/linux-64/pysocks-1.7.1-py37_1.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/python_abi-3.7-1_cp37m.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/pytz-2021.1-pyhd8ed1ab_0.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/qt-5.9.7-h5867ecd_1.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/sip-4.19.8-py37hf484d3e_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/six-1.15.0-py37h06a4308_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/termcolor-1.1.0-py37_1.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/threadpoolctl-2.1.0-pyh5ca1d4c_0.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/toolz-0.11.1-py_0.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/typing_extensions-3.7.4.3-py_0.tar.bz2 -https://repo.anaconda.com/pkgs/main/noarch/werkzeug-1.0.1-py_0.conda -https://repo.anaconda.com/pkgs/main/noarch/wheel-0.36.2-pyhd3eb1b0_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/wrapt-1.12.1-py37h7b6447c_1.conda -https://repo.anaconda.com/pkgs/main/noarch/zipp-3.4.0-pyhd3eb1b0_0.conda -https://repo.anaconda.com/pkgs/main/noarch/absl-py-0.11.0-pyhd3eb1b0_1.conda -https://repo.anaconda.com/pkgs/main/noarch/astunparse-1.6.3-py_0.conda -https://conda.anaconda.org/conda-forge/linux-64/certifi-2020.12.5-py37h89c1867_1.tar.bz2 -https://repo.anaconda.com/pkgs/main/linux-64/cffi-1.14.4-py37h261ae71_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/cycler-0.10.0-py_2.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/cytoolz-0.11.0-py37h4abf009_1.tar.bz2 -https://repo.anaconda.com/pkgs/main/noarch/google-pasta-0.2.0-py_0.conda -https://repo.anaconda.com/pkgs/main/noarch/importlib-metadata-2.0.0-py_1.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/kiwisolver-1.3.1-py37hc928c03_0.tar.bz2 -https://repo.anaconda.com/pkgs/main/linux-64/mkl-service-2.3.0-py37he8ac12f_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/pillow-8.0.1-py37he98fc37_0.conda -https://repo.anaconda.com/pkgs/main/noarch/pyasn1-modules-0.2.8-py_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/pyqt-5.9.2-py37hcca6a23_4.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/python-dateutil-2.8.1-py_0.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/pyyaml-5.3.1-py37hb5d75c8_1.tar.bz2 -https://repo.anaconda.com/pkgs/main/noarch/rsa-4.6-py_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/tornado-6.1-py37h4abf009_0.tar.bz2 -https://repo.anaconda.com/pkgs/main/linux-64/yarl-1.6.3-py37h27cfd23_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/aiohttp-3.6.3-py37h7b6447c_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/arrow-1.0.3-py37h89c1867_0.tar.bz2 -https://repo.anaconda.com/pkgs/main/linux-64/brotlipy-0.7.0-py37h27cfd23_1003.conda -https://repo.anaconda.com/pkgs/main/linux-64/cryptography-3.3.1-py37h3c74f83_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/dask-core-2020.12.0-pyhd8ed1ab_0.tar.bz2 -https://repo.anaconda.com/pkgs/main/linux-64/markdown-3.3.3-py37h06a4308_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/numpy-base-1.19.2-py37hfa32c7d_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/setuptools-51.0.0-py37h06a4308_2.conda -https://repo.anaconda.com/pkgs/main/noarch/google-auth-1.24.0-pyhd3eb1b0_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/grpcio-1.31.0-py37hf8bcb03_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/joblib-1.0.0-pyhd8ed1ab_0.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/networkx-2.5-py_0.tar.bz2 -https://repo.anaconda.com/pkgs/main/linux-64/pip-20.3.3-py37h06a4308_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/protobuf-3.13.0.1-py37he6710b0_1.conda -https://repo.anaconda.com/pkgs/main/linux-64/pyjwt-1.7.1-py37_0.conda -https://repo.anaconda.com/pkgs/main/noarch/pyopenssl-20.0.1-pyhd3eb1b0_1.conda -https://repo.anaconda.com/pkgs/main/noarch/tensorboard-plugin-wit-1.6.0-py_0.conda -https://repo.anaconda.com/pkgs/main/noarch/oauthlib-3.1.0-py_0.conda -https://repo.anaconda.com/pkgs/main/noarch/urllib3-1.26.2-pyhd3eb1b0_0.conda -https://repo.anaconda.com/pkgs/main/noarch/requests-2.25.1-pyhd3eb1b0_0.conda -https://repo.anaconda.com/pkgs/main/noarch/requests-oauthlib-1.3.0-py_0.conda -https://repo.anaconda.com/pkgs/main/noarch/google-auth-oauthlib-0.4.2-pyhd3eb1b0_2.conda -https://repo.anaconda.com/pkgs/main/linux-64/h5py-2.10.0-py37hd6299e0_1.conda -https://repo.anaconda.com/pkgs/main/linux-64/mkl_fft-1.2.0-py37h23d657b_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/mkl_random-1.1.1-py37h0573a6f_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/numpy-1.19.2-py37h54aff64_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/imageio-2.9.0-py_0.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/matplotlib-base-3.3.3-py37h4f6019d_0.tar.bz2 -https://repo.anaconda.com/pkgs/main/noarch/opt_einsum-3.1.0-py_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/pandas-1.0.1-py37hb3f55d8_0.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/linux-64/pytorch-1.7.1-py3.7_cuda10.2.89_cudnn7.6.5_0.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/pywavelets-1.1.1-py37h161383b_3.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/scipy-1.5.2-py37h0b6359f_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch/tensorboard-2.4.0-pyhc547734_0.conda -https://repo.anaconda.com/pkgs/main/noarch/keras-preprocessing-1.1.0-py_1.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/matplotlib-3.3.3-py37h89c1867_0.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/patsy-0.5.1-py_0.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/scikit-image-0.16.2-py37hb3f55d8_0.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/scikit-learn-0.23.2-py37hddcf8d6_3.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/seaborn-base-0.11.1-pyhd8ed1ab_1.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/linux-64/torchaudio-0.7.2-py37.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/linux-64/torchvision-0.8.2-py37_cu102.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/statsmodels-0.11.1-py37h8f50634_2.tar.bz2 -https://repo.anaconda.com/pkgs/main/linux-64/tensorflow-base-2.3.0-eigen_py37h3b305d7_0.conda -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/timm-0.4.12-pyhd8ed1ab_0.tar.bz2 -https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/seaborn-0.11.1-hd8ed1ab_1.tar.bz2 -https://repo.anaconda.com/pkgs/main/noarch/tensorflow-estimator-2.3.0-pyheb71bc4_0.conda -https://repo.anaconda.com/pkgs/main/linux-64/tensorflow-2.3.0-eigen_py37h189e6a2_0.conda diff --git a/core/environment.yml b/core/environment.yml deleted file mode 100644 index 2afd4ef50..000000000 --- a/core/environment.yml +++ /dev/null @@ -1,188 +0,0 @@ -name: pytorch -channels: - - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch - - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - - conda-forge - - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge - - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ - - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/ - - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/ - - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/ - - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ - - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ - - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ - - defaults -dependencies: - - _libgcc_mutex=0.1=main - - _tflow_select=2.3.0=eigen - - absl-py=0.11.0=pyhd3eb1b0_1 - - aiohttp=3.6.3=py37h7b6447c_0 - - arrow=1.0.3=py37h89c1867_0 - - astunparse=1.6.3=py_0 - - async-timeout=3.0.1=py37_0 - - attrs=20.3.0=pyhd3eb1b0_0 - - blas=1.0=mkl - - blinker=1.4=py37_0 - - brotlipy=0.7.0=py37h27cfd23_1003 - - c-ares=1.17.1=h27cfd23_0 - - ca-certificates=2020.12.5=ha878542_0 - - cachetools=4.2.0=pyhd3eb1b0_0 - - certifi=2020.12.5=py37h89c1867_1 - - cffi=1.14.4=py37h261ae71_0 - - chardet=3.0.4=py37h06a4308_1003 - - click=7.1.2=py_0 - - cloudpickle=1.6.0=py_0 - - cryptography=3.3.1=py37h3c74f83_0 - - cudatoolkit=10.2.89=hfd86e86_1 - - cycler=0.10.0=py_2 - - cytoolz=0.11.0=py37h4abf009_1 - - dask-core=2020.12.0=pyhd8ed1ab_0 - - dbus=1.13.6=he372182_0 - - decorator=4.4.2=py_0 - - expat=2.2.9=he1b5a44_2 - - fontconfig=2.13.1=he4413a7_1000 - - freetype=2.10.4=h7ca028e_0 - - gast=0.3.3=py_0 - - glib=2.66.1=h92f7085_0 - - google-auth=1.24.0=pyhd3eb1b0_0 - - google-auth-oauthlib=0.4.2=pyhd3eb1b0_2 - - google-pasta=0.2.0=py_0 - - grpcio=1.31.0=py37hf8bcb03_0 - - gst-plugins-base=1.14.0=hbbd80ab_1 - - gstreamer=1.14.0=hb31296c_0 - - h5py=2.10.0=py37hd6299e0_1 - - hdf5=1.10.6=hb1b8bf9_0 - - icu=58.2=hf484d3e_1000 - - idna=2.10=py_0 - - imageio=2.9.0=py_0 - - importlib-metadata=2.0.0=py_1 - - intel-openmp=2020.2=254 - - joblib=1.0.0=pyhd8ed1ab_0 - - jpeg=9b=h024ee3a_2 - - keras-preprocessing=1.1.0=py_1 - - kiwisolver=1.3.1=py37hc928c03_0 - - lcms2=2.11=h396b838_0 - - ld_impl_linux-64=2.33.1=h53a641e_7 - - libblas=3.8.0=21_mkl - - libcblas=3.8.0=21_mkl - - libedit=3.1.20191231=h14c3975_1 - - libffi=3.3=he6710b0_2 - - libgcc-ng=9.1.0=hdf63c60_0 - - libgfortran-ng=7.3.0=hdf63c60_0 - - libpng=1.6.37=h21135ba_2 - - libprotobuf=3.13.0.1=hd408876_0 - - libstdcxx-ng=9.1.0=hdf63c60_0 - - libtiff=4.1.0=h2733197_1 - - libuuid=2.32.1=h14c3975_1000 - - libuv=1.40.0=hd18ef5c_0 - - libxcb=1.13=h14c3975_1002 - - libxml2=2.9.10=hb55368b_3 - - lz4-c=1.9.2=he1b5a44_3 - - markdown=3.3.3=py37h06a4308_0 - - matplotlib=3.3.3=py37h89c1867_0 - - matplotlib-base=3.3.3=py37h4f6019d_0 - - mkl=2020.2=256 - - mkl-service=2.3.0=py37he8ac12f_0 - - mkl_fft=1.2.0=py37h23d657b_0 - - mkl_random=1.1.1=py37h0573a6f_0 - - multidict=4.7.6=py37h7b6447c_1 - - ncurses=6.2=he6710b0_1 - - networkx=2.5=py_0 - - ninja=1.10.2=py37hff7bd54_0 - - numpy=1.19.2=py37h54aff64_0 - - numpy-base=1.19.2=py37hfa32c7d_0 - - oauthlib=3.1.0=py_0 - - olefile=0.46=pyh9f0ad1d_1 - - openssl=1.1.1l=h7f8727e_0 - - opt_einsum=3.1.0=py_0 - - patsy=0.5.1=py_0 - - pcre=8.44=he1b5a44_0 - - pillow=8.0.1=py37he98fc37_0 - - pip=20.3.3=py37h06a4308_0 - - protobuf=3.13.0.1=py37he6710b0_1 - - pthread-stubs=0.4=h36c2ea0_1001 - - pyasn1=0.4.8=py_0 - - pyasn1-modules=0.2.8=py_0 - - pycparser=2.20=py_2 - - pyjwt=1.7.1=py37_0 - - pyopenssl=20.0.1=pyhd3eb1b0_1 - - pyparsing=2.4.7=pyh9f0ad1d_0 - - pyqt=5.9.2=py37hcca6a23_4 - - pysocks=1.7.1=py37_1 - - python=3.7.9=h7579374_0 - - python-dateutil=2.8.1=py_0 - - python_abi=3.7=1_cp37m - - pytorch=1.7.1=py3.7_cuda10.2.89_cudnn7.6.5_0 - - pytz=2021.1=pyhd8ed1ab_0 - - pywavelets=1.1.1=py37h161383b_3 - - qt=5.9.7=h5867ecd_1 - - readline=8.0=h7b6447c_0 - - requests=2.25.1=pyhd3eb1b0_0 - - requests-oauthlib=1.3.0=py_0 - - rsa=4.6=py_0 - - scikit-image=0.16.2=py37hb3f55d8_0 - - seaborn=0.11.1=hd8ed1ab_1 - - seaborn-base=0.11.1=pyhd8ed1ab_1 - - setuptools=51.0.0=py37h06a4308_2 - - sip=4.19.8=py37hf484d3e_0 - - six=1.15.0=py37h06a4308_0 - - sqlite=3.33.0=h62c20be_0 - - statsmodels=0.11.1=py37h8f50634_2 - - tensorboard=2.4.0=pyhc547734_0 - - tensorboard-plugin-wit=1.6.0=py_0 - - tensorflow=2.3.0=eigen_py37h189e6a2_0 - - tensorflow-base=2.3.0=eigen_py37h3b305d7_0 - - tensorflow-estimator=2.3.0=pyheb71bc4_0 - - termcolor=1.1.0=py37_1 - - threadpoolctl=2.1.0=pyh5ca1d4c_0 - - timm=0.4.12=pyhd8ed1ab_0 - - tk=8.6.10=hbc83047_0 - - toolz=0.11.1=py_0 - - torchaudio=0.7.2=py37 - - torchvision=0.8.2=py37_cu102 - - tornado=6.1=py37h4abf009_0 - - typing_extensions=3.7.4.3=py_0 - - urllib3=1.26.2=pyhd3eb1b0_0 - - werkzeug=1.0.1=py_0 - - wheel=0.36.2=pyhd3eb1b0_0 - - wrapt=1.12.1=py37h7b6447c_1 - - xorg-libxau=1.0.9=h14c3975_0 - - xorg-libxdmcp=1.1.3=h516909a_0 - - xz=5.2.5=h7b6447c_0 - - yaml=0.2.5=h516909a_0 - - yarl=1.6.3=py37h27cfd23_0 - - zipp=3.4.0=pyhd3eb1b0_0 - - zlib=1.2.11=h7b6447c_3 - - zstd=1.4.5=h6597ccf_2 - - pip: - - backcall==0.2.0 - - einops==0.3.0 - - inplace-abn==1.1.0 - - ipykernel==5.5.3 - - ipython==7.22.0 - - ipython-genutils==0.2.0 - - jedi==0.18.0 - - jupyter-client==6.1.12 - - jupyter-core==4.7.1 - - lmdb==1.0.0 - - nltk==3.6.5 - - opencv-python==4.4.0.46 - - pandas==1.2.3 - - parso==0.8.2 - - pexpect==4.8.0 - - pickleshare==0.7.5 - - prompt-toolkit==3.0.18 - - ptyprocess==0.7.0 - - pygments==2.8.1 - - pyyaml==5.3.1 - - pyzmq==22.0.3 - - regex==2021.11.10 - - scikit-learn==0.24.0 - - scipy==1.2.1 - - tensorboardx==2.4.1 - - torch-tb-profiler==0.1.0 - - tqdm==4.55.0 - - traitlets==5.0.5 - - wcwidth==0.2.5 -prefix: /home/user/anaconda3/envs/pytorch - diff --git a/infer.py b/infer.py index a8201fea0..edc1e0357 100755 --- a/infer.py +++ b/infer.py @@ -8,8 +8,6 @@ from core.wandb_logger import WandbLogger from tensorboardX import SummaryWriter import os -import numpy as np -import wandb if __name__ == "__main__": parser = argparse.ArgumentParser() diff --git a/requirement.txt b/requirement.txt new file mode 100644 index 000000000..0aaed4d63 --- /dev/null +++ b/requirement.txt @@ -0,0 +1,11 @@ +torch>=1.6 +torchvision +numpy +pandas +tqdm +lmdb +opencv-python +pillow +tensorboardx +wandb + diff --git a/sample.py b/sample.py index c3fc2236d..ce2b54a73 100755 --- a/sample.py +++ b/sample.py @@ -9,7 +9,6 @@ from tensorboardX import SummaryWriter import os import numpy as np -import wandb if __name__ == "__main__": parser = argparse.ArgumentParser() diff --git a/sr.py b/sr.py index c8d0f7b75..0657500b9 100755 --- a/sr.py +++ b/sr.py @@ -9,7 +9,6 @@ from tensorboardX import SummaryWriter import os import numpy as np -import wandb if __name__ == "__main__": parser = argparse.ArgumentParser() @@ -42,6 +41,7 @@ # Initialize WandbLogger if opt['enable_wandb']: + import wandb wandb_logger = WandbLogger(opt) wandb.define_metric('validation/val_step') wandb.define_metric('epoch')