Giter Club home page Giter Club logo

sketch-to-art's Introduction

Sketch to Art 🎨

You could be an artist with AI

[Live Demo] Note: Only frontend is available now

Or you can Run with Docker in minutes

Introduction

This project can transform your casual sketch to beautiful painting/artwork using modern AI technology.

Screenshots

Run with Docker

With Docker, you can quickly build and run the entire application in minutes 🐳

# 1. First, clone the repo
git clone https://github.com/mtobeiyf/sketch-to-art.git
cd sketch-to-art

# 2. Build Docker image
docker build -t sketch-to-art:dev .

# 3. Run!
docker run -it --rm -p 8080:8080 -p 5001:5001 -p 5002:5002 sketch-to-art:dev

Then, go to localhost:8080 and play with the demo! 🎉

Theories

To achieve the goal, there are mainly two steps in the pipeline:

  • Reconstruct and generate real image from the sketch
  • Arbitary style transfer to beautify the result with given result

Sketch Reconstruction

The principle behind this is called Conditional Adversarial Networks, known as pix2pix, which is able to generate image based on the given image.

Style Transfer

It became known to us with the appearance of Prisma app. Typically, we generate an individual model for each pre-defined style. Here, we want to go further by using any new picture as the style. So, we adopted the method, Universal Style Transfer via Feature Transforms proposed in NIPS2017, which enables us to perform arbitary style transfer.

Manual Installation

Backend

The server side is powered by Python and Flask. You can see this simpler example. Navigate to the server directory and all the files concerning the service and neural networks are there. The two main files:

  • app_pix.py for pix2pix translation
  • app_stylize.py for arbitrary style transfer

Prerequisites

Make sure you have Python installed, and some packages are needed: tensorflow, keras, pillow, flask, gevent. You can use pip to install them:

pip install -r server/requirements.txt

Run

# Simply run with python
python app_xxx.py

And you could see the output indicating the port it's listening (5001 and 5002). Go to http://localhost:5001 and you should see the returned information.

Frontend

You should installed:

# Clone the repo
git clone [email protected]:mtobeiyf/sketch-to-art.git
cd sketch-to-art

# Install dependencies
yarn  # or npm install

# Run
yarn dev  # or npm run dev

Open your favorite browser at http://localhost:8080, the site is there.

Acknowledgments

This is the final project of Digital Image Processing instructed by Prof. Jia Yan.

Authors

Xin Fu, Shuaibin Zhang, Tangbo Liu, Haoran Su

License

Copyright © 2018, Fing

Released under the MIT License.

sketch-to-art's People

Contributors

dependabot[bot] avatar imfing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sketch-to-art's Issues

What dataset you use for pix2pix?

Hi Fing,

Thanks for your excellent work. I have question about the model of pix2pix. Could you tell me what dataset you used to train the pix2pix model?

Best,
Nelson

数据集问题以及模型训练问题

fing神您好:
很感谢您这个项目开源,我对这个AI作画方向很感兴趣准备研究这个,您的论文和开源给了我很大帮助。然后我有一些问题可能需要您的指导(鼠鼠是初学者)。
1、看您论文这数据集是CUHKPQ选取风景画,然后边缘提取,得到对应的草图,形成数据集。但是我看了下结果应该是黑底线条是白色的,同时杂乱的线条也比较多,您是如何去掉的,要怎么调整?有源代码提供嘛?希望您能指导下,然后我希望的是您是否方便直接提供您的数据集(鼠鼠羞耻且过分的请求)。
2、如果输入的草图中有多个物体轮廓,比如说有山有水有亭台楼阁,还能生成嘛?
希望能得到fing神的帮助,祝您工作顺利,身体健康!

Thank you very much for sharing this :)

Hey Xin,

Thank you for making this repo/code available. Much appreciated and needed. And thank you for making everything clear and easy.

I can't offer you a job but I wanted to invite you to check out my project because I want to supplement it with the hardware design/proof-of-concept and I would love to hear any feedback from someone like yourself. It would really help me out to improve and learn.

The hardware part is very simple and built upon/relies upon a popular Raspberry PI

Here is the direct link. Also, check out my other repos/links.
https://github.com/Tegridy-Code/Project-Hellraiser

Thank you very much.

Alex

代码问题

富神:
我在跑app_stylize时候报错
File "./wct\wct.py", line 34, in init
ss_patch_size=self.ss_patch_size, ss_stride=self.ss_stride)
File "./wct\model.py", line 62, in init
self.vgg_model = vgg_from_t7(vgg_path, target_layer=deepest_target)
File "./wct\vgg_normalised.py", line 38, in vgg_from_t7
trainable=False)(x)
File "E:\Anaconda3\envs\livedemo\lib\site-packages\keras\engine\base_layer.py", line 463, in call
self.build(unpack_singleton(input_shapes))
File "E:\Anaconda3\envs\livedemo\lib\site-packages\keras\layers\convolutional.py", line 141, in build
constraint=self.kernel_constraint)
File "E:\Anaconda3\envs\livedemo\lib\site-packages\keras\engine\base_layer.py", line 279, in add_weight
weight = K.variable(initializer(shape, dtype=dtype),
TypeError: () got an unexpected keyword argument 'dtype'
是keras的版本不对吗

Key encoder_decoder_relu5_1_1/decoder_relu5_1/decoder_model_relu5_1/relu5_1_0/relu5_1_0/bias not found in checkpoint

Hello,when I run the stylize.py ,it comes an error.

NotFoundError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

Key encoder_decoder_relu5_1_1/decoder_relu5_1/decoder_model_relu5_1/relu5_1_0/relu5_1_0/bias not found in checkpoint
	 [[Node: save_7/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save_7/Const_0_0, save_7/RestoreV2/tensor_names, save_7/RestoreV2/shape_and_slices)]]

I was wondering whether I had miss some steps,would you help me?

Where is the data source of your pre-trained model?

To learn my own pix2pix model,
I need sketch data as input and landscape picture as output.
Natural landscape photos can be obtained with a crawler or web.
but where did you get the sketch data for input?
Can you tell me the where? Or did you use HED?

server not responding

Access to XMLHttpRequest at 'http://localhost:5001/' from origin 'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

🐛 Permission denied error when download model

🐛 Permission denied error when download model

When build the docker image according to the instruction on README.md

# 1. First, clone the repo
git clone https://github.com/mtobeiyf/sketch-to-art.git
cd sketch-to-art

# 2. Build Docker image
docker build -t sketch-to-art:dev .

# 3. Run!
docker run -it --rm -p 8080:8080 -p 5001:5001 -p 5002:5002 sketch-to-art:dev

Error

I bump into the following error

Step 7/12 : RUN cd /tmp/models && ./download_models.sh
 ---> Running in 62a20a199203
/bin/sh: 1: ./download_models.sh: Permission denied
The command '/bin/sh -c cd /tmp/models && ./download_models.sh' returned a non-zero code: 126

The full building log

Sending build context to Docker daemon  3.937MB
Step 1/12 : FROM node:10
10: Pulling from library/node
1e987daa2432: Pull complete 
a0edb687a3da: Pull complete 
6891892cc2ec: Pull complete 
684eb726ddc5: Pull complete 
b0af097f0da6: Pull complete 
154aee36a7da: Pull complete 
5208610038e3: Pull complete 
5f843eccc850: Pull complete 
1298d697961f: Pull complete 
Digest: sha256:426ce4b7e659e081413b739ec3c6a6dea22dfc1a53bfaa147117dfb0238013a2
Status: Downloaded newer image for node:10
 ---> 711c143a39dd
Step 2/12 : RUN apt-get update     && apt-get -y install python3-pip     && apt-get autoremove -y     && apt-get clean -y     && rm -rf /var/lib/apt/lists/*
 ---> Running in 44462fcc8d05
Ign:1 http://deb.debian.org/debian stretch InRelease
Get:2 http://security.debian.org/debian-security stretch/updates InRelease [53.0 kB]
Get:3 http://deb.debian.org/debian stretch-updates InRelease [93.6 kB]
Get:4 http://deb.debian.org/debian stretch Release [118 kB]
Get:5 http://deb.debian.org/debian stretch Release.gpg [2410 B]
Get:6 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [656 kB]
Get:7 http://deb.debian.org/debian stretch-updates/main amd64 Packages [2596 B]
Get:8 http://deb.debian.org/debian stretch/main amd64 Packages [7080 kB]
Fetched 8006 kB in 8s (996 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  build-essential dbus libapparmor1 libdbus-glib-1-2 libpython3-dev
  libpython3.5 libpython3.5-dev python-pip-whl python3-cffi-backend
  python3-crypto python3-cryptography python3-dbus python3-dev python3-gi
  python3-idna python3-keyring python3-keyrings.alt python3-pkg-resources
  python3-pyasn1 python3-secretstorage python3-setuptools python3-six
  python3-wheel python3-xdg python3.5-dev
Suggested packages:
  default-dbus-session-bus | dbus-session-bus python3-crypto-dbg
  python-crypto-doc python-cryptography-doc python3-cryptography-vectors
  python-dbus-doc python3-dbus-dbg gnome-keyring libkf5wallet-bin
  gir1.2-gnomekeyring-1.0 python3-pykde4 doc-base python-secretstorage-doc
  python-setuptools-doc
The following NEW packages will be installed:
  build-essential dbus libapparmor1 libdbus-glib-1-2 libpython3-dev
  libpython3.5 libpython3.5-dev python-pip-whl python3-cffi-backend
  python3-crypto python3-cryptography python3-dbus python3-dev python3-gi
  python3-idna python3-keyring python3-keyrings.alt python3-pip
  python3-pkg-resources python3-pyasn1 python3-secretstorage
  python3-setuptools python3-six python3-wheel python3-xdg python3.5-dev
0 upgraded, 26 newly installed, 0 to remove and 7 not upgraded.
Need to get 43.4 MB of archives.
After this operation, 70.3 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian stretch/main amd64 libapparmor1 amd64 2.11.0-3+deb9u2 [78.9 kB]
Get:2 http://security.debian.org/debian-security stretch/updates/main amd64 libpython3.5 amd64 3.5.3-1+deb9u3 [1372 kB]
Get:3 http://deb.debian.org/debian stretch/main amd64 dbus amd64 1.10.32-0+deb9u1 [213 kB]
Get:4 http://deb.debian.org/debian stretch/main amd64 build-essential amd64 12.3 [7346 B]
Get:5 http://deb.debian.org/debian stretch/main amd64 libdbus-glib-1-2 amd64 0.108-2 [206 kB]
Get:6 http://deb.debian.org/debian stretch/main amd64 libpython3-dev amd64 3.5.3-1 [18.7 kB]
Get:7 http://deb.debian.org/debian stretch/main amd64 python3-cffi-backend amd64 1.9.1-2 [70.1 kB]
Get:8 http://deb.debian.org/debian stretch/main amd64 python3-crypto amd64 2.6.1-7 [259 kB]
Get:9 http://deb.debian.org/debian stretch/main amd64 python3-idna all 2.2-1 [32.7 kB]
Get:10 http://deb.debian.org/debian stretch/main amd64 python3-pyasn1 all 0.1.9-2 [34.5 kB]
Get:11 http://deb.debian.org/debian stretch/main amd64 python3-pkg-resources all 33.1.1-1 [137 kB]
Get:12 http://deb.debian.org/debian stretch/main amd64 python3-setuptools all 33.1.1-1 [215 kB]
Get:13 http://deb.debian.org/debian stretch/main amd64 python3-six all 1.10.0-3 [14.4 kB]
Get:14 http://deb.debian.org/debian stretch/main amd64 python3-cryptography amd64 1.7.1-3+deb9u2 [211 kB]
Get:15 http://security.debian.org/debian-security stretch/updates/main amd64 libpython3.5-dev amd64 3.5.3-1+deb9u3 [37.8 MB]
Get:16 http://deb.debian.org/debian stretch/main amd64 python3-dbus amd64 1.2.4-1+b1 [184 kB]
Get:17 http://deb.debian.org/debian stretch/main amd64 python3-dev amd64 3.5.3-1 [1154 B]
Get:18 http://deb.debian.org/debian stretch/main amd64 python3-gi amd64 3.22.0-2 [473 kB]
Get:19 http://deb.debian.org/debian stretch/main amd64 python3-secretstorage all 2.3.1-2 [14.2 kB]
Get:20 http://deb.debian.org/debian stretch/main amd64 python3-keyring all 10.1-1 [36.8 kB]
Get:21 http://deb.debian.org/debian stretch/main amd64 python3-keyrings.alt all 1.3-1 [16.2 kB]
Get:22 http://deb.debian.org/debian stretch/main amd64 python3-wheel all 0.29.0-2 [51.8 kB]
Get:23 http://deb.debian.org/debian stretch/main amd64 python3-xdg all 0.25-4 [35.7 kB]
Get:24 http://security.debian.org/debian-security stretch/updates/main amd64 python-pip-whl all 9.0.1-2+deb9u2 [1399 kB]
Get:25 http://security.debian.org/debian-security stretch/updates/main amd64 python3.5-dev amd64 3.5.3-1+deb9u3 [413 kB]
Get:26 http://security.debian.org/debian-security stretch/updates/main amd64 python3-pip all 9.0.1-2+deb9u2 [143 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 43.4 MB in 39s (1103 kB/s)
Selecting previously unselected package libapparmor1:amd64.
(Reading database ... 29953 files and directories currently installed.)
Preparing to unpack .../00-libapparmor1_2.11.0-3+deb9u2_amd64.deb ...
Unpacking libapparmor1:amd64 (2.11.0-3+deb9u2) ...
Selecting previously unselected package dbus.
Preparing to unpack .../01-dbus_1.10.32-0+deb9u1_amd64.deb ...
Unpacking dbus (1.10.32-0+deb9u1) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../02-build-essential_12.3_amd64.deb ...
Unpacking build-essential (12.3) ...
Selecting previously unselected package libdbus-glib-1-2:amd64.
Preparing to unpack .../03-libdbus-glib-1-2_0.108-2_amd64.deb ...
Unpacking libdbus-glib-1-2:amd64 (0.108-2) ...
Selecting previously unselected package libpython3.5:amd64.
Preparing to unpack .../04-libpython3.5_3.5.3-1+deb9u3_amd64.deb ...
Unpacking libpython3.5:amd64 (3.5.3-1+deb9u3) ...
Selecting previously unselected package libpython3.5-dev:amd64.
Preparing to unpack .../05-libpython3.5-dev_3.5.3-1+deb9u3_amd64.deb ...
Unpacking libpython3.5-dev:amd64 (3.5.3-1+deb9u3) ...
Selecting previously unselected package libpython3-dev:amd64.
Preparing to unpack .../06-libpython3-dev_3.5.3-1_amd64.deb ...
Unpacking libpython3-dev:amd64 (3.5.3-1) ...
Selecting previously unselected package python-pip-whl.
Preparing to unpack .../07-python-pip-whl_9.0.1-2+deb9u2_all.deb ...
Unpacking python-pip-whl (9.0.1-2+deb9u2) ...
Selecting previously unselected package python3-cffi-backend.
Preparing to unpack .../08-python3-cffi-backend_1.9.1-2_amd64.deb ...
Unpacking python3-cffi-backend (1.9.1-2) ...
Selecting previously unselected package python3-crypto.
Preparing to unpack .../09-python3-crypto_2.6.1-7_amd64.deb ...
Unpacking python3-crypto (2.6.1-7) ...
Selecting previously unselected package python3-idna.
Preparing to unpack .../10-python3-idna_2.2-1_all.deb ...
Unpacking python3-idna (2.2-1) ...
Selecting previously unselected package python3-pyasn1.
Preparing to unpack .../11-python3-pyasn1_0.1.9-2_all.deb ...
Unpacking python3-pyasn1 (0.1.9-2) ...
Selecting previously unselected package python3-pkg-resources.
Preparing to unpack .../12-python3-pkg-resources_33.1.1-1_all.deb ...
Unpacking python3-pkg-resources (33.1.1-1) ...
Selecting previously unselected package python3-setuptools.
Preparing to unpack .../13-python3-setuptools_33.1.1-1_all.deb ...
Unpacking python3-setuptools (33.1.1-1) ...
Selecting previously unselected package python3-six.
Preparing to unpack .../14-python3-six_1.10.0-3_all.deb ...
Unpacking python3-six (1.10.0-3) ...
Selecting previously unselected package python3-cryptography.
Preparing to unpack .../15-python3-cryptography_1.7.1-3+deb9u2_amd64.deb ...
Unpacking python3-cryptography (1.7.1-3+deb9u2) ...
Selecting previously unselected package python3-dbus.
Preparing to unpack .../16-python3-dbus_1.2.4-1+b1_amd64.deb ...
Unpacking python3-dbus (1.2.4-1+b1) ...
Selecting previously unselected package python3.5-dev.
Preparing to unpack .../17-python3.5-dev_3.5.3-1+deb9u3_amd64.deb ...
Unpacking python3.5-dev (3.5.3-1+deb9u3) ...
Selecting previously unselected package python3-dev.
Preparing to unpack .../18-python3-dev_3.5.3-1_amd64.deb ...
Unpacking python3-dev (3.5.3-1) ...
Selecting previously unselected package python3-gi.
Preparing to unpack .../19-python3-gi_3.22.0-2_amd64.deb ...
Unpacking python3-gi (3.22.0-2) ...
Selecting previously unselected package python3-secretstorage.
Preparing to unpack .../20-python3-secretstorage_2.3.1-2_all.deb ...
Unpacking python3-secretstorage (2.3.1-2) ...
Selecting previously unselected package python3-keyring.
Preparing to unpack .../21-python3-keyring_10.1-1_all.deb ...
Unpacking python3-keyring (10.1-1) ...
Selecting previously unselected package python3-keyrings.alt.
Preparing to unpack .../22-python3-keyrings.alt_1.3-1_all.deb ...
Unpacking python3-keyrings.alt (1.3-1) ...
Selecting previously unselected package python3-pip.
Preparing to unpack .../23-python3-pip_9.0.1-2+deb9u2_all.deb ...
Unpacking python3-pip (9.0.1-2+deb9u2) ...
Selecting previously unselected package python3-wheel.
Preparing to unpack .../24-python3-wheel_0.29.0-2_all.deb ...
Unpacking python3-wheel (0.29.0-2) ...
Selecting previously unselected package python3-xdg.
Preparing to unpack .../25-python3-xdg_0.25-4_all.deb ...
Unpacking python3-xdg (0.25-4) ...
Setting up python-pip-whl (9.0.1-2+deb9u2) ...
Setting up python3-cffi-backend (1.9.1-2) ...
Setting up build-essential (12.3) ...
Setting up python3-crypto (2.6.1-7) ...
Setting up libdbus-glib-1-2:amd64 (0.108-2) ...
Setting up libpython3.5:amd64 (3.5.3-1+deb9u3) ...
Setting up python3-idna (2.2-1) ...
Setting up python3-xdg (0.25-4) ...
Setting up python3-keyrings.alt (1.3-1) ...
Setting up python3-six (1.10.0-3) ...
Setting up python3-wheel (0.29.0-2) ...
Setting up python3-pkg-resources (33.1.1-1) ...
Setting up python3-gi (3.22.0-2) ...
Setting up libpython3.5-dev:amd64 (3.5.3-1+deb9u3) ...
Setting up python3-pyasn1 (0.1.9-2) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Setting up libapparmor1:amd64 (2.11.0-3+deb9u2) ...
Setting up python3-pip (9.0.1-2+deb9u2) ...
Setting up dbus (1.10.32-0+deb9u1) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Setting up python3-setuptools (33.1.1-1) ...
Setting up python3.5-dev (3.5.3-1+deb9u3) ...
Setting up libpython3-dev:amd64 (3.5.3-1) ...
Setting up python3-cryptography (1.7.1-3+deb9u2) ...
Setting up python3-dbus (1.2.4-1+b1) ...
Setting up python3-dev (3.5.3-1) ...
Setting up python3-secretstorage (2.3.1-2) ...
Setting up python3-keyring (10.1-1) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
Removing intermediate container 44462fcc8d05
 ---> 9133e548a948
Step 3/12 : RUN mkdir -p /usr/src/app
 ---> Running in 58d133a790cb
Removing intermediate container 58d133a790cb
 ---> bade5e9c8b6a
Step 4/12 : ADD server/requirements.txt /tmp/
 ---> d82307ee8cd1
Step 5/12 : RUN pip3 --no-cache-dir install -r /tmp/requirements.txt
 ---> Running in c2a8813af13a
Collecting absl-py==0.8.1 (from -r /tmp/requirements.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/3b/72/e6e483e2db953c11efa44ee21c5fdb6505c4dffa447b4263ca8af6676b62/absl-py-0.8.1.tar.gz (103kB)
Collecting astor==0.8.0 (from -r /tmp/requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/d1/4f/950dfae467b384fc96bc6469de25d832534f6b4441033c39f914efd13418/astor-0.8.0-py2.py3-none-any.whl
Collecting Click==7.0 (from -r /tmp/requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl (81kB)
Collecting Flask==1.1.1 (from -r /tmp/requirements.txt (line 4))
  Downloading https://files.pythonhosted.org/packages/9b/93/628509b8d5dc749656a9641f4caf13540e2cdec85276964ff8f43bbb1d3b/Flask-1.1.1-py2.py3-none-any.whl (94kB)
Collecting Flask-Cors==3.0.8 (from -r /tmp/requirements.txt (line 5))
  Downloading https://files.pythonhosted.org/packages/78/38/e68b11daa5d613e3a91e4bf3da76c94ac9ee0d9cd515af9c1ab80d36f709/Flask_Cors-3.0.8-py2.py3-none-any.whl
Collecting gast==0.3.2 (from -r /tmp/requirements.txt (line 6))
  Downloading https://files.pythonhosted.org/packages/1f/04/4e36c33f8eb5c5b6c622a1f4859352a6acca7ab387257d4b3c191d23ec1d/gast-0.3.2.tar.gz
Collecting gevent==1.4.0 (from -r /tmp/requirements.txt (line 7))
  Downloading https://files.pythonhosted.org/packages/95/d2/f2f454b00fde1608f6f4889c8cc3e12b5000f26cd5c3e11b5427c7781de9/gevent-1.4.0-cp35-cp35m-manylinux1_x86_64.whl (5.4MB)
Collecting google-pasta==0.1.7 (from -r /tmp/requirements.txt (line 8))
  Downloading https://files.pythonhosted.org/packages/d0/33/376510eb8d6246f3c30545f416b2263eee461e40940c2a4413c711bdf62d/google_pasta-0.1.7-py3-none-any.whl (52kB)
Collecting greenlet==0.4.15 (from -r /tmp/requirements.txt (line 9))
  Downloading https://files.pythonhosted.org/packages/2e/65/27f35497cc0102a792390d056e793e064da95fc9eae45d75ae0ba49c0a0d/greenlet-0.4.15-cp35-cp35m-manylinux1_x86_64.whl (41kB)
Collecting grpcio==1.24.1 (from -r /tmp/requirements.txt (line 10))
  Downloading https://files.pythonhosted.org/packages/6a/5a/c17f0c15cf823acaa57a363d9d93ce3130856aa9f11be141593a4d2853ce/grpcio-1.24.1-cp35-cp35m-manylinux1_x86_64.whl (2.2MB)
Collecting h5py==2.10.0 (from -r /tmp/requirements.txt (line 11))
  Downloading https://files.pythonhosted.org/packages/10/56/d5c53cd170529bb40cd7dd43e2b68944cb65a45f65ab4c78a68f4ac9e51e/h5py-2.10.0-cp35-cp35m-manylinux1_x86_64.whl (2.8MB)
Collecting itsdangerous==1.1.0 (from -r /tmp/requirements.txt (line 12))
  Downloading https://files.pythonhosted.org/packages/76/ae/44b03b253d6fade317f32c24d100b3b35c2239807046a4c953c7b89fa49e/itsdangerous-1.1.0-py2.py3-none-any.whl
Collecting Jinja2==2.10.3 (from -r /tmp/requirements.txt (line 13))
  Downloading https://files.pythonhosted.org/packages/65/e0/eb35e762802015cab1ccee04e8a277b03f1d8e53da3ec3106882ec42558b/Jinja2-2.10.3-py2.py3-none-any.whl (125kB)
Collecting Keras==2.3.1 (from -r /tmp/requirements.txt (line 14))
  Downloading https://files.pythonhosted.org/packages/ad/fd/6bfe87920d7f4fd475acd28500a42482b6b84479832bdc0fe9e589a60ceb/Keras-2.3.1-py2.py3-none-any.whl (377kB)
Collecting Keras-Applications==1.0.8 (from -r /tmp/requirements.txt (line 15))
  Downloading https://files.pythonhosted.org/packages/71/e3/19762fdfc62877ae9102edf6342d71b28fbfd9dea3d2f96a882ce099b03f/Keras_Applications-1.0.8-py3-none-any.whl (50kB)
Collecting Keras-Preprocessing==1.1.0 (from -r /tmp/requirements.txt (line 16))
  Downloading https://files.pythonhosted.org/packages/28/6a/8c1f62c37212d9fc441a7e26736df51ce6f0e38455816445471f10da4f0a/Keras_Preprocessing-1.1.0-py2.py3-none-any.whl (41kB)
Collecting Markdown==3.1.1 (from -r /tmp/requirements.txt (line 17))
  Downloading https://files.pythonhosted.org/packages/c0/4e/fd492e91abdc2d2fcb70ef453064d980688762079397f779758e055f6575/Markdown-3.1.1-py2.py3-none-any.whl (87kB)
Collecting MarkupSafe==1.1.1 (from -r /tmp/requirements.txt (line 18))
  Downloading https://files.pythonhosted.org/packages/6e/57/d40124076756c19ff2269678de7ae25a14ebbb3f6314eb5ce9477f191350/MarkupSafe-1.1.1-cp35-cp35m-manylinux1_x86_64.whl
Collecting numpy==1.17.2 (from -r /tmp/requirements.txt (line 19))
  Downloading https://files.pythonhosted.org/packages/9b/21/2b18339d24a2f73dcefb2f10f48aff6182e16da83e3a612684443c6cfb29/numpy-1.17.2-cp35-cp35m-manylinux1_x86_64.whl (20.1MB)
Collecting Pillow==6.2.0 (from -r /tmp/requirements.txt (line 20))
  Downloading https://files.pythonhosted.org/packages/a8/34/086feba718f629fc51f27f993fa72e210c1c25077cba2f9e9a2dcfa23a7f/Pillow-6.2.0-cp35-cp35m-manylinux1_x86_64.whl (2.1MB)
Collecting protobuf==3.10.0 (from -r /tmp/requirements.txt (line 21))
  Downloading https://files.pythonhosted.org/packages/27/1c/ccf7810d5d02bdaafc223af032e8ac7f5ad6d23c5d0a44682a5a85fdda25/protobuf-3.10.0-cp35-cp35m-manylinux1_x86_64.whl (1.3MB)
Collecting PyYAML==5.1.2 (from -r /tmp/requirements.txt (line 22))
  Downloading https://files.pythonhosted.org/packages/e3/e8/b3212641ee2718d556df0f23f78de8303f068fe29cdaa7a91018849582fe/PyYAML-5.1.2.tar.gz (265kB)
Collecting scipy==1.1.0 (from -r /tmp/requirements.txt (line 23))
  Downloading https://files.pythonhosted.org/packages/cd/32/5196b64476bd41d596a8aba43506e2403e019c90e1a3dfc21d51b83db5a6/scipy-1.1.0-cp35-cp35m-manylinux1_x86_64.whl (33.1MB)
Collecting six==1.12.0 (from -r /tmp/requirements.txt (line 24))
  Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting tensorboard==1.14.0 (from -r /tmp/requirements.txt (line 25))
  Downloading https://files.pythonhosted.org/packages/91/2d/2ed263449a078cd9c8a9ba50ebd50123adf1f8cfbea1492f9084169b89d9/tensorboard-1.14.0-py3-none-any.whl (3.1MB)
Collecting tensorflow==1.14.0 (from -r /tmp/requirements.txt (line 26))
  Downloading https://files.pythonhosted.org/packages/7c/fb/7b2c5b3e85ad335b53ca67deb2ef4af574dc0a8759f43b7f45e15005e449/tensorflow-1.14.0-cp35-cp35m-manylinux1_x86_64.whl (109.2MB)
Collecting tensorflow-estimator==1.14.0 (from -r /tmp/requirements.txt (line 27))
  Downloading https://files.pythonhosted.org/packages/3c/d5/21860a5b11caf0678fbc8319341b0ae21a07156911132e0e71bffed0510d/tensorflow_estimator-1.14.0-py2.py3-none-any.whl (488kB)
Collecting termcolor==1.1.0 (from -r /tmp/requirements.txt (line 28))
  Downloading https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz
Collecting Werkzeug==0.16.0 (from -r /tmp/requirements.txt (line 29))
  Downloading https://files.pythonhosted.org/packages/ce/42/3aeda98f96e85fd26180534d36570e4d18108d62ae36f87694b476b83d6f/Werkzeug-0.16.0-py2.py3-none-any.whl (327kB)
Collecting wrapt==1.11.2 (from -r /tmp/requirements.txt (line 30))
  Downloading https://files.pythonhosted.org/packages/23/84/323c2415280bc4fc880ac5050dddfb3c8062c2552b34c2e512eb4aa68f79/wrapt-1.11.2.tar.gz
Collecting setuptools>=36 (from Markdown==3.1.1->-r /tmp/requirements.txt (line 17))
  Downloading https://files.pythonhosted.org/packages/6d/38/c21ef5034684ffc0412deefbb07d66678332290c14bb5269c85145fbd55e/setuptools-50.3.2-py3-none-any.whl (785kB)
Requirement already satisfied: wheel>=0.26; python_version >= "3" in /usr/lib/python3/dist-packages (from tensorboard==1.14.0->-r /tmp/requirements.txt (line 25))
Installing collected packages: six, absl-py, astor, Click, MarkupSafe, Jinja2, itsdangerous, Werkzeug, Flask, Flask-Cors, gast, greenlet, gevent, google-pasta, grpcio, numpy, h5py, Keras-Preprocessing, scipy, PyYAML, Keras-Applications, Keras, setuptools, Markdown, Pillow, protobuf, tensorboard, tensorflow-estimator, termcolor, wrapt, tensorflow
  Found existing installation: six 1.10.0
    Not uninstalling six at /usr/lib/python3/dist-packages, outside environment /usr
  Running setup.py install for absl-py: started
    Running setup.py install for absl-py: finished with status 'done'
  Running setup.py install for gast: started
    Running setup.py install for gast: finished with status 'done'
  Running setup.py install for PyYAML: started
    Running setup.py install for PyYAML: finished with status 'done'
  Found existing installation: setuptools 33.1.1
    Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr
  Running setup.py install for termcolor: started
    Running setup.py install for termcolor: finished with status 'done'
  Running setup.py install for wrapt: started
    Running setup.py install for wrapt: finished with status 'done'
Successfully installed Click-7.0 Flask-1.1.1 Flask-Cors-3.0.8 Jinja2-2.10.3 Keras-2.3.1 Keras-Applications-1.0.8 Keras-Preprocessing-1.1.0 Markdown-3.1.1 MarkupSafe-1.1.1 Pillow-6.2.0 PyYAML-5.1.2 Werkzeug-0.16.0 absl-py-0.8.1 astor-0.8.0 gast-0.3.2 gevent-1.4.0 google-pasta-0.1.7 greenlet-0.4.15 grpcio-1.24.1 h5py-2.10.0 itsdangerous-1.1.0 numpy-1.17.2 protobuf-3.10.0 scipy-1.1.0 setuptools-50.3.2 six-1.12.0 tensorboard-1.14.0 tensorflow-1.14.0 tensorflow-estimator-1.14.0 termcolor-1.1.0 wrapt-1.11.2
Removing intermediate container c2a8813af13a
 ---> 57ffa200fe94
Step 6/12 : ADD server/models/download_models.sh /tmp/models/
 ---> 4a64a2b81e58
Step 7/12 : RUN cd /tmp/models && ./download_models.sh
 ---> Running in 62a20a199203
/bin/sh: 1: ./download_models.sh: Permission denied
The command '/bin/sh -c cd /tmp/models && ./download_models.sh' returned a non-zero code: 126

Server not responding

II do as your guider, but it occurs this problem"Server not responding, check your Internet connection first. You can view details in the About page. To experience the app, please contact the author for help.", how can i solve it?

How Can The Backend Runs So Fast?

I am now learning Pytorch, so I want to implement the WCT tranfer backend in Pytorch, and I I refer to this project: PytorchWCT. I run it successfully in my labtop too, but it takes about 120 seconds at a time, I don't have a cuda GPU, I run both sketch-to-art and this PytorchWCT on My CPU. According to his tutorial, I downloaded the Pretrained encoder and decoder model:
image
and successfully load and ran well, but just too slow compared with yours which takes less than 20 seconds each time. So how can your backend run so fast, what can I do in Pytorch?

docker run error

I run in docker according to the tutorial, but There should be an error with the front end:

dcc4c6f96427e1df6bdca047b3704c9

0263aa31dd43dcaf0420b03f9ab201d

And the two back ends run well:

7a3e2a71e182e07f4cf831a20a50892
d38af5c57cb6c3b745e8ad7f3867997

What should I do to solve this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.