Git Product home page Git Product logo

esp-dl's Introduction

ESP-DL [中文]

ESP-DL is a library for high-performance deep learning resources dedicated to ESP32, ESP32-S2, ESP32-S3 and ESP32-C3. Please read ESP-DL User Guide for more information about ESP-DL.

Overview

ESP-DL provides APIs for Neural Network (NN) Inference, Image Processing, Math Operations and some Deep Learning Models. With ESP-DL, you can use Espressif's SoCs for AI applications easily and fast.

As ESP-DL does not need any peripherals, it can be used as a component of some projects. For example, you can use it as a component of ESP-WHO, which contains several project-level examples of image application. The figure below shows what ESP-DL consists of and how ESP-DL is implemented as a component in a project.

Get Started with ESP-DL

For setup instructions to get started with ESP-DL, please read Get Started.

Please use ESP-IDF release/v5.0 or above.

Try Models in the Model Zoo

ESP-DL provides some model APIs in the Model Zoo, such as Human Face Detection, Human Face Recognition, Cat Face Detection, etc. You can use these models in the table below out of box.

Name API Example
Human Face Detection ESP-DL/examples/human_face_detect
Human Face Recognition ESP-DL/examples/face_recognition
Cat Face Detection ESP-DL/examples/cat_face_detect

Deploy Your Own Models

We recommend using TVM to deploy your models, for details please refer to ESP-DL/tutorial/tvm_example.

Feedback

For feature requests or bug reports, please submit an issue. We will prioritize the most anticipated features.

esp-dl's People

Contributors

blueskyb avatar esp-yhy avatar espwangning avatar fazledyn-or avatar ilidur avatar simple12360 avatar sun-xiangyu avatar tore-espressif 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

esp-dl's Issues

关于运行时,conv2d中出现的错误。

extern "C" uint8_t app_recon(uint8_t *img)
{
// input
Tensor<int16_t> input;
input.set_element((int16_t *)img).set_exponent(0).set_shape({64, 64, 3}).set_auto_free(false);
ORDER model;
dl::tool::Latency latency;

// model forward
latency.start();
model.forward(input);
latency.end();

}

当运行到model.forwad(input);时出现了如下错误:
Guru Meditation Error: Core 1 panic'ed (InstrFetchProhibited). Exception was un
handled.

Core 1 register dump:
PC : 0x00000000 PS : 0x00060e30 A0 : 0x82017c47 A1 : 0x3f
c9ee70
A2 : 0x3dddd010 A3 : 0x3fce1dd0 A4 : 0x00000000 A5 : 0x00
000000
A6 : 0x3fce1d28 A7 : 0x00000000 A8 : 0x82017771 A9 : 0x3f
c9ee50
A10 : 0x3fce1dd0 A11 : 0x3fce25f0 A12 : 0x3fce1d28 A13 : 0x3f
ce25f0
A14 : 0x00000000 A15 : 0x00000042 SAR : 0x00000004 EXCCAUSE: 0x00
000014
EXCVADDR: 0x00000000 LBEG : 0x4037d810 LEND : 0x4037d815 LCOUNT : 0xff
ffffff
0x4037d810: dl_tie728_bzero at ??:?

0x4037d815: dl_tie728_bzero at ??:?

Backtrace:0xfffffffd:0x3fc9ee700x42017c44:0x3fc9eeb0 0x42016d0c:0x3fc9eed0 0x420
09f69:0x3fc9ef10 0x42016dfd:0x3fc9eff0 0x4200b134:0x3fc9f010 0x4200935a:0x3fc9f5
70 0x4038215d:0x3fc9fc10
0x42017c44: void dl::base::conv2d<short, short, short, short, int>(void*) at /ho
me/yehangyang/Documents/workspace/DL/build/../components/dl/base/dl_base_conv2d.
cpp:895

0x42016d0c: dl::nn::conv2d(dl::Tensor&, dl::Tensor&, std::vector<i
nt, std::allocator >&, dl::Filter const&, int, int, dl::Bias
const*, dl::Activation const*, std::vector<int, std::allocator > con
st&) at /home/yehangyang/Documents/workspace/DL/build/../components/dl/nn/src/dl
_nn_conv2d.cpp:40

0x42009f69: dl::layer::Conv2D::call(dl::Tensor&, bool, std::vector
<int, std::allocator > const&) at C:\Users\gaochao\eclipse-workspace\ESP32S
3_RTOS_SDK_master\build/../components/esp-dl/include/layer/dl_layer_conv2d.hpp:1
15
(inlined by) ORDER::call(dl::Tensor&) at C:\Users\gaochao\eclipse-worksp
ace\ESP32S3_RTOS_SDK_master\build/../main/includes/order_model.hpp:106

0x42016dfd: dl::layer::Model::forward(dl::Tensor&) at /home/yehang
yang/Documents/workspace/DL/build/../components/dl/layer/src/dl_layer_model.cpp:
30

0x4200b134: app_recon at C:\Users\gaochao\eclipse-workspace\ESP32S3_RTOS_SDK_mas
ter\build/../main/app_order_recon.cpp:31

0x4200935a: task_app_recon_process(void*) at C:\Users\gaochao\eclipse-workspace
ESP32S3_RTOS_SDK_master\build/../main/app_recon_process.cpp:122

0x4038215d: vPortTaskWrapper at C:/Users/gaochao/Desktop/esp-idf/components/free
rtos/port/xtensa/port.c:168

Sources of deep learning lib (AIV-395)

Hi there. I see that you provide pre-compiled .a files for the deep learning layer implementations (like convolutions etc...). Is the reason for this to keep the code proprietary or rather for convenience? I'm interested in extending/modifying the supported layer list for running custom models, but without code to start with, it is going to be difficult. It would be nice if you would consider releasing the sources for the open source community too.

quantization parameters and convert model step by step (AIV-393)

@yehangyang
Hi,
Get the onnx model according to the code,which named mnist_model_pytorch1.onnx(removed softmax ):
Screenshot_select-area_20210831134128

Then,get the mnist_calib.pickle by executing quantization_tool/examples/example.py.

mnist_calib.pickle

>>> f=open("mnist_calib.pickle",'rb')
>>> a=pickle.load(f)
>>> a
{'9': 16.0, '11': 8.0, 'output': 4.0, 'input': 64.0, '8': 16.0, '10': 8.0, '7': 64.0, 'fc1.weight': array([256.]), 'fc1.bias': 16.0, 'fc2.weight': array([256.]), 'fc2.bias': 8.0, 'fc3.weight': array([128.]), 'fc3.bias': 4.0}
>>> 

Does the value(16.0,8.0,...) in the dictionary represent the output_exponent value in the config json file?

BTW,For my own model, are the following steps correct?
1.prepare a float32 model,and convet to onnx model
2.executing quantization_tool/examples/example.py
3.get the out_exponent(Can the current tools generate the exponent value?), and write a config.json file
4.executing convert_tool/convert.py

Thanks!

Referencing Work

Hi!
Not an issue, but I was wondering if you have a preference on how I should cite this library in academic work?
Currently I am citing it with the link on Github, but I'm unsure who to attribute the work to.
Thanks!
-Caleb

While linking undefined reference to functions from dl_lib_matrix3d.h and dl_lib_matrix3dq.h

For example:
/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /<MY_ESP_HOME>/esp-who/components/esp-face/lib/libod.a(sparse_mn_5_q.c.obj):(.literal.sparse_mn_5_q_without_landmark+0x40c): undefined reference to `dl_matrix3dqq_mobilenet'

Could you please suggest a solution?

wdt during lengthy face_detect()

Hi, I'm having a problem with cpu1 watchdog timer going off during a call to face_detect(). The watchdog goes off at about 375 ms, the best I can figure using this bit of code and looking at the arduino serial monitor

        fmt2rgb888(fb->buf, fb->len, fb->format, out_res.image);
        long detstart = millis();
        Serial.println(detstart);
        out_res.net_boxes = face_detect(image_matrix, &mtmn_config);
        Serial.println(millis()-detstart);
00:04:06.515 -> 218850
00:04:06.889 -> Guru Meditation Error: Core  1 panic'ed (Interrupt wdt timeout on CPU1)
00:04:06.923 -> Core 1 register dump:

So the 889 ms minus 515 ms is the 374 ms that creates the wdt.

I've trained dozen of faces, and detected hundreds with this code, before I ran into this. It is a esp32-cam standard setup, with some <FastLED.h> added, and recently a <Adafruit_SSD1306.h> with <SPI.h> and <Wire.h>. These are configured but not being called during the facedetect(), as it is just running in the arduino loop, with nothing on the other cpu, and no user interrupts or tasks.

My setup is below.

  config.pixel_format = PIXFORMAT_JPEG; 
  config.frame_size =  FRAMESIZE_QVGA; //  320 x 240

  config.fb_count = 2;
  config.jpeg_quality = 12; 

And I have fiddled with these mtmn parameters without success, trying to reduce the time of the detect or fail, so it doesn't exceed the watchdog.

  mtmn_config_t mtmn_config = {0};
  mtmn_config.type = FAST;
  mtmn_config.min_face = 80; 
  mtmn_config.pyramid = 0.707;
  mtmn_config.pyramid_times = 4;
  mtmn_config.p_threshold.score = 0.6;
  mtmn_config.p_threshold.nms = 0.7;
  mtmn_config.p_threshold.candidate_number = 20; 
  mtmn_config.r_threshold.score = 0.7; 
  mtmn_config.r_threshold.nms = 0.7;
  mtmn_config.r_threshold.candidate_number = 10; 
  mtmn_config.o_threshold.score = 0.7; 
  mtmn_config.o_threshold.nms = 0.7;     
  mtmn_config.o_threshold.candidate_number = 1;

It usually fails after about 50ms when there is no face, and takes 100ms to 150ms when there is a face, but sometimes looking at a face which is programmed or not programmed, it seems to run past the limit of the watchdog.

So any advice? Is there a way to command it to give up after 250 ms say?
I'm keeping the faces in flash, and I have 30 faces configured. Could they be corrupted somehow?
Or some strange interaction with the SPI activities? I removed the SPI and 1306, but still getting the problem.

Matrix multiplication

@yehangyang
Hi,How to use mul2d to multiply two matrices(AxB)?

    int16_t element1[] = {5, 6, 7, 8};
    int16_t element2[] = {1, 2, 3, 4};
    Tensor<int16_t> input1;
    input1.set_element((int16_t *)element1).set_exponent(0).set_shape({2,2,1}).set_auto_free(false);
    Tensor<int16_t> input2;
    input2.set_element((int16_t *)element2).set_exponent(0).set_shape({2, 2, 1}).set_auto_free(false);
    Tensor<int16_t> output;
    dl::nn::mul2d(output,input1,input2);

Is this reasonable?

调用GlobalAveragePool2D遇到了,如下错误

../components/esp-dl/include/layer/dl_layer_global_avg_pool2d.hpp: In constructor 'dl::layer::GlobalAveragePool2D<feature_t>::GlobalAveragePool2D(int, const char*)':
../components/esp-dl/include/layer/dl_layer_global_avg_pool2d.hpp:34:13: error: expected identifier before '{' token
{
^
../components/esp-dl/include/layer/dl_layer_global_avg_pool2d.hpp: In member function 'void dl::layer::GlobalAveragePool2D<feature_t>::build(dl::Tensor<feature_t>&)':
../components/esp-dl/include/layer/dl_layer_global_avg_pool2d.hpp:54:17: error: 'vector' was not declared in this scope
vector output_shape(input.shape.size(), 1);
^~~~~~
../components/esp-dl/include/layer/dl_layer_global_avg_pool2d.hpp:54:17: note: suggested alternative:
In file included from c:\users\g.espressif\tools\xtensa-esp32s3-elf\esp-2021r1-8.4.0\xtensa-esp32s3-elf\xtensa-esp32s3-elf\include\c++\8.4.0\vector:64,
from ../components/esp-dl/include/tool/dl_tool.hpp:3,
from ../main/app_order_recon.cpp:16:
c:\users\g.espressif\tools\xtensa-esp32s3-elf\esp-2021r1-8.4.0\xtensa-esp32s3-elf\xtensa-esp32s3-elf\include\c++\8.4.0\bits\stl_vector.h:339:11: note: 'std::vector'
class vector : protected _Vector_base<_Tp, _Alloc>
^~~~~~
In file included from ../main/includes/order_model.hpp:6,
from ../main/app_order_recon.cpp:17:
../components/esp-dl/include/layer/dl_layer_global_avg_pool2d.hpp:54:24: error: expected primary-expression before 'int'
vector output_shape(input.shape.size(), 1);
^~~
../components/esp-dl/include/layer/dl_layer_global_avg_pool2d.hpp:55:17: error: 'output_shape' was not declared in this scope

Import pre-trained model

I want to make enroll from profile picture saved on database. My approach sends "face-id" by mqtt and make recognition in the backend with a pre-trained model.

In Tensorflow is available MobileNetV2 model, how can I load this pre-trained model?

when build a project include esp-face components ,there is many build error like this?

c:/progra1/espres1/esp-id1/tools/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: /home/gongxiaochao/code/esp/esp_temp/dl_lib/components/face_recognition/frmn/frmn.c:835: undefined reference to dl_matrix3dqq_depthwise_conv_3x3s1_with_bias' c:/progra~1/espres~1/esp-id~1/tools/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: /home/gongxiaochao/code/esp/esp_temp/dl_lib/components/face_recognition/frmn/frmn.c:842: undefined reference to dl_matrix3dqq_mobilefaceblock'
c:/progra
1/espres1/esp-id1/tools/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: /home/gongxiaochao/code/esp/esp_temp/dl_lib/components/face_recognition/frmn/frmn.c:846: undefined reference to dl_matrix3dqq_mobilefaceblock' c:/progra~1/espres~1/esp-id~1/tools/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: /home/gongxiaochao/code/esp/esp_temp/dl_lib/components/face_recognition/frmn/frmn.c:865: undefined reference to dl_matrix3dqq_mobilefaceblock'
c:/progra1/espres1/esp-id1/tools/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: /home/gongxiaochao/code/esp/esp_temp/dl_lib/components/face_recognition/frmn/frmn.c:884: undefined reference to dl_matrix3dqq_mobilefaceblock_split' c:/progra~1/espres~1/esp-id~1/tools/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: /home/gongxiaochao/code/esp/esp_temp/dl_lib/components/face_recognition/frmn/frmn.c:903: undefined reference to dl_matrix3dqq_mobilefaceblock_split'
c:/progra
1/espres1/esp-id1/tools/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: /home/gongxiaochao/code/esp/esp_temp/dl_lib/components/face_recognition/frmn/frmn.c:924: undefined reference to dl_matrix3dqq_mobilefaceblock_split' c:/progra~1/espres~1/esp-id~1/tools/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: /home/gongxiaochao/code/esp/esp_temp/dl_lib/components/face_recognition/frmn/frmn.c:945: undefined reference to dl_matrix3dqq_mobilefaceblock_split'
c:/progra1/espres1/esp-id~1/tools/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: /home/gongxiaochao/code/esp/esp_temp/dl_lib/components/face_recognition/frmn/frmn.c:966: undefined reference to dl_matrix3dqq_mobilefaceblock_split' c:/progra~1/espres~1/esp-id~1/tools/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:/Users/Administrator/esp/m5stack-cam-psram-master/mpu6050/components/esp-face/lib\libfr.a(frmn.c.obj):/home/gongxiaochao/code/esp/esp_temp/dl_lib/components/face_recognition/frmn/frmn.c:987: more undefined references to dl_matrix3dqq_mobilefaceblock_split' follow

NaN error

Hello!
I would like to know the way numbers are handled in the deep learning softmax function.
After performing 3 convolutions I have output numbers for the first 1000 spaces (printed out).
The shape of this convolution input is (32,3,3,16).
then prelu, and maxpool.
The following operation is another convolution of shape (2,1,1,32) to obtain the scores.
This output for this matrix is mostly Nan, and then some numbers that make general sense for a score (0-1)...so my question would be where are these nans coming from?
Are they expected?
Should i write a small function to obtain the scores at each stride instead of all score for all convolutions?
Could it be that my Data is not normalized?
--> As a side note, I have a hunch that it could be something to do with weight ordering
the ESP lib is: (N H W C)
caffe's output is: (N C H W)

in-> (N C H W)
I have translated these formats using the method below with numpy
first step: np.moveaxis(in,1,3)
out-> (N W H C )
second step: np.moveaxis(in, 1,2)
out-> ( N H W C)
flatten the array using np.reshape(in,-1)
load the array into dl_matrix3d_t using a for loop
(using out = in.transpose(0,2,3,1) also provides the same result)

as an example (this is from the input to the bounding box layer)
original Shape from caffe (4, 32, 1, 1)
new shape for ESP lib(4, 1, 1, 32)
flatten and load

OUTPUT FROM MODEL:
Screenshot from 2019-12-03 18-31-05

here is the code for the neural layers of the network: ( i have erased the free and some printout methods to save space, but will attach the whole code if context is needed)

dl_matrix3d_t *filt_c1 = dl_matrix3d_alloc(10,3,3,3);
dl_matrix3d_t *bias1  =dl_matrix3d_alloc(1,1,1,10);
dl_matrix3d_t *prelu1 =dl_matrix3d_alloc(1,1,1,10);
dl_matrix3d_t *out1   =dl_matrix3d_alloc(10,1,1,10);

getpnet_conv1_0(filt_c1);//pnetVals.h
getpnet_conv1_1(bias1);//pnetvals.h
getpnet_prelu1_0(prelu1);//pnetvals.h
// 3x3 convolution 1
out1= dl_matrix3dff_conv_3x3(in,filt_c1,bias1,1,1,PADDING_SAME);

dl_matrix3d_p_relu(out1, prelu1);
dl_matrix3d_global_pool(out1);

dl_matrix3d_t *filt_c2 = dl_matrix3d_alloc(16,3,3,10);
dl_matrix3d_t *bias2 = dl_matrix3d_alloc(1,1,1,16);
dl_matrix3d_t *out2= dl_matrix3d_alloc(1,1,1,16);
//this might need to be moved until after conv_2
dl_matrix3d_t *prelu2 = dl_matrix3d_alloc(1,1,1,16);

getpnet_conv2_0(filt_c2);
getpnet_conv2_1(bias2);
getpnet_prelu2_0(prelu2);

out2 = dl_matrix3dff_conv_3x3(out1,filt_c2,bias2,1,1,PADDING_SAME);

dl_matrix3d_p_relu(out2,prelu2);


    dl_matrix3d_global_pool(out2);
    
//=====================================

dl_matrix3d_t *filt_c3 = dl_matrix3d_alloc(32,3,3,16);
    dl_matrix3d_t *bias3 = dl_matrix3d_alloc(1,1,1,32);
    dl_matrix3d_t *out3= dl_matrix3d_alloc(1,1,1,32);

//get weights
    getpnet_conv3_0(filt_c3);
    getpnet_conv3_1(bias3);

    out3 = dl_matrix3dff_conv_3x3(out2,filt_c3,bias3,1,1,PADDING_SAME);
dl_matrix3d_free(out2);
dl_matrix3d_free(bias3);

dl_matrix3d_t *prelu3 = dl_matrix3d_alloc(1,1,1,32);
getpnet_prelu3_0(prelu3);

    dl_matrix3d_p_relu(out3,prelu3);
    
dl_matrix3d_free(prelu3);
    dl_matrix3d_global_pool(out3);
//=====================================

dl_matrix3d_t *score_filter=dl_matrix3d_alloc(2,1,1,32);
dl_matrix3d_t *score_bias = dl_matrix3d_alloc(1,1,1,2);
dl_matrix3d_t *score_out = dl_matrix3d_alloc(1,1,1,2); 

getpnet_score_0(score_filter);
getpnet_score_1(score_bias);

score_out = dl_matrix3dff_conv_3x3(out3,score_filter,score_bias,1,1,PADDING_SAME);

dl_matrix3d_free(score_filter);
dl_matrix3d_free(score_bias);
dl_matrix3d_softmax(score_out);	

//====================================
dl_matrix3d_t *bbox_filter=dl_matrix3d_alloc(4,1,1,32);
dl_matrix3d_t *bbox_bias=dl_matrix3d_alloc(1,1,1,4);
dl_matrix3d_t *bbox_out=dl_matrix3d_alloc(1,1,1,4);

getpnet_bbox_pred_0(bbox_filter);
getpnet_bbox_pred_1(bbox_bias);

bbox_out = dl_matrix3dff_conv_3x3(out3,bbox_filter,bbox_bias,1,1,PADDING_SAME);
dl_matrix3d_free(out3);
dl_matrix3d_free(bbox_filter);
dl_matrix3d_free(bbox_bias);
printf("\n\nALLOCATING OUTPUT...\n\n\n");

//=========================================
// SET MEMORY //

//output is a global variable
setOutput(bbox_out,1);// bounding boxes
setOutput(score_out,0);//score output

dl_matrix3d_free(bbox_out);

// dl_matrix3d_free(score_out);

printf("\n\n");
int i;
printf("\n\nFROM PNET LOOP:\nscore: ");
for (i=0;i<1500;i++)
{
printf("---:%f :---", score_out->item[i]);
}
printf("\n\n");

xSemaphoreGive(skeletonKey);
vTaskDelay(1000/portTICK_PERIOD_MS);
vTaskDelete( NULL );

Detect movement only (AIV-399)

Good day, I use a PIR sensor to detect movement , but i receive many false triggers. I would like to know if there is a way to use your code to be able to compare consecutive images to confirm movement. I do not require facial recognition.
Is there any library I could use with documentation available?
Thank you.

Cannot invoke 3X3 convolution in Arduino IDE

Hi!
I am trying to invode dl_matrix3dqq_conv_3x3() in the Arduino IDE in order to do some deep learning classification but the compiler cant find the function in the library, what do i do??
after creating a quantized matrix I can use other functions in the library (ReLu, PreRelu, allocation, etc..) but when it comes to the convolution operations I get the following error:

ESP32_DeepNet_attempt:219:12: error: 'dl_matrix3dqq_conv_3x3' was not declared in this scope
outMatrix=dl_matrix3dqq_conv_3x3(qMatrix,qMatrix,2,2,0,2,"test");
^
exit status 1
'dl_matrix3dqq_conv_3x3' was not declared in this scope

when it is defined in dl_lib_matrix3dq.h library as:

/**

@brief Do 1x1 convolution with an 8-bit fixed point matrix, with bias adding
@param out Preallocated quantized matrix, size (1, w, h, n)
@param in Input matrix, size (1, w, h, c)
@param filter 1x1 filter, size (n, 1, 1, c)
@param bias Bias, size (1, 1, 1, n)
@param mode Implementation mode
*/
void dl_matrix3duq_conv_1x1_with_bias(dl_matrix3dq_t *out,
dl_matrix3du_t *in,
dl_matrix3dq_t *filter,
dl_matrix3dq_t *bias,
dl_conv_mode mode,
char *name);
//
// Conv 3x3
//

Hardware:
Board: ESP32-Cam
Core Installation version: 1.0.4
IDE name: Arduino IDE
Flash Frequency: 40Mhz
PSRAM enabled: yes
Upload Speed: 115200
Computer OS: Ubuntu

Pnet valid box issue

Hello!
For the life of me I cannot figure out what is wrong with an implementation of Pnet (smallest and first layer in MTCNN)
the configuration is set to the same as the one in the example code (min_face = 0.07 and pyramid to 80)
the input is a XGA frame buffer converted to a dl_marix3du_t, and then normalized and turned into the proper floating point dl_matrix3d_t
the code is shown below, the weights are obtained from a .h file that adds values to input->items
setOutput is a function that sets a global mtmn_net_t variable to the matrix given at the point of calling (0 for score, 1 for bounding boxes)

void pnetCore1(void *pvParameter)
{
printf("\n[PNET] HELLO P net!\n");

while(true)//xSemaphoreTake(skeletonKey,portMAX_DELAY))//true)
{
xSemaphoreTake(skeletonKey,portMAX_DELAY);
//=====================================
// PNET LAYER 1

dl_matrix3d_t *in =(dl_matrix3d_t*) pvParameter;
dl_matrix3d_t *filt_c1 = dl_matrix3d_alloc(10,3,3,3);//(10,3,3,3);
dl_matrix3d_t *bias1   = dl_matrix3d_alloc(1,1,1,10);//(1,1,1,10);	
dl_matrix3d_t *prelu1  = dl_matrix3d_alloc(1,1,1,10);//(1,1,1,10); 
dl_matrix3d_t *out1;   
dl_matrix3d_t *outPool;

//init weights
getpnet_conv1_0(filt_c1);//pnetVals.h
getpnet_conv1_1(bias1);//pnetvals.h
getpnet_prelu1_0(prelu1);//pnetvals.h
//calculate
out1= dl_matrix3dff_conv_3x3(in,filt_c1,bias1,1,1,PADDING_VALID);
//clean up
dl_matrix3d_free(filt_c1);
dl_matrix3d_free(bias1);
//pool
outPool=dl_matrix3d_pooling(out1,1,1,2,2,PADDING_VALID,DL_POOLING_MAX);
//clean up
dl_matrix3d_free(out1);
dl_matrix3d_p_relu(outPool, prelu1);
dl_matrix3d_free(prelu1);

    //=====================================
    // PNET LAYER 3
dl_matrix3d_t *filt_c2 = dl_matrix3d_alloc(16,3,3,10);
dl_matrix3d_t *bias2   = dl_matrix3d_alloc(1,1,1,16);
dl_matrix3d_t *pool2;
dl_matrix3d_t *out2;
dl_matrix3d_t *prelu2 = dl_matrix3d_alloc(1,1,1,16);

//init weights
getpnet_conv2_0(filt_c2);
getpnet_conv2_1(bias2);
getpnet_prelu2_0(prelu2);
//calculate
out2 = dl_matrix3dff_conv_3x3(outPool,filt_c2,bias2,1,1,PADDING_VALID);
//clean up
dl_matrix3d_free(outPool);
//pool
pool2=dl_matrix3d_pooling(out2,1,1,2,2,PADDING_VALID,DL_POOLING_MAX);
//clean up
dl_matrix3d_free(out2);
dl_matrix3d_p_relu(pool2,prelu2);
dl_matrix3d_free(prelu2);

//=====================================
// PNET LAYER 3
dl_matrix3d_t *filt_c3 = dl_matrix3d_alloc(32,3,3,16);
    dl_matrix3d_t *bias3   = dl_matrix3d_alloc(1,1,1,32);
dl_matrix3d_t *pool3;
    dl_matrix3d_t *out3;
//get weights
    getpnet_conv3_0(filt_c3);
    getpnet_conv3_1(bias3);
//calculate
    out3 = dl_matrix3dff_conv_3x3(pool2,filt_c3,bias3,1,1,PADDING_VALID);
//clean up
dl_matrix3d_free(pool2);
dl_matrix3d_free(bias3);
dl_matrix3d_free(filt_c3);
//pool
pool3=dl_matrix3d_pooling(out3,1,1,2,2,PADDING_VALID,DL_POOLING_MAX);
//clean up
dl_matrix3d_free(out3);
dl_matrix3d_t *prelu3 = dl_matrix3d_alloc(1,1,1,32);
    getpnet_prelu3_0(prelu3);
    //prelu
dl_matrix3d_p_relu(pool3,prelu3);                
dl_matrix3d_free(prelu3);


dl_matrix3d_t *score_filter=dl_matrix3d_alloc(2,1,1,32);
dl_matrix3d_t *score_bias = dl_matrix3d_alloc(1,1,1,2);
dl_matrix3d_t *score_out;

getpnet_score_0(score_filter);
getpnet_score_1(score_bias);

score_out= dl_matrix3dff_conv_3x3(pool3,score_filter,score_bias,1,1,PADDING_VALID);

dl_matrix3d_free(score_filter);
dl_matrix3d_free(score_bias);

dl_matrix3d_softmax(score_out);	

dl_matrix3d_t *bbox_filter=dl_matrix3d_alloc(4,1,1,32);
dl_matrix3d_t *bbox_bias=dl_matrix3d_alloc(1,1,1,4);
dl_matrix3d_t *bbox_out=dl_matrix3d_alloc(1,1,1,4);

getpnet_bbox_pred_0(bbox_filter);
getpnet_bbox_pred_1(bbox_bias);

bbox_out = dl_matrix3dff_conv_3x3(pool3,bbox_filter,bbox_bias,1,1,PADDING_VALID);
//dl_matrix3d_free(out3);
dl_matrix3d_free(bbox_filter);
dl_matrix3d_free(bbox_bias);
dl_matrix3d_free(pool3);
//=========================================
// SET MEMORY //

//output->offset=bbox_out;

initOut(score_out->w,score_out->h,bbox_out->w,bbox_out->h );
setOutput(bbox_out,1);// bounding boxes
setOutput(score_out,0);//score output	

//printf("\n\n");

    dl_matrix3d_free(bbox_out);
    dl_matrix3d_free(score_out);

printf("\n[PNET] Bye PNET!\n");
xSemaphoreGive(skeletonKey);
vTaskDelay(1000/portTICK_PERIOD_MS);
vTaskDelete( NULL );
}//endForeverWhile

printf("\n\n\n[PNET] I SHOULD NOT SEE THIS! \n\n\n");
//vTaskDelay(1000/portTICK_PERIOD_MS);
for(; ; )
{
vTaskDelay(1000/portTICK_PERIOD_MS);
xSemaphoreGive(skeletonKey);
printf(".");
vTaskDelete( NULL );
}

}

Precompiled detection .a files in Arduino IDE (AIV-397)

Should I be able to use the libdetection_cat_face.a file in the Arduino IDE? Maybe using it as a library with the precompiled=true property?

I get this on compilation

Compiling library "cat_face_3"
Library cat_face_3 has been declared precompiled:
Using precompiled library in C:\Users\Dude\Documents\Arduino\libraries\cat_face_3\src\esp32
The plaform does not support 'compiler.libraries.ldflags' for precompiled libraries.

The ESP32 crashes at this point:
assertion "model->model_config.enabled_top_k > 0" failed

So I guess the model isn't loading but I'm not sure.

I have the cat face detection working using the IDF but I would like to make a little project with it using the Arduino IDE to make it easier for people to play with.

Where is the (.c)file in arduino IDE?

board : ESP32-CAM
environment :arduino IDE(1.8.10)
esp32 core : 1.0.4
PC:win10

When I want to learn the function of face detection and recognition yesterday,I found that there was no (.c) file to explain this function.
Finally,I found here.

However,what make me confuse is how can arduino IDE manage to compile without (.c) function file.
Or where do I find its (.c)file.(More important)

More detail:
The path of face detection and recognition lib in my computer:
C:\Users\ASUS\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\tools\sdk\include\esp-face

The contents of the folder are shown below:
image

It's really amazing.
It would be a great help if someone could help.
Thank you!

assertion "out->c == bias->c" failed:

Hello!
after running a convolution:
net_out = dl_matrix3dff_conv_3x3(imgIn,filt_c1,bias1,10,10,PADDING_SAME);

I recieve this error:

assertion "out->c == bias->c" failed: file "/home/gongxiaochao/code/esp/esp_temp/dl_lib/components/dl_lib/dl_lib_matrix3d.c", line 37, function: dl_matrix3d_init_bias
abort() was called at PC 0x400e1c43 on core 1

I'm not sure what to do because I can't see the context where the assertion is failing
could you give me some pointers?
thanks!
-Caleb

Self-comparison error in image_util.c

On compilation, I encounter:

../components/esp-face/image_util/image_util.c:454:33: error: 
     self-comparison always evaluates to true [-Werror=tautological-compare]

     if (src_w == dst_w && src_h == src_h)
                           ^^^^^^^^^^^^^^

This can be corrected by changing the offending line 454 to:

     if (src_w == dst_w && src_h == dst_h)

About face detection and face recognition

Hi,
I just wonder:

  1. Where is the "face id vectors" exactly store in CameraWebServer? (flash or RAM?)
  2. And how many face id can it store?
  3. Does face recognition use a one-to-one comparison to get the owner of the face or a one-to-many(face id) method to find the person?
  4. What is the value of FR and FA?
  5. How long does it take on face detection? What about face recognition?

I am new about this.
Hope to get your help soon.
Thank you.

更新esp-dl后,出现了编译错误

更新esp-dl后,出现了如下编译错误:
In file included from ../main/app_recon_process.cpp:22:
../components/esp-dl/include/image/dl_image.hpp:9:10: fatal error: dl_math_matrix.hpp: No such file or directory
#include "dl_math_matrix.hpp"
^~~~~~~~~~~~~~~~~~~~
compilation terminated.

Can't use from functions dl_matrixq_from_matrix3d_qmf and dl_matrixq_from_matrix3d from libdl.a

I'm using the esp-dl API to run MNIST on the ESP-EYE board. In my project, I tried using the functions dl_matrixq_from_matrix3d_qmf and dl_matrixq_from_matrix3d.

During linking, I get the following error
~/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: ~/esp-who/components/esp-face/lib/libdl.a(dl_lib_matrix3dq.c.obj): in function 'dl_matrixq_from_matrix3d_qmf':
/home/yehangyang/Documents/Gitlab/others/dl_lib/components/dl_lib/dl_lib_matrix3dq.c:61: undefined reference to 'rintf'

This error makes me think there's a mistake in the dl_lib_matrix3dq.c file used to make libdl.a. Is this correct? If so, do you have any plans of fixing this in the near future?

Thanks.

Issue while reading file from SD card

Hello,
I want to read a simple text file, after face detection, system crashed when fread function called, writing a txt file/ image file it is working well, I pasted the backtrace please refer

Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x400d8404 PS : 0x00060230 A0 : 0x800d84fc A1 : 0x3ffc4da0
0x400d8404: _fread_r at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/fread.c:194

A2 : 0x3ffc4f6c A3 : 0x3ffc4e00 A4 : 0x00000001 A5 : 0x00000001
A6 : 0x00000000 A7 : 0x3ffb22a8 A8 : 0x00000001 A9 : 0x3ffc4d90
A10 : 0x3ffc4f04 A11 : 0x00000000 A12 : 0x00000000 A13 : 0x000001b6
A14 : 0x00000072 A15 : 0x0000002b SAR : 0x0000000c EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000064 LBEG : 0x40090ac0 LEND : 0x40090acb LCOUNT : 0x00000000
0x40090ac0: memset at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/memset.S:142

0x40090acb: memset at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/memset.S:152

Backtrace: 0x400d8404:0x3ffc4da0 0x400d84f9:0x3ffc4dd0 0x400d59d9:0x3ffc4df0 0x400891a9:0x3ffc4e70
0x400d8404: _fread_r at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/fread.c:194

0x400d84f9: fread at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/fread.c:301

0x400d59d9: task_process at C:\Users\XL008\Desktop\esp-idf\esp-who-master\examples\single_chip\fd_sd\build/../main/app_facenet.c:156

0x400891a9: vPortTaskWrapper at C:/Users/XL008/Desktop/ESP/esp-idf-2/components/freertos/port.c:435

Thanks & Regards,
Kiran

Matrix Slicing

Hello!
I would like to make sure I am using the dl_matrix3d_slice_copy() function correctly.

Suppose I have a matrix with the shape (1,1,1,48)
And I would like to slice the second half into a copy.
Proper usage would look like this:
input shape = (1,1,1,48)
output shape = (1,1,1,24)

dl_matrix3d_slice_copy(output,input,24,2,1,1);

This code does execute, but i believe it is poisoning my heap as I will get an error later.
I have tried multiple combinations of numbers
but one thing remains unclear.
is the x-offset the end point and w the start point?
Thanks!

--if it helps,
this error occurs when using light impact heap debugging
does NOT occur when using basic (no debugging)
both using

heap_caps_check_integrity_all(true)
and looks like

CORRUPT HEAP: Bad tail at 0x3fff63fc. Expected 0xbaad5678 got 0xbb819f89
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x4008ad3c PS : 0x00060633 A0 : 0x8008a6fd A1 : 0x3ffc1180
0x4008ad3c: is_free at /home/caleb/esp/esp-idf/components/heap/multi_heap.c:131
(inlined by) multi_heap_malloc_impl at /home/caleb/esp/esp-idf/components/heap/multi_heap.c:432

Image_get_valid_boxes change (?)

Hi! making an adaptation of your implementation for image pre/post processing for Pnet (I'm setting up MTCNN for a different purpose). I run into the following compilation error (fixed by commenting out config->threshold.score when i call get_valid_boxes.
So, has there been any changes in the library that are different in the repo?
Or am i missing something quite obvious?

error: too many arguments to function 'image_get_valid_boxes'
origin_head[i] = image_get_valid_boxes(....)

Running the compiled form (as shown in the code below) results in a Guru Error

               Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
               Core 0 register dump:

-code
image_resize_linear( .. ) ...
printf("\n[PNET FWD] RESIZED\n");
in->h = height;
in->w = width;
in->stride = in->w * in->c;
printf("\nSET UP IMAGE\n ");
xTaskCreatePinnedToCore(&pnetCore1,"core2Print",50000,in,5,&pHandle,1);
//vTaskDelete(&pHandle);

vTaskDelay(1000/portTICK_PERIOD_MS);
printf("\n[PNET FWD] BACK FROM convolutions\n\n");
printf("\n\n..config w: %i \n",(&config->w));
// if (output )
// {
printf("\n\nSKELETON KEY: %p\n\n",skeletonKey);
//xSemaphoreTake(skeletonKey,portMAX_DELAY);
printf("\n\n..getting valid boxes..\n\n\n");//%i.",
(&config->w));

        origin_head[i] = image_get_valid_boxes(output->category->item,
                                               output->offset->item,
                                               NULL,
                                               output->category->w,
                                               output->category->h,
                                               1,
                                               &config->w,
                                              // config->threshold.score,
                                               2,
                                               scale,
                                               scale,
                                               false);

...and so on with further processing

--found the compilation error, but still getting a Guru load error
compilation fix:
origin_head[i] = image_get_valid_boxes(
output->category->item,
output->offset->item,
NULL,
output->category->w,
output->category->h,
1,
&config->w,
config->threshold.score,
2,
scale,
//scale,
false);

关于conv2d类型的错误

l7_gpool("l7_global_pool"),
l8_cp(Conv2D<int16_t>(-14, get_l8_full_c_filter(), get_l8_full_c_bias(), NULL, PADDING_VALID, 1, 1, "l8_compress")){}

编译上面的代码时,显示类型的错误如下:
In file included from ../main/app_order_recon.cpp:17:
../main/includes/order_model.hpp: In constructor 'ORDER::ORDER()':
../main/includes/order_model.hpp:53:129: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
l8_cp(Conv2D<int16_t>(-14, get_l8_full_c_filter(), get_l8_full_c_bias(), NULL, PADDING_VALID, 1, 1, "l8_compress")){}

但是没找到哪里类型不对

esp-face -> esp-object (DL - Component)

Hello and thank you for the very interesting features you provide
with the esp-face component.

Hopefully probably soon you provide more insight into the DL(DeepLearning)-Framework, that you are using.

Will there be more details how to train other objects to be detected?

It would be very comforting if I possibly could train an esp-camera
for any or say some more specialized objects like balls, pyramids, cars or teddy bears.

Especially if these detections could be made a little faster for more simple objects
the field of application(i.e. Robot-Arm-Grasping) of my esp-camera would rise enormously.

Would you mind to give any time-frame when you explain in more detail your
DL-Framework?

Thank you very much so far.

Failure while building tutorial/test

Hi,

I'm trying to get the tutorial compiled but get an error.
[982/983] Linking CXX executable test.elf FAILED: test.elf : && /home/raf/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ -mlongcalls -Wno-frame-address CMakeFiles/test.elf.dir/project_elf_src_esp32.c.obj -o test.elf esp-idf/esp_pm/libesp_pm.a esp-idf/mbedtls/libmbedtls.a esp-idf/efuse/libefuse.a esp-idf/bootloader_support/libbootloader_support.a esp-idf/app_update/libapp_update.a esp-idf/esp_ipc/libesp_ipc.a esp-idf/spi_flash/libspi_flash.a esp-idf/nvs_flash/libnvs_flash.a esp-idf/pthread/libpthread.a esp-idf/esp_gdbstub/libesp_gdbstub.a esp-idf/esp_system/libesp_system.a esp-idf/esp_rom/libesp_rom.a esp-idf/hal/libhal.a esp-idf/vfs/libvfs.a esp-idf/esp_eth/libesp_eth.a esp-idf/tcpip_adapter/libtcpip_adapter.a esp-idf/esp_netif/libesp_netif.a esp-idf/esp_event/libesp_event.a esp-idf/wpa_supplicant/libwpa_supplicant.a esp-idf/esp_wifi/libesp_wifi.a esp-idf/lwip/liblwip.a esp-idf/log/liblog.a esp-idf/heap/libheap.a esp-idf/soc/libsoc.a esp-idf/esp_hw_support/libesp_hw_support.a esp-idf/esp_ringbuf/libesp_ringbuf.a esp-idf/driver/libdriver.a esp-idf/xtensa/libxtensa.a esp-idf/espcoredump/libespcoredump.a esp-idf/perfmon/libperfmon.a esp-idf/esp32/libesp32.a esp-idf/esp_common/libesp_common.a esp-idf/esp_timer/libesp_timer.a esp-idf/freertos/libfreertos.a esp-idf/newlib/libnewlib.a esp-idf/cxx/libcxx.a esp-idf/app_trace/libapp_trace.a esp-idf/asio/libasio.a esp-idf/cbor/libcbor.a esp-idf/unity/libunity.a esp-idf/cmock/libcmock.a esp-idf/coap/libcoap.a esp-idf/console/libconsole.a esp-idf/nghttp/libnghttp.a esp-idf/esp-tls/libesp-tls.a esp-idf/esp_adc_cal/libesp_adc_cal.a esp-idf/esp_hid/libesp_hid.a esp-idf/tcp_transport/libtcp_transport.a esp-idf/esp_http_client/libesp_http_client.a esp-idf/esp_http_server/libesp_http_server.a esp-idf/esp_https_ota/libesp_https_ota.a esp-idf/protobuf-c/libprotobuf-c.a esp-idf/protocomm/libprotocomm.a esp-idf/mdns/libmdns.a esp-idf/esp_local_ctrl/libesp_local_ctrl.a esp-idf/sdmmc/libsdmmc.a esp-idf/esp_serial_slave_link/libesp_serial_slave_link.a esp-idf/esp_websocket_client/libesp_websocket_client.a esp-idf/expat/libexpat.a esp-idf/wear_levelling/libwear_levelling.a esp-idf/fatfs/libfatfs.a esp-idf/freemodbus/libfreemodbus.a esp-idf/jsmn/libjsmn.a esp-idf/json/libjson.a esp-idf/libsodium/liblibsodium.a esp-idf/mqtt/libmqtt.a esp-idf/openssl/libopenssl.a esp-idf/spiffs/libspiffs.a esp-idf/ulp/libulp.a esp-idf/wifi_provisioning/libwifi_provisioning.a esp-idf/main/libmain.a -Wl,--cref -Wl,--Map=/home/raf/esp-who/components/esp-face/tutorial/test/build/test.map -fno-rtti -fno-lto esp-idf/asio/libasio.a esp-idf/cbor/libcbor.a esp-idf/cmock/libcmock.a esp-idf/unity/libunity.a esp-idf/coap/libcoap.a esp-idf/esp_adc_cal/libesp_adc_cal.a esp-idf/esp_hid/libesp_hid.a esp-idf/esp_local_ctrl/libesp_local_ctrl.a esp-idf/esp_websocket_client/libesp_websocket_client.a esp-idf/expat/libexpat.a esp-idf/fatfs/libfatfs.a esp-idf/wear_levelling/libwear_levelling.a esp-idf/freemodbus/libfreemodbus.a esp-idf/jsmn/libjsmn.a esp-idf/libsodium/liblibsodium.a esp-idf/mqtt/libmqtt.a esp-idf/openssl/libopenssl.a esp-idf/spiffs/libspiffs.a esp-idf/wifi_provisioning/libwifi_provisioning.a esp-idf/protocomm/libprotocomm.a esp-idf/protobuf-c/libprotobuf-c.a esp-idf/mdns/libmdns.a esp-idf/console/libconsole.a esp-idf/json/libjson.a esp-idf/esp_pm/libesp_pm.a esp-idf/mbedtls/libmbedtls.a esp-idf/efuse/libefuse.a esp-idf/bootloader_support/libbootloader_support.a esp-idf/app_update/libapp_update.a esp-idf/esp_ipc/libesp_ipc.a esp-idf/spi_flash/libspi_flash.a esp-idf/nvs_flash/libnvs_flash.a esp-idf/pthread/libpthread.a esp-idf/esp_gdbstub/libesp_gdbstub.a esp-idf/esp_system/libesp_system.a esp-idf/esp_rom/libesp_rom.a esp-idf/hal/libhal.a esp-idf/vfs/libvfs.a esp-idf/esp_eth/libesp_eth.a esp-idf/tcpip_adapter/libtcpip_adapter.a esp-idf/esp_netif/libesp_netif.a esp-idf/esp_event/libesp_event.a esp-idf/wpa_supplicant/libwpa_supplicant.a esp-idf/esp_wifi/libesp_wifi.a esp-idf/lwip/liblwip.a esp-idf/log/liblog.a esp-idf/heap/libheap.a esp-idf/soc/libsoc.a esp-idf/esp_hw_support/libesp_hw_support.a esp-idf/esp_ringbuf/libesp_ringbuf.a esp-idf/driver/libdriver.a esp-idf/xtensa/libxtensa.a esp-idf/espcoredump/libespcoredump.a esp-idf/perfmon/libperfmon.a esp-idf/esp32/libesp32.a esp-idf/esp_common/libesp_common.a esp-idf/esp_timer/libesp_timer.a esp-idf/freertos/libfreertos.a esp-idf/newlib/libnewlib.a esp-idf/cxx/libcxx.a esp-idf/app_trace/libapp_trace.a esp-idf/nghttp/libnghttp.a esp-idf/esp-tls/libesp-tls.a esp-idf/tcp_transport/libtcp_transport.a esp-idf/esp_http_client/libesp_http_client.a esp-idf/esp_http_server/libesp_http_server.a esp-idf/esp_https_ota/libesp_https_ota.a esp-idf/sdmmc/libsdmmc.a esp-idf/esp_serial_slave_link/libesp_serial_slave_link.a esp-idf/ulp/libulp.a esp-idf/mbedtls/mbedtls/library/libmbedtls.a esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a esp-idf/mbedtls/mbedtls/library/libmbedx509.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libcoexist.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libcore.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libespnow.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libmesh.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libnet80211.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libpp.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/librtc.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libsmartconfig.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libphy.a esp-idf/esp_pm/libesp_pm.a esp-idf/mbedtls/libmbedtls.a esp-idf/efuse/libefuse.a esp-idf/bootloader_support/libbootloader_support.a esp-idf/app_update/libapp_update.a esp-idf/esp_ipc/libesp_ipc.a esp-idf/spi_flash/libspi_flash.a esp-idf/nvs_flash/libnvs_flash.a esp-idf/pthread/libpthread.a esp-idf/esp_gdbstub/libesp_gdbstub.a esp-idf/esp_system/libesp_system.a esp-idf/esp_rom/libesp_rom.a esp-idf/hal/libhal.a esp-idf/vfs/libvfs.a esp-idf/esp_eth/libesp_eth.a esp-idf/tcpip_adapter/libtcpip_adapter.a esp-idf/esp_netif/libesp_netif.a esp-idf/esp_event/libesp_event.a esp-idf/wpa_supplicant/libwpa_supplicant.a esp-idf/esp_wifi/libesp_wifi.a esp-idf/lwip/liblwip.a esp-idf/log/liblog.a esp-idf/heap/libheap.a esp-idf/soc/libsoc.a esp-idf/esp_hw_support/libesp_hw_support.a esp-idf/esp_ringbuf/libesp_ringbuf.a esp-idf/driver/libdriver.a esp-idf/xtensa/libxtensa.a esp-idf/espcoredump/libespcoredump.a esp-idf/perfmon/libperfmon.a esp-idf/esp32/libesp32.a esp-idf/esp_common/libesp_common.a esp-idf/esp_timer/libesp_timer.a esp-idf/freertos/libfreertos.a esp-idf/newlib/libnewlib.a esp-idf/cxx/libcxx.a esp-idf/app_trace/libapp_trace.a esp-idf/nghttp/libnghttp.a esp-idf/esp-tls/libesp-tls.a esp-idf/tcp_transport/libtcp_transport.a esp-idf/esp_http_client/libesp_http_client.a esp-idf/esp_http_server/libesp_http_server.a esp-idf/esp_https_ota/libesp_https_ota.a esp-idf/sdmmc/libsdmmc.a esp-idf/esp_serial_slave_link/libesp_serial_slave_link.a esp-idf/ulp/libulp.a esp-idf/mbedtls/mbedtls/library/libmbedtls.a esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a esp-idf/mbedtls/mbedtls/library/libmbedx509.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libcoexist.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libcore.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libespnow.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libmesh.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libnet80211.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libpp.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/librtc.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libsmartconfig.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libphy.a esp-idf/esp_pm/libesp_pm.a esp-idf/mbedtls/libmbedtls.a esp-idf/efuse/libefuse.a esp-idf/bootloader_support/libbootloader_support.a esp-idf/app_update/libapp_update.a esp-idf/esp_ipc/libesp_ipc.a esp-idf/spi_flash/libspi_flash.a esp-idf/nvs_flash/libnvs_flash.a esp-idf/pthread/libpthread.a esp-idf/esp_gdbstub/libesp_gdbstub.a esp-idf/esp_system/libesp_system.a esp-idf/esp_rom/libesp_rom.a esp-idf/hal/libhal.a esp-idf/vfs/libvfs.a esp-idf/esp_eth/libesp_eth.a esp-idf/tcpip_adapter/libtcpip_adapter.a esp-idf/esp_netif/libesp_netif.a esp-idf/esp_event/libesp_event.a esp-idf/wpa_supplicant/libwpa_supplicant.a esp-idf/esp_wifi/libesp_wifi.a esp-idf/lwip/liblwip.a esp-idf/log/liblog.a esp-idf/heap/libheap.a esp-idf/soc/libsoc.a esp-idf/esp_hw_support/libesp_hw_support.a esp-idf/esp_ringbuf/libesp_ringbuf.a esp-idf/driver/libdriver.a esp-idf/xtensa/libxtensa.a esp-idf/espcoredump/libespcoredump.a esp-idf/perfmon/libperfmon.a esp-idf/esp32/libesp32.a esp-idf/esp_common/libesp_common.a esp-idf/esp_timer/libesp_timer.a esp-idf/freertos/libfreertos.a esp-idf/newlib/libnewlib.a esp-idf/cxx/libcxx.a esp-idf/app_trace/libapp_trace.a esp-idf/nghttp/libnghttp.a esp-idf/esp-tls/libesp-tls.a esp-idf/tcp_transport/libtcp_transport.a esp-idf/esp_http_client/libesp_http_client.a esp-idf/esp_http_server/libesp_http_server.a esp-idf/esp_https_ota/libesp_https_ota.a esp-idf/sdmmc/libsdmmc.a esp-idf/esp_serial_slave_link/libesp_serial_slave_link.a esp-idf/ulp/libulp.a esp-idf/mbedtls/mbedtls/library/libmbedtls.a esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a esp-idf/mbedtls/mbedtls/library/libmbedx509.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libcoexist.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libcore.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libespnow.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libmesh.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libnet80211.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libpp.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/librtc.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libsmartconfig.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libphy.a esp-idf/esp_pm/libesp_pm.a esp-idf/mbedtls/libmbedtls.a esp-idf/efuse/libefuse.a esp-idf/bootloader_support/libbootloader_support.a esp-idf/app_update/libapp_update.a esp-idf/esp_ipc/libesp_ipc.a esp-idf/spi_flash/libspi_flash.a esp-idf/nvs_flash/libnvs_flash.a esp-idf/pthread/libpthread.a esp-idf/esp_gdbstub/libesp_gdbstub.a esp-idf/esp_system/libesp_system.a esp-idf/esp_rom/libesp_rom.a esp-idf/hal/libhal.a esp-idf/vfs/libvfs.a esp-idf/esp_eth/libesp_eth.a esp-idf/tcpip_adapter/libtcpip_adapter.a esp-idf/esp_netif/libesp_netif.a esp-idf/esp_event/libesp_event.a esp-idf/wpa_supplicant/libwpa_supplicant.a esp-idf/esp_wifi/libesp_wifi.a esp-idf/lwip/liblwip.a esp-idf/log/liblog.a esp-idf/heap/libheap.a esp-idf/soc/libsoc.a esp-idf/esp_hw_support/libesp_hw_support.a esp-idf/esp_ringbuf/libesp_ringbuf.a esp-idf/driver/libdriver.a esp-idf/xtensa/libxtensa.a esp-idf/espcoredump/libespcoredump.a esp-idf/perfmon/libperfmon.a esp-idf/esp32/libesp32.a esp-idf/esp_common/libesp_common.a esp-idf/esp_timer/libesp_timer.a esp-idf/freertos/libfreertos.a esp-idf/newlib/libnewlib.a esp-idf/cxx/libcxx.a esp-idf/app_trace/libapp_trace.a esp-idf/nghttp/libnghttp.a esp-idf/esp-tls/libesp-tls.a esp-idf/tcp_transport/libtcp_transport.a esp-idf/esp_http_client/libesp_http_client.a esp-idf/esp_http_server/libesp_http_server.a esp-idf/esp_https_ota/libesp_https_ota.a esp-idf/sdmmc/libsdmmc.a esp-idf/esp_serial_slave_link/libesp_serial_slave_link.a esp-idf/ulp/libulp.a esp-idf/mbedtls/mbedtls/library/libmbedtls.a esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a esp-idf/mbedtls/mbedtls/library/libmbedx509.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libcoexist.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libcore.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libespnow.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libmesh.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libnet80211.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libpp.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/librtc.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libsmartconfig.a /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32/libphy.a -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u ld_include_panic_highint_hdl -u start_app -u start_app_other_cores -L /home/raf/esp/esp-idf/components/esp_rom/esp32/ld -T esp32.rom.ld -T esp32.rom.api.ld -T esp32.rom.libgcc.ld -T esp32.rom.newlib-data.ld -T esp32.rom.syscalls.ld -T esp32.rom.newlib-funcs.ld -T esp32.rom.newlib-time.ld -u vfs_include_syscalls_impl -L /home/raf/esp/esp-idf/components/esp_wifi/lib/esp32 /home/raf/esp/esp-idf/components/xtensa/esp32/libxt_hal.a -L /home/raf/esp-who/components/esp-face/tutorial/test/build/esp-idf/esp32 -T esp32_out.ld -L /home/raf/esp-who/components/esp-face/tutorial/test/build/esp-idf/esp32/ld -T esp32.project.ld -L /home/raf/esp/esp-idf/components/esp32/ld -T esp32.peripherals.ld -u call_user_start_cpu0 -Wl,--gc-sections -Wl,--undefined=uxTopUsedPriority -u app_main -lm esp-idf/newlib/libnewlib.a -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -lgcc -u __cxa_guard_dummy -lstdc++ esp-idf/pthread/libpthread.a -u __cxx_fatal_exception esp-idf/app_trace/libapp_trace.a -lgcov esp-idf/app_trace/libapp_trace.a -lgcov -lc -L /home/raf/esp-who/components/esp-face/tutorial/test/main/../../../lib -ldl_lib && : /home/raf/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: cannot find -ldl_lib collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. ninja failed with exit code 1
Tried to find something with google, but no luck.

Someone an Idea how to fix?

Thank you in advance.

Incorrect results returned by dl_matrix3dff_conv_3x3

Hi team,
I compared the dl_matrix3dff_conv_3x3 and dl_matrix3dff_conv_common functions, but the dl_matrix3dff_conv_3x3 function gives incorrect output, when n > 1.
Attached is the test example to reproduce the error.
The output of the example code is printed below.
Please note that the results are incorrect for the case n > 1 (n - number of filters in convolution kernel).

conv_test.txt

image

no such file :ref_id.h

CC build/main/main.o
C:/msys32/home/Jiangyinhu/exam/esp-face-master/main/main.c:11:20: fatal error: ref_id.h: No such file or directory

Eye blink detection

Hi, is it possible to detect eyes and blink detection? Thanks in advance.

Please Help!!!! - frmn.c

I need a copy of frmn.c. I am using esp-face on my esp32 for a school project, and my professor wants my group to do the facial recognition part. I know that face_id has the feature extractions that I need for facial recognition. I just do not know what those 512 elements are measuring.

Any help is appreciated. Thank you.

Face detection failure

I am developing a face recognizing by ESP-EYE, But the face detection fail every frequently.
I found the P-Net result is OK, but the R-Net return NULL when I input e normal face.
Could I do something refine it?
Thanks!

In <dl_matrix3dff_conv_common> function the bias weights are not taken into account.

input
cnn3x3_with_1_bias_weight
cnn3x3_with_0_bias_weight
one conv layer
conv_output_with_1_bias_weight
conv_output_with_0_bias_weight

I used "dl_matrix3dff_conv_common(dl_matrix3d_t *in, dl_matrix3d_t *filter, dl_matrix3d_t *bias, int stride_x, int stride_y, dl_padding_type padding)" function with different bias weights, but there are no changing results. This is a small test program with 4x4 input data, where I run the program in the case of 0 bias weight and in the case of 1 bias weight and I get the same result.

Can I get the code of the DL framework?

Hi, currently I am trying to use ESP32 to run DL algorithms and my algorithm is a variant of MobileNet. I wonder whether I could get the code of this DL framework for further development. Thank you.

How to store enrolled faces on Firebase instead of on flash? (AIV-403)

I'm currently doing facial recognition for my office, and given the number of people, I thought it would be better to store the data of the enrolled faces and their matching ids in a firebase database. However even after reading all the documentation, I still don't know what specific values of variables I need to send to the database, as well as what I would call from the database.

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.