How to train CNN with an image in the input and an image in the output?
Show older comments
I have a task to train CNN with an image as input and an image as output. I have tried to do it at the beginning with Matlab tutorial, but matlab has no image as output, but a vector.
any idea how i can do this tutorial again but with image as output?
For example you could insert input as image for number one and the output is also for number one but rotated or deformed.
Please don't send me other people's question, because i have seen all answers about it.
6 Comments
ghada sandoub
on 8 Jun 2020
Edited: ghada sandoub
on 8 Jun 2020
Hello Osama,
I hope that you have found a solution to your problem. I have the same situation, I need to train CNN for image enhancement and I don't know how to design the network to recieve an image as input and the output is also an image not a label. However, all the available CNNs in matlab can recieve an image as input and the output is a label for the task of classification or regression. could you please if you already found a method to do this please help me on that. Thanks alot.
Osama Tabbakh
on 8 Jun 2020
ghada sandoub
on 9 Jun 2020
Thanks alot Osama for your reply. However, unfortunately, I have no experience in using python. So, I was searching for a method that can do this on Matlab.
Ritesh Jain
on 13 Aug 2020
Hello Osama,
I am stuck in the same thing for almost a month can you please help me out in this thing in Python.
Osama Tabbakh
on 15 Aug 2020
Florent Busnoult
on 25 Aug 2020
Edited: Florent Busnoult
on 25 Aug 2020
There is an example in the 5G toolbox that uses a CNN network with a picture as an input and a picture as an output.
The variable used to store the "labels" or (ouput images) is the following:
trainLabels(:,:,:,i) = est_grid;
It's a 4-D double variable.
And you can look at the different output images used to trian the network by using the command below:
>> imagesc(abs(trainLabels(:,:,:,2))); % output image number 2
>> imagesc(abs(trainLabels(:,:,:,3))); % output image number 3
>> imagesc(abs(trainLabels(:,:,:,25))); % output image number 25
and so on.
Accepted Answer
More Answers (1)
Johanna Pingel
on 29 Apr 2019
0 votes
Try this example: https://www.mathworks.com/help/deeplearning/examples/image-to-image-regression-using-deep-learning.html
Let me know if this doesn't answer your question!
3 Comments
Osama Tabbakh
on 30 Apr 2019
supriya Naik
on 28 Aug 2020
Did you get the solution sir?? Actually I am facing same problem now.
Osama Tabbakh
on 17 Sep 2020
Categories
Find more on Get Started with Statistics and Machine Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!