Comments (5)
I think I have solve the problem.
In load_data.py, line 53 should be changed into
'image = np.array(Image.open(os.path.join(image_path, image_name)).convert('L'))'
Because the default mode of 'Image.open()' to load images is 'RGB'.
Maybe it is the same solution to this issue
from cyclegan-keras.
Hi @APhun,
Sounds like you did everything right and that this is an error in the code. This since you should be able to use grayscale images if you want to. If you have color images (e.g. rgb) you want to use the size 256x256x3 but as you suggest it can work for you also even if you have grayscale images. The downside is that training takes more time.
On which row in the code is the error thrown?
My guess is that there is a problem in the saveImages-function on row 665-711 and that the if-statements on row 684 and 695 if self.channels == 1: # Use the paired data for MR images
should not be there. So you could try to modify the code by removing rows 684-688 and 695-699.
from cyclegan-keras.
Thanks a lot. The error didn't occur any more.
By the way, I noticed the comment βfor MR imagesβ, I guess you are also studying medical images :)
from cyclegan-keras.
That is correct
Always fun to meet new people in the merged deep learning and medtech field!
from cyclegan-keras.
Oops
Do you have any idea to solve it?
from cyclegan-keras.
Related Issues (20)
- Use numpy array as input HOT 4
- Error when batch size > 1 HOT 2
- Error in the adversarial least-squares loss for the discriminator HOT 4
- Save cycle_loss to training_history? HOT 2
- Histogram HOT 4
- Error with Dimention HOT 5
- Is It able to convert into coreML tools? HOT 2
- Saving weights as .hdf5 file.
- How do I run the model.py file using GPU? HOT 1
- Issue with generation of images HOT 1
- Weight initialized as? HOT 1
- Recreating night2day results HOT 6
- error in line 652
- Generator bug?
- Valid value for G_loss
- what's the purpose of using Network in line 115 to 122?
- keras and tensorflow version?
- tensorflow.python.framework.errors_impl.FailedPreconditionError
- where is CycleGAN.py?
- How can i solve the proble 'UnboundLocalError: local variable 'real_images_A' referenced before assignment'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cyclegan-keras.