Undoubtedly, the FlipperZero has introduced pen testing to a much larger audience of tinkerers and hackers.At Remyx, we aim to help users on their journey to innovating AI-powered projects and products effortlessly!
This project brings these ideas together as we show you how to customize a computer vision model that runs in real-time on your ESP32 device.In particular, we'll create an image classifier to distinguish between an iPhone and a RFID card reader. Pair this with your FlipperZero to automate match attack payloads to target devices.
ScopeThis project will cover how to:
- Sign up and use the Remyx platform
- Chat/Click-to-create a new TFLite micro model
- Run your new model on device
Note: You can test this model using just your computer, but if you want to fully reproduce this project, you'll need:
SoftwareThis project will use:
- Remyx AI Engine (https://engine.remyx.ai)
- ESP-IDF
Sign in/Sign up: Navigate to https://engine.remyx.ai and create a new account. You can also find this link from our landing page, https://remyx.ai, by clicking the "Get Started" button.
Choose "Continue with Google" or "Continue with Github" to authenticate using your Google or GitHub account.
An account will be created for you if you haven't previously authenticated.
Ready to train: On signup, you'll have a free model training credit available! We can use this credit to train our model.
Customize Your ModelTrain
Let's train a tiny image classifier for our ESP32-CAM AI Thinker. You can chat with the Remyx Agent to create your model.
Tell the agent about your project. The agent creates the right model for you, asking questions as necessary. Here's an example:
I need a model to differentiate between an iPhone and an RFID card reader. This model will need to run on a microcontroller like the ESP32 for my Flipperzero project.
Training takes around 30 minutes and is easy to do! 🎉
Soon, you'll see your model's progress on the Home or Dashboard tab. When it's done, click to see more details.
Want to try a quick test? Go to "Predictions" on the dashboard, click "Options" and then "Run model in browser". Drop a test image and see the result.
To download a model for microcontroller devices such as the ESP32, click "Options" then "Download" and choose "Microcontroller".
Hardware AssemblyFollow this diagram to attach the USB-UART bridge to the ESP32 so we can flash our model.
Here's an example using just jumper cables. It is easier to reach the reset button this way.
Repository Find the esp32 code example for this project at https://github.com/remyxai/remyx_experiments.git
git clone https://github.com/remyxai/remyx_experiments.git
Make sure you’ve installed the ESP-IDF software according to these instructions. Then, navigate to the esp32 example within the Remyx Experiments repo - /path/to/remyx_experiments/microcontroller/esp32_classifier.
Update the weights in the main/esp32_model_data.cc file with the weights found in the downloaded model.cc file.
Make sure to update the length variable at the bottom of the file with the size found in the model.cc file. Update the labels in the main/model_settings.h file and wherever they are referenced as needed.
Ensure you have the ESP-IDF environment variables set according to these instructions. Then, you can use the idf.py script to build and flash the program onto the ESP32-cam device.
Set the target to esp32:
idf.py set-target esp32
Configure the correct camera with:
idf.py menuconfig
Follow the UI to select the AI Thinker camera.
Build the project with:
idf.py build
And flash with:
idf.py --port /dev/ttyUSB0 flash
Now you can view the prediction results by running:
idf.py --port /dev/ttyUSB0 flash monitor
And remove the short on the esp32 device, then press the reset button to run
You’ll see the streaming inference results from the camera!
With the Remyx Engine, turning your AI ideas into reality is easy. You flashed an image classifier onto an ESP32-CAM AI Thinker to identify devices in the field of view, with no data or ML expertise required.
Got the model? You can integrate the ESP32-cam classifier with the Flipperzero device like this motion detection example.
We're excited to see what you create using Remyx.
Have questions or want to share some feedback? Feel free to reach us at contact@remyx.ai or on Twitter and LinkedIn.
Don't forget to sign up for our newsletter for more machine learning goodies! Andread our blog for the latest update
Comments