Could you provide the pretrained weights?
Closed this issue · 21 comments
Hi MathiasGruber,
Firstly I am kindly to thank you for your awesome contribution, especially making them as step by step process.
I have went through the source code, and as you have said that it is going to take time to train the model, could you provide your pretrained weights such as these files:
50_weights_2018-06-01-16-41-43.h5
150_weights_2018-06-26-22-19-32.h5
170_weights_2018-06-28-15-00-38.h5
in "Step4 - Imagenet Training" file
Thank you again 👍 🥇
Requesting the same! Thanks in advance.
Hey, i would be interested as well, that would save us a some training time and helps us to evaluate your code 👍
Hello anyone,
Is there anyone run successfully the source code? please show us how?
I am stuck at this step :
# Pick out an example
test_data = next(test_generator)
(masked, mask), ori = test_data
# Show side by side
for i in range(len(ori)):
_, axes = plt.subplots(1, 3, figsize=(20, 5))
axes[0].imshow(masked[i,:,:,:])
axes[1].imshow(mask[i,:,:,:] * 1.)
axes[2].imshow(ori[i,:,:,:])
plt.show()
And have gotten this error:
Found 0 images belonging to 0 classes.
---------------------------------------------------------------------------
ZeroDivisionError Traceback (most recent call last)
<ipython-input-27-638825d3ed00> in <module>()
1 # Pick out an example
----> 2 test_data = next(test_generator)
3 (masked, mask), ori = test_data
4
5 # Show side by side
<ipython-input-25-cdb5b281b766> in flow_from_directory(self, directory, *args, **kwargs)
5
6 # Get augmentend image samples
----> 7 ori = next(generator)
8
9 # Get masks for each image sample
c:\users\trinh\appdata\local\programs\python\python35\lib\site-packages\keras_preprocessing\image.py in __next__(self, *args, **kwargs)
1296
1297 def __next__(self, *args, **kwargs):
-> 1298 return self.next(*args, **kwargs)
1299
1300 def _get_batches_of_transformed_samples(self, index_array):
c:\users\trinh\appdata\local\programs\python\python35\lib\site-packages\keras_preprocessing\image.py in next(self)
1772 """
1773 with self.lock:
-> 1774 index_array = next(self.index_generator)
1775 # The transformation of images is not under thread lock
1776 # so it can be done in parallel
c:\users\trinh\appdata\local\programs\python\python35\lib\site-packages\keras_preprocessing\image.py in _flow_index(self)
1281 self._set_index_array()
1282
-> 1283 current_index = (self.batch_index * self.batch_size) % self.n
1284 if self.n > current_index + self.batch_size:
1285 self.batch_index += 1
ZeroDivisionError: integer division or modulo by zero
see here: keras-team/keras#4699
you should add a subfolder and move all images to this subfolder
Hi hblflybird,
Thank you for your reply, I have run successfully the code. I think we have to modify a little bit to test on our data. Do you have any ideas? 🤓 _
@xhh232018 Maybe caused by preprocessing, it has to be rescale 1/255.
I've edited several places of codes for more reasonable preprocessing, but I'm still training my model.
Would you like contact me by email?Thank you!
research@s51vfx.com
When i train the model on my own dataset, the loss of the epoch1 is too high, but the loss is decreasing slowly. I want to know if it is normal?
Interested in the weights as well - I would like to use inpainting for preprocessing in another task, but I don't have the GPU-time to train the whole thing.
Hello MathiasGruber,
Thank you for this really nice implementation. I am trying to run this 4th notebook. I am trying to use image impainting for a different use case. It would be great if you wish to share the pretrained weights that I could use.
Hi guys, I have trained the model for one week based on my own dataset. I can show you some training results:
However, I cannot figure out how to load my trained model to test on some artificial mask such as:
The result is quite bad:
Can anyone help me with this problem?
Thanks a lot!
Hello, I am having trouble running this last step. What changes are to be made to train it on our custom dataset?
@xhh232018 can u provide the steps needed to run the code?
thanks
Hi hblflybird,
Thank you for your reply, I have run successfully the code. I think we have to modify a little bit to test on our data. Do you have any ideas? nerd_face _
how did u run the code? @TrinhQuocNguyen
@NerminSalem
You have to modify the directory paths to your own folders.
Hi hblflybird,
Thank you for your reply, I have run successfully the code. I think we have to modify a little bit to test on our data. Do you have any ideas? 🤓 _
i have been experiencing the same error, i understand that i have to move all images in a subfolder, i tired it but still getting the same error? so what name did u use for that subfolder and do i have to do this for train, pexels and val folders?
Thank you for the great implementation!
We would greatly appreciate if you could provide us with the pre-trained weights for the 4th notebook. I don't have the infrastructure to train the model or budget to rent GPUs and storage online. (student). Any help will be greatly appreciated. Thankyou!!
hi @TrinhQuocNguyen , how do you run the step4 file? In the file, it need to load ' ./data/logs/50_weights_2018-06-01-16-41-43.h5' pretrain model. I just delete the model.load(r"./data/logs/50_weights_2018-06-01-16-41-43.h5") and then run the step4. is it correct?
hi @TrinhQuocNguyen , how do you run the step4 file? In the file, it need to load ' ./data/logs/50_weights_2018-06-01-16-41-43.h5' pretrain model. I just delete the model.load(r"./data/logs/50_weights_2018-06-01-16-41-43.h5") and then run the step4. is it correct?
Correct!
hi @TrinhQuocNguyen I deleted ( load ' ./data/logs/50_weights_2018-06-01-16-41-43.h5)then run the code,It ended with (OSError: Unable to create file (unable to open file:name= 'data/logs/1_weights_2019-01-23-10-58-06.h5')
Am I supposed to add any code?Did you meet the same problem? Thanks
Have you solved this problem yet? @xhh232018 @QuantumLiu
Hi hblflybird,
Thank you for your reply, I have run successfully the code. I think we have to modify a little bit to test on our data. Do you have any ideas? nerd_face _
i meet the same problem,what's mean? Is that i should make a new folder? ,now i creat a floder Celeba cludes train , val and test ,it under data so ,my command is python main.py --name celeba --train ./data/celeba/train/ --validation ./data/celeba/val/ --test ./data/celeba/test/ --vgg_path ./data/logs/pytorch_to_keras_vgg16.h5
, it doesn't work, thanks for your time !