This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] SK-TDA4VM:在 HWA 上进行预处理

Guru**** 2463330 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1468359/sk-tda4vm-pre-processing-on-hwa

器件型号:SK-TDA4VM

工具与软件:

嗨、团队:

我在代码中有一个自定义预处理函数。 利用一些操作来降低 CPU 利用率。 我正在寻找一种将其卸载到 HWA 的方法。 例如 gstreamer 流水线中存在的引脚。  是可能的。 下面是代码参考  

import cv2
import numpy as np

def preprocess_image(image):
    """

    # Resize image
    image = cv2.resize(image, (300, 300))

    # Convert BGR to RGB
    image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)

    # Normalize pixel values to [0, 1]
    image = image / 255.0

    # Subtract mean pixel values (for MobileNetV1)
    mean_pixel_values = [127.5, 127.5, 127.5]
    image = image - mean_pixel_values

    return image

有关这方面的任何信息都将有所帮助。  

谢谢。此致  

Gopal S.