--- datasets: - pdDuduzin/ESP32-CAM_Autonomous_Line-Following_Car_Dataset tags: - tensorflow-lite - esp32 - computer-vision - line-following - embedded-ml license: apache-2.0 language: - en - pt --- # ESP32-CAM Autonomous Line-Following Car Model Quantized steering model used by an autonomous line-following car built with an ESP32-CAM and an ESP32 DevKit. ## Model contract - Input: `96 x 96 x 1` grayscale image. - Output: one steering value from `-1` (maximum left) to `+1` (maximum right). - Task: supervised regression by behavioral cloning. - Deployment format: fully quantized INT8 TensorFlow Lite Micro model. - Dataset: [ESP32-CAM Autonomous Line-Following Car Dataset](https://huggingface.co/datasets/pdDuduzin/ESP32-CAM_Autonomous_Line-Following_Car_Dataset). ## Files - `modelo_linha.tflite`: quantized deployment model. - `modelo_linha.h`: C header embedded in the ESP32-CAM firmware. - `modelo_linha.keras`: original Keras model. - `training_manifest.json`: training configuration, session split and hashes. - `conversion_manifest.json`: quantization configuration, validation metrics and hashes. - `avaliacao_val.json`: validation report. - `historico_treino.png` and `precisao_val.png`: training and validation plots. ## Validation results For the INT8 model on the validation split: - MAE: `0.2585` - MSE: `0.1145` - R²: `0.5372` - Curve direction accuracy: `95.81%` These offline metrics do not guarantee stable driving. Performance is sensitive to lighting, reflections, track appearance, camera position and conditions that differ from the training data. ## Deployment Copy `modelo_linha.h` to `firmware/esp32cam_autonomous/modelo_linha.h`, compile the autonomous firmware and upload it to the ESP32-CAM. The header in this release has SHA-256 `f835b35dae58bbae79324b01cc249774e020db102483add12ce391a6d3fae751`.