naokishibuya / car-behavioral-cloning

Built and trained a convolutional network for end-to-end driving in a simulator using Tensorflow and Keras
MIT License
230 stars 135 forks source link

Model isnt working #17

Closed vighnesh-balaji closed 5 years ago

vighnesh-balaji commented 6 years ago

I have a few things to clarify. When I run the drive.py file with the model.h5 file, though it says 'Recording this run' and starting wsgi, nothing happens after that.

  1. Do we need Unity Engine and load the Udacity Simulator on that? if yes, then does Unity work on Ubuntu 16.04

  2. The python files, the .exe of the simulator and also the image folder which contains the data is in the same folder. The driving_log.csv has the absolute paths of the images. Where should each component be present? Is there some directory problem here the reason for my problem?

  3. What are the arguments needed to be provided by us while running the drive.py and train.py file? will the drive.py file work even when the model is not saved as a .h5 and saved as .ckpt?

naokishibuya commented 6 years ago

@vighneshsrinivasabalaji

  1. You don't need Unity Engine unless you are modifying the environment. Unity does work on Ubuntu 16.04. https://forum.unity.com/threads/unity-on-linux-release-notes-and-known-issues.350256/ (go to the end of the thread which has the link to the downloadable).
  2. I'm not sure the cause of your issue. I would check if your environment is set up as per environment.yml or environment-gpu.yml.
  3. Could you tell me your command line when running drive.py? I'll try reproducing the problem and see if I can spot anything.
vighnesh-balaji commented 6 years ago

I have the environment set up as per environment-gpu.yml. I use python3 drive.py model.h5

But it says "Not Recording this Run" Should I use python3 drive.py model.h5 images

naokishibuya commented 6 years ago

Hi @vighneshsrinivasabalaji

The following command should give you the description of arguments.

python drive.py --help

It should output the following:

usage: drive.py [-h] model [image_folder]

Remote Driving

positional arguments:
  model         Path to model h5 file. Model should be on the same path.
  image_folder  Path to image folder. This is where the images from the run
                will be saved.

optional arguments:
  -h, --help    show this help message and exit

So, if you want to save images generated by drive.py, you should specify the target folder as the second argument. It is an optional parameter so you do not have to specify if you don't need to save images.

Also, please make sure the Udacity simulator is up and running by clicking the button that says "AUTONOMOUS MODE" before you run drive.py.

I am not entirely sure if I resolved your problem but I hope the above clarifies the things for you.

vighnesh-balaji commented 6 years ago

I guess the issue is with the utils.py file

naokishibuya commented 5 years ago

I'm closing this due to inactivity for more than 3 month.