RAIK 371H — Technical Workshop

Kernels and YOU

A hands-on activity exploring CNN kernels — the building blocks behind our crop disease detection project. Apply filters to real images, design your own kernel, and watch a neural network learn.

Open in Google Colab Run Locally Instead

Get started with Google Colab

Colab runs the notebook in your browser with zero setup — Python, PyTorch, and GPU access are all pre-installed. This is the fastest way to get going.

1

Open the notebook

Click "Open in Google Colab" above. Sign in with your Google account if prompted.

2

Run the setup cell

Click the first code cell and press Shift + Enter (or hit the ▶ play button). This loads the crop disease image and all the helper functions.

3

Work through Parts 1 & 2

Run each cell in order. In Part 2, edit the kernel values and re-run to see your result. Try to beat a score of 5.0!

or run it on your machine

Run locally with Jupyter

If you'd prefer to run on your own machine, download the notebook and install a few dependencies.

1

Download the notebook

Grab the .ipynb file and save it somewhere you can find it.

2

Install dependencies

Open a terminal and run:

pip install ipykernel torch torchvision matplotlib

Requires Python 3.8+. If you use conda, conda install pytorch torchvision matplotlib jupyter -c pytorch works too.

3

Launch Jupyter and open the notebook

From the same terminal, navigate to where you saved the file and run:

jupyter notebook kernels_and_you_activity.ipynb