Code Monkey home page Code Monkey logo

Comments (10)

luisomoreau avatar luisomoreau commented on June 9, 2024 1

Thanks for this, I'm adding this to the code!

from example-esp32-cam.

luisomoreau avatar luisomoreau commented on June 9, 2024

Hello @Jakub-Bielawski,
Can you make sure you have selected one of the ESP board in the board manager please. This error usually appears when trying to compile for the Arduino Uno.
You can try to compile with the AI Thinker board to make sure it works.
If it does not work, can you try removing the ESP boards and install them again

from example-esp32-cam.

Jakub-Bielawski avatar Jakub-Bielawski commented on June 9, 2024

Hello @luisomoreau thank you for your response. You're right I forgot about it, now it's compiling and predicting, but.. always same class, no matter for what camera is looking at. I'm using ESP-EYE(I've selected right camera define) training on RGB/Grayscale images 96x96, and using MobileNetV2 96x96 0.05, can you give me some advice where to start in debugging?

from example-esp32-cam.

luisomoreau avatar luisomoreau commented on June 9, 2024

Hey @Jakub-Bielawski ,

Yes it is at the moment a known issue, I will probably work on that next week. I'm traveling at the moment for business and don't have a ESP32 Cam with me.
You also can check the forum https://forum.edgeimpulse.com/t/esp32-cam-support/797/116 (pretty long thread though)

Did you try the Basic example or the Advanced example?
The basic one has only a cutout function that basically cutout some pixels of the image whereas the Advance one uses a bilinear interpolation to resize the image. I'm suspecting the issues comes from the image that is passed to the run_inference function doesn't really match with the images the models have been trained with.

Regards,

Louis

from example-esp32-cam.

Jakub-Bielawski avatar Jakub-Bielawski commented on June 9, 2024

I'll check forum for sure. I was trying both examples. I have similar suspicions about pixel values. I'm also trying to make, train, quantize and deploy my own custom simple model (few Conv2D, MaxPool and FullyConected layers). I done everything like tensorflow suggested but i think there is some issue with pixel values. Maybe you can help me, because I'm not sure which type and scale should it be. During quantification, I'm using
converter.inference_input_type = tf.int8 # or tf.uint8
converter.inference_output_type = tf.int8 # or tf.uint8
but I don't know how to check range. I'm training my model with grayscale image in range(0., 1.). As tensorflow write on their blog layers are in [-127,127] range but still nothing about input. I'm asking because maybe you faced this problem :)

I'll be thankful for any advice :)

Jakub

from example-esp32-cam.

luisomoreau avatar luisomoreau commented on June 9, 2024

Hello!
Could you try using RGB instead of greyscale also and let me know if you still have you problem?
Regards,

from example-esp32-cam.

Jakub-Bielawski avatar Jakub-Bielawski commented on June 9, 2024

Hi, I've checked RGB on MobileNetv2 0.05 48x48x3, and got still same problem, always same prediction with almost 100% certainty. I'm using Basic classification because Advance does not include ep-eye selection in board model. Should I change anything other than the wifi ssid/password and library name? I'm not sure about fmt2tgb888 line in void classify(). Thanks for your support :)

[EDIT]:
Here is my arduino sketch setup:

  • Board "ESP32 Wrover Module"
  • Upload speed 921600
  • Flash freq 80Mhz
  • Flash Mode "QIO"
  • Partition Scheme "Default 4Mb with spiffs(1.2MB APP/1.5MB SPIFFS)"

from example-esp32-cam.

Jakub-Bielawski avatar Jakub-Bielawski commented on June 9, 2024

Hi Louis,
I solved the problem, it turned out to be totally my fault, I didn't delete the previous attached libraries, so apparently the correct model was not loaded, which was causing errors, so far I checked Basic example, the predictions are not perfect but it probably results from this what did you say about cutting image and not actual scaling. The final settings for inference are:

MobileNetV2 0.05 48x48x1

If you know something that can help me with my own quantization and inference, please let me know :)

Thanks for your support :)

from example-esp32-cam.

luisomoreau avatar luisomoreau commented on June 9, 2024

@Jakub-Bielawski,
Also to add the ESP EYE for the advance sketch example, just add:

#define CAMERA_MODEL_ESP_EYE

And comment the other boards

I haven't tested but I guess it should work as this board has PSRAM.

Regards,

Louis

from example-esp32-cam.

Jakub-Bielawski avatar Jakub-Bielawski commented on June 9, 2024

I did that and it works, but i had to also add this

#if defined(CAMERA_MODEL_ESP_EYE)
  pinMode(13, INPUT_PULLUP);
  pinMode(14, INPUT_PULLUP);
#endif

in Advance-Image-Classification.ino
In advance example I was trying MobileNetV2 0.05 32x32x3, and I think it works pretty well
For future work I'll try larger versions of MobileNetV2 and smaller frame size like capturing 96x96, maybe it will work :)

Jakub

from example-esp32-cam.

Related Issues (11)

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.