SullyChen/Autopilot-TensorFlow

Unexpected train result?

weijia-yu opened this issue · 6 comments

Thanks for your sample code, I tried this but couldn't get expected result. I am using wheel rotation degree to train the data, this is my sample train data:

22.jpg 0
23.jpg 0
24.jpg 0
25.jpg 0
26.jpg 0
27.jpg 0
28.jpg 0
29.jpg 0
30.jpg 0
31.jpg 0
32.jpg -3.851463
33.jpg -6.549802
34.jpg -11.0871
35.jpg -14.10705
36.jpg -18.85992
37.jpg -21.56775
38.jpg -20.37253
39.jpg -17.5227
40.jpg -13.01936
41.jpg -9.757766
42.jpg -5.45346
43.jpg -2.566003
44.jpg 0
45.jpg 0
46.jpg 0
47.jpg 0
48.jpg 0
49.jpg 0
50.jpg 0
51.jpg 0
52.jpg 0
53.jpg 0
54.jpg 1.5773

mostly it is 0, but when I eval the data, it outputs:

0.848186871676
0.247460795198
0.585712200104
0.410212570454
0.451668243538
0.933786110727
0.905919685965
0.66789506391
0.497750729456
0.352852214917
0.391191160626
0.959048846033
0.931835024502
0.174691773018
-0.0430651931555
-0.260673075776
-0.258237713131
-0.620764197316
-0.750217252903
-0.715262639247
-0.710381775394
-0.733180519957
-0.473712732446
-0.605725828311
-0.814070557019

There is no 0s and when it is supposed to be 8 degree, it is like 0.x degree, did I feed the right parameter? Should I feed the steer wheel's rotation? Thank you

I converted the degree values to radians before feeding it in to the model. That is the issue.

@SullyChen Thanks for the fast reply! Correct me if I am wrong, the code takes the degree train data and in the code it converts into radians. When running run.py, it then converts back to degree.

The first data block is fed into train.py, the second data block is got by writing new line of degrees
degrees = model.y.eval(feed_dict={model.x: [image], model.keep_prob: 1.0})[0][0] * 180 / scipy.pi

Another question I have is do you use radius instead of 1/radius mentioned in the paper?

Oh that's true. I thought you had modified my code, I didn't expect that. Also are you aware that the first few hundred images are very noisy dark images in a parking lot? Those images won't be classified well regardless of how well you train the model. There are no clear road markings and the picture quality is poor. Try it with images much later in the dataset.

As for your other question, the paper uses 1/radius where radius is the radius of the car's turn. This is roughly proportional to the angle of the steering wheel, so essentially I do use the same 1/radius as the paper.

Can I ask why you didnt use max_pool?

I didn't use max_pool because the Nvidia paper this model is based off of didn't use any max pooling.