我已按照链接“https://www.tensorflow.org/lite/guide/python”中给出的程序在我的树莓派中安装 tensorflow lite。但是 .interpreter 和其他类不存在于已安装的包中。
我正在使用 Raspberry-pi 模型 B+ 和 raspberry pi OS(buster)
pi@raspberrypi:~ $
pi@raspberrypi:~ $ echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list
deb https://packages.cloud.google.com/apt coral-edgetpu-stable main
pi@raspberrypi:~ $ curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1974 100 1974 0 0 6902 0 --:--:-- --:--:-- --:--:-- 6926
OK
pi@raspberrypi:~ $ sudo apt-get update
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 https://packages.cloud.google.com/apt coral-edgetpu-stable InRelease
Hit:3 http://raspbian.raspberrypi.org/raspbian buster InRelease
Reading package lists... Done
pi@raspberrypi:~ $ sudo apt-get install python3-tflite-runtime
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
python3-tflite-runtime
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/2,929 kB of archives.
After this operation, 9,951 kB of additional disk space will be used.
Selecting previously unselected package python3-tflite-runtime.
(Reading database ... 106370 files and directories currently installed.)
Preparing to unpack .../python3-tflite-runtime_2.5.0_armhf.deb ...
Unpacking python3-tflite-runtime (2.5.0) ...
Setting up python3-tflite-runtime (2.5.0) ...
pi@raspberrypi:~ $ python3
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tflite_runtime
>>> dir(tflite_runtime)
['__builtins__', '__cached__', '__doc__', '__file__', '__git_version__', '__loader__', '__name__', '__package__', '__path__', '__spec__', '__version__']
>>>
- 安装过程中还有什么需要注意的吗?
- 我已经有了 .tflite 模型。这个装置足以让我进行面部识别吗?