Giter VIP home page Giter VIP logo

esp-who's Introduction

ESP-WHO [中文]

ESP-WHO is an image processing development platform based on Espressif chips. It contains development examples that may be applied in practical applications.

Overview

ESP-WHO provides examples such as Human Face Detection, Human Face Recognition, Cat Face Detection, Gesture Recognition, etc. You can develop a variety of practical applications based on these examples. ESP-WHO runs on ESP-IDF. ESP-DL provides rich deep learning related interfaces for ESP-WHO, which can be implemented with various peripherals to realize many interesting applications.

What You Need

Hardware

We recommend novice developers to use the development boards designed by Espressif. The examples provided by ESP-WHO are developed based on the following Espressif development board, and the corresponding relationships between the development boards and SoC are shown in the table below.

SoC ESP32 ESP32-S2 ESP32-S3
Development Board ESP-EYE ESP32-S2-Kaluga-1 ESP-S3-EYE

Using a development board not mentioned in the table above, configure pins assigned to peripherals manually, such as camera, LCD, and buttons.

Software

Get ESP-IDF

ESP-WHO runs on ESP-IDF release/v5.0 branch . For details on getting ESP-IDF, please refer to ESP-IDF Programming Guide.
If you use ESP-IDF release/v4.4, please checkout the ESP-WHO branch to the idfv4.4.

Get ESP-WHO

Run the following commands in your terminal to download ESP-WHO:

git clone --recursive https://github.com/espressif/esp-who.git

Remember to use git submodule update --recursive --init to pull and update submodules of ESP-WHO.

Run Examples

All examples of ESP-WHO are stored in examples folder. Structure of this folder is shown below:

├── examples
│   ├── cat_face_detection          // Cat Face Detection examples
│   │   ├── lcd                     // Output displayed on LCD screen
│   │   ├── web                     // Output displayed on web
│   │   └── terminal                // Output displayed on terminal
│   ├── code_recognition            // Barcode and QR Code Recognition examples
│   ├── human_face_detection        // Human Face Detection examples
│   │   ├── lcd
│   │   ├── web
│   │   └── terminal
│   ├── human_face_recognition      // Human Face Recognition examples
│   │   ├── lcd
│   │   ├── terminal
│   │   └── README.md               // Detailed description of examples
│   └── motion_detection            // Motion Detection examples
│       ├── lcd 
│       ├── web
│       ├── terminal
│       └── README.rst              

For the development boards mentioned in Hardware, all examples are available out of the box. To run the examples, you only need to perform [Step 1: Set the target chip] (#Step-1 Set the target chip) and [Step 4: Launch and monitor] (#Step-4 Launch and monitor).

Step 1: Set the target chip

Open the terminal and go to any folder that stores examples (e.g. examples/human_face_detection/lcd). Run the following command to set the target chip:

idf.py set-target [SoC]

Replace [SoC] with your target chip, e.g. esp32, esp32s2, esp32s3.

NOTE: we implement examples of target chip esp32s3 with ESP32-S3-EYE by defaults. So that flash and monitor are through USB. If you are using other board, please confirm which method you will use first,

  • If by USB, just keep it in defaults,
  • If by UART, set it in menuconfig.

(Optional) Step 2: Configure the camera

If not using the Espressif development boards mentioned in Hardware, configure the camera pins manually. Enter idf.py menuconfig in the terminal and click (Top) -> Component config -> ESP-WHO Configuration to enter the ESP-WHO configuration interface, as shown below:

Click Camera Configuration to select the pin configuration of the camera according to the development board you use, as shown in the following figure:

If the board you are using is not shown in the figure above, please select Custom Camera Pinout and configure the corresponding pins correctly, as shown in the following figure:

(Optional) Step 3: Configure the Wi-Fi

If the output of example is displayed on web server, click Wi-Fi Configuration to configure Wi-Fi password and other parameters, as shown in the following figure:

Step 4: Launch and monitor

Flash the program and launch IDF Monitor:

idf.py flash monitor

Default Binaries of Development Boards

The default binaries for each development board are stored in the folder default_bin. You can use Flash Download Tool (https://www.espressif.com/en/support/download/other-tools) to flash binaries.

Feedback

Please submit an issue if you find any problems using our products, and we will reply as soon as possible.

esp-who's People

Contributors

abergmann avatar bkeevil avatar charlotudy avatar esp-yhy avatar espwangning avatar igrr avatar me-no-dev avatar natashali-espressif avatar sachin0x18 avatar slcasner avatar sun-xiangyu avatar thenitek avatar tore-espressif avatar xiaochaogong avatar yehangyang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp-who's Issues

ESP-EYE V2.0 fr_flash: No ID Infomation + internal ram fail

I'm trying the recognition_solution example with an ESP-EYE v2.0.

I get the following in the monitor:

E (6691) fr_flash: No ID Infomation
I (6701) esp-eye: Version 0.9.0 success
I (43571) wifi: n:1 1, o:1 0, ap:1 1, sta:255 255, prof:1
I (43571) wifi: station: f8:63:3f:4e:50:16 join, AID=1, bgn, 40U
I (43611) app_wifi: station:f8:63:3f:4e:50:16 join, AID=1
I (43641) tcpip_adapter: softAP assign IP to station,IP is: 192.168.4.2
I (104301) app_httpserver: Get count 0

internal ram fail: 1, 19, 13, 32, size: 31616

The second error is when I bring up the stream IP in the browser. I've tried it with a few versions of the IDF. The camera_web_server example works fine so I imagine it's a config setting.

Ideas?

write in flash

how can I write the face-IDs in the flash ?
I use the camera_webserver example.

how to use face recognition driving GPIO ?

I have tested this firmware and now would have appreciate to do something with this basis.
For example sound a buzzer if rejected, Light a GREEN LED if valid.....
An other good stuff would be also to write a message in the streamed video
I there a way to start Recognition on demand using a GPIO input from a sensor ?

fd_forward.h

Hi, I am getting this error on compiling
fatal error: fd_forward.h: No such file or directory
compilation terminated.

Cannot boot with AI Thinker ESP32-CAM board

I'm trying to get the single_chip/camera_web_server sample working with my AI Thinker ESP32-CAM board, but so far no luck. Compile + flashing is OK, but it doesn't boot. make monitor shows:

I (32) boot: ESP-IDF v3.3-dev-32-gfb7ba1baa 2nd stage bootloader
I (32) boot: compile time 15:33:32
I (32) boot: Enabling RNG early entropy source...
I (39) boot: SPI Speed      : 40MHz
I (43) boot: SPI Mode       : DIO
I (47) boot: SPI Flash Size : 4MB
I (51) boot: Partition Table:
I (54) boot: ## Label            Usage          Type ST Offset   Length
I (62) boot:  0 factory          factory app      00 00 00010000 00300000
I (69) boot:  1 nvs              WiFi data        01 02 00310000 00004000
I (77) boot: End of partition table
I (81) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1780cc (1540300) map
I (629) esp_image: segment 1: paddr=0x001880f4 vaddr=0x3ff80000 size=0x00000 (     0) load
I (630) esp_image: segment 2: paddr=0x001880fc vaddr=0x3ff80000 size=0x00000 (     0) load
I (636) esp_image: segment 3: paddr=0x00188104 vaddr=0x3ffb0000 size=0x03544 ( 13636) load
I (650) esp_image: segment 4: paddr=0x0018b650 vaddr=0x3ffb3544 size=0x00000 (     0) load
I (654) esp_image: segment 5: paddr=0x0018b658 vaddr=0x40080000 size=0x00400 (  1024) load

I'm missing a lot of output above, not sure why.

LED / Flash

Is it possible to use the front LED of the Ai-Thinker board?

Question: PIN definitions for external SPI RAM

Can you please document where is the GPIO definition to use an external SPI RAM ?

It's not possible to try this without an external memory right ?
I just want to try it with another board that is not ESP-WROVER-KIT.

As a second question I would be interested to know if in a near future we can use OV5642 as a camera that has already an internal memory ? Or there are no plans to support SPI Cameras ?
This SPI cameras already have a RAM which is quite big in OV5642 so maybe an external SPI RAM is not needed ? (Just tell me if it's doable)

i run the demo `camera_web_server` on my board , but keeps rebootting

  • i run the demo camera_web_server on my board , but keeps rebootting , ..

I (693) esp_image: segment 8: paddr=0x002120e4 vaddr=0x4008452c size=0x13370 ( 78704) load
0x4008452c: DPORT_REG_READ at E:/Espressif/Esp32/esp-idf/home/XuHongYss/esp-who/esp-idf/components/soc/esp32/include/soc/dport_access.h:79
(inlined by) cache_sram_mmu_set at E:/Espressif/Esp32/esp-idf/home/XuHongYss/esp-who/esp-idf/components/esp32/cache_sram_mmu.c:123

I (719) esp_image: segment 9: paddr=0x0022545c vaddr=0x400c0000 size=0x00000 ( 0) load
I (719) esp_image: segment 10: paddr=0x00225464 vaddr=0x50000000 size=0x00000 ( 0) load
I (726) esp_image: segment 11: paddr=0x0022546c vaddr=0x50000000 size=0x00000 ( 0) load
I (748) boot: Loaded app from partition at offset 0x10000
I (748) boot: Disabling RNG early entropy source...
E (750) cpu_start: Failed to init external RAM!

ESP-EYE v2.1 keeps rebooting

I bought an ESP-EYE v2.1 from Taobao. After flashing examples/single_chip/camera_web_server on it, I can boot up the ESP-EYE and I see it connects to the WiFi network and gets an IP address.

However, when accessing the IP address in my browser, the ESP-EYE crashes. The serial log is:

�[0;32mI (2765) event: sta ip: 10.37.254.43, mask: 255.255.254.0, gw: 10.37.255.254�[0m
�[0;32mI (2765) camera wifi: got ip:10.37.254.43�[0m
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x400d67e4  PS      : 0x00060130  A0      : 0x80126bfa  A1      : 0x3ffcb8a0  
A2      : 0x3ffca1ac  A3      : 0x3ffb42e9  A4      : 0x3ffb42e8  A5      : 0x00000000  
A6      : 0x3ffcbc40  A7      : 0x00000001  A8      : 0x800d67ca  A9      : 0x3ffcb880  
A10     : 0x00000000  A11     : 0x3ffca1ba  A12     : 0x00000000  A13     : 0x00000000  
A14     : 0x00ff0000  A15     : 0xff000000  SAR     : 0x00000019  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x0000000c  LBEG    : 0x400972b5  LEND    : 0x400972c5  LCOUNT  : 0xfffffffd  

Backtrace: 0x400d67e4:0x3ffcb8a0 0x40126bf7:0x3ffcb8c0 0x40125e81:0x3ffcb8f0 0x40125ef2:0x3ffcb980 0x40126238:0x3ffcb9a0 0x40125358:0x3ffcb9c0 0x401253cc:0x3ffcba00 0x4008eeb1:0x3ffcba20

Rebooting...

Any idea what's happening here?

Trying to get ESP32 AI-Thinker with AF2569 camera module working

I bought the cheap 9$ ESP32-CAM board from alixpress
After searching and lots of reading I discovered its this board -> www.ai-thinker.com/esp32-cam

When I try and flash this board I get the following error.

SCCB_Write [23]=00 failed
E (740) camera: Failed to set frame size
E (740) camera: Camera init failed with error 0x20002
E (740) app_camera: Camera init failed with error 0x20002

I did get this Board with AF2569 camera module working with another project here on github https://github.com/donny681/ESP32_CAMERA_QR

Any suggestions how to be able to get esp-who working?

This is what I received through my make monitor

HP@5574cc35 MINGW32 ~/esp/esp-who/examples/single_chip/camera_web_server
$ make flash
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
Compiler version: 5.2.0
Python requirements from C:/msys32/home/HP/esp/esp-idf/requirements.txt are satisfied.

App "camera_web_server" version: v0.9.1-15-g123ce3b
Flashing binaries to serial port COM5 (app at offset 0x10000)...
esptool.py v2.6
Serial port COM5
Connecting....
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: 24:0a:c4:ba:9f:1c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 26432 bytes to 15743...
Wrote 26432 bytes (15743 compressed) at 0x00001000 in 0.2 seconds (effective 1033.4 kbit/s)...
Hash of data verified.
Compressed 2250400 bytes to 1797823...
Wrote 2250400 bytes (1797823 compressed) at 0x00010000 in 24.6 seconds (effective 731.2 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 88...
Wrote 3072 bytes (88 compressed) at 0x00008000 in 0.0 seconds (effective 7048.2 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

HP@5574cc35 MINGW32 ~/esp/esp-who/examples/single_chip/camera_web_server
$ make monitor
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
Compiler version: 5.2.0
Python requirements from C:/msys32/home/HP/esp/esp-idf/requirements.txt are satisfied.
MONITOR
--- idf_monitor on COM5 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
e.Rչ╔ 8 ╗:22HHH0x1 ]ON_QUIi0x1&BA%_FAe1║MH_Bϊj
confZ֥ 0, *]A0xeC,kE0x00)}:0x0d_d.0,czi0x0bhd_00,w}0x0C닕:DI k dZj
load',le'SH+0x3fflenj
loa'00780,leK
0x480400
I (28) boot: ESP-IDF v4.0-dev-78-g8fbb63c2a 2nd stage bootloader
I (28) boot: compile time 13:11:30
I (28) boot: Enabling RNG early entropy source...
I (34) qio_mode: Enabling default flash chip QIO
I (39) boot: SPI Speed : 80MHz
I (44) boot: SPI Mode : QIO
I (48) boot: SPI Flash Size : 4MB
I (52) boot: Partition Table:
I (55) boot: ## Label Usage Type ST Offset Length
I (63) boot: 0 factory factory app 00 00 00010000 00300000
I (70) boot: 1 nvs WiFi data 01 02 00310000 00004000
I (78) boot: End of partition table
I (82) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x17fb5c (1571676) map
I (506) esp_image: segment 1: paddr=0x0018fb84 vaddr=0x3ffb0000 size=0x0048c ( 1164) load
I (507) esp_image: segment 2: paddr=0x00190018 vaddr=0x400d0018 size=0x8c598 (574872) map
0x400d0018: _stext at ??:?

I (665) esp_image: segment 3: paddr=0x0021c5b8 vaddr=0x3ffb048c size=0x02cdc ( 11484) load
I (668) esp_image: segment 4: paddr=0x0021f29c vaddr=0x40080000 size=0x00400 ( 1024) load
0x40080000: _WindowOverflow4 at C:/msys32/home/HP/esp/esp-idf/components/freertos/xtensa_vectors.S:1779

I (672) esp_image: segment 5: paddr=0x0021f6a4 vaddr=0x40080400 size=0x15fcc ( 90060) load
I (723) boot: Loaded app from partition at offset 0x10000
I (723) boot: Disabling RNG early entropy source...
I (724) spiram: Found 64MBit SPI RAM device
I (728) spiram: SPI RAM mode: flash 80m sram 80m
I (733) spiram: PSRAM initialized, cache is in low/high (2-core) mode.
I (740) cpu_start: Pro cpu up.
I (744) cpu_start: Application information:
I (749) cpu_start: Project name: camera_web_server
I (755) cpu_start: App version: v0.9.1-15-g123ce3b
I (761) cpu_start: Compile time: Mar 19 2019 13:11:55
I (767) cpu_start: ELF file SHA256: b705aedb8cf8efed...
I (773) cpu_start: ESP-IDF: v4.0-dev-78-g8fbb63c2a
I (779) cpu_start: Starting app cpu, entry point is 0x40081410
0x40081410: call_start_cpu1 at C:/msys32/home/HP/esp/esp-idf/components/esp32/cpu_start.c:267

I (0) cpu_start: App cpu up.
I (1274) spiram: SPI SRAM memory test OK
I (1274) heap_init: Initializing. RAM available for dynamic allocation:
I (1274) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1281) heap_init: At 3FFBC328 len 00023CD8 (143 KiB): DRAM
I (1287) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1293) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1300) heap_init: At 400963CC len 00009C34 (39 KiB): IRAM
I (1306) cpu_start: Pro cpu start user code
I (1311) spiram: Adding pool of 4096K of external SPI memory to heap allocator
I (213) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (260) wifi: wifi driver task: 3ffc3d58, prio:23, stack:3584, core=0
I (260) wifi: wifi firmware version: 1f585c4
I (260) wifi: config NVS flash: enabled
I (270) wifi: config nano formating: disabled
I (270) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (280) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (300) wifi: Init dynamic tx buffer num: 32
I (310) wifi: Init data frame dynamic rx buffer num: 32
I (310) wifi: Init management frame dynamic rx buffer num: 32
I (310) wifi: Init management short buffer num: 32
I (310) wifi: Init static rx buffer size: 1600
I (320) wifi: Init static rx buffer num: 10
I (320) wifi: Init dynamic rx buffer num: 32
I (340) camera wifi: wifi_init_softap finished.SSID:ESP32-Camera password:
I (340) camera wifi: wifi_init_sta finished.
I (340) camera wifi: connect to ap SSID:FRITZ!Box Fon WLAN 7360 password:67357982247453841495
I (430) phy: phy_version: 4100, 6fa5e27, Jan 25 2019, 17:02:06, 0, 0
I (430) wifi: mode : sta (24:0a:c4:ba:9f:1c) + softAP (24:0a:c4:ba:9f:1d)
I (430) wifi: Init max length of beacon: 752/752
I (430) wifi: Init max length of beacon: 752/752
I (440) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (530) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (530) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (540) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (550) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (560) gpio: GPIO[21]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (570) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (580) gpio: GPIO[18]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (590) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (590) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (600) gpio: GPIO[23]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (610) gpio: GPIO[22]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (620) camera: Allocating 2 frame buffers (750 KB total)
I (630) camera: Allocating 375 KB frame buffer in PSRAM
I (690) camera: Allocating 375 KB frame buffer in PSRAM
SCCB_Write [23]=00 failed
E (740) camera: Failed to set frame size
E (740) camera: Camera init failed with error 0x20002
E (740) app_camera: Camera init failed with error 0x20002
I (750) camera_httpd: Starting web server on port: '80'
I (760) camera_httpd: Starting stream server on port: '81'
I (2880) camera wifi: retry to connect to the AP
I (2880) camera wifi: connect to the AP fail
I (5320) camera wifi: retry to connect to the AP
I (5320) camera wifi: connect to the AP fail
I (7760) camera wifi: retry to connect to the AP
I (7760) camera wifi: connect to the AP fail
I (10200) camera wifi: retry to connect to the AP
I (10200) camera wifi: connect to the AP fail
I (12640) camera wifi: retry to connect to the AP
I (12640) camera wifi: connect to the AP fail
I (15080) camera wifi: connect to the AP fail

how to modify fb.buffer

Hi, I am trying to modify the frame buffer get from the esp32 camera, and then send it to the http server, but I failed this time. Are there someone know how to solve this problem. Thank you.
The code is listed as the following:
`

// // ToDo
// image = fb->buf;
// pixels = stbi_load_from_memory(fb->buf, fb->len, &width, &height, &bpp, n_channel);
//
// if (pixels == NULL) {
// ESP_LOGI(TAG,"stbi failure: %s\r\n", stbi_failure_reason());
// } else {
//
// // added 2019.2.11
// w = width;
// n = n_channel;
// h = height;
//
// for (int dx = 40; dx < 90; ++dx)
// {
// pixels[n * w * 40 + dx * n + 0] = 255;
// pixels[n * w * 40 + dx * n + 1] = 0;
// pixels[n * w * 40 + dx * n + 2] = 0;
// pixels[n * w * 40 + dx * n + 3] = 255;
// }
//
// for (int dx = 40; dx < 90; ++dx)
// {
// pixels[n * w * 90 + dx * n + 0] = 255;
// pixels[n * w * 90 + dx * n + 1] = 0;
// pixels[n * w * 90 + dx * n + 2] = 0;
// pixels[n * w * 90 + dx * n + 3] = 255;
// }
// size_t buf_size = strlen((const char *)image);
// memcpy(image, pixels, buf_size);
// stbi_image_free(pixels);
// }
// size_t buf_size = strlen((const char *)image);
// res = httpd_resp_send(req, (const char *)image, buf_size);`

Is there any camera app example which works with ESP-EYE v2.1 board?

I've ESP-EYE v2.1 board. I am not sure which type of camera I have. I checked the ESP-EYE_V2.1_BOM_list.xlsx file from ESP-EYE_V2.1_Reference_Design -> 04_BOM List folder. It says "1 Camera module" (in red). No mention about the model.

From make menuconfig, I see 3 supported camera models - OV2640, OV7725 and OV3660. Which one of these is in ESP_EYEv2.1 board?

Please let me know if there is any camera app which is available to run on this board. If so, how to run it? What all config do I need to change to get started?

Thanks
Dheeraj

Support for object detection

Hello!

Do you have any plans for object detection, for example with YOLO or SSD MobileNet?

I think it's awesome what you guys are doing with ESP-EYE by the way. Nice work!

Best Regards
Mark

i run the demo "detection_with_command_line" on ESP-WROVER-KIT-v4.1+OV2640,but Camera capture failed

just follow the examples---detection_with_command_line

error:
I (0) cpu_start: App cpu up.
I (823) spiram: SPI SRAM memory test OK
I (823) heap_init: Initializing. RAM available for dynamic allocation:
I (823) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (829) heap_init: At 3FFB3F60 len 0002C0A0 (176 KiB): DRAM
I (835) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (842) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (848) heap_init: At 4008F0BC len 00010F44 (67 KiB): IRAM
I (854) cpu_start: Pro cpu start user code
I (859) spiram: Adding pool of 4096K of external SPI memory to heap allocator
I (208) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (209) gpio: GPIO[0]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
SCCB_Write [ff]=01 failed
SCCB_Write [12]=80 failed
E (249) camera: Camera probe failed with error 0x20001
E (249) app_camera: Camera init failed with error 0x20001
E (259) app_process: Camera capture failed
E (259) app_process: Camera capture failed

in camera.c,there is
if(config->pin_pwdn >= 0) {
ESP_LOGD(TAG, "Resetting camera by power down line");
gpio_config_t conf = { 0 };
conf.pin_bit_mask = 1LL << config->pin_pwdn;
conf.mode = GPIO_MODE_OUTPUT;
gpio_config(&conf);

    // carefull, logic is inverted compared to reset pin
    gpio_set_level(config->pin_pwdn, 1);
    vTaskDelay(10 / portTICK_PERIOD_MS);
    gpio_set_level(config->pin_pwdn, 0);
    vTaskDelay(10 / portTICK_PERIOD_MS);
}

if(config->pin_reset >= 0) {
    ESP_LOGD(TAG, "Resetting camera");
    gpio_config_t conf = { 0 };
    conf.pin_bit_mask = 1LL << config->pin_reset;
    conf.mode = GPIO_MODE_OUTPUT;
    gpio_config(&conf);

    gpio_set_level(config->pin_reset, 0);
    vTaskDelay(10 / portTICK_PERIOD_MS);
    gpio_set_level(config->pin_reset, 1);
    vTaskDelay(10 / portTICK_PERIOD_MS);

#if CONFIG_OV2640_SUPPORT
} else {
//reset OV2640
SCCB_Write(0x30, 0xFF, 0x01);//bank sensor
SCCB_Write(0x30, 0x12, 0x80);//reset
vTaskDelay(10 / portTICK_PERIOD_MS);
#endif
}

Results from testing face recognition with photographs

I've been testing the camera_web_server example using the AI-Thinker ESP32-CAM.

Using a collection of photographs the face detection works really well. The face recognition part isn't so successful. I've gone through a set of 10 photographs and 'enrolled' them. When I run through the same photos, starting at the point linked in the video below, the system doesn't recognize many of them.

https://youtu.be/dDyx15JrrcA?t=230

0 man isn't recognized
1 woman mistaken for 4 or 6
2 woman not recognized
3 man not recognized
4 Correct
5 Thinks three different people
6 Correct
7 8 and 9 wrong people.

You can see the whole process of enrolling if you jump to the start of the video.

Is this just because I'm using photographs and the algorithm is optimized for live faces?

Still image output is required in PGM format

Hi,
I want still image output in PGM format.
1.
Do I need to use OV3660 or shall I stick to OV2640?
2.
Will the following change to "app_camera.c" is sufficient to yield PGM format output, instead of JPG? (The file is located at "esp-who\examples\single_chip\camera_web_server\main"):
For:
config.pixel_format = PIXFORMAT_JPEG;
ChangedTo:
config.pixel_format = PIXFORMAT_GRAYSCALE;

libdl_lib.a

But how did you get the libdl_lib.a ? Did you do it yourself?

how to optimize the bootup time?

as I can measure.
when using webserver demo of ESP-who, app_main was executed about 1S after the reset .
then initial the OV2640 takes about 500ms.
totally takes about 1-2S to get the picture.
how can I reduce this time?

how to support 640*480 picture ?

609480YUV = 600KB space.

so must use SPIRAM, while the DMA transfer the data to SPIRAM have some problem.

I made a experiment with grayscale picture encoding. while the picture output shows like this:
picture

what might I did wrong?

Detected camera not supported

I'm using the ESP-EYE v2.1 kit with the OV2640 camera module and the latest master branch.
With make menuconfig I have selected the ESP_EYE Devkit in the 'Camera Pins' section.
The following error occurs :
E (273) camera: Detected camera not supported.
E (273) camera: Camera probe failed with error 0x20004
E (273) app_camera: Camera init failed with error 0x20004

I have used the ESP-EYE devkit, before. With an earlier esp-who version about three weeks ago and then it worked fine.

MoblieNets or MobileNet?

As I know, its offical name is MobileNets. So in the ReadMe.md, could you guys fix it😃
Or use MobileNetV2?

How to read camera buffer from DMA directly

Hi
Now, I want to improve the speed of getting fb. As far as I am concerned, now we use "fb = esp_camera_fb_get(); " to get the buffer. Is it from cpu? Now, I want to get the camera buffer from DMA directly, how should I do?
Thanks in advance !

Configure as normal wifi cam

Hello, nice product the ESP-EYE !!!
Just started using it. Managed to setup everything and flashed it, works fine
Just have some questions

  • is it possible to configure somehow so that the device acts like a "standard" wifi camera and connects to my home network instead of setting up it's own AP?
  • is it possible to make the device autostart instead of needing the the "hi, lexin" voice phrase?

Thank you and kind regards, Walter

No or broken image sent to browser

I'm using the AI-Thinker ESP32-Cam. I've set up the ESP-IDF environment using MSYS32 and imported this project. For the camera_web_server example everything seems to work except the single image and stream received by the browser don't appear to be valid jpgs.

Similar problem with the ESP32_CAMERA_QR library - donny681/ESP32_CAMERA_QR#7

Terminal output below:

I (0) cpu_start: App cpu up.
I (1257) spiram: SPI SRAM memory test OK
I (1257) heap_init: Initializing. RAM available for dynamic allocation:
I (1257) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1263) heap_init: At 3FFBBA78 len 00024588 (145 KiB): DRAM
I (1270) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1276) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1283) heap_init: At 40094FCC len 0000B034 (44 KiB): IRAM
I (1289) cpu_start: Pro cpu start user code
I (1294) spiram: Adding pool of 4096K of external SPI memory to heap allocator
I (195) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (196) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (236) wifi: wifi driver task: 3ffcb4b0, prio:23, stack:3584, core=0
I (236) wifi: wifi firmware version: 328353e
I (236) wifi: config NVS flash: enabled
I (236) wifi: config nano formating: disabled
I (246) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (246) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (276) wifi: Init dynamic tx buffer num: 32
I (276) wifi: Init data frame dynamic rx buffer num: 32
I (276) wifi: Init management frame dynamic rx buffer num: 32
I (276) wifi: Init static tx buffer num: 16
I (286) wifi: Init static rx buffer size: 1600
I (286) wifi: Init static rx buffer num: 10
I (286) wifi: Init dynamic rx buffer num: 32
I (296) camera wifi: wifi_init_softap finished.SSID:ESP32-Camera password:
I (316) camera wifi: wifi_init_sta finished.
I (316) camera wifi: connect to ap SSID:Mueller password:smallhands
I (476) phy: phy_version: 4000, b6198fa, Sep 3 2018, 15:11:06, 0, 2
W (476) phy_init: saving new calibration data because of checksum failure, mode(0)
I (526) wifi: mode : sta (24:0a:c4:29:a1:78) + softAP (24:0a:c4:29:a1:79)
I (526) wifi: Init max length of beacon: 752/752
I (526) wifi: Init max length of beacon: 752/752
I (536) gpio: GPIO[13]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (546) gpio: GPIO[14]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (556) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (646) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (646) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (656) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (656) wifi: ap channel adjust o:1,1 n:11,2
I (666) wifi: new:<11,0>, old:<1,0>, ap:<11,2>, sta:<11,0>, prof:1
I (1356) wifi: state: init -> auth (b0)
I (1356) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1356) gpio: GPIO[21]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1366) wifi: state: auth -> assoc (0)
I (1376) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1376) wifi: state: assoc -> run (10)
I (1386) gpio: GPIO[18]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1396) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1406) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1416) gpio: GPIO[23]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1426) gpio: GPIO[22]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
W (1426) wifi: discard, ba not setup
W (1436) wifi: discard, ba not setup
I (1436) camera: Allocating 2 frame buffers (750 KB total)
I (1486) camera: Allocating 375 KB frame buffer in OnBoard RAM
I (1556) camera: Allocating 375 KB frame buffer in OnBoard RAM
I (1956) camera_httpd: Starting web server on port: '80'
I (1956) camera_httpd: Starting stream server on port: '81'
I (2466) wifi: connected with NSA HONEYPOT, channel 11, bssid = 3c:47:11:87:fc:44
I (2466) wifi: pm start, type: 1

W (2506) wifi: discard, ba not setup
W (2506) wifi: discard, ba not setup
W (2506) wifi: discard, ba not setup
W (2506) wifi: discard, ba not setup
W (2506) wifi: discard, ba not setup
W (2516) wifi: discard, ba not setup
W (2516) wifi: discard, ba not setup
I (5236) event: sta ip: 192.168.1.110, mask: 255.255.255.0, gw: 192.168.1.101
I (5236) camera wifi: got ip:192.168.1.110
W (12806) httpd_uri: httpd_uri: URI '/favicon.ico' not found
W (12806) httpd_txrx: httpd_resp_send_err: 404 Not Found - This URI doesn't exist
I (14636) camera_httpd: awb = 0
I (23146) camera_httpd: awb_gain = 0
I (28366) camera_httpd: framesize = 7

Version confusion

I have esp-eye recognition solution version 0.11.0 on a new ESP-Eye v2.1 board but I only found version 0.9.0 here on the repo.

How to get the R G B data from rgb888?

Hi
I had the fb size 320*240, now I get the r/g/b data for(x,y) as below:

fb_data_t fb;
fb.width = image_matrix->w;
fb.height = image_matrix->h;
fb.data = image_matrix->item;
fb.bytes_per_pixel = 3; //三通道 rgb模式
fb.format = FB_BGR888; //RGB模式

uint8_t *data = fb->data + ((x + (y * 320)) * 3); // offset = ((x + (y * fb->width)) * 3)
blue=data[0];
green=data[1];
red=data[2];
So does rgb data is right? Can I get the rgb data like this ??

Trigger events (pin I/O) with face recognition without web-interface?

I am looking for examples or documentation of the face recognition API to trigger events (like switching I/O pins of the ESP32-CAM board). Especially without using the web-interface. I would like to only use the web interface to train the recognition, but then just power the ESP32, have it start face recognition automatically, and respond by switching a voltage on one of the IO pins.
Is that possible? And where do I find which commands to use for that?

esptool write_flash: error: argument <address> <filename>: Detected overlap at address: 0x8000 for file " esp-who/examples/single_chip/camera_web_server

$ make flash
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
Compiler version: 5.2.0
Python requirements from C:/msys32/home/user-pc/esp/esp-who/esp-idf/requirements.txt are satisfied.
Flashing binaries to serial port /COM3 (app at offset 0x10000)...
usage: esptool write_flash [-h] [--flash_freq {keep,40m,26m,20m,80m}]
[--flash_mode {keep,qio,qout,dio,dout}]
[--flash_size FLASH_SIZE]
[--spi-connection SPI_CONNECTION] [--no-progress]
[--verify] [--compress | --no-compress]

[ ...]
esptool write_flash: error: argument : Detected overlap at address: 0x8000 for file: C:/msys32/home/user-pc/esp/esp-who/examples/single_chip/camera_web_server123/build/partitions.bin
make: *** [/home/user-pc/esp/esp-who/esp-idf/components/esptool_py/Makefile.projbuild:63: flash] Error 2

Why its overlapping? how can i solve it?

Support for OV7725

The menuconfig shows option for OV7725.
1.
Can I connect a OV7725 Camera ?
2.
What about the Pin Configuration?

fmt2rgb888 too slow

Hi
This function is too slow, in "to_bmp.c"
bool fmt2rgb888(const uint8_t *src_buf, size_t src_len, pixformat_t format, uint8_t * rgb_buf);
I used this function to process the image buffer from camera(JPEG), but it cost 120ms. It's too slow, can you give me some ideas?
Thanks in advance !

No /dev/cu.* found

Hello,

I ordered the following board and work on Mac OS 10.14.1:

TTGO T-Camera ESP32 WROVER & PSRAM Camera Module ESP32-WROVER-B OV2640 Camera Module 0.96 OLED

When I try ls /dev/cu.* the following is showing:

/dev/cu.Bluetooth-Incoming-Port /dev/cu.MALS /dev/cu.SOC

The same after plugging in the board via usb-kabel and usb-to-usb-c-converter-box.

Any hints what's wrong and no serial port from the board is showing?

Best,
cc13

An error occurred when voice detection and face recognition were run.

An error occurred when voice detection and face recognition were run, and the error log is:

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:6700
load:0x40078000,len:10976
load:0x40080400,len:7240
entry 0x40080780
I (29) boot: ESP-IDF v3.3-dev-32-gfb7ba1baa-dirty 2nd stage bootloader
I (29) boot: compile time 11:27:43
I (39) boot: Enabling RNG early entropy source...
I (39) qio_mode: Enabling QIO for flash chip WinBond
I (41) boot: SPI Speed      : 80MHz
I (45) boot: SPI Mode       : QIO
I (49) boot: SPI Flash Size : 4MB
I (53) boot: Partition Table:
I (57) boot: ## Label            Usage          Type ST Offset   Length
I (64) boot:  0 factory          factory app      00 00 00010000 00300000
I (72) boot:  1 nvs              WiFi data        01 02 00310000 00004000
I (79) boot:  2 fr               unknown          20 20 00320000 00020000
I (87) boot: End of partition table
I (91) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1c20ec (1843436) map
I (587) esp_image: segment 1: paddr=0x001d2114 vaddr=0x3ff80000 size=0x00000 (     0) load
I (587) esp_image: segment 2: paddr=0x001d211c vaddr=0x3ff80000 size=0x00000 (     0) load
I (594) esp_image: segment 3: paddr=0x001d2124 vaddr=0x3ffb0000 size=0x03b10 ( 15120) load
I (607) esp_image: segment 4: paddr=0x001d5c3c vaddr=0x3ffb3b10 size=0x00000 (     0) load
I (612) esp_image: segment 5: paddr=0x001d5c44 vaddr=0x40080000 size=0x00400 (  1024) load
0x40080000: _WindowOverflow4 at D:/espressif/esp-who-new/esp-who/esp-idf/components/freertos/xtensa_vectors.S:1685

I (621) esp_image: segment 6: paddr=0x001d604c vaddr=0x40080400 size=0x09fc4 ( 40900) load
I (643) esp_image: segment 7: paddr=0x001e0018 vaddr=0x400d0018 size=0xa86c4 (689860) map
0x400d0018: _stext at ??:?

I (825) esp_image: segment 8: paddr=0x002886e4 vaddr=0x4008a3c4 size=0x11220 ( 70176) load
0x4008a3c4: lmacMSDUAged at ??:?

I (849) esp_image: segment 9: paddr=0x0029990c vaddr=0x400c0000 size=0x00000 (     0) load
I (849) esp_image: segment 10: paddr=0x00299914 vaddr=0x50000000 size=0x00000 (     0) load
I (856) esp_image: segment 11: paddr=0x0029991c vaddr=0x50000000 size=0x00000 (     0) load
I (880) boot: Loaded app from partition at offset 0x10000
I (880) boot: Disabling RNG early entropy source...
I (882) spiram: Found 32MBit SPI RAM device
I (886) spiram: SPI RAM mode: flash 80m sram 80m
I (891) spiram: PSRAM initialized, cache is in low/high (2-core) mode.
I (898) cpu_start: Pro cpu up.
I (902) cpu_start: Starting app cpu, entry point is 0x40081520
0x40081520: call_start_cpu1 at D:/espressif/esp-who-new/esp-who/esp-idf/components/esp32/cpu_start.c:245

I (894) cpu_start: App cpu up.
I (1397) spiram: SPI SRAM memory test OK
I (1397) heap_init: Initializing. RAM available for dynamic allocation:
I (1397) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1404) heap_init: At 3FFCD828 len 000127D8 (73 KiB): DRAM
I (1410) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1416) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1423) heap_init: At 4009B5E4 len 00004A1C (18 KiB): IRAM
I (1429) cpu_start: Pro cpu start user code
I (1434) spiram: Adding pool of 4096K of external SPI memory to heap allocator
I (112) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (113) esp-eye: Version 0.9.0
I (117) gpio: GPIO[0]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (148) gpio: GPIO[19]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (148) gpio: GPIO[22]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (155) gpio: GPIO[21]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
E (165) [SD]: Failed to initialize the card (ESP_ERR_TIMEOUT). Make sure SD card lines have pull-up resistors in place.
I (176) gpio: GPIO[13]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (185) gpio: GPIO[14]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
E (1175) [SENSOR]: Found addr :0x30
I (1175) camera: Detected camera at address=0x30
I (1187) camera: Camera PID=0x26 VER=0x42 MIDL=0x7f MIDH=0xa2
I (1259) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1259) gpio: GPIO[37]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1266) gpio: GPIO[38]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1276) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1285) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1294) gpio: GPIO[26]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1304) gpio: GPIO[13]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1313) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1323) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1332) gpio: GPIO[27]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1341) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1351) camera: Allocating 2 frame buffers (30 KB total)
I (1357) camera: Allocating 15 KB frame buffer in OnBoard RAM
I (1363) camera: Allocating 15 KB frame buffer in OnBoard RAM
I (1550) gpio: GPIO[12]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
wake word number = 1, word1 name = nihaotianmao
I (11321) I2S: DMA Malloc info, datalen=blocksize=2400, dma_buf_count=3
I (11321) I2S: PLL_D2: Req RATE: 16000, real rate: 16025.000, BITS: 32, CLKM: 39, BCK: 4, MCLK: 4096000.000, SCLK: 1025600.000000, diva: 64, divb: 4
I (14454) app_wifi: ESP_WIFI_MODE_AP
I (14458) wifi: wifi driver task: 3fff1df4, prio:23, stack:3584, core=0
I (14459) wifi: wifi firmware version: a85ca5e
I (14459) wifi: config NVS flash: enabled
I (14464) wifi: config nano formating: disabled
I (14468) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (14478) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (14512) wifi: Init dynamic tx buffer num: 32
I (14512) wifi: Init data frame dynamic rx buffer num: 32
I (14512) wifi: Init management frame dynamic rx buffer num: 32
I (14516) wifi: Init static rx buffer size: 1600
I (14520) wifi: Init static rx buffer num: 10
I (14524) wifi: Init dynamic rx buffer num: 32
I (14529) wifi: Set ps type: 0

I (14627) phy: phy_version: 4000, b6198fa, Sep  3 2018, 15:11:06, 0, 0
I (14628) wifi: mode : softAP (30:ae:a4:c1:50:65)
I (14628) wifi: Init max length of beacon: 752/752
I (14632) wifi: Init max length of beacon: 752/752
I (14637) app_wifi: wifi_init_softap finished.Camera-5065
I (14944) [main]: Starting web server on port: '80'
Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x400ecf88  PS      : 0x00060f30  A0      : 0x800ed1cd  A1      : 0x3ffdfa80
0x400ecf88: csf_framesig at /home/wangwangwang/workspace/AI/nihaotianmao_test/github_for_audio/components/esp_wakenet/c_speech_features/c_speech_features/c_speech_features.c:815

A2      : 0x3ffcecb0  A3      : 0x000001e0  A4      : 0x000001e0  A5      : 0x00000000
A6      : 0x00000000  A7      : 0x00000000  A8      : 0x00000000  A9      : 0x00000000
A10     : 0x00000000  A11     : 0x3ffff7a8  A12     : 0x00000000  A13     : 0x3ffcecb0
A14     : 0x00000780  A15     : 0x00000000  SAR     : 0x00000017  EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000000  LBEG    : 0x400ecf41  LEND    : 0x400ecf47  LCOUNT  : 0x00000000
0x400ecf41: csf_framesig at /home/wangwangwang/workspace/AI/nihaotianmao_test/github_for_audio/components/esp_wakenet/c_speech_features/c_speech_features/c_speech_features.c:815

0x400ecf47: csf_framesig at /home/wangwangwang/workspace/AI/nihaotianmao_test/github_for_audio/components/esp_wakenet/c_speech_features/c_speech_features/c_speech_features.c:815


Backtrace: 0x400ecf88:0x3ffdfa80 0x400ed1ca:0x3ffdfac0 0x400ed3ca:0x3ffdfb20 0x400ed44e:0x3ffdfb60 0x400eb6de:0x3ffdfbf0 0x400eb1fd:0x3ffdfc60 0x400d7055:0x3ffdfc80 0x400937d9:0x3ffdfca0
0x400ecf88: csf_framesig at /home/wangwangwang/workspace/AI/nihaotianmao_test/github_for_audio/components/esp_wakenet/c_speech_features/c_speech_features/c_speech_features.c:815

0x400ed1ca: csf_fbank_HTK at /home/wangwangwang/workspace/AI/nihaotianmao_test/github_for_audio/components/esp_wakenet/c_speech_features/c_speech_features/c_speech_features.c:349

0x400ed3ca: csf_logfbank_HTK at /home/wangwangwang/workspace/AI/nihaotianmao_test/github_for_audio/components/esp_wakenet/c_speech_features/c_speech_features/c_speech_features.c:458

0x400ed44e: csf_mfcc_HTK at /home/wangwangwang/workspace/AI/nihaotianmao_test/github_for_audio/components/esp_wakenet/c_speech_features/c_speech_features/c_speech_features.c:41

0x400eb6de: run at /home/wangwangwang/workspace/AI/nihaotianmao_test/github_for_audio/components/esp_wakenet/speech_recog/mfcc_runner_straight.c:60

0x400eb1fd: model_detect at /home/wangwangwang/workspace/AI/nihaotianmao_test/github_for_audio/components/esp_wakenet/speech_recog/wakenet4_quantized.c:279

0x400d7055: nnTask at D:/espressif/esp-who-new/esp-who/examples/single_chip/camera_display3/main/app_speech_wakeup.c:52 (discriminator 1)

0x400937d9: vPortTaskWrapper at D:/espressif/esp-who-new/esp-who/esp-idf/components/freertos/port.c:435

The problem is located in the following function: Since this part is not open source, you can't continue to view it, The comment section will run normally, if it opens, the above error will occur.

void nnTask(void *arg)
{
    int audio_chunksize = model->get_samp_chunksize(model_data);
    int16_t *buffer = malloc(audio_chunksize * sizeof(int16_t));
    assert(buffer);

    while (1) {

        xQueueReceive(sndQueue, buffer, portMAX_DELAY);

        // int r = model->detect(model_data, buffer);
        // if (r) {
        //     event_wakeup_detected(r);
        // }

    }

    free(buffer);
    vTaskDelete(NULL);
}

SPI RAM initialization fails

Environment

  • Development Kit: ESP-WHO Face Detection and Recognition Libraries
  • Kit version: Latest download https://github.com/espressif/esp-who.git
  • Module or chip used: ESP32-CAM WiFi + Bluetooth Camera Module Development Board ESP32 With Camera Module OV2640
  • IDF: MINGW32
  • Build System: Make
  • Compiler version: 5.2.0
  • Operating System: Windows
  • Power Supply: USB

Problem Description

Hi this my first issue here so sorry if I have not followed the process well enough.

I purchased the Geekcreit® ESP32-CAM WiFi + Bluetooth Camera Module Development Board ESP32 With Camera Module OV2640 recently and after finding not a lot of information with the kit I finally settled on trying to set it up using Espressif Systems (https://github.com/espressif) using information found here (https://robotzero.one/esp32-camera-module/) specificly (https://github.com/espressif/esp-who.git).

It has all gone reasonably smoothly with some initial testing using the examples found here (https://github.com/espressif/esp-idf/tree/master/examples) to check the board is working at all. The board seems to pass all tests including the ram being written and read.

However once the ESP-WHO Face Detection and Recognition Libraries (/esp-who/examples/single_chip/camera_web_server/) is flashed to the module I constantly get on every boot the ERROR (E (841) spiram: SPI RAM enabled but initialization failed. Bailing out.).

I have checked every setting against information found by searching extensively and after trying all solutions offered I have been able to load the camera webserver but the camera fails to initialise due to the SPI RAM failing to initialize I believe?

Expected Behavior

The camera should initialize and be available at the IP address which it is successfully allocated.

Actual Behavior

The server is available at the allocated IP but no image or stream is available.

Debug Logs

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:6732
load:0x40078000,len:11960
load:0x40080400,len:7332
entry 0x40080780
I (28) boot: ESP-IDF v3.3-beta1-223-ga62cbfec9 2nd stage bootloader
I (28) boot: compile time 10:53:34
I (28) boot: Enabling RNG early entropy source...
I (34) qio_mode: Enabling default flash chip QIO
I (40) boot: SPI Speed      : 40MHz
I (44) boot: SPI Mode       : QIO
I (48) boot: SPI Flash Size : 4MB
I (52) boot: Partition Table:
I (55) boot: ## Label            Usage          Type ST Offset   Length
I (63) boot:  0 factory          factory app      00 00 00010000 00300000
I (70) boot:  1 nvs              WiFi data        01 02 00310000 00004000
I (78) boot: End of partition table
I (82) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x17ecdc (1567964) map
I (557) esp_image: segment 1: paddr=0x0018ed04 vaddr=0x3ff80000 size=0x00000 (     0) load
I (557) esp_image: segment 2: paddr=0x0018ed0c vaddr=0x3ff80000 size=0x00000 (     0) load
I (563) esp_image: segment 3: paddr=0x0018ed14 vaddr=0x3ffb0000 size=0x012fc (  4860) load
I (574) esp_image: segment 4: paddr=0x00190018 vaddr=0x400d0018 size=0x8b674 (570996) map
0x400d0018: _stext at ??:?

I (751) esp_image: segment 5: paddr=0x0021b694 vaddr=0x3ffb12fc size=0x01e00 (  7680) load
I (754) esp_image: segment 6: paddr=0x0021d49c vaddr=0x3ffb30fc size=0x00000 (     0) load
I (757) esp_image: segment 7: paddr=0x0021d4a4 vaddr=0x40080000 size=0x00400 (  1024) load
0x40080000: _WindowOverflow4 at C:/msys32/home/Gavin/esp/esp-idf/components/freertos/xtensa_vectors.S:1685

I (767) esp_image: segment 8: paddr=0x0021d8ac vaddr=0x40080400 size=0x17678 ( 95864) load
I (810) esp_image: segment 9: paddr=0x00234f2c vaddr=0x400c0000 size=0x00000 (     0) load
I (810) esp_image: segment 10: paddr=0x00234f34 vaddr=0x50000000 size=0x00000 (     0) load
I (817) esp_image: segment 11: paddr=0x00234f3c vaddr=0x50000000 size=0x00000 (     0) load
I (839) boot: Loaded app from partition at offset 0x10000
I (839) boot: Disabling RNG early entropy source...
############################################################################
ERRORS COMMENCE
############################################################################
E (841) spiram: SPI RAM enabled but initialization failed. Bailing out.
I (847) cpu_start: Failed to init external RAM; continuing without it.
I (854) cpu_start: Pro cpu up.
I (858) cpu_start: Application information:
I (863) cpu_start: Project name:     camera_web_server
I (869) cpu_start: App version:      v0.9.0-9-g0927f69
I (874) cpu_start: Compile time:     10:53:49
I (880) cpu_start: Compile date:     Jan 20 2019
I (885) cpu_start: ESP-IDF:          v3.3-beta1-223-ga62cbfec9
I (891) cpu_start: Starting app cpu, entry point is 0x400813d0
0x400813d0: call_start_cpu1 at C:/msys32/home/Gavin/esp/esp-idf/components/esp32/cpu_start.c:265

I (0) cpu_start: App cpu up.
I (902) heap_init: Initializing. RAM available for dynamic allocation:
I (909) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (915) heap_init: At 3FFBC3C0 len 00023C40 (143 KiB): DRAM
I (921) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (927) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (934) heap_init: At 40097A78 len 00008588 (33 KiB): IRAM
I (940) cpu_start: Pro cpu start user code
I (62) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (63) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (103) wifi: wifi driver task: 3ffcbe5c, prio:23, stack:3584, core=0
I (103) wifi: wifi firmware version: 44ce2e2
I (103) wifi: config NVS flash: enabled
I (103) wifi: config nano formating: disabled
I (103) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (113) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (143) wifi: Init dynamic tx buffer num: 32
I (143) wifi: Init data frame dynamic rx buffer num: 32
I (143) wifi: Init management frame dynamic rx buffer num: 32
I (143) wifi: Init static tx buffer num: 16
I (153) wifi: Init static rx buffer size: 1600
I (153) wifi: Init static rx buffer num: 10
I (153) wifi: Init dynamic rx buffer num: 32
I (163) camera wifi: wifi_init_softap finished.SSID:ESP32-Camera password:
I (183) camera wifi: wifi_init_sta finished.
I (183) camera wifi: connect to ap SSID:Bugwire password:LeeannePC
I (243) phy: phy_version: 4006, e540b8e, Dec 17 2018, 11:53:06, 0, 0
I (243) wifi: mode : sta (30:ae:a4:d7:2e:f0) + softAP (30:ae:a4:d7:2e:f1)
I (243) wifi: Init max length of beacon: 752/752
I (253) wifi: Init max length of beacon: 752/752
I (253) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (343) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (343) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (353) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (363) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (373) gpio: GPIO[21]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (373) wifi: ap channel adjust o:1,1 n:10,2
I (383) wifi: new:<10,0>, old:<1,0>, ap:<10,2>, sta:<10,0>, prof:1
I (1143) wifi: state: init -> auth (b0)
I (1153) wifi: state: auth -> assoc (0)
I (1153) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1153) gpio: GPIO[18]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1153) wifi: state: assoc -> run (10)
I (1163) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1173) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1183) gpio: GPIO[23]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1193) wifi: connected with Bugwire, channel 10, bssid = e0:3f:49:72:b8:e0
I (1243) wifi: pm start, type: 1

I (1243) gpio: GPIO[22]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
############################################################################
CAMERA FAILS TO INITIALISE
############################################################################
I (1253) camera: Allocating 2 frame buffers (750 KB total)
I (1253) camera: Allocating 375 KB frame buffer in PSRAM
E (1263) camera: Allocating 375 KB frame buffer Failed
E (1263) camera: Failed to allocate frame buffer
E (1273) gpio: gpio_isr_handler_remove(380): GPIO isr service is not installed, call gpio_install_isr_service() first
E (1283) camera: Camera init failed with error 0x101
E (1283) app_camera: Camera init failed with error 0x101
I (1293) camera_httpd: Starting web server on port: '80'
I (1303) camera_httpd: Starting stream server on port: '81'
I (2093) event: sta ip: 192.168.1.158, mask: 255.255.255.0, gw: 192.168.1.1
I (2093) camera wifi: got ip:192.168.1.158

Similar issue but found no solution for mine here

espressif/esp-idf#1984

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.