Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel6
outlinefalse
styledefault
typelist
printabletrue

Overview

The airside system runs on the NVIDIA Jetson TX2i Raspberry Pi 5 on the drone.

Repository:

https://github.com/UWARG/computer-vision-python

...

Follow the instructions: Autonomy Workflow Software

Install packagesIn short:

...

Code Block
pip install -r requirements.txt
pip install -r requirements-pytorch.txt
pip install -r modules/common/requirements.txt

Jetson setup

Follow the instructions: Jetson

languagebash
git clone https://github.com/UWARG/computer-vision-python.git
python -m venv --system-site-packages venv/
./setup_project.ps1   OR   source ./setup_project.sh
./venv/Scripts/Activate.ps1   OR   source ./venv/bin/activate

Usage - development

Copy the model file (.pt) into the repository.

...

Code Block
git checkout main
git pull
git submodule update
./setup_project.ps1   OR   source ./setup_project.sh
./venv/Scripts/Activate.ps1   OR   source ./venv/bin/activate
python -m main_2024

If your computer does not not have CUDA support (ie for the RPi), add --cpu to force the program to use the CPU:

...

Other options are available. See them by using -h .

Hardware

NVIDIA Jetson TX2i: Jetson You are going to need to setup Mission Planner to fully test the code: https://uwarg-docs.atlassian.net/wiki/x/AYCNhQ .

Raspberry Pi setup & usage

Follow the instructions: Running Airside on the Raspberry Pi 5 - Comp 2025

Hotspot Detection Configuration

To modify the hotspot detection configuration edit the detect_brightspot section in config.yaml :

Code Block
detect_brightspot:
    brightspot_percentile_threshold: float  # 0 <= brightspot_percentile_threshold <= 100
    filter_by_color: bool                   # Detects by intensity of image
    blob_color: int                         # 0 <= blob_color <= 255
    filter_by_circularity: bool
    min_circularity: float                  # 0 < min_circularity <= max_circularity
    max_circularity: float                  # min_circularity <= max_circularity <= 1
    filter_by_inertia: bool
    min_inertia_ratio: float                # 0 < min_inertia_ratio <= max_inertia_ratio
    max_inertia_ratio: float                # min_inertia_ratio <= max_inertia_ratio <= 1
    filter_by_convexity: bool
    min_convexity: float                    # 0 < min_convexity <= max_convexity
    max_convexity: float                    # min_convexity <= max_convexity <= 1
    filter_by_area: bool                    # Detects by pixel area of the blob
    min_area_pixels: int                    # 0 < min_area_pixels <= max_area_pixels
    max_area_pixels: int                    # min_area_pixels <= max_area_pixels

According to OpenCV reference:

  • By color. This filter compares the intensity of a binary image at the center of a blob to blobColor. If they differ, the blob is filtered out. Use blob_color = 0 to extract dark blobs and blob_color = 255 to extract light blobs.

  • By area. Extracted blobs have an area between min_area_pixels (inclusive) and max_area_pixels (exclusive).

  • By circularity. Extracted blobs have circularity (4∗π∗Area)/(perimeter∗perimeter) between min_circularity (inclusive) and max_circularity (exclusive).

  • By ratio of the minimum inertia to maximum inertia. Extracted blobs have this ratio between min_inertia_ratio (inclusive) and max_inertia_ratio (exclusive).

  • By convexity. Extracted blobs have convexity (area / area of blob convex hull) between min_convexity (inclusive) and max_convexity (exclusive)

From https://learnopencv.com/blob-detection-using-opencv-python-c/:

...

Hardware

Raspberry Pi 5: Raspberry Pi 5

CUDA compability information: CUDA and PyTorch

...