-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
33 lines (27 loc) · 1.2 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import os
import sys
def test_floods():
os.chdir("Instagan")
os.system("python test.py --dataroot datasets/street2water --model instagan --name s2w2 --loadSizeH 320 --loadSizeW 320 --fineSizeH 320 --fineSizeW 320")
def test_heat_waves():
os.system("git clone https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix.git")
os.system("cp -r pix2pix/* pytorch-CycleGAN-and-pix2pix/")
os.chdir("pytorch-CycleGAN-and-pix2pix")
os.system("python test.py --dataroot /path/to/your/data --name test --model cycle_gan --netG unet_256")
def test_storms():
os.chdir("style transfer/style transfer")
os.system("python style_transfer.py -c ./07.jpg -s ./cloudd.jpg -save out07 -steps 400 -style_weight 180000 -sharpness_weight 1.0")
# Add similar lines for other images as needed
if __name__ == "__main__":
if len(sys.argv) != 2:
print("Usage: python test.py <project_name>")
sys.exit(1)
project_name = sys.argv[1].lower()
if project_name == 'floods':
test_floods()
elif project_name == 'heat_waves':
test_heat_waves()
elif project_name == 'storms':
test_storms()
else:
print(f"Unknown project name: {project_name}")