Skip to content

mwortsma/elements_of_style

Repository files navigation

elements of style

Run this command if you have a mac, a camera, and opencv2 (pip3 install python-opencv i think?) cd pytorch-CycleGAN-and-pix2pix python3 interactive_demov4.py --dataroot ./datasets/monet2photo --name vangogh2photo --model cycle_gan --which_model_netG resnet_9blocks --dataset_mode unaligned --checkpoints_dir ./checkpoints/ --gpu_ids -1

Important things:

  1. Python 3
  2. Make a folder at the same level as this called data. We have added it to the gitignore.
  3. Datasets are stored at data/

Data loading

We will make use of torchvision.datasets, specifically the ImageFolder implementation of the Dataset class. Assuming image data is arranged as follows:

root/<label1>/image00.png
root/<label1>/image01.png
...
root/<labelN>/imageXX.png

we can then load our dataset like so:

import torch
from torchvision import transforms, datasets

data_transform = transforms.Compose([transform1, transform2, ...]) # apply some transformations
bam_dataset = datasets.ImageFolder(root="data/bam/", transform=data_transform)
dataset_loader = torch.utils.data.DataLoader(bam_dataset, batch_size=batch_sz, shuffle=True)

Helpful commands: python3 mnist_fc_vae_experiments.py -res=results/MNIST/train_z_sz_10/ -save=trained_models/mnist_fc_vae_z_sz_10.model -z_sz=10 -epochs=50

this is a test.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •