Skip to main content

Computer Vision I: Introduction and Image Classification



This workshop will teach participants the concepts and tools they need to begin applying modern, deep learning-based computer vision methods to their own scientific research. This will be an interactive, hands-on workshop that will offer plenty of opportunities for practice and experiential learning. By the end of the session, participants will have trained and evaluated a state-of-the-art image classification model on a custom image dataset.

Tutorial setup instruction

Steps to prepare for the tutorial:

  1. Login to Atlas Open OnDemand at https://atlas-ood.hpc.msstate.edu/. For more information on login procedures for web-based SCINet access, see the SCINet access user guide. If it is the first day of the workshop, go to step 2. For the second day of the workshop, go to step 7.

  2. Open a command-line session by clicking on “Clusters” -> “Atlas Shell Access” on the top menu. This will open a new tab with a command-line session on Atlas’s login node.

  3. Request resources on a compute node by running the following command:

    srun -A scinet_workshop1 -t 00:30:00 -n 1 --mem 8G --pty bash 
    
  4. Create and/or update your workshop working directory and copy the tutorial materials into it by running the following commands. Note: you do not have to edit the commands with your username as it will be determined by the $USER variable.

    mkdir -p /90daydata/shared/$USER/computer_vision1
    cd /90daydata/shared/$USER/computer_vision1
    cp -r /project/scinet_workshop1/computer_vision1/computer_vision_1-day_1.ipynb .
    cp -r /project/scinet_workshop1/computer_vision1/*.py .
    
  5. Setup the kernel for JupyterLab. You will create a kernel called computer_vision_1_env to access from JupyterLab Server. Run the following commands to activate the workshop’s virtual environment and create a new kernelspec from it:

    source /project/scinet_workshop1/computer_vision1/computer_vision_1_env/bin/activate
    ipython kernel install --name "computer_vision_1_env" --user
    
  6. Stop the interactive job on the compute node by running the command:

    exit
    
  7. Launch a JupyterLab Server session. Under the Interactive Apps menu, select JupyterLab Server. Specify the following input values on the page:

    • Account: scinet_workshop1
    • Partition: gpu-a100-mig7
    • QOS: normal 14-00:00:00
    • Number of hours: 4
    • Number of nodes: 1
    • Number of tasks: 3
    • Additional Slurm Parameters:

      --reservation=cv1_workshop --gres=gpu:1 --mem=32G --ntasks-per-node=3
      
    • Working Directory:

      /90daydata/shared/${USER}/computer_vision1
      

    Click Launch. The screen will update to the Interactive Sessions page. When your Jupyter session is ready, the top card will update from Queued to Running and a Connect to JupyterLab Server button will appear. Click Connect to JupyterLab Server.

  8. If this is the first day, then follow along with the notebook available in JupyterLab. If this is the second day, open up a terminal in JupyterLab and run the following command to retrieve the second notebook:

    cd /90daydata/shared/${USER}/computer_vision1
    cp /project/scinet_workshop1/computer_vision1/computer_vision_1-day_2.ipynb .
    
  9. Select the computer_vision_1_env kernel for the notebook.

Workshop Materials

Workshop materials and recordings available for USDA employees at the links below