Programming Assignment Guidelines


This document aims to clarify important issues relevant to programming assignments for the course. Following the guidelines explained here will greatly simplify submission, testing, and grading of your work.

Submission

The homework should be submitted on Canvas. The submission should contain:

Include all the files in a zip file named hwX_yourNetID.zip (where X is the homework number), and upload to Canvas. This zip file should have a single directory named hwX_yourNetID, which contains all the files listed above.

An easy way to get the directory structure right is by doing the following steps:

  1. download the file Python.zip from Canvas,
  2. unzip it to get a folder also named Python,
  3. rename the folder Python to hwX_yourNetID,
  4. do the homework in this new directory hwX_yourNetID, keeping in mind the other guidelines listed below,
  5. and finally, zip the folder hwX_yourNetID, creating the file hwX_yourNetID.zip.

More notes/guidelines

The runHwX.py file serves as a framework for the homework and guides you through the individual programming milestones. In this file you will need to enter your name, your NetID, and possibly to complete some skeleton code or to fill in certain parameters. It also interfaces with all the functions you need to implement and will help you run and test your solution. As such, we cannot allow you to change the signature of any function required to be implemented in the HW.

runHwX.py contains a set of sub-functions prefixed with the string walkthrough or challenge, which are test cases for walkthroughs and challenges. To execute a run the runHwX.py script with a command line parameter containing the name of the test to run, e.g. python runHwX.py test_name_string at the shell command prompt (or, for example, in a launch.json if using VSCode. Similar configuration in other Python IDEs). To execute the entire set of tests, use python runHwX.py all at the command prompt.

We would also like you to keep the following in mind when writing your code or preparing your submission:

  1. Make sure you can run runHwX.py without errors before submission.
  2. Do not use absolute paths. For instance, if there's a file named Vincent_Van_Gogh.jpg in the directory hwX_yourNetID, your code should refer to its path as just 'Vincent_Van_Gogh.jpg', and not something like 'C:\My Documents\CS 566\Assignments\Vincent_Van_Gogh.jpg'. (To elaborate, we always run your code from the directory hwX_yourNetID, so relative paths allow us to run each student's submission reliably without changing any code.)
  3. Use plt.imshow() only for the final output; comment out any intermediate occurrences. We will uncomment or add them as necessary when grading.
  4. Again, do not remove input files from the submission unless explicitly requested. And please keep your generated output in the directory as well.

Using Python packages

The Python ecosystem provides a large collection of image processing and computer vision packages. In this course, the primary goal is for you to understand and implement fundamental algorithms from scratch. Therefore, the restriction is not about banning specific libraries entirely, but about avoiding functions that directly give you the solution without requiring you to think through the algorithm.

Allowed packages:

Disallowed usage: You should not use “shortcut” functions that already implement the algorithm you are asked to code. For example:

This does not mean that OpenCV, PIL, or scikit-image are entirely forbidden, but their use is limited: you may only use functions explicitly permitted in the assignment or scaffolding code. In other cases, stick to the allowed packages listed above.

The guiding principle: If a function automatically accomplishes the main task of the assignment, you should not use it. There are too many packages in the Python ecosystem to list them all, so if you are unsure about a particular function, please ask on Piazza or at Office Hours. Using disallowed functions without clarification will result in zero credit. Remember: When in doubt, please ASK!

Academic Honesty Policy

The course requires you to read the Code of Academic Integrity as stated by University of Wisconsin-Madison Dean of Students Office. You are permitted and encouraged to discuss ideas with other students. However, you may not share answers or your code with others. Also, copying code/solutions from other sources, including online files, MATLAB sources or solutions from other educational institutions, but not limited to these, is prohibited. We will be monitoring source code for individuality. Ramifications for students who violate the Code of Academic Integrity may include an F grade for the course, documentation on your academic file, and even probation.