About a year ago, I tried to explore Face Detection/Recognition via a tutorial on the site.
I always failed regardless of what board I used (I bought several in my desire to succeed.)
Well, I’m back!
I recently viewed the eBook “ESP32_CAM_Projects_eBook_V1_3”.
In Module 5, the project is Face Recognition/Detection.
I would like to try again and this time I hope to succeed.
Here is my question: When was the last time this Module 5 project was actually run and verified to work as the document describes it?
Is this Module 5 project, as described in the eBook, known to work.
If the answer is YES, then I would like to know exactly what ESP32 board to buy.
At one point, there seemed to be an issue of whether the ESP32 board had an S2 chip or and S3 chip.
I seemed to recall being told the S3 chip was required — that is the reason I bought another ESP32 board with the S3 chip — to no avail.
After reading the instructions for Module 5 in the eBook, I think the ideal board would have an S3 chip and a USB connector for uploading and maximum PSRAM. The Module 5 instructions mention several ESP32 boards and I’m OK with getting any of them regardless of the cost.
I am more focused on succeeding rather than keeping track of costs!
If I buy the right stuff, will I have a very high probability of success?
Ray
Hi.
After your question, I went to test project 5.1 again.
I just tested project 5.1 a few minutes ago (Face Dectection Video Streaming (Age, Face expression, etc) and it is working right out of the box. I tested it with the ESP32-CAM AI-Thinker. I just inserted my network credentials and it is working.
Is this the project you’re referring to? Or are you referring to other project?
Regards,
Sara
Sara,
Thanks. It appears to be working.
The only problem I have now is; Where am I going to find the ESP32-CAM AI-Thinker board?
As you’re probably aware that board is rather old and not very much available, as far as I’ve been able to determine through my wonderings on the Internet.
If I’m wrong about its availability or there is another board, known to work, please let me know.
I have found quite a few ESP32-CAM boards, but they don’t have “AI-Thinker” etched on top of the chip.
They have “ESP32-S”. I checked Esp32-cam Esp32-cam-mb Micro Usb Esp32 Serial To Wifi Esp32 Cam Development Board Ch340 Ch340g 5v Bluetooth+ov2640 Camera,temu
One of the pictures has “Ai” without the “Thinker”, while the other does not have either.
I have no problem paying a premium for the board that is the correct one.
I don’t have to deal with the Asian community and the lower prices.
If you know of a vendor selling the CORRECT board, I’m happy to shop there.
One final question, does the board you used to show me it works have the S2 or the S3 chip?
Ray
Sara,
I forgot to answer your actual question to me at the end of the demo.
If by, “project 5.1”, you mean “Module 5, Unit 1” as specified in the PDF document;
“ESP32_CAM_Projects_eBook_V1_3”, then YES, that is the project I’m referring to.
Ray
Hi again.
It doesn’t matter if they don’t have the “Ai-Thinker” label. What boards do you have already?
Can you send me a picture of the boards that you have?
To share a picture, upload it to google drive, or dropbox, or imgur and then share a link to the file.
Regards,
Sara
Sara,
I’m sending you pictures of the ESP32/OV2640 boards I have:
https://www.dropbox.com/scl/fo/rakflahoc19y6v6ws0fc5/h?rlkey=yq2mhtxsj87jyxelde0ifnww1&dl=0
For some boards, I sent a picture of both sides of the board so you could see the ESP32 chip.
I only have 1 board with an S3 chip and I can’t get it to work at all because it is not one of the boards listed in the program’s list of cameras and I don’t know how to find out the pin assignments so I can create a pin list (camera_pins.h) as is suggested in the tutorial.
Some of the other boards (S2 chips) work for Face Detection ONLY (as was told).
I have 3 of the ESP32-CAM boards with the ESP32-CAM-MB, but I can’t seem to get them to work — so, I use the FTDI board you can see in one of the pictures.
I just realized that the demo you showed me of the Module 5, Unit 1 from the eBook I mentioned is only showing Face Detection, Not Recognition.
I suppose that is because either you don’t have a board with the S3 chip or you don’t have code that is supposed to work with S3 chip doing Face Recognition?
I don’t get Age and Face Expression as you show in the demo, I wonder why?
I am slowly coming to the conclusion that I can never succeed in get Face Recognition to work!
If you are convinced I should be able to achieve that (Face Recognition), then what board should I buy and is the code from the Model 5, Unit 1 of the eBook correct as published?
I have the impression that I need one of the boards mentioned in the camera_pins.h file such as “CAMERA_MODEL_ESP32S3_EYE”, since it mentions “S3” in the name!
What do you think?
Ray
Hi.
All those boards should work for project 5.1 (the S3 should also work, even though I haven’t tested it)
I think there is a misunderstanding.I think you’re referring to other project.
Project 5.1 is not supposed to do face recognition. It’s only face detection.
Maybe you’re referring to project 1.3?
Reegards,
Sara
I’ve just remembered that we ordered one of those ESP32-S3 a few months ago and never tested it.
I just tried it with the ESPCameraWebServer example and it works for face recognition.
Here are the settings you need to use that board.
1- Make sure you’re connecting the USB cable to the USB-UART
2- In tools > board, select ESP32S3 Dev Module
3 – Go to Tools > PSRAM and select OPI PSRAM
4- Go to Tools > Partion Scheme > Huge App (3MB no OTA /1MB SPIFFS)
5 – Go to Tools > Flash Mode and select DIO 80MHz
6- Then, make sure you add the right pinout for that board that is as follows:
#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 15
#define SIOD_GPIO_NUM 4
#define SIOC_GPIO_NUM 5
#define Y9_GPIO_NUM 16
#define Y8_GPIO_NUM 17
#define Y7_GPIO_NUM 18
#define Y6_GPIO_NUM 12
#define Y5_GPIO_NUM 10
#define Y4_GPIO_NUM 8
#define Y3_GPIO_NUM 9
#define Y2_GPIO_NUM 11
#define VSYNC_GPIO_NUM 6
#define HREF_GPIO_NUM 7
#define PCLK_GPIO_NUM 13
Then, upload the code to your board.
You may get the “core dump partition not found” warning. It’s just a warning, not an error. The code still works and it will print your IP address after connection to wi-fi (don’t forget to insert your network credentials).
I just tested it and face recognition is working for the Freenove S3 board, the same as yours. My picture is a bit blurry and black because I’m testing this at night.
I hope this helps.
Regards,
Sara
Sara,
You are correct about me getting confused between 5.1 and 1.3. I did want to do 1.3.
In my previous reply, I mentioned I had just realized my mistake as I was composing that reply.
I believe I followed all your instructions in both your reply to me and in part 1.3 of the tutorial.
I FAILED again.
Here is the URL for the Dropbox file where I’ve tried to provide information, I hope helps discover what I may be doing wrong:
https://www.dropbox.com/scl/fi/p7pouxnjr8zpdrsv83cxe/CameraWEB.odt?rlkey=99aygwrj4xrvxw7dabr54b5la&dl=0
Thanks for your help, I’m still a little hopeful.
Ray
Sara,
I have it working. Dumb me! I selected the wrong camera,
— “CAMERA_MODEL_ESP_EYE” instead of “CAMERA_MODEL_ESP32S3_EYE”.
Once I did that, it worked, although I get a continuous stream of the same message on the serial ouput:
E (26864) ledc: ledc_set_duty(720): LEDC is not initialized
E (26865) ledc: ledc_update_duty(648): LEDC is not initialized
I don’t know what it means — do you get the same output?
One thing I have never been able to figure out is: How do I know when the Enroll Face operation is complete so I an check out the Face Detection?
The only time I have ever seen the “Intruder Alert” message is after a clean load and 1st run of the sketch.
Everthing is extremely SLOW — it takes a long time before my image changes as I change my position slightly!
Am I supposed to press any of the buttons AFTER I press “Enroll Face”?
To put it quite simply, I don’t know how to operate the program!
Thanks,
Ray
Sara,
I somehow don’t get the messages I previously got that are shown above:
E (26864) ledc: ledc_set_duty(720): LEDC is not initialized
E (26865) ledc: ledc_update_duty(648): LEDC is not initialized
Now, I am getting this output on the serial monitor:
………
WiFi connected
[0;31mE (4799) MFN: Partition Not found[0m
[0;31mE (4800) MFN: Please Set the Partition[0m
Camera Ready! Use ‘http://192.168.1.177’ to connect
I wonder if this might be the reason its so slow?
I do have the settings you mentioned above:
1- Make sure you’re connecting the USB cable to the USB-UART
2- In tools > board, select ESP32S3 Dev Module
3 – Go to Tools > PSRAM and select OPI PSRAM
4- Go to Tools > Partion Scheme > Huge App (3MB no OTA /1MB SPIFFS)
5 – Go to Tools > Flash Mode and select DIO 80MHz
My next attempt to deal with this will be to use a laptop so I can get right next to the router since I’m using the on-board antenna.
Meanwhile, do you have any ideas about this strange output I get concerning the “Partition Not found”?
Ray
Hi Ray.
As I mentioned previously, you may get the “core dump partition not found” warning. It’s just a warning, not an error. The code still works and it will print your IP address after connection to wi-fi.
Face recognition and detection are extremely slow. It’s normal… It’s a lot of processing for such a tiny board.
To operate the program:
1- open the web browser and type your board IP address.
2.- Select Resolution: QVGA (320 x240)
3 – Click Start Stream
4- Enable the Face Detection and Face Recognition
5 – Look at the camera and click enroll face
6. wait a few seconds until it draws a green rectangle around your face. From then on it will recognize your face by drawing a green square around it.
7 – If another person shows up on the screen, it will print the “Intruder alert” message.
I hope this helps.
Regards,
Sara
Sara,
I realized you mentioned the message “core dump partition not found”, but in addition to that message I got, and asked you about these 2 messages:
E (26864) ledc: ledc_set_duty(720): LEDC is not initialized
E (26865) ledc: ledc_update_duty(648): LEDC is not initialized
Also, I guess you are saying that these messages:
0;31mE (4799) MFN: Partition Not found[0m
[0;31mE (4800) MFN: Please Set the Partition[0m
are the same as what you referred to as “core dump…”.
I’m quite confused about the messages.
However, the program does appear to work, even though it is very slow.
I see the green rectangle, but it also has some kind of matrix notation which is changing and I wasn’t sure how I would know when the program is done “enrolling” my face?
I thought I would be given a clear indication of when the enrolling is done and the face recognition is now starting.
From what you have said above, as soon as the green rectangle goes away, the face has been enrolled and can subsequently be recognized?
Is that correct?
Anyway, it appears to work.
I wish I could find an ESP32-S3 with camera (ov2640) AND antenna choice like I have with the non-S3 ESP32 “Thinker” board. All my boards that use the off-board antenna don’t have S3 chips.
Thanks for all your help, I really appreciate the patience.
Ray
P.S. I mark this one “done”!
Hi.
Yes, I also get those errors. Not sure why…
“From what you have said above, as soon as the green rectangle goes away, the face has been enrolled and can subsequently be recognized?” Yes….I think it’s that way…
Previously, that example worked better (when it was compatible with boards that are not S3). But, after the updates, I think it’s more confusing and slower…
I’ll close this issue.
If you need further help, you just need to open a new question in our forum.
Regards,
Sara