Skip to main content
This section will provide information on how to use image processing models that you have prepared with your own dataset or acquired as pre-trained models.

Integrating with Your Existing Python Code

TensorFlow Lite runs models on the device’s CPU (Central Processing Unit) by default. A “Delegate” is a mechanism that “delegates” some or all of the computations in your TFLite model to more specialized hardware instead of the CPU. To use these specialized hardware components (such as the image processing accelerators found in the T3 Gemstone O1 Development Board), you need to load the required shared library file (.so, .dll, etc.).
Python
#!/usr/bin/python3

import numpy as np
from tflite_runtime.interpreter import Interpreter
from tflite_runtime.interpreter import load_delegate

# 1. Edge AI delegate kütüphanesini yükle
try:
    edgetpu_delegate = load_delegate('/usr/lib/libtidl_tfl_delegate.so')
    delegates_list = [edgetpu_delegate]
    print("Edge TPU bulundu ve yüklendi.")
except (ValueError, OSError):
    delegates_list = [] # TPU bulunamazsa, normal CPU'da çalıştır
    print("Edge TPU bulunamadı, CPU kullanılacak.")

# 2. Modeli yükle ve Interpreter'ı başlatırken delegate'i kullan
interpreter = Interpreter(
    model_path="modelinizin_adi.tflite",
    experimental_delegates=delegates_list
)

# 3. Kalan standart TFLite adımları...
interpreter.allocate_tensors()
input_details = interpreter.get_input_details()
output_details = interpreter.get_output_details()

# ... (Giriş verisini ayarla, modeli çalıştır, vb.)

Edge AI GStreamer Apps

This project is a collection of open-source reference applications provided by Texas Instruments that can be used to rapidly develop AI applications on devices like the T3 Gemstone O1. It primarily operates on a GStreamer-based architecture and offers ready-made solutions for performing image processing, object detection, streaming, and other AI workflows on Texas Instruments processors and SoC hardware. The configs folder contains examples for multiple applications. It allows you to run the project in both Python and C++ languages.
/opt/edgeai-gst-apps/apps_python# ./app_edgeai.py ../configs/image_classification.yaml
The source code is available in Texas Instruments’ edgeai-gst-apps repository on GitHub.