Generator is not producing datasets
Hi everyone my generator is not producing images and stops with the first epoch
Epoch 1/5
StopIteration Traceback (most recent call last)
in () 6 validation_steps = gen_valid.get_size(), 7 callbacks = [early_stop, checkpoint, tensorboard], ----> 8 max_q_size = 8) 9 ~/anaconda3/lib/python3.5/site-packages/keras/legacy/interfaces.py in wrapper(*args, **kwargs) 85 warnings.warn('Update your
' + object_name + 86 'call to the Keras 2 API: ' + signature, stacklevel=2) ---> 87 return func(*args, **kwargs) 88 wrapper._original_function = func 89 return wrapper~/anaconda3/lib/python3.5/site-packages/keras/models.py in fit_generator(self, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch) 1154 use_multiprocessing=use_multiprocessing, 1155 shuffle=shuffle, -> 1156 initial_epoch=initial_epoch) 1157 1158 @interfaces.legacy_generator_methods_support
~/anaconda3/lib/python3.5/site-packages/keras/legacy/interfaces.py in wrapper(*args, **kwargs) 85 warnings.warn('Update your
' + object_name + 86 'call to the Keras 2 API: ' + signature, stacklevel=2) ---> 87 return func(*args, **kwargs) 88 wrapper._original_function = func 89 return wrapper~/anaconda3/lib/python3.5/site-packages/keras/engine/training.py in fit_generator(self, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch) 2044 batch_index = 0 2045 while steps_done < steps_per_epoch: -> 2046 generator_output = next(output_generator) 2047 2048 if not hasattr(generator_output, 'len'):
then I checked the# ### show(generator.__next __()[0][0][0]) and it returns:
StopIteration Traceback (most recent call last)
in () ----> 1 show(generator.next()) erator.next())
Can you show the full error of show(generator.__next __()[0][0][0])? Your provided text is clipped somewhere.
One comment: you should run cell In [15]: to produce the images from the videos first.
Sorry I tried a couple of times(the problem is not with generator function either) and find out that whenever I read images using opencv returns none(
Type: NoneType
String form: None
Docstring:
and thats why it cannot generate images. { I have my train/images directory with all the frames in it and I can watch the video feed too. kindof some other issues with conda/opencv(built in conda envs) and the gsettings(memory error is bursting out too)
and thank you so much for your kind words. may I know how you made the environment for the purpose.
Are you install OPENCV using pip install opencv or something? I had this same error. I had to reinstall it using (https://www.pyimagesearch.com/2016/10/24/ubuntu-16-04-how-to-install-opencv/).
Thank you . I used a conda enviournment to build the model . but the whole thing broke somehow (with xdg/gsettings reinstallation and other errors) will get back to you once i complete this process!
On Wed, Nov 22, 2017 at 6:52 PM, Huynh Ngoc Anh [email protected] wrote:
Are you install OPENCV using pip install opencv or something. I had this same error. I had to install it again using (https://www.pyimagesearch. com/2016/10/24/ubuntu-16-04-how-to-install-opencv/).
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/experiencor/speed-prediction/issues/4#issuecomment-346348527, or mute the thread https://github.com/notifications/unsubscribe-auth/AOrAC5wXHm0GBW1qshHJGPLZ1EO2rX6Kks5s5CAagaJpZM4QnC3q .
Thank you I will get back to you once I complete this installation process I guess.
I used conda environment and build it(using make install) to get it working with ffmpeg.
Hi I tried to build this using virtual environment and I could cmake and cmake install it but, I cannot import/find file cv2.so.
I went through root files of python 2&3 and cannot find this cv2.so as per the instructor. Conda is disabled during this binary compiling.
Hi its working fine mahn! thanks :+1:
Great! Hope that you go farther than me. My code works very well on validation set (3.4) but not that well on test set (31.4).