llSourcell / How_to_simulate_a_self_driving_car

This is the code for "How to Simulate a Self-Driving Car" by Siraj Raval on Youtube
430 stars 306 forks source link

problems with keras 2.0 + tf. 1.4 and python3 on Ubuntu 16.04 #18

Open Robomate opened 7 years ago

Robomate commented 7 years ago

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.where mask[np.where((ym - y1) * (x2 - x1) - (y2 - y1) * (xm - x1) > 0)] = 1

This is at least a config which worked for me.