/
New usecase - UAV Path Prediction

New usecase - UAV Path Prediction

UAV Path Prediction (Guideline)

Introduction

  • We use data from UAV movements in the x, y, and z axes as input to train a model using the Long Short-Term Memory (LSTM) architecture and the OSC AIMLFW framework. This trained model can predict the path of UAVs, enabling various applications.

  • Ensure the Influx database is operational for this use case, which is based on the OSC AI/ML Framework (Release-J).

Suggested Requirements

Below are the suggested requirements for installing the AIMLFW:

  1. OS: Ubuntu 22.04 server

  2. 16 cpu cores

  3. 32 GB RAM

  4. 200 GB harddisk

Getting Started (Start from data insertion)

Step 1. Query influx token

# Search the influx "token" value in below output cat bitnami/influxdb/influxd.bolt | tr -cd "[:print:]"

 

Step 2. Create “UAVData” bucket (Inside Influx DB container)

influx bucket create -n UAVData -o primary -t <token>

 

Step 3. Fill the file config (UAV_insert.py)

DATASET_PATH = '/path/to/dataset.csv' # Replace to the UAV dataset path INFLUX_IP = 'localhost' # Influx IP INFLUX_TOKEN = 'VJpoNpqeVnjzvhpPm8jZ' # Influx token

 

Step 4. Excute the insert processing to insert data into Influx DB

If you meet the timeout issue when writing data to InfluxDB, try UAV_insert_in_chunks.py, which changes the process of writing data to InfluxDB to be done in chunks, writing 1000 rows of data at a time.

 

Step 5.  Upload UAV_pipeline.ipynb to aiml-notebook and generate a UAV_pipeline.yaml

 

Step 6. Start a UAV model training job

  1. Create Feature Group: Below are some example values to be used for the standalone influx DB creation for UAV usecase.

Parameter

Value

Feature Group Name

featuregroup_uav

Features

*

Host

<IP of VM where Influx DB is installed>

Port

<port of Influx DB>

Db Org

primary

Bucket Name

UAVData

DB Token

<token obtained during Influx DB installation>

_measurement

liveCell

  1. Create Training Job: Below are some example values to be used for the UAV usecase training job creation when model management service is not used.

Parameter

Value

Training Job Name

uavtest

Model Management Service

disable

Training Function

UAV_pipeline

FeatureGroup Name

featuregroup_uav

Datalake Source

Influx DB

Feature Filter

 

Hyper Parameters

epochs:1

Description

test

image-20241209-203513.png

 

Step 7. Load UAV model

Step 8. Start model prediction
1. obtain Ingress port for Kserve

2. source uav.sh

File List

  • UAV_dataset.csv (Download)
    The file contains collected UAV movement path data.

  • UAV_insert.py (Download)
    The file processes the UAV_dataset and inserts the data into InfluxDB.
    (Changed required: DATASET_PATH , INFLUX_IP , INFLUX_TOKEN)


  • An updated UAV_insert.py to write data to InfluxDB in 1000-row chunks.

  • UAV_pipeline.ipynb (Download)
    The file defines the model structure and training process.


  • An updated UAV_pipeline to support KFP 2.2.0. Thanks to Francesco Davide Lapenta.

  • UAV_deploy.yaml (Download)
    The yaml file is used for deploying model inference service.

  • UAV_input.json (Download)
    The json file is the sample data for the prediction.

  • UAV_predict.sh (Download)
    The script used for excuting the model prediction.

Example

Input:
This input data represents a set of three-dimensional points, where each point is defined by its normalized x, y, and z coordinates.

Example input

UAV_input

 

Example output

The output should be next xyz-axis path prediction (after normalization).

UAV_output

Additional Resources

List of additional documentation, links, or resources that may be helpful.

Acknowledge

  • Joseph Thaliath, Samsung - a initial pipeline format to support AIMLFW

  • Francesco Davide Lapenta, Ericsson Software Technology - updated UAV_pipeline to support KFP 2.2.0

Version History

Date

Ver.

Author

Comment

Date

Ver.

Author

Comment

2024-05-20

1.0.0

Antony Wang, NTUST MITLab

Jasmine Lee, NTUST MITLab

H Release

2024-12-10

1.1.0

Tuck-Wai Choong, NTUST MITLab

J Release