Top rank on kaggle is 417.
My portfolio with some of my projects, which include Kaggle kernels, pet-projects, articles, etc.
The repository provides usefull python scripts for ML and data analysis
License: Apache License 2.0
Top rank on kaggle is 417.
My portfolio with some of my projects, which include Kaggle kernels, pet-projects, articles, etc.
Traceback (most recent call last):
File ".\train.py", line 250, in <module>
predicted = model.predict(np.expand_dims(Xtest[0], axis=0)).reshape(1472, 1472)
ValueError: cannot reshape array of size 589824 into shape (1472,1472)
May I ask why reshape to (1472, 1472)?
And, may you supply a separate predict.py for loading trained model and predict a test image?
Thanks!
aaa
Hi,
I have read your code of "ML-DL-scripts/DEEP LEARNING/segmentation/Segmentation pipeline/segmentation pipeline.ipynb", the data set used is in the folder of "../data/". However, I am so confused about how to get the dataset of "../data/".
So, could you pls help to give me some suggestions? Thanks!
You wrote an excellent script to download dataset, thank you very much!
But there is a question when I run this script.
The progress sometimes show:HTTP Error 500. Therefore, I can't download the full data from this website, and when I locate the specific link that shown error, the chrome also shown HTTP Error 500, I don't know whether is my internet problem.
I don't know whether other guys have the same problem, could you offer an Google Drive link to download full dataset?
Thank you very much
When I run the code line 'Xtest, ytest = test_generator.getitem(0)' in segmentation pipeline.ipynb, I get FileNotFoundError. Although, I sorted the dataset after downloading it. Once it says, img-98.png is not a file, sometimes another file name, and then at times it says list out of index if I comment this 'Xtest, ytest = test_generator.getitem(0', and run this code line deep down 'history = model.fit(train_generator, shuffle =True,
epochs=50, workers=4, use_multiprocessing=True,
validation_data = test_generator,
verbose = 1, callbacks = callbacks)
#plotting history
plot_training_history(history)'
If I run the second code line, the error is as follows:
FileNotFoundError Traceback (most recent call last)
/var/folders/q2/2l3cmy9d7ws6npzjdp68gcbm0000gn/T/ipykernel_64715/3593073851.py in
2 epochs=50, workers=4, use_multiprocessing=True,
3 validation_data = test_generator,
----> 4 verbose = 1, callbacks = callbacks)
5 #plotting history
6 plot_training_history(history)
~/PycharmProjects/myvenv/lib/python3.7/site-packages/keras/engine/training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_freq, max_queue_size, workers, use_multiprocessing, **kwargs)
1145 use_multiprocessing=use_multiprocessing,
1146 shuffle=shuffle,
-> 1147 initial_epoch=initial_epoch)
1148
1149 # Case 2: Symbolic tensors or Numpy array-like.
~/PycharmProjects/myvenv/lib/python3.7/site-packages/keras/legacy/interfaces.py in wrapper(*args, **kwargs)
89 warnings.warn('Update your ' + object_name + '
call to the ' +
90 'Keras 2 API: ' + signature, stacklevel=2)
---> 91 return func(*args, **kwargs)
92 wrapper._original_function = func
93 return wrapper
~/PycharmProjects/myvenv/lib/python3.7/site-packages/keras/engine/training.py in fit_generator(self, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, validation_freq, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch)
1730 use_multiprocessing=use_multiprocessing,
1731 shuffle=shuffle,
-> 1732 initial_epoch=initial_epoch)
1733
1734 @interfaces.legacy_generator_methods_support
~/PycharmProjects/myvenv/lib/python3.7/site-packages/keras/engine/training_generator.py in fit_generator(model, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, validation_freq, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch)
183 batch_index = 0
184 while steps_done < steps_per_epoch:
--> 185 generator_output = next(output_generator)
186
187 if not hasattr(generator_output, 'len'):
~/PycharmProjects/myvenv/lib/python3.7/site-packages/keras/utils/data_utils.py in get(self)
623 except Exception:
624 self.stop()
--> 625 six.reraise(*sys.exc_info())
626
627
~/PycharmProjects/myvenv/lib/python3.7/site-packages/six.py in reraise(tp, value, tb)
717 if value.traceback is not tb:
718 raise value.with_traceback(tb)
--> 719 raise value
720 finally:
721 value = None
~/PycharmProjects/myvenv/lib/python3.7/site-packages/keras/utils/data_utils.py in get(self)
608 try:
609 future = self.queue.get(block=True)
--> 610 inputs = future.get(timeout=30)
611 except mp.TimeoutError:
612 idx = future.idx
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/pool.py in get(self, timeout)
655 return self._value
656 else:
--> 657 raise self._value
658
659 def _set(self, i, obj):
FileNotFoundError: No such file: '/Users/hammadmacho7/PycharmProjects/CondaTest/img-494.png'
whereas if I run the former code line, the error is as follows:
FileNotFoundError Traceback (most recent call last)
/var/folders/q2/2l3cmy9d7ws6npzjdp68gcbm0000gn/T/ipykernel_64715/1877470075.py in
26 nb_y_features = 1, augmentation = aug_with_crop)
27
---> 28 Xtest, ytest = test_generator.getitem(0)
/var/folders/q2/2l3cmy9d7ws6npzjdp68gcbm0000gn/T/ipykernel_64715/4241908483.py in getitem(self, index)
41
42 X_sample, y_sample = self.read_image_mask(self.image_filenames[index * self.batch_size + i],
---> 43 self.mask_names[index * self.batch_size + i])
44
45 # if augmentation is defined, we assume its a train set
/var/folders/q2/2l3cmy9d7ws6npzjdp68gcbm0000gn/T/ipykernel_64715/4241908483.py in read_image_mask(self, image_name, mask_name)
22
23 def read_image_mask(self, image_name, mask_name):
---> 24 return imread(image_name)/255, (imread(mask_name, as_gray=True) > 0).astype(np.int8)
25
26 def getitem(self, index):
~/PycharmProjects/myvenv/lib/python3.7/site-packages/skimage/io/_io.py in imread(fname, as_gray, plugin, **plugin_args)
46
47 with file_or_url_context(fname) as fname:
---> 48 img = call_plugin('imread', fname, plugin=plugin, **plugin_args)
49
50 if not hasattr(img, 'ndim'):
~/PycharmProjects/myvenv/lib/python3.7/site-packages/skimage/io/manage_plugins.py in call_plugin(kind, *args, **kwargs)
205 (plugin, kind))
206
--> 207 return func(*args, **kwargs)
208
209
~/PycharmProjects/myvenv/lib/python3.7/site-packages/skimage/io/_plugins/imageio_plugin.py in imread(*args, **kwargs)
8 @wraps(imageio_imread)
9 def imread(*args, **kwargs):
---> 10 return np.asarray(imageio_imread(*args, **kwargs))
~/PycharmProjects/myvenv/lib/python3.7/site-packages/imageio/init.py in imread(uri, format, **kwargs)
94 )
95
---> 96 return imread_v2(uri, format=format, **kwargs)
97
98
~/PycharmProjects/myvenv/lib/python3.7/site-packages/imageio/v2.py in imread(uri, format, **kwargs)
198 imopen_args["legacy_mode"] = True
199
--> 200 with imopen(uri, "ri", **imopen_args) as file:
201 return file.read(index=0, **kwargs)
202
~/PycharmProjects/myvenv/lib/python3.7/site-packages/imageio/core/imopen.py in imopen(uri, io_mode, plugin, format_hint, legacy_mode, **kwargs)
108 request.format_hint = format_hint
109 else:
--> 110 request = Request(uri, io_mode, format_hint=format_hint)
111
112 source = "" if isinstance(uri, bytes) else uri
~/PycharmProjects/myvenv/lib/python3.7/site-packages/imageio/core/request.py in init(self, uri, mode, format_hint, **kwargs)
246
247 # Parse what was given
--> 248 self._parse_uri(uri)
249
250 # Set extension
~/PycharmProjects/myvenv/lib/python3.7/site-packages/imageio/core/request.py in _parse_uri(self, uri)
386 # Reading: check that the file exists (but is allowed a dir)
387 if not os.path.exists(fn):
--> 388 raise FileNotFoundError("No such file: '%s'" % fn)
389 else:
390 # Writing: check that the directory to write to does exist
FileNotFoundError: No such file: '/Users/hammadmacho7/PycharmProjects/CondaTest/img-94.png'
I really need to solve this issue asap as I have to implement this for a project I am working on, which by the way has a very near deadline.
Describe the bug
IOError: Unable to open file (unable to open file: name = 'weights/mobilenet_weights.h5'
when running:
python evaluate_mobilenet.py -dir dir_with_single_jpg_file
To Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
Describe the bug
File "nn_image_features.py", line 108
raise ValueError(f'Got incorrect DenseNet model type ({model_type}).')
^
SyntaxError: invalid syntax
@Diyago What are the tf, keras respective versions installed for Segmentation ipynb?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.