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

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:

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.

Additional Resources