-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regarding Training your Own Images #94
Comments
Hello Abraham, The dataset structure required here should be like: 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
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: |
Hi yang,
Thanks for preprocessing steps ,I will check this.
1.By the way how do we create input images from ground truth images ( I am
creating edges from the ground truth for now )?
2.Also how do we control color generation from the model ?
…On Mon, 19 Jul 2021, 19:42 twentyfiveYang, ***@***.***> wrote:
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:
[image: datasetsample]
<https://user-images.githubusercontent.com/20677807/126171935-14d53473-5f7d-4c38-8d9f-61743f852861.png>
The way to make this kind of dataset you can refer to the image
pre-processing method offered by the author @junyanz
<https://github.com/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
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#94 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJK54CITKBGK2OED2XPGF73TYQXDJANCNFSM473YQ2RA>
.
|
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. |
Thanks for the reply. It follows the pix2pix directory structure rather than CycleGAN's. |
Hi Juyanz,
How are you !hope all is fine .
I want to train this algo on different images ,I was thinking how to train them on self images ,
1)What pre-processing steps do i need to take here .Can you please guide me .?
2)The model is not saving to any directory ,Can you please let know where the trained model saves(for our own images) ?
The text was updated successfully, but these errors were encountered: