-
Notifications
You must be signed in to change notification settings - Fork 19.4k
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
How to handle grayscale images when using fine-tune with VGG16? #20031
Comments
How are you using the data? Are you repeating the same channel three times? What is your finally task (classify, segment)?
Take in advanced, that your model's output is now an intermediate convolutional representation ( output_layer = vgg.get_layer('block5_conv4').output) not a final representation that you could use for a useful task. I hope that my answer can help you :) |
@sachinprasadhs , thank you for your answer. I used VGG16 with SRGAN to enhance the image and I repeated the channel 3 times but why it works without problem and generate gray images when freeze all layers of vgg ? like this code?
And I have another question please, why when in some code for the VGG16 they used ??
|
Hi, first of all, I'm going to respond to your second question. In this case, sometimes you may want to use only a certain part of the network (normally, the network without the top layer is used as a backbone to extract features), so this is the main reason! Regarding the first question, I don't have any idea why it is giving you a tensor with more than one depth channel. Please, comment here with the output shape of the last layer of your VGG16 model! :) |
This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you. |
This issue was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further. |
Hi keras team!
I am trying to use pre trained VGG16 with SRGAN and grayscale images when I use the VGG16 in this way:
my model work without any problem and gave grayscale images but when trying to frees the layers of VGG16 and train some layes like this code:
The generated images be like have blue filter and some time brown filter or all generated images in blue. why this happen and how can I fine tune the VGG16 with gray images??
The text was updated successfully, but these errors were encountered: