Spaces:
Runtime error
Runtime error
Upload examples with huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +2 -0
- examples/inputs/2022-06-14-144710_4.jpg +0 -0
- examples/inputs/brad_pitt.jpg +0 -0
- examples/inputs/escher_sphere.jpg +0 -0
- examples/inputs/frida_kahlo.jpg +0 -0
- examples/inputs/golden_gate.jpg +0 -0
- examples/inputs/hoovertowernight.jpg +0 -0
- examples/inputs/picasso_selfport1907.jpg +0 -0
- examples/inputs/seated-nude.jpg +0 -0
- examples/inputs/shipwreck.jpg +0 -0
- examples/inputs/starry_night.jpg +0 -0
- examples/inputs/starry_night_crop.png +0 -0
- examples/inputs/starry_night_google.jpg +0 -0
- examples/inputs/the_scream.jpg +0 -0
- examples/inputs/tubingen.jpg +0 -0
- examples/inputs/woman-with-hat-matisse.jpg +0 -0
- examples/outputs/golden_gate_escher.png +0 -0
- examples/outputs/golden_gate_kahlo.png +0 -0
- examples/outputs/golden_gate_matisse.png +0 -0
- examples/outputs/golden_gate_scream.png +0 -0
- examples/outputs/golden_gate_seated.png +0 -0
- examples/outputs/golden_gate_starry.png +0 -0
- examples/outputs/golden_gate_starry_scale05.png +0 -0
- examples/outputs/golden_gate_starry_scale1.png +0 -0
- examples/outputs/golden_gate_starry_scale2.png +0 -0
- examples/outputs/golden_gate_starry_scream_3_7.png +0 -0
- examples/outputs/golden_gate_starry_scream_5_5.png +0 -0
- examples/outputs/golden_gate_starry_scream_7_3.png +0 -0
- examples/outputs/original_color/tubingen_composition_vii.png +0 -0
- examples/outputs/original_color/tubingen_scream.png +0 -0
- examples/outputs/original_color/tubingen_seated_nude.png +0 -0
- examples/outputs/original_color/tubingen_shipwreck.png +0 -0
- examples/outputs/original_color/tubingen_starry.png +0 -0
- examples/outputs/pitt_picasso_content_0025_style_100.png +0 -0
- examples/outputs/pitt_picasso_content_01_style_100.png +0 -0
- examples/outputs/pitt_picasso_content_1_style_100.png +0 -0
- examples/outputs/pitt_picasso_content_5_style_100.png +0 -0
- examples/outputs/pitt_picasso_nin_cudnn.png +0 -0
- examples/outputs/starry_stanford_big.png +3 -0
- examples/outputs/starry_stanford_bigger.png +3 -0
- examples/outputs/tubingen_composition_vii.png +0 -0
- examples/outputs/tubingen_scream.png +0 -0
- examples/outputs/tubingen_scream_composition_vii.png +0 -0
- examples/outputs/tubingen_seated_nude.png +0 -0
- examples/outputs/tubingen_seated_nude_composition_vii.png +0 -0
- examples/outputs/tubingen_shipwreck.png +0 -0
- examples/outputs/tubingen_starry.png +0 -0
- examples/outputs/tubingen_starry_scream.png +0 -0
- examples/outputs/tubingen_starry_seated.png +0 -0
- examples/scripts/starry_stanford.sh +92 -0
.gitattributes
CHANGED
@@ -29,3 +29,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
29 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
30 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
31 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
29 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
30 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
31 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
32 |
+
examples/outputs/starry_stanford_big.png filter=lfs diff=lfs merge=lfs -text
|
33 |
+
examples/outputs/starry_stanford_bigger.png filter=lfs diff=lfs merge=lfs -text
|
examples/inputs/2022-06-14-144710_4.jpg
ADDED
examples/inputs/brad_pitt.jpg
ADDED
examples/inputs/escher_sphere.jpg
ADDED
examples/inputs/frida_kahlo.jpg
ADDED
examples/inputs/golden_gate.jpg
ADDED
examples/inputs/hoovertowernight.jpg
ADDED
examples/inputs/picasso_selfport1907.jpg
ADDED
examples/inputs/seated-nude.jpg
ADDED
examples/inputs/shipwreck.jpg
ADDED
examples/inputs/starry_night.jpg
ADDED
examples/inputs/starry_night_crop.png
ADDED
examples/inputs/starry_night_google.jpg
ADDED
examples/inputs/the_scream.jpg
ADDED
examples/inputs/tubingen.jpg
ADDED
examples/inputs/woman-with-hat-matisse.jpg
ADDED
examples/outputs/golden_gate_escher.png
ADDED
examples/outputs/golden_gate_kahlo.png
ADDED
examples/outputs/golden_gate_matisse.png
ADDED
examples/outputs/golden_gate_scream.png
ADDED
examples/outputs/golden_gate_seated.png
ADDED
examples/outputs/golden_gate_starry.png
ADDED
examples/outputs/golden_gate_starry_scale05.png
ADDED
examples/outputs/golden_gate_starry_scale1.png
ADDED
examples/outputs/golden_gate_starry_scale2.png
ADDED
examples/outputs/golden_gate_starry_scream_3_7.png
ADDED
examples/outputs/golden_gate_starry_scream_5_5.png
ADDED
examples/outputs/golden_gate_starry_scream_7_3.png
ADDED
examples/outputs/original_color/tubingen_composition_vii.png
ADDED
examples/outputs/original_color/tubingen_scream.png
ADDED
examples/outputs/original_color/tubingen_seated_nude.png
ADDED
examples/outputs/original_color/tubingen_shipwreck.png
ADDED
examples/outputs/original_color/tubingen_starry.png
ADDED
examples/outputs/pitt_picasso_content_0025_style_100.png
ADDED
examples/outputs/pitt_picasso_content_01_style_100.png
ADDED
examples/outputs/pitt_picasso_content_1_style_100.png
ADDED
examples/outputs/pitt_picasso_content_5_style_100.png
ADDED
examples/outputs/pitt_picasso_nin_cudnn.png
ADDED
examples/outputs/starry_stanford_big.png
ADDED
Git LFS Details
|
examples/outputs/starry_stanford_bigger.png
ADDED
Git LFS Details
|
examples/outputs/tubingen_composition_vii.png
ADDED
examples/outputs/tubingen_scream.png
ADDED
examples/outputs/tubingen_scream_composition_vii.png
ADDED
examples/outputs/tubingen_seated_nude.png
ADDED
examples/outputs/tubingen_seated_nude_composition_vii.png
ADDED
examples/outputs/tubingen_shipwreck.png
ADDED
examples/outputs/tubingen_starry.png
ADDED
examples/outputs/tubingen_starry_scream.png
ADDED
examples/outputs/tubingen_starry_seated.png
ADDED
examples/scripts/starry_stanford.sh
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# To run this script you'll need to download the ultra-high res
|
2 |
+
# scan of Starry Night from the Google Art Project, using this command:
|
3 |
+
# wget -c https://upload.wikimedia.org/wikipedia/commons/e/ea/Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg -O starry_night_gigapixel.jpg
|
4 |
+
# Or you can manually download the image from here: https://commons.wikimedia.org/wiki/File:Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg
|
5 |
+
|
6 |
+
STYLE_IMAGE=starry_night_gigapixel.jpg
|
7 |
+
CONTENT_IMAGE=examples/inputs/hoovertowernight.jpg
|
8 |
+
|
9 |
+
STYLE_WEIGHT=5e2
|
10 |
+
STYLE_SCALE=1.0
|
11 |
+
|
12 |
+
STYLE_WEIGHT2=2500 # Style weight for image size 2048 and above
|
13 |
+
|
14 |
+
PYTHON=python3 # Change to Python if using Python 2
|
15 |
+
SCRIPT=neural_style.py
|
16 |
+
GPU=0
|
17 |
+
|
18 |
+
NEURAL_STYLE=$PYTHON
|
19 |
+
NEURAL_STYLE+=" "
|
20 |
+
NEURAL_STYLE+=$SCRIPT
|
21 |
+
|
22 |
+
# Uncomment if using pip package
|
23 |
+
#NEURAL_STYLE=neural-style
|
24 |
+
|
25 |
+
|
26 |
+
$NEURAL_STYLE \
|
27 |
+
-content_image $CONTENT_IMAGE \
|
28 |
+
-style_image $STYLE_IMAGE \
|
29 |
+
-style_scale $STYLE_SCALE \
|
30 |
+
-print_iter 1 \
|
31 |
+
-style_weight $STYLE_WEIGHT \
|
32 |
+
-image_size 256 \
|
33 |
+
-output_image out1.png \
|
34 |
+
-tv_weight 0 \
|
35 |
+
-gpu $GPU \
|
36 |
+
-backend cudnn -cudnn_autotune
|
37 |
+
|
38 |
+
$NEURAL_STYLE \
|
39 |
+
-content_image $CONTENT_IMAGE \
|
40 |
+
-style_image $STYLE_IMAGE \
|
41 |
+
-init image -init_image out1.png \
|
42 |
+
-style_scale $STYLE_SCALE \
|
43 |
+
-print_iter 1 \
|
44 |
+
-style_weight $STYLE_WEIGHT \
|
45 |
+
-image_size 512 \
|
46 |
+
-num_iterations 500 \
|
47 |
+
-output_image out2.png \
|
48 |
+
-tv_weight 0 \
|
49 |
+
-gpu $GPU \
|
50 |
+
-backend cudnn -cudnn_autotune
|
51 |
+
|
52 |
+
$NEURAL_STYLE \
|
53 |
+
-content_image $CONTENT_IMAGE \
|
54 |
+
-style_image $STYLE_IMAGE \
|
55 |
+
-init image -init_image out2.png \
|
56 |
+
-style_scale $STYLE_SCALE \
|
57 |
+
-print_iter 1 \
|
58 |
+
-style_weight $STYLE_WEIGHT \
|
59 |
+
-image_size 1024 \
|
60 |
+
-num_iterations 200 \
|
61 |
+
-output_image out3.png \
|
62 |
+
-tv_weight 0 \
|
63 |
+
-gpu $GPU \
|
64 |
+
-backend cudnn -cudnn_autotune
|
65 |
+
|
66 |
+
$NEURAL_STYLE \
|
67 |
+
-content_image $CONTENT_IMAGE \
|
68 |
+
-style_image $STYLE_IMAGE \
|
69 |
+
-init image -init_image out3.png \
|
70 |
+
-style_scale $STYLE_SCALE \
|
71 |
+
-print_iter 1 \
|
72 |
+
-style_weight $STYLE_WEIGHT2 \
|
73 |
+
-image_size 2048 \
|
74 |
+
-num_iterations 200 \
|
75 |
+
-output_image out4.png \
|
76 |
+
-tv_weight 0 \
|
77 |
+
-gpu $GPU \
|
78 |
+
-backend cudnn
|
79 |
+
|
80 |
+
$NEURAL_STYLE \
|
81 |
+
-content_image $CONTENT_IMAGE \
|
82 |
+
-style_image $STYLE_IMAGE \
|
83 |
+
-init image -init_image out4.png \
|
84 |
+
-style_scale $STYLE_SCALE \
|
85 |
+
-print_iter 1 \
|
86 |
+
-style_weight $STYLE_WEIGHT2 \
|
87 |
+
-image_size 2350 \
|
88 |
+
-num_iterations 200 \
|
89 |
+
-output_image out5.png \
|
90 |
+
-tv_weight 0 \
|
91 |
+
-gpu $GPU \
|
92 |
+
-backend cudnn -optimizer adam
|