MathiasGruber / PConv-Keras

Unofficial implementation of "Image Inpainting for Irregular Holes Using Partial Convolutions". Try at: www.fixmyphoto.ai
MIT License
903 stars 253 forks source link

training for my own dataset #6

Open NerminSalem opened 5 years ago

NerminSalem commented 5 years ago

thanks alot for sharing yr code. how can i use it to train on my own dataset ? also i have a question regarding used loss function, from wt i understand of yr code is that u only used root mean sqaure loss, is that correct? yr help is really appropriated

KhyatiGanatra commented 5 years ago

thanks alot for sharing yr code. how can i use it to train on my own dataset ? also i have a question regarding used loss function, from wt i understand of yr code is that u only used root mean sqaure loss, is that correct? yr help is really appropriated

I have the same question. How to train on my custom dataset. It is trying to load saved models, which does not exist already. Any help will be appreciated

NerminSalem commented 5 years ago

@MathiasGruber your help is really appreciated, how to run the code?

MathiasGruber commented 5 years ago

You should follow the notebook "Step4 - Imagenet Training.ipynb", and change the TRAIN_DIR, TEST_DIR and VAL_DIR as appropriate. Let me know if it doesn't work :)

KhyatiGanatra commented 5 years ago

:)

Yes, thanks for the reply. I have changed the directories. But in later part where you are trying to load model, and trying to access logs, its empty. There is no model to load in Phase 1. Please correct if I am wrong

NerminSalem commented 5 years ago

You should follow the notebook "Step4 - Imagenet Training.ipynb", and change the TRAIN_DIR, TEST_DIR and VAL_DIR as appropriate. Let me know if it doesn't work :)

i m getting this error (Found 0 images belonging to 0 classes.). do i have to put the images in a folder and wt should i name it? also i followed the same paths to train, pexels and val yr help is really needed thanks

Zzzzy411 commented 5 years ago

i m getting this error (Found 0 images belonging to 0 classes.). do i have to put the images in a folder and wt should i name it? also i followed the same paths to train, pexels and val yr help is really needed thanks

Have you solved this problem ?Thanks for your answer.

NerminSalem commented 5 years ago

Sadly still didn't find a solution

xdujiang commented 5 years ago

@NerminSalem @Zzzzy411 There must be subfolders in your TRAIN_DIR, TEST_DIR, VAL_DIR, and you need to put image files in the subfolders... https://github.com/keras-team/keras/issues/3946#issuecomment-400546787

JaimeCarracedo commented 5 years ago

:)

Yes, thanks for the reply. I have changed the directories. But in later part where you are trying to load model, and trying to access logs, its empty. There is no model to load in Phase 1. Please correct if I am wrong

Hi, have you any solution for this problem? Thanks.

ZDD2009 commented 5 years ago

You should follow the notebook "Step4 - Imagenet Training.ipynb", and change the TRAIN_DIR, TEST_DIR and VAL_DIR as appropriate. Let me know if it doesn't work :)

i m getting this error (Found 0 images belonging to 0 classes.). do i have to put the images in a folder and wt should i name it? also i followed the same paths to train, pexels and val yr help is really needed thanks Hi,Had the problem been solved?Thanks!

ZDD2009 commented 5 years ago

i m getting this error (Found 0 images belonging to 0 classes.). do i have to put the images in a folder and wt should i name it? also i followed the same paths to train, pexels and val yr help is really needed thanks

MathiasGruber commented 5 years ago

I've updated the repo with a CLI, so you should now be able to do: python main.py \ --name MyDataset \ --train TRAINING_PATH \ --validation VALIDATION_PATH \ --test TEST_PATH \ --vgg_path './data/logs/pytorch_to_keras_vgg16.h5'

Note that each image folder needs one or more subfolders that contain the actual images, since I'm basing my image generator on the ImageDataGenerator.

shabin75 commented 5 years ago

i have an issue after first epoch current_index = (self.batch_index * self.batch_size) % self.n ZeroDivisionError: integer division or modulo by zero pls help me

Lvhhhh commented 5 years ago

i have an issue after first epoch current_index = (self.batch_index * self.batch_size) % self.n ZeroDivisionError: integer division or modulo by zero pls help me

i have the same problem , do you fix it?

ttxxr commented 5 years ago

i have an issue after first epoch current_index = (self.batch_index * self.batch_size) % self.n ZeroDivisionError: integer division or modulo by zero pls help me

i have the same problem , do you fix it? I have the same problem,too. If you have any solution for it , could you tell me ,please ?

Lvhhhh commented 5 years ago

i have an issue after first epoch current_index = (self.batch_index * self.batch_size) % self.n ZeroDivisionError: integer division or modulo by zero pls help me

i have the same problem , do you fix it? I have the same problem,too. If you have any solution for it , could you tell me ,please ?

i fix it , delete the 'val' because there is no 'val' folder in your valiation sample

Lvhhhh commented 5 years ago

i have an issue after first epoch current_index = (self.batch_index * self.batch_size) % self.n ZeroDivisionError: integer division or modulo by zero pls help me

delete 'val' in your valition sample

elham1992 commented 5 years ago

thanks alot for sharing your code. i use the cli to train on my own dataset .
python main.py --name celeba --train ./data/train --test ./data/test --vgg_path ./data/pytorch_to_keras_vgg16.h5

out put on command prompt is : image why no result and training is 0%?? pleas help me and answer to my Question.

SunnyPann commented 5 years ago

i have an issue after first epoch current_index = (self.batch_index * self.batch_size) % self.n ZeroDivisionError: integer division or modulo by zero pls help me

Are you training on your own training set? Where can I download the training model? thank you

jiguanglu commented 5 years ago

i m getting this error (Found 0 images belonging to 0 classes.). do i have to put the images in a folder and wt should i name it? also i followed the same paths to train, pexels and val yr help is really needed thanks

Have you solved this problem ?Thanks for your answer. Hi ,
TRAIN_DIR = r'/home/user/my_test/PConv-Keras/data/train' VAL_DIR = r'/home/user/my_test/PConv-Keras/data/val' TEST_DIR = r'/home/user/my_test/PConv-Keras/data/test' In each folder, you must have the sub folder and they must have the same name. like this.

data/ ...images/ ........./images ...masks/ ........./masks