Comments (15)
@anas-899 @VeniVidiGavi I just removed the arguments input_width
and input_height
for both train.py
and predict.py
and it worked well
from image-segmentation-keras.
Yes default values don't work. Just go to /home/.keras/keras.json and change to
{
"floatx": "float32",
"epsilon": 1e-07,
"backend": "theano",
"image_data_format": "channels_last"
}
from image-segmentation-keras.
This error happens because VGG16 was designed for images with size of 224. But the given code uses Input(shape=(3,416,608). If you do not replace the input shape with (3,224,224),you will meet the error that "ValueError: Dimension 0 in both shapes must be equal, but are ***** and 25088 for 'Assign_26' (op: 'Assign') with input shapes: [****,4096], [25088,4096]".Remove arguments input_width and input_height for both train.py and predict.py and it worked well becasue the train.py and predict.py use default arguments" 224".I find the code don't support tensorflow backend because tensorflow uses "channels_last" and theano uses "channels_first" .So if you want the code support tensorflow backend,just change input shape with (224,224,3) and change "data_format='channels_first'" with " data_format='channels_last". @VeniVidiGavi @anas-899 @quelibrio @gpkc
from image-segmentation-keras.
If you remove the input_width and input_height it will simply use the default size of 224x224 I believe.
from image-segmentation-keras.
@noamgal It works well, thanks! I got another error after the fix AttributeError: 'itertools.cycle' object has no attribute 'next', but changes to next(zipped) at "/image-segmentation-keras/LoadBatches.py" and now it works.
from image-segmentation-keras.
Yes, This error is because of the Tensorflow backend. We don;t support tensorflow backend currently. Try installing latest version of nvcc and theano.
from image-segmentation-keras.
@VeniVidiGavi did you discover how to solve it? .. I got the same error
from image-segmentation-keras.
Then you'll be changing your backend to Theano. Some people can't use Theano (for example if you want to train on Google Cloud ML).
from image-segmentation-keras.
Ye you won't be able to train on google cloud, but since authors state "We don't support tensorflow backend currently" i don't see other option
from image-segmentation-keras.
@Cbanyungong Why is it exactly that makes it necessary to keep the size 224? Aren't CNNs kernel-based and therefore independent of input size (i.e. they just train the kernel weights)?
from image-segmentation-keras.
I'm getting this error in Line 105 of the FCN8 ( o = Add()([ o , o2 ])):
ValueError: Operands could not be broadcast together with shapes (14, 16, 10) (14, 14, 10)
Any ideas why this is happening?
I try to use tensorflow as backend aswell and did everything mentioned in this post.
from image-segmentation-keras.
@noamgal It works well, thanks! I got another error after the fix AttributeError: 'itertools.cycle' object has no attribute 'next', but changes to next(zipped) at "/image-segmentation-keras/LoadBatches.py" and now it works.
Have you solved the problem?
from image-segmentation-keras.
@mgq1507 you can try to replace zipped.next() with zipped._next_() in LoadBatches.py
from image-segmentation-keras.
Why is it exactly that makes it necessary to keep the size 224? Aren't CNNs kernel-based and therefore independent of input size (i.e. they just train the kernel weights)?
CNNs are indeed independent of input size, but VGG net is not fully convolutional. It has some fully-connected layers at the end. At the time of flattening the input the mismatch of the shape occur.
from image-segmentation-keras.
Image segmentation keras has been updated. The new version should fix the issue.
from image-segmentation-keras.
Related Issues (20)
- How to resume model training from last saved weight file?
- Installation requirement of h5py<=2.10.0?
- Not working on video
- Augmentations with "do_augment=True"
- Local Machine Multi GPU usage
- Wrong number of classes in visualize_segmentation
- urllib.error.URLError: <urlopen error [WinError 10061] 由于目标计算机积极拒绝,无法连接。>
- Unable to Work Preprocessing Function Parameter for model.train() HOT 1
- Custom Augmentation: AttributeError: 'Compose' object has no attribute 'to_deterministic'
- how to get FLOPs and Params
- crash to reboot durring training on both linux and windows
- iteration number is fixed to 512 and doesn't change
- Normalization problem
- if my pictures have a channel number more than 3, how to change the code to adapt to it
- Run pre-trained from Command Line?
- turning off the print statements?
- Another project using this lib....
- question about vgg16.py block 5
- TypeError: train() got an unexpected keyword argument 'callbacks'
- Model Deployment
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 image-segmentation-keras.