diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/Autopilot-TensorFlow.iml b/.idea/Autopilot-TensorFlow.iml new file mode 100644 index 0000000..d0876a7 --- /dev/null +++ b/.idea/Autopilot-TensorFlow.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..ca7b14b --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,14 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..812ab5a --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..7ee9f13 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/driving_data.py b/driving_data.py index 97fbb73..34c5e35 100644 --- a/driving_data.py +++ b/driving_data.py @@ -2,6 +2,7 @@ import random import numpy as np + xs = [] ys = [] @@ -16,7 +17,15 @@ #the paper by Nvidia uses the inverse of the turning radius, #but steering wheel angle is proportional to the inverse of turning radius #so the steering wheel angle in radians is used as the output - ys.append(float(line.split()[1]) * 3.14159265 / 180) + # Assuming the value you want to convert is in line.split()[1] + raw_value = line.split()[1] + + # Extract only the numeric part (remove the comma and year) + numeric_part = raw_value.split(',')[0] + + # Convert the numeric part to a float + ys.append(float(numeric_part) * 3.14159265 / 180) + #get number of images num_images = len(xs) @@ -53,4 +62,4 @@ def LoadValBatch(batch_size): x_out.append(cv2.resize(cv2.imread(val_xs[(val_batch_pointer + i) % num_val_images])[-150:], (200, 66)) / 255.0) y_out.append([val_ys[(val_batch_pointer + i) % num_val_images]]) val_batch_pointer += batch_size - return x_out, y_out + return x_out, y_out \ No newline at end of file diff --git a/logs/events.out.tfevents.1716720301.Linkans-MacBook-Pro.local b/logs/events.out.tfevents.1716720301.Linkans-MacBook-Pro.local new file mode 100644 index 0000000..0b17e72 Binary files /dev/null and b/logs/events.out.tfevents.1716720301.Linkans-MacBook-Pro.local differ diff --git a/run_dataset.py b/run_dataset.py index 276311e..cde5d59 100644 --- a/run_dataset.py +++ b/run_dataset.py @@ -4,6 +4,7 @@ import cv2 from subprocess import call import os +import time #check if on windows OS windows = False @@ -36,4 +37,6 @@ cv2.imshow("steering wheel", dst) i += 1 -cv2.destroyAllWindows() + time.sleep(0.04) + +cv2.destroyAllWindows() \ No newline at end of file diff --git a/save/model.ckpt.data-00000-of-00001 b/save/model.ckpt.data-00000-of-00001 new file mode 100644 index 0000000..28eeb68 Binary files /dev/null and b/save/model.ckpt.data-00000-of-00001 differ diff --git a/save/model.ckpt.index b/save/model.ckpt.index new file mode 100644 index 0000000..89db69c Binary files /dev/null and b/save/model.ckpt.index differ diff --git a/save/model.ckpt.meta b/save/model.ckpt.meta index 0ef5016..559f947 100644 Binary files a/save/model.ckpt.meta and b/save/model.ckpt.meta differ