aitorzip / VPilot

Scripts and tools to easily communicate with DeepGTAV. In the future a self-driving agent will be implemented.
GNU General Public License v3.0
145 stars 63 forks source link

Output value of the training model #3

Closed tyluckyma closed 7 years ago

tyluckyma commented 7 years ago

Hi @ai-tor

I'm trying to train a network using my own data and your network structure. The target steer value is [-1, 1]. However, the outputs of the trained model is all positive values (>0). Is it because the ELU() and BatchNormalizations result in this? Should we modify the extracted steer value a bit?

aitorzip commented 7 years ago

Hi!

No, there is no ELU activation in the last layer, so the network can output negative values. Probably is due to the fact that the CNN is not properly trained.

It won't correctly work until somebody trains it. This network was trained with another simulator and it is completely normal that it doesn't work with GTAV. The CNN has to be retrained again with the dataset generated with GTAV. My plan is to have it by the end of this month, but you can always do it yourself before me! :)

Cheers!

tyluckyma commented 7 years ago

Regression is a bit more tricky than classification, especially the data balance. I notice that 90% of the steer value is within [-0.1, 0.1]. Any suggestions on the data preprocessing?

aitorzip commented 7 years ago

Hi!

Yes, I agree with you :)

Hmmm... I have several ideas:

  1. Of course, generate more data! It is infinite with GTAV :)
  2. With let' say, 0.9 prob, skip frames in training where abs(steering) < 0.1. This will help you to balance the data
  3. You can also to verticaly flip the images with abs(steering) > 0.1 and then set steering=-steering, this will double the number of samples where steering is large to improve learning in curves.

Finally, if this still doesn't give you good results, you could try NVIDIA's approach, of creating artificial shifts and rotations to images to increase your dataset.

Hope it helps!