Thursday, June 30, 2022

[TensorFlow Lite] TensorFlow Lite 有用的工具

TensorFlow Lite Tool: Toco (轉換器)

toco是用來生成一個可供TensorFlow Lite框架使用tflite文件。

bazel 編譯方式
$ bazel build tensorflow/lite/toco:toco

程式位於tensorflow/lite/toco資料夾下。Toco有三個主要功能,即匯入、匯出和轉換。匯入將輸入轉為Model類別,匯出將模型轉為flite模型或是grpahviz。轉換以輸入標示為基礎對模型操作,並且它會刪除未使用的運算元等。

Saturday, June 18, 2022

[Raspberry Pi] Install TensorFlow Lite on Raspberry Pi 4

Build TensorFlow Lite Static Library on Raspberry Pi 4

I found a very useful resource about installing TensorFlow Lite 2.* on Raspberry Pi 4 as follows: https://qengineering.eu/install-tensorflow-2-lite-on-raspberry-pi-4.html

It's about to build TensorFlow Lite static library in version 2.4 :

# the tools needed

Wednesday, June 8, 2022

[Raspberry Pi] Install TensorFlow 2.2 and OpenCV 4.4.0 on Raspberry Pi 4 and use Neural Compute Stick 2


So far as we have known that Raspberry Pi 4, which is based on ARMv7 Processor rev 3 (v7l), has much more CPU computing power than previous generations. Neural Compute Stick 2(NCS 2) is a Plug and Play Development Kit for AI Inferencing via USB. Fortunately, I have both of them. Because of that, I was just wondering how to use them at the same time. The first idea coming to my mind is about AI inferencing. If we can have Tensorflow installed on it and do inferencing using NCS 2, that will be great. 



Friday, May 27, 2022

[Golang] Golang with Cgo 動態連結(dynamic linking) 函式庫範例與筆記 in Linux environment

之前曾經動手實作並測試Golang with Cgo 動態連結(dynamic linking) 與 靜態連結(static linking)函式庫範例用在Windows環境,相關內容整理在這篇:

[Golang] Golang with Cgo 動態連結(dynamic linking) 與 靜態連結(static linking)函式庫範例與筆記 in Windows environment

最近看到一篇 "最简单的cgo示例",既簡單且完整的示範了Golang with Cgo 動態連結(dynamic linking) 函式庫範例在Linux環境,個人將其改寫並放到github上: 

Wednesday, May 25, 2022

[Golang] Golang應用程式使用TensorFlow/TensorFlow Lite(TFLite)/Tensorflow Serving 的方法整理

Golang應用程式使用TensorFlow 或是 Tensorflow Lite(TFLite) 的前提是必須要有Tensorflow C 函式庫 或是 TensorFlow Lite C 函式庫,一般來說,比較少情況會是用Golang應用程式使用TensorFlow透過TensorFlow C 函式庫,因為未經過最佳化而效能不佳。Golang應用程式使用TensorFlow Lite(TFLite) 透過TensorFlow Lite C 函式庫會是效能較好的其中一種方式。以下將整理相關資訊來說明:

Tuesday, May 17, 2022

[Offensive Security] eBPF、K8S與Offensive Security相關議題之研究

 資安議題已經是越來越火熱的項目,本篇主要目的是進行eBPF、K8S與Offensive Security相關議題之研究,以便於掌握目前之發展狀況。

[Surftrace] 開源項目Surftrace,基於libbpf的ftrace加強版

 Surftrace 是由系統運維SIG 推出的一個ftrace 封裝器和開發編譯平台,讓用戶既能基於libbpf 快速構建工程進行開發,也能作為ftrace 的封裝器進行trace 命令編寫。

Surftrace 在網絡層面的增強,使得用戶只需要有相關的網絡基礎和一定的內核知識儲備,就可以用較低編碼工作量達到精準追踪網絡報文在Linux 內核的完整處理過程。適合用於追踪Linux 內核協議棧代碼、定位深層次網絡問題。

Sunday, May 15, 2022