Browse Source

doc(plugin): add labelImage plugin

ngjaying 4 years atrás
parent
commit
fc323af43d

+ 10 - 0
docs/en_US/plugins/functions/functions.md

@@ -172,4 +172,14 @@ geohashNeighborsInt example
 
 ```sql
 SELECT geohashNeighborsInt(hash) FROM test
+```
+
+### LabelImage plugin
+
+This is a sample plugin to demonstrate the usage of TensorFlowLite(tflite) model interpreter. The function receives a bytea input representing an image and produce the AI label of the image by running the tflite model.
+
+Assuming the input is the byte array of peacock.jpg, the output will be "peacock".
+
+```sql
+SELECT labelImage(self) FROM tfdemo
 ```

+ 10 - 0
docs/zh_CN/plugins/functions/functions.md

@@ -172,4 +172,14 @@ geohashNeighborsInt 示例
 
 ```sql
 SELECT geohashNeighborsInt(hash) FROM test
+```
+
+### LabelImage plugin
+
+该插件为展示使用 TensorFlowLite 模型的示例插件。此函数接收一个以 bytea 类型表示的图像的输入,输出该图像的根据 tflite 模型计算的标示。
+
+如下 SQL 中,假设输入为 peacock.jpg 文件的二进制流,则输出为字符串 “peacock”。
+
+```sql
+SELECT labelImage(self) FROM tfdemo
 ```