Updated: January 8th, 2025

Estimated Read Time: ⏱️ 1 hour Skill Level: Beginning coder

For comments about this tutorial, contact Sheng Zheng ([email protected]).

Welcome to this beginner-friendly, quick start guide for working with AI models! In this guide, we will get you on-the-keyboard with training a computer vision model for a Structural Engineering application — classifying surface roughness categories:

 Surface Roughness B

Surface Roughness B

Surface Roughness C

Surface Roughness C

Surface Roughness D

Surface Roughness D

You have probably heard about training, fine-tuning, and transfer learning with AI models, but how exactly do you do it? Can you do it with using tools that others have packaged for you? To some extent, yes—but with limited options and flexibility. If you want to customize models, solve challenging problems, and stay at the forefront of innovation by leveraging each other’s work, it will be difficult to do so without some level of understanding about programing. The good news is, once you overcome the initial hurdle of learning programming, tens of thousands of open-source models and millions of open-source projects are available, ready to be applied to areas that truly matters to you.

And that is why we’ll get hands-on with programming in this guide, helping you set up your development environment to work with Python and machine learning frameworks. It will most likely refresh your memories about the introductory computer science course back in college. And it may also feel a bit challenging at first if programming is completely new to you. But don’t worry, we’ll walk you through the essentials. By the end of this guide, you’ll get a glimpse into the “black box” of software programs, set up a local environment capable of training open-source AI models for your areas of interest, and become acquainted with resources to continue your journey.

No need to stress if you come across unfamiliar terms. Coding has never become more accessible with resources like online courses and blog posts. Everybody can be a creator. There are plenty of resources just a quick Google search away. Plus, with tools like ChatGPT, Gemini, and other advanced language models at your fingertips, you’ll always have a coding companion to guide you, answer questions, and clarify concepts aside from this guide.

This guide has two main parts:

Part 1: Setting Up Your Local Environment

First, you’ll prepare your computer to work with the necessary software. You’ll need a machine where you have administrative privileges to install programs. Unlike the typical graphical user interface you’re used to, this first portion will introduce you to the terminal (or command-line interface) —a powerful text-based way to interact with your computer. If you’ve never used the command lines before, we highly recommend follow along with referencing this crash course: Command line crash course - Learn web development | MDN

Part 2: Fine-Tuning Visual Transformers Models

The second part will dive into coding, using Jupyter Notebook to write and run Python code and train AI models. This part covers processes from preparing datasets to installing and fine-tuning AI models. Large language models (LLMs) like ChatGPT will be invaluable here, as they can explain code to you line by line, making the process much easier to understand.

Now grab your favorite drink and let’s get started!

Part 1: Setting Up Your Local Environment for Machine Learning Projects


<aside> 📒

Reference Hardware Configuration:

Below is the system setup we tested. It serves only as a reference to guide your own configuration for completing this tutorial.

Step 1: Install WSL2 (Windows Subsystem for Linux)

<aside> ℹ️

If you are familiar with setting up WSL2, virtual environment and Python package manager, feel free to jump to Step 4 of Part 1.

</aside>