Skip to content

Commit 4c27b29

Browse files
committed
docs: 📝 添加实时监控功能文档
- 新增实时监控功能使用说明 - 添加摄像头实时识别功能介绍 - 完善操作指南和功能特点说明 - 补充文件存储路径说明
1 parent 1902795 commit 4c27b29

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/convert.py

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import tensorflow as tf
2+
3+
model_path = "../models/yingyan_model.h5"
4+
model = tf.keras.models.load_model(model_path)
5+
6+
converter = tf.lite.TFLiteConverter.from_keras_model(model)
7+
tflite_model = converter.convert()
8+
9+
# 保存为 .tflite 文件
10+
tflite_model_path = "../models/yingyan_model.tflite"
11+
with open(tflite_model_path, "wb") as f:
12+
f.write(tflite_model)

0 commit comments

Comments
 (0)