This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update | |
sudo apt upgrade -y | |
sudo apt install nginx -y | |
echo 'deb https://download.jitsi.org stable/' | sudo tee /etc/apt/sources.list.d/jitsi-stable.list | |
wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | sudo apt-key add - | |
# Ensure support is available for apt repositories served via HTTPS | |
sudo apt-get install apt-transport-https -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convert original.png +repage -crop 1x -trim -resize 1x256\! +append out.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls | xargs -t -I in mv in sub | |
ls | sort -R | tail -1000 | xargs -I in mv in ../selected-people/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
montage -geometry 256x256-32 -tile x1 *.png montage-overlap.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DONT USE this seems to miss off the last iamge | |
convert -extent 512x256 *.png | |
# works, use this for batch operations | |
mogrify -extent 512x256 *.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import subprocess | |
path_to_images = '/Users/tomchambers/projects/machine_learning_data/clothed_unclothed/original' | |
images = os.listdir(path_to_images) | |
image_paths = [path for path in images if 'jpg' in path] | |
def escape_url(url): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convert * -geometry 512x256^ -gravity center -crop 512x256+0+0 out.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TRAIN | |
floyd run --gpu --data tomchambers2/datasets/person_background_pair:inputs "python pix2pix.py \ | |
--mode train \ | |
--output_dir model \ | |
--max_epochs 200 \ | |
--input_dir /inputs \ | |
--which_direction AtoB" | |
# TEST (use to generate new images from input) | |
floyd run --gpu --data tomchambers2/datasets/eleanor_nude_test_2:inputs --data tomchambers2/projects/pix2pix/11:files "python pix2pix.py \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import subprocess | |
path_to_images = '/Users/tomchambers/projects/machine_learning_results/monster_results' | |
images = os.listdir(path_to_images) | |
image_paths = [path for path in images if 'pdf' in path] | |
image_packages = [{"name": path.split('.')[0], "pdf_name": path} |