Giter VIP home page Giter VIP logo

Comments (4)

twentyfiveYang avatar twentyfiveYang commented on August 20, 2024

Hello Abraham,
I'm also trying to do the same thing and find a way to train our own images.

The dataset structure required here should be like:
datasetsample

The way to make this kind of dataset you can refer to the image pre-processing method offered by the author @junyanz here: https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix/blob/master/docs/datasets.md

  1. Create folder /path/to/data with subfolders A and B. A and B should each have their own subfolders train, val, test, etc. In /path/to/data/A/train, put training images in style A. In /path/to/data/B/train, put the corresponding images in style B. Repeat same for other data splits (val, test, etc).
    ( Corresponding images in a pair {A,B} must be the same size and have the same filename, e.g., /path/to/data/A/train/1.jpg is considered to correspond to /path/to/data/B/train/1.jpg. )

  2. Once the data is formatted this way, call:

python path/to/combine_A_and_B.py --fold_A /path/to/data/A --fold_B /path/to/data/B --fold_AB /path/to/data

This will combine each pair of images (A,B) into a single image file, which is the dataset ready for training the BicycleGAN.

combine_A_and_B.py file can be found here:
https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix/blob/master/datasets/combine_A_and_B.py

from bicyclegan.

kuruvilla2087 avatar kuruvilla2087 commented on August 20, 2024

from bicyclegan.

AvirupJU avatar AvirupJU commented on August 20, 2024

Thanks @twentyfiveYang. This post helped. I guess many would keep the same directory structure as in CycleGAN as nothing is mentioned in the official readme.

from bicyclegan.

junyanz avatar junyanz commented on August 20, 2024

Thanks for the reply. It follows the pix2pix directory structure rather than CycleGAN's.

from bicyclegan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.