Skip to content

Local Setup

Local OS

The following instructions and software were only tested on a Windows 11 computer. For macOS or Linux users, some steps and software versions might be different. If you run into any problems with the software setup, please post an issue to the GitHub repo.

Raspberry Pi Imager

Download Raspberry Pi Imager and install it to your computer. We will use it to set up the microSD card with Raspberry Pi OS and do some initial configuration.


Visual Studio Code

Download Visual Studio Code and install it to your computer. Install the following extensions:

  • Python to work with Python scripts.
  • SSH FS to access the Raspberry Pi file explorer.
  • Rainbow CSV and/or Excel Viewer for a more readable preview of the generated .csv files.

Python

Download Python 3.12.9 and install it to your computer (3.13 is not yet supported by some packages). Select Install Now with the checkbox Add Python to PATH activated. Run Disable path length limit at the end of the installation to remove the MAX_PATH limitation.

You will need Python to run the scripts for classification of the captured insect images and subsequent metadata post-processing.

We are going to use the Python Launcher for Windows to run Python scripts with the py command. You can check if the Python Launcher works correctly and display the installed Python version(s), by opening a Terminal (e.g. Windows PowerShell) and running:

py --list

After installing the Python extension, activate Python in VS Code by opening the Command Palette with Ctrl+Shift+P and running the Python: Select Interpreter command. You can find more information including a tutorial at Python in Visual Studio Code.


VcXsrv Windows X Server

Download VcXsrv and install it to your computer. To be able to see the OAK camera stream on your local computer, you will need to install a X server if you are connected to the Raspberry Pi via SSH and X11 forwarding. Run XLaunch.exe to start the X server with the default settings:

  1. Select display settings:

    • Multiple windows
    • Display number: -1
  2. Select how to start clients:

    • Start no client
  3. Extra settings:

    • Clipboard
      • Primary Selection
    • Native opengl

After that you will see the VcXsrv tray icon in the taskbar and running e.g. one of the preview scripts will open the OAK camera stream in a new VcXsrv window on your computer.


DiskInternals Linux Reader

Download DiskInternals Linux Reader and install it to your computer. You can use it to save data from the Raspberry Pi's microSD card to your local computer, as the Linux partition format is not compatible with Windows and you will only see the boot partition in your file explorer.

Follow these steps to save the captured data to your computer:

  • Insert the Raspberry Pi's microSD card into your card reader and start DiskInternals Linux Reader. You will see two partitions on the microSD card: rootfs and bootfs.
  • Open the rootfs partition and navigate to the /home/pi directory.
  • Select the insect-detect directory and hit the Save button in the upper menu bar.
  • Keep the Save Files option, choose your output folder and select both options:

    Save directory structure

    Extract file date from metadata