Just checkin this code after some months again .. and Keras changed the generator, iterator function in 2.0?? Anyway this code does not work for me with Keras 2.0 and tf 1.4. So just in case, I decided to provide a working configuration:
with python 2.7 and tensorflow 1.0-gpu, I installed the following requirements.txt via pip with:
pip install -r requirements.txt
and copy paste the following dependencies in the requirements.txt file.
Also make sure that you that you change the below line of code in the random_shadow function in utils.py.
mask[(ym - y1) * (x2 - x1) - (y2 - y1) * (xm - x1) > 0] = 1 replace below by np.where
mask[np.where((ym - y1) * (x2 - x1) - (y2 - y1) * (xm - x1) > 0)] = 1
Just checkin this code after some months again .. and Keras changed the generator, iterator function in 2.0?? Anyway this code does not work for me with Keras 2.0 and tf 1.4. So just in case, I decided to provide a working configuration: with python 2.7 and tensorflow 1.0-gpu, I installed the following requirements.txt via pip with:
pip install -r requirements.txt
and copy paste the following dependencies in the requirements.txt file.jupyter pillow scikit-learn scikit-image scipy h5py eventlet flask-socketio seaborn pandas imageio moviepy keras==1.2 opencv-contrib-python matplotlib==2.0.2
Also make sure that you that you change the below line of code in the random_shadow function in utils.py.
mask[(ym - y1) * (x2 - x1) - (y2 - y1) * (xm - x1) > 0] = 1
replace below by np.wheremask[np.where((ym - y1) * (x2 - x1) - (y2 - y1) * (xm - x1) > 0)] = 1
This is at least a config which worked for me.