Lab1
Due date: July 24, 2023
Welcome to WES 237B!
Generally, the course has five labs/assignments. Each lab/assignment has some elements we expect that you will finish in-lab during the class and then some elements we expect you to complete on your own as homework. You are welcome to work together on-lab activities, however everyone should be sure things work on their own machines, collect their own data, and prepare their own demonstrations / answers for lab report questions.
If you finish early, you are welcome to start working on the on-your-own component during the lab, or, if you are unable to finish the in-lab portion during the class session, you are expected to finish the in-lab part(s) as homework. Generally, you will submit one, monolithic turn-in that covers both the in-lab and on-your-own components (the first week is a bit different as the in-lab part is a demo; you can demo during office hours if you are unable to finish on time in lab).
In-Lab
Part 0: Validate your hardware kit
Confirm you have all of your equipment. Please let us know if anything is missing:
Your Jetson comes in an anti-static bag and has labels indicating username/password/hostname.
There should be a white safety booklet and a brown quickstart guide.
The following cables should also be present:
HDMI Cable
Two WiFi antennas
A male micro USB to male USB A cable
A male micro USB to female USB A cable
A power adapter
Set up your Jetson for use in the lab:
It's easiest to just plug in a monitor and keyboard directly to the Jetson. Feel free to unplug the keyboard from a lab computer to use (just put it back when you're done!), and use an open HDMI port on a monitor (caution: not all the monitors have HDMI ports!).
Please be sure to be careful with the micro USB port on your Jetson. They are fragile.
You can connect your Jetson to UCSD-PROTECTED using your credentials, or you can just plug into ethernet using one of the hubs on the desks in lab. If you do intend to use Wi-Fi, be sure to attach the antennas in the box! :)
When your Jetson first boots...
Please make sure the hostname of your system matches the sticker on your board
Validate your network connectivity, e.g., open a terminal and ping google.com
Make sure your image is up-to-date, run: sudo apt update && sudo apt upgrade -y
Note: By default the root account on the class image does not require a password to run sudo. The password is on a sticker on the board if you need it.
Validate that perf is installed and working correctly, i.e. perf version should return 4.9.253.
You're good to go!
Part 1: Welcome to Jetson TX2
This is the in-lab component. The goal of today's lab is to get familiar with the Jetson TX2 platform.
We are going to use nVidia's official tutorials for this.
The specific, minimum assignment is to get the Object Detection Inference example up and running for person detection. You may do this either using a prerecorded video file, or if you would like a bit of a stretch by configuring a remote live stream from your laptop camera to the Jetson board.
If you finish early, try out some of the other examples to get a feel for the capabilities of the Jetson.
By the end of this class, we will build up (a simplified version of) this demo from scratch!
How to Submit
Demo your object detection for course staff, either live in-lab, or later during office hours if needed.
On Your Own
Part 2: Huffman encoder/decoder
The assignment can be found here: https://classroom.github.com/a/Z9lnRzzb.
To optionally setup Visual Studio Code, see this page. If you are using Visual Studio Code, you should open the huffman directory.
Write the functions to do basic Huffman encoder and decoder in huffman.cpp. Use a text file as your input (Note that random input will not benefit from huffman coding). Your code must work on other text files than the provided example.
The input of the encoder is the content of the text file, and the output is Huffman tree and Huffman codes.
The input of the decoder is Huffman tree and Huffman codes from the encoder, and the output of the decoder is a text file.
The format you choose for the encoder output is not important so long as it is efficient (compact) and decodes correctly. For example, you can store the frequency of each character (256 total), or you can store character-frequency pairs (potentially smaller if only compressing text). Provide a brief explanation of your chosen format in the report.
Modify only the huffman.cpp file.
You can test your code by manually running make in the huffman directory. This will generate an executable you can call with ./huffman input.txt code.txt output.txt.
How to Submit
IMPORTANT: Follow the instructions exactly, and double check your repository, folder, and file names. You may lose points if you do not follow the exact instructions. If you have a doubt or a question, please ask the TAs.
Each team must have a private GitHub repository. Please make sure your repository follows our policies. All of your codes related to assignment 1 must be placed in a folder called huffman/ in your repository’s root directory. You have to submit these:
You code should build the same as the template repository (i.e. cd huffman; make must generate an executable named huffman).
A short report named README.md with brief responses / answers:
Describe your encoding scheme
Sample output
This should be at the root of the assignment folder.
Do not submit other files than those listed, unless you have a good reason, and explain so in your report.