代做CVI620程序、代写Python编程设计
Self-Driving Car Simulation Project Using CNN
CVI620 Final Project, Winter 2025
1. Project Introduction
In this project, students will develop a neural network model to control a self-driving car. The
goal is to determine the appropriate steering angle using images captured from the car's
front camera to ensure the vehicle stays on the road.
The trained model will be tested by feeding it real-time images from the car’s front camera,
where it will predict the correct steering angle. To achieve this, we will use a simulation
environment developed by Udacity and Nvidia.
2. Getting Started
It is recommended to create a virtual environment specifically for this project. (Your
Computer Vision virtual environment is all good). A package_list.txt file is provided to ensure
all necessary modules are correctly installed. This setup has been tested for TensorFlow
GPU (64-bit) on Windows 10 to guarantee proper functionality.
Instructions for setting up the environment can be found in package_list.txt.
3. Data Collection and Creation
To collect the necessary data for the self-driving car model, download the self-driving car
simulator from this link. If you are on MacOS or Linux you can search for “udacity self driving
car simulator on mac”. Extract the downloaded file. Locate and run the beta_simulator.exe
file and a window similar to Figure 1 will appear. In order to set Up the Simulation adjust the
settings as needed. Then, select "Play" to start the data collection process.
After launching the simulator, the mode selection screen will appear.
• To collect data, select the "Training Mode" option.
• In this mode, you will manually drive the car along the correct path to generate and
store the required data.
• This process ensures the model learns from properly labeled training data.
A visual representation of this screen is shown in Figure 2.
Using the keys introduced in the Controls section, you can steer the car. After setting up the
simulator for data collection, you must drive the car along a path (generally, the leftmost
path is simpler and preferred for data collection).
Figure 1.
Figure 2.
This process should be performed in both directions to ensure balanced data collection.
To save the data, select the Recording option from the top menu, which is marked in red. This
allows you to specify the path where you want to store the collected data (as shown in Figure
3).
Figure 3.
After selecting your desired path, click Select, and then start driving the car along the chosen
route. When steering, it is better to use the mouse to maintain smooth and continuous
movements. To collect a sufficient amount of data, drive about five times in the forward
direction and five times in the reverse direction along the path.
After completing the car's movement along the entire path and clicking the Recording
option, the simulator will begin saving the data, as shown in Figure 4. At the end of the
process, a folder named IMG will be created in your project directory, containing all the
recorded images from the car’s cameras. Additionally, a CSV file named driving_log.csv will
be generated, storing all the movement data of the car along the path.
The columns in this file are organized as follows: Center, Left, Right, Steering, Throttle,
Brake, Speed. The first three columns correspond to the images captured from the center,
left, and right cameras. For this project, you will only use the center camera images and the
Steering value, which represents the steering angle.
4. Reviewing and Balancing the Dataset
To ensure that the car stays within the lane boundaries, the neural network must be trained
in a way that prevents excessive deviation to the left or right.
To verify whether the collected data has a suitable distribution for training, a histogram
should be plotted, specifically for the steering angle values. For a balanced dataset, the
histogram should resemble the one shown in Figure 5.
4. Data Augmentation
To improve the generalization of the model, the collected images should be diverse. You can
achieve this by applying data augmentation techniques such as: Flipping, Brightness
adjustment, Zooming, Panning, Rotation. When applying flipping, make sure that the
corresponding steering angle is also reversed (multiplied by -1). It is important that these
transformations are applied randomly to only a portion of the data, rather than uniformly
Figure 4.
Figure 5.
across the entire dataset. Also, note that data augmentation should only be applied to the
training dataset.
5. Data Preprocessing
The necessary preprocessing steps for this project include:
• Cropping the road area from the full image.
• Converting the image to YUV color space.
• Resizing the image to 200×66 pixels, as used by the Nvidia model.
The road area should be extracted for training, as shown in Figure 6.
Additional recommended preprocessing techniques:
• Normalization
• Applying a Gaussian Blur filter
6. Batching the Dataset
Define a function that divides the dataset into batches of your desired size. This function will
be used during training to efficiently process the data.
7. Training the Neural Network
At this stage:
Figure 6.
• Build your neural network based on Figure 7.
• Plot and analyze the training graphs.
• Evaluate the training performance using these graphs to ensure proper learning.
• Save the final trained model for later use.
Figure 7.
8. Testing the Model
To use the final trained model in the simulator, you must run it within the same virtual
environment that was set up initially.
This is necessary because some library versions may be incompatible, which could cause
the simulator to malfunction.
Testing Steps:
1. Run the TestSimulation.py script.
2. Launch the simulator with the same settings used for data collection.
3. Observe the car's movement. It should follow the path accurately.
9. Deliverables
• All Python scripts, including: Data preprocessing, Training, Inference/testing, Data
augmentation (if separate)
• A screen recording of the final trained model running successfully in the simulator
• Git repository, including: Clear commit history showing individual contributions,
Proper project structure and organization
• Any documentation if needed like brief explanation of the approach or any challenges
encountered and how they were solved, Instructions on how to run the project (e.g.,
environment setup, dependencies, how to launch training and testing scripts)
The project can be completed in groups of up to 3 individuals.
Good luck!

热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图