In this project, you'll label the pixels of a road in images using a Fully Convolutional Network (FCN).
Make sure you have the following is installed:
Download the Kitti Road dataset from here. Extract the dataset in the data
folder. This will create the folder data_road
with all the training a test images.
Implement the code in the main.py
module indicated by the "TODO" comments.
The comments indicated with "OPTIONAL" tag are not required to complete.
Run the following command to run the project:
python main.py
Note If running this in Jupyter Notebook system messages, such as those regarding test status, may appear in the terminal rather than the notebook.
Save the model and checkpoint after first training. Write a retrain function to continue previous training.
- Use Spot Instance
- EC2 Dashboard -> Spot Request -> Request Spot Instances
- Create new key pair-> key pair name: carnd1
- Create new security group": security group name: jupyter inbound: ssh, port 22 custom tcp: port 8888
- AMI : "Select", search community AMIs: udacity-carnd-advanced-deep-learning
- Instance Type: "Select": "Instance Type": GPU instances: g34xlarge
- "Next"
- Set Keypair and role: -> key pair name: carnd1
- Manage Firewall rules: -> jupyter
- "Review"
- "Launch"
- Connect AWS Instance
-
EC2 Dashboard -> Instances
-
Right click the instance: "connect"
-
copy the connection string
-
In terminal: ssh -i "carnd1.pem" ubuntu@ec2-xxx-xxx-xxx-xxx.us-west-1.compute.amazonaws.com -L 8888:127.0.0.1:8888
git clone https://github.com/MichaelTien8901/CarND-Semantic-Segmentation.git cd CarND-Semantic-Sementation jupyter notebook
-
Now use browser to open 127.0.0.1:8888 for jupyter notebook. We can then use it to edit files.
-
Run program in another terminal, ssh -i "carnd1.pem" ubuntu@ec2-xxx-xxx-xxx-xxx.us-west-1.compute.amazonaws.com
cd CarND-Semantic-Sementation python main.py
-