soiz1 commited on
Commit
cef14f5
·
verified ·
1 Parent(s): b83b4a0

Create ins.py

Browse files
Files changed (1) hide show
  1. ins.py +29 -0
ins.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import torch
3
+ os.system("pip freeze")
4
+ # download weights
5
+ if not os.path.exists('realesr-general-x4v3.pth'):
6
+ os.system("wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesr-general-x4v3.pth -P .")
7
+ if not os.path.exists('GFPGANv1.2.pth'):
8
+ os.system("wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.2.pth -P .")
9
+ if not os.path.exists('GFPGANv1.3.pth'):
10
+ os.system("wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth -P .")
11
+ if not os.path.exists('GFPGANv1.4.pth'):
12
+ os.system("wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.4.pth -P .")
13
+ if not os.path.exists('RestoreFormer.pth'):
14
+ os.system("wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.4/RestoreFormer.pth -P .")
15
+ if not os.path.exists('CodeFormer.pth'):
16
+ os.system("wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.4/CodeFormer.pth -P .")
17
+
18
+ torch.hub.download_url_to_file(
19
+ 'https://thumbs.dreamstime.com/b/tower-bridge-traditional-red-bus-black-white-colors-view-to-tower-bridge-london-black-white-colors-108478942.jpg',
20
+ 'a1.jpg')
21
+ torch.hub.download_url_to_file(
22
+ 'https://media.istockphoto.com/id/523514029/photo/london-skyline-b-w.jpg?s=612x612&w=0&k=20&c=kJS1BAtfqYeUDaORupj0sBPc1hpzJhBUUqEFfRnHzZ0=',
23
+ 'a2.jpg')
24
+ torch.hub.download_url_to_file(
25
+ 'https://i.guim.co.uk/img/media/06f614065ed82ca0e917b149a32493c791619854/0_0_3648_2789/master/3648.jpg?width=700&quality=85&auto=format&fit=max&s=05764b507c18a38590090d987c8b6202',
26
+ 'a3.jpg')
27
+ torch.hub.download_url_to_file(
28
+ 'https://i.pinimg.com/736x/46/96/9e/46969eb94aec2437323464804d27706d--victorian-london-victorian-era.jpg',
29
+ 'a4.jpg')