湖南智能网站建设,软件开发专科学校,旅行网站首页模板,用个人的信息备案网站Ubuntu20.04系统为esp32cam烧录human_face_detect 1. 下载esp-dl2. 安装esp-idf3. 烧录human_face_detect 如果使用ubuntu 16.04在后续的步骤中会报错如下#xff0c;因为ubuntu 16.04不支持glibc2.23以上的版本#xff08;可使用strings /lib/x86_64-linux-gnu/libc.so.6 | … Ubuntu20.04系统为esp32cam烧录human_face_detect 1. 下载esp-dl2. 安装esp-idf3. 烧录human_face_detect 如果使用ubuntu 16.04在后续的步骤中会报错如下因为ubuntu 16.04不支持glibc2.23以上的版本可使用strings /lib/x86_64-linux-gnu/libc.so.6 | grep GLIBC_命令查询。所以建议使用18.04以上的ubuntu进行烧录。
OSError: /lib/x86_64-linux-gnu/libm.so.6: version GLIBC_2.27 not found (required by /home/zhouying/Desktop/ESP32CAM/esp-dl/tools/tvm/python/tvm/libtvm.so)1. 下载esp-dl
git clone https://github.com/espressif/esp-dl.git2. 安装esp-idf
官方文档Linux 和 macOS 平台工具链的标准设置
我安装的版本是5.0.4其他的版本会在某一步出现版本不兼容的问题。
打开https://github.com/espressif/esp-idf/tree/v5.0.4选择手动下载压缩文件到本地。 cd esp-idf-v5.0.4/
./install.sh # 也可以指定单个芯片安装 ./install.sh esp32# 设置环境
export IDF_PATH/home/zhouying/Downloads/esp-idf-v5.0.4
export IDF_TOOLS_PATH/home/zhouying/.espressif在需要运行ESP-IDF的终端窗口运行不建议直接将export.sh添加到shell的配置文件这样会导致在每个终端会话中都激活IDF虚拟环境
~$ source /home/zhouying/Downloads/esp-idf-v5.0.4/export.sh
Detecting the Python interpreter
Checking python3 ...
Python 3.10.9
python3 has been detected
Checking Python compatibility
Checking other ESP-IDF version.
Adding ESP-IDF tools to PATH...
Checking if Python packages are up to date...
Constraint file: /home/zhouying/.espressif/espidf.constraints.v5.0.txt
Requirement files:- /home/zhouying/Downloads/esp-idf-v5.0.4/tools/requirements/requirements.core.txt
Python being checked: /home/zhouying/.espressif/python_env/idf5.0_py3.10_env/bin/python
Python requirements are satisfied.
Added the following directories to PATH:/home/zhouying/Downloads/esp-idf-v5.0.4/components/espcoredump/home/zhouying/Downloads/esp-idf-v5.0.4/components/partition_table/home/zhouying/Downloads/esp-idf-v5.0.4/components/app_update/home/zhouying/.espressif/python_env/idf5.0_py3.10_env/bin
Done! You can now compile ESP-IDF projects.
Go to the project directory and run:idf.py build3. 烧录human_face_detect
cd esp-dl/examples/human_face_detect
idf.py set-target esp32
idf.py flash monitor -p /dev/ttyUSB0如果报错A fatal error occurred: Could not open /dev/ttyUSB0, the port doesnt exist先修改权限sudo chmod arw /dev/ttyUSB0再重新运行
~$ idf.py flash monitor -p /dev/ttyUSB0
...
I (1214) main_task: Calling app_main()
Inference latency: 411416 us
[0] score: 0.999874, box: [-1, -1, 268, 299]left eye: (126, 75), right eye: (189, 73)nose: (119, 194)mouth left: ( 41, 141), mouth right: (263, 212)[1] score: 0.999810, box: [5, 206, 233, 506]left eye: (118, 268), right eye: (170, 291)nose: (115, 352)mouth left: ( 55, 303), mouth right: (303, 415)[2] score: 0.896976, box: [125, 255, 385, 556]left eye: (217, 330), right eye: (252, 341)nose: (185, 390)mouth left: (194, 333), mouth right: (349, 465)I (1674) main_task: Returned from app_main()Doneesp32的结果跑出来和官方的不一样可能芯片性能原因。