anubhavshrimal/Simulated-Self-Driving-Car

cant work

Closed this issue · 1 comments

c:\Users\YRP\Desktop\autodrive\Simulated_Self_Driving_Car\model.py:124: UserWarning: The semantics of the Keras 2 argument steps_per_epoch is not the same as the Keras 1 argument samples_per_epoch. steps_per_epoch is the number of batches to draw from the generator at each epoch. Basically steps_per_epoch = samples_per_epoch/batch_size. Similarly nb_val_samples->validation_steps and val_samples->steps arguments have changed. Update your method calls accordingly.
callbacks=[checkpoint], verbose=1)
c:\Users\YRP\Desktop\autodrive\Simulated_Self_Driving_Car\model.py:124: UserWarning: Update your fit_generator call to the Keras 2 API: fit_generator(<generator..., 20000, 10, validation_data=<generator..., callbacks=[<keras.ca..., verbose=1, validation_steps=12, max_queue_size=1)
callbacks=[checkpoint], verbose=1)
Epoch 1/10
Traceback (most recent call last):
File "c:\Users\YRP\Desktop\autodrive\Simulated_Self_Driving_Car\model.py", line 170, in
main()
File "c:\Users\YRP\Desktop\autodrive\Simulated_Self_Driving_Car\model.py", line 166, in main
train_model(model, args, *data)
File "c:\Users\YRP\Desktop\autodrive\Simulated_Self_Driving_Car\model.py", line 124, in train_model
callbacks=[checkpoint], verbose=1)
File "D:\ProgramData\Anaconda3\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "D:\ProgramData\Anaconda3\lib\site-packages\keras\models.py", line 1276, in fit_generator
initial_epoch=initial_epoch)
File "D:\ProgramData\Anaconda3\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "D:\ProgramData\Anaconda3\lib\site-packages\keras\engine\training.py", line 2192, in fit_generator
generator_output = next(output_generator)
File "D:\ProgramData\Anaconda3\lib\site-packages\keras\utils\data_utils.py", line 793, in get
six.reraise(value.class, value, value.traceback)
File "D:\ProgramData\Anaconda3\lib\site-packages\six.py", line 693, in reraise
raise value
File "D:\ProgramData\Anaconda3\lib\site-packages\keras\utils\data_utils.py", line 658, in _data_generator_task
generator_output = next(self._generator)
File "c:\Users\YRP\Desktop\autodrive\Simulated_Self_Driving_Car\utils.py", line 148, in batch_generator
image, steering_angle = augument(data_dir, center, left, right, steering_angle)
File "c:\Users\YRP\Desktop\autodrive\Simulated_Self_Driving_Car\utils.py", line 127, in augument
image, steering_angle = choose_image(data_dir, center, left, right, steering_angle)
File "c:\Users\YRP\Desktop\autodrive\Simulated_Self_Driving_Car\utils.py", line 56, in choose_image
return load_image(data_dir, right), steering_angle - 0.2
File "c:\Users\YRP\Desktop\autodrive\Simulated_Self_Driving_Car\utils.py", line 13, in load_image
return mpimg.imread(os.path.join(data_dir, image_file.strip()))
AttributeError: 'int' object has no attribute 'strip'

File "c:\Users\YRP\Desktop\autodrive\Simulated_Self_Driving_Car\utils.py", line 13, in load_image
return mpimg.imread(os.path.join(data_dir, image_file.strip()))
AttributeError: 'int' object has no attribute 'strip'

The error seems to be in the image_file attribute that you are passing.
Make sure it is a String, not Integer and that the data_dir is the correct path where images are saved.