Testing ESP32-CAM
I just got an ESP32-CAM from a friend, but he's not sure if it's working properly. I'm testing it using the Arduino IDE with the example camera code. I’ve wired the ESP32-CAM to an Arduino as the programmer. The code uploads successfully, but I gett this error in the serial monitor:
62 Replies
interesting...
i never gotten this error
in the code
did you choose the correct board?
there are like 4 - 5 boards when i was tested it with arduino IDE
Since the code uploaded ,i think it's the correct board...
i mean the board selection from the code itself, not arduino IDE
because the soc family is same, it would upload
but PSRAM changes in different soc spec
Either the psram is faulty or misconfigured.
Or could there be esp32cam variants that come without the psram?
I think arduino offered a way to configure the psram, no?
when i used the example
it used #defines boards
where you uncomment the board, you want to use
I also know that the camera can work without the psram but do not expect fancy resolutions.😅
i think the stream would slower
havnt had one without PSRAM to confirm
@wafa_ath maybe ask google how you can manually configure your psram in arduino and see if the issue persists.
I imagine your model will need some decent resolution.
Ow yes i did that too
as @32bitSaviour said
try manually configure the PSRAM
Okay, thank i will see
@wafa_ath
You can flash this to your board to test PSRAM with zephyr.
https://github.com/zephyrproject-rtos/zephyr/blob/main/tests%2Fboards%2Fespressif%2Fcache_coex%2Fsrc%2Fcache_coex.c#L263
GitHub
zephyr/tests/boards/espressif/cache_coex/src/cache_coex.c at main ·...
Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures. - zephyrproject-rtos/zephyr
Happy news @32bitSaviour, the ESP32-CAM worked fine,but the model I trained is in YOLOv5, and I need to retrain or convert it to TensorFlow Lite (a fairly simple process) to make it compatible for deployment on the ESP32-CAM.
yes I want to see hoe the Tensorflow Lite model works
With Zephyr?
Absolutely that why i tagged you
I take (simple process) back 🙂, apparently Yolov5 and tansorflow lite have different architecture make Yolov5 much faster training an object detection model, in tansorflow lite it took sooo much time comparing (not doing much but the waiting is killing )
wait but why are you training in tensorflow lite. Why not the Tensorfloe then we convert to lite?
My mistake, i mean tansorflow and not tansorflow lite
Yes exactly what am trying to do
thank you keep trying!
i did it actually. I deployed a YoloV5 model on a esp32 .
https://github.com/daleonpz/POC_CV_tinyml
I have scripts in python that may help you. Also I documented step by step the process
GitHub
GitHub - daleonpz/POC_CV_tinyml: Screw type detection using ESP-EYE...
Screw type detection using ESP-EYE and TensorFlow Lite Micro for real-time classification on ESP32. - daleonpz/POC_CV_tinyml
That’s great! So, after training the model with YOLOv5, you converted it to TFLite format for quantization, right? Since YOLOv5 is trained with PyTorch and TensorFlow Lite uses a different architecture, how did it handle the conversion process?
the python library handles it for me.. you just need to give the right parameters to convert from pytorch to tf, then i convert the tf to tflite using a script I wrote, which gives me at the end the C array
Oh i see , so you go from yolo pytorch to tf than convert it to tf lite , in case like me witch i already have Yolov5 trained model it would help me , but if someone wants to build from the beginning don't you think it's an extra steps or does it have butter results?
I cannot say, I did'nt compare the outputs. But I got a pytorch model and I needed a tflite, so I did what was necessary to get the format I wanted
Thank you so much for sharing this, it's really helpful
Setting up the environment is harder than the actual work (ps: it's my first time with zephyr) 😅
Are you stuck? Do you need assistance?
i'm working with zephyr too, pretty new to it, it's really difficult
what challenges are you having?
check out this tutorial https://interrupt.memfault.com/blog/practical_zephyr_basics
that may help
am just trying to figure out how to setup esp32-cam with zephyr
what are you working on
what part is difficult Wafa?
just all the configuration that is in there. when something doesn't compile, it's not always easy to understand why because there are so many settings behind the scenes. i have no problem with writing code as that is basically the same. also the rtt screwed me up at one point because i didn't have it set to automatically look for the address but use a fixed one and for a few days things were working sometimes and sometimes they weren't and it drove me nuts until i saw that and fixed the rtt setting.
it's a sensor, battery powered, using nordic's processor with nrf connect sdk
you're trying to run zephyr on the esp32? i played with esp32 cam but for me the arduino-style code worked the best/quickest.
Yes i did the Arduino-style code and it worked fine , but i am trying to learn zephyr 😅
that's a great reason actually. i would suggest to use a different processor, nrf52840 and use nordic nrf connect sdk. i don't know about esp32 on this but nordic has really good zephyr tutorials in the form of courses. 2 boards come to mind, Seeed Studio XIAO nRF52840, only $14 to $17, and nrf52840 dk, costs about $50. take a look at their beginner course to see what i mean: https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/
Nordic Developer Academy
nRF Connect SDK Fundamentals - Nordic Developer Academy
Firmware Development nRF Connect SDK Fundamentals Course description nRF Connect SDK Fundamentals is a self-paced hands-on online course focusing on learning the essentials of firmware development using the highly extensible and feature-rich nRF Connect SDK. The nRF Connect Software Development Kit contains a highly configurable real-time operat...
Wafa what is the difficulty with running Zephyr on Esp32, @32bitSaviour and I have done it with ease
Oh maybe because am new 😅 , so i saw Zephyr does support ESP32 boards, but it doesn't provide direct, support for the ESP32-CAM module. that require custom configuration.
Oh I see, is the CAM module closed source
I would think there is support
i remember there is
OV series recently got added
by charles
if i am not wrong
yeah that's what I thought, if we identlgy what image sensor it is
the rest is just hooking up
i am also almost done with SPI driver
but it's very hacky at this point
need to clean it up🫠
I want to see the hacky version
please can we have a session on it?
GitHub
GitHub - malto101/zephyr at k3_mcspi_testing
Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures. - GitHub - malto101/zephyr at k3_mcspi_testing
digging into this after OH
feedback is very much welcome
Just some overlay files to tell Zephyr what and where things are. We can do this.