Machine Problem 1: Convolution
In MP1, you will smooth and differentiate one-dimensional signals (e.g., unit step) and three-dimensional signals (color images) using convolution.
The ZIP Archive, and the recommended Code-Writing Process
In the ZIP archive, you will find the following directory hierarchy:
mp1.py -- this is the ONLY file that you
will submit, and the only file on which you will be
- The parts that you need to edit are marked with NotImplementedError, so you can find them easily.
If you run this from the command line,
python mp1.py, it will generate a popup window (using tkinter) with a debugging visualization, in between each pair of steps.
If you get tired of all the popup windows, you can
have it go directly to the step you want by typing
python mp1.py -s Nwhere
Nis any integer from 0 to 8.
- image.jpg -- this is the visible image file (the autograder will give you half the points for this one, and half the points for another hidden image file).
- solutions.hdf5 -- this is just what it says; complete solutions for the visible data (not for the hidden data, though). You can read this file using H5PY (see the code provided in mp1.py for examples).
run_tests.py -- the autograder will actually run
python run_tests.py -j, which gives JSON output. During debugging, I recommend using just
python run_tests.py, which gives plaintext output -- a little more human-readable. The tests are specified in tests/test_visible.py.
How to Submit
- Go to Gradescope. Under "Active Assignments," click "MP1". Submit mp1.py as a plain text file. There are other submission options (e.g., you can submit through github; you can submit a zip file), but just choosing mp1.py to upload is easiest. If you upload a zip archive, everything else in the archive you submit will be ignored.
- You may submit as many times as you like. Your total score (for both visible and hidden data) will be shown. If you get 100%, you're done.
- In general, we will only see the grade of your most recent gradescope submission. We are willing to use your highest gradescope grade, but you have to tell us which one it is.