Comments (13)
Am I right when I say you are on windows?
If you are on windows, you can change the / with "\\" . (To actually see what is happening, try printing im and seg)
If you're not, then sorry but I don't have any ideas.
Have a good one :)
from image-segmentation-keras.
So it worked?
you forgot :
Change the assert( im.split('/')[-1].split(".")[0] == seg.split('/')[-1].split(".")[0] )
to assert( im.split('\\')[-1].split(".")[0] == seg.split('\\')[-1].split(".")[0] )
from image-segmentation-keras.
Ok that error is because you are on python 3.X
modification :
itertools.cycle().next() to next(itertools.cycle())
So in your case :
zipped.next() to next(zipped)
from image-segmentation-keras.
Yes, I'm on windows. I did the following (after aplying the modification you suggested):
print(im)
print(seg)
and that was the response:
data/dataset1/images_prepped_test\0016E5_08159.png
data/dataset1/annotations_prepped_test\0016E5_08159.png
data/dataset1/images_prepped_train\0016E5_08640.png
data/dataset1/annotations_prepped_train\0016E5_08640.png
from image-segmentation-keras.
Now I'm having this error:
Traceback (most recent call last):
File "train.py", line 90, in
m.fit_generator( G , 512 , validation_data=G2 , validation_steps=200 , epochs=1 )
File "C:\Users\Matheus\Anaconda3\envs\tensorflow\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "C:\Users\Matheus\Anaconda3\envs\tensorflow\lib\site-packages\keras\engine\training.py", line 1415, in fit_generator
initial_epoch=initial_epoch)
File "C:\Users\Matheus\Anaconda3\envs\tensorflow\lib\site-packages\keras\engine\training_generator.py", line 177, in fit_generator
generator_output = next(output_generator)
File "C:\Users\Matheus\Anaconda3\envs\tensorflow\lib\site-packages\keras\utils\data_utils.py", line 793, in get
six.reraise(value.class, value, value.traceback)
File "C:\Users\Matheus\Anaconda3\envs\tensorflow\lib\site-packages\six.py", line 693, in reraise
raise value
File "C:\Users\Matheus\Anaconda3\envs\tensorflow\lib\site-packages\keras\utils\data_utils.py", line 658, in _data_generator_task
generator_output = next(self._generator)
File "C:\Users\Matheus\Desktop\UFRGS\Mestrado\tutorial_python\APLICACAO_A_AGRICULTURA\image-segmentation-keras-master\LoadBatches.py", line 82, in imageSegmentationGenerator
im , seg = zipped.next()
AttributeError: 'itertools.cycle' object has no attribute 'next'
=(
from image-segmentation-keras.
I made the modification you mentioned, I think that assertion error is ok now, but I'm having this new error I've just mentioned above =(
from image-segmentation-keras.
It worked! thanks a lot for your time!!! I'm rookie on python, so it's kind of hard to solve these errors on my own... I want to use the code to apply to my own dataset, so it's likely I'll need help again...
Thanks again!
from image-segmentation-keras.
You're very welcome !
If you ever have a problem or an error just type it in google and you will surely find solutions :p
from image-segmentation-keras.
Could you answer one more question? The instructions by the author tell us to use --input_height = 320 and --input_width = 640, but these are not the exact dimensions of the images from the dataset. How those values influence on the code?
from image-segmentation-keras.
For me, they cause an error for me ! I removed these arguments
Sorry can't help you on that :(
from image-segmentation-keras.
@matheuscass there are multiple reasons that we do not use the original size of the images. If the images are very large, the the size of the CNN would also increase which means slower training time and more memory. In most cases, larger the image, you would have to use more number of layers.
from image-segmentation-keras.
@divamgupta
Let’s say my dataset are images of same dimensions (weird ratio 624*464) but the images I want to predict come from a phone (so dimensions like 1080p). What should I modify in order to get good dimensions on the prediction ?
from image-segmentation-keras.
You can first resize the image before inputting to the model and resize the output to the original dimensions
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.