Skip to content

Instantly share code, notes, and snippets.

@woctezuma
Last active June 15, 2021 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woctezuma/ef7ccf7b92d7170f98a62345447a4c77 to your computer and use it in GitHub Desktop.
Save woctezuma/ef7ccf7b92d7170f98a62345447a4c77 to your computer and use it in GitHub Desktop.
Google Colab: ESRGAN

Reference: https://github.com/xinntao/ESRGAN

Prepare code:

%cd /content
!git clone https://github.com/xinntao/ESRGAN.git

%cd /content/ESRGAN/models
!gdown --id 1TPrz5QKd8DHHt1k8SRtm6tMiPjz_Qene

Prepare data:

%cd /content/ESRGAN/LR

# Upload your own images to Colab, or download images from Internet
!wget https://raw.githubusercontent.com/chaofengc/PSFRGAN/master/test_dir/test_hzgg.jpg -O example.jpg
!wget https://static.boredpanda.com/blog/wp-content/uploads/2017/03/childhood-celebrities-when-they-were-young-kids-101-58bd73a65dee9__700.jpg -O Adele.jpg
!wget https://static.boredpanda.com/blog/wp-content/uploads/2017/03/childhood-celebrities-when-they-were-young-kids-4-58b80eeeefa13__700.jpg -O Julia_Roberts.jpg
!wget https://i.imgur.com/sct87xb.png - O Star_Wars_meme.png
!wget https://i.imgur.com/7gPVDg4.png -O Gabe.png

Run:

%cd /content/ESRGAN
!python test.py

Export:

!tar czvf ESRGAN.tar.gz /content/ESRGAN/results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment