### View Project Summary Output Source: https://docs.edgeimpulse.com/tutorials/end-to-end/motion-recognition-using-agent Example output returned by the agent after querying project information and sample counts. ```bash Project: Gesture Classifier (ID: 12345) Training samples: 47 idle 18 wave 16 punch 13 Testing samples: 0 ``` -------------------------------- ### Agent Build Status Output Source: https://docs.edgeimpulse.com/tutorials/end-to-end/motion-recognition-using-agent Example output showing the agent's progress during the deployment build process. ```text Build started (type: arduino). Polling... done (34 s). Downloaded to ./build/arduino-library.zip (1.2 MB) ``` -------------------------------- ### Inference Output Example Source: https://docs.edgeimpulse.com/tutorials/end-to-end/sound-recognition Example output showing DSP, classification, and anomaly detection results from the device. ```text Starting inferencing in 2 seconds... Recording Recording OK Predictions (DSP: 399 ms., Classification: 175 ms., Anomaly: 0 ms.): faucet: 0.03757 noise: 0.96243 Starting inferencing in 2 seconds... ``` -------------------------------- ### Monitor Data Upload Progress Source: https://docs.edgeimpulse.com/tutorials/end-to-end/motion-recognition-using-agent Example console output showing the agent's progress while uploading labeled training samples. ```bash Uploading idle samples... 18/18 done Uploading wave samples... 16/16 done Uploading punch samples... 13/13 done Total uploaded: 47 training samples ``` -------------------------------- ### Example Inference Output Source: https://docs.edgeimpulse.com/tutorials/end-to-end/keyword-spotting Sample output showing classification results and timing metrics from the impulse runner. ```text Edge Impulse impulse runner v1.9.1 [SER] Connecting to /dev/tty.usbmodem0004401658161 Predictions (DSP: 143 ms., Classification: 13 ms., Anomaly: 0 ms.): helloworld: 0.98828 noise: 0.0039 unknown: 0.00781 ``` -------------------------------- ### Arduino Inference Code for Opta PLC Source: https://docs.edgeimpulse.com/tutorials/end-to-end/temp-anomaly-detection-opta-plc This example demonstrates how to collect sensor data, run inference using the Edge Impulse SDK, and trigger hardware actions based on anomaly detection results. ```cpp #include #include // Define the feature buffer float features[EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE]; void setup() { Serial.begin(115200); while (!Serial); pinMode(TEMP_SENS, INPUT); Serial.println("Edge Impulse Inference Example"); } void loop() { // Collect data for (size_t i = 0; i < EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE; i++) { features[i] = analogRead(TEMP_SENS) * (10.0 / 1024.0); delay(10); // Adjust delay as needed } // Prepare signal signal_t signal; numpy::signal_from_buffer(features, EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE, &signal); // Run inference ei_impulse_result_t result = { 0 }; EI_IMPULSE_ERROR res = run_classifier(&signal, &result, false); if (res != EI_IMPULSE_OK) { Serial.print("ERR: Failed to run classifier ("); Serial.print(res); Serial.println(")"); return; } // Print results Serial.println("Inference results:"); for (size_t ix = 0; ix < EI_CLASSIFIER_LABEL_COUNT; ix++) { Serial.print(result.classification[ix].label); Serial.print(": "); Serial.println(result.classification[ix].value); } // Control heaters based on anomaly detection if (result.anomaly > ANOMALY_THRESHOLD) { // Anomaly detected, take action Serial.println("Anomaly detected!"); digitalWrite(HEAT_LEFT, LOW); digitalWrite(HEAT_RIGHT, LOW); } else { // Normal operation digitalWrite(HEAT_LEFT, HIGH); digitalWrite(HEAT_RIGHT, HIGH); } delay(1000); } ``` -------------------------------- ### Inference Output Example Source: https://docs.edgeimpulse.com/tutorials/end-to-end/motion-recognition Sample output showing the results of signal processing and classification, including timing and prediction scores. ```text Starting inferencing in 2 seconds... Sampling... Storing in file name: /fs/device-classification261 Tensor shape: 4 Predictions (DSP: 17 ms., Classification: 1 ms., Anomaly: 0 ms.): idle: 0.00004 snake: 0.00012 updown: 0.00009 wave: 0.99976 anomaly score: 0.032 Finished inferencing, raw data is stored in '/fs/device-classification261'. Use AT+UPLOADFILE to send back to Edge Impulse. ``` -------------------------------- ### Sample CSV Structure for HR/HRV Data Source: https://docs.edgeimpulse.com/tutorials/end-to-end/hr-hrv-estimation Example of the expected CSV format for physiological data, including timestamps, accelerometer axes, PPG, and heart rate labels. ```csv Time,acc_x,acc_y,acc_z,ppg,eda,temp,hr,activity,activity_label,Subject 2018-06-29 08:44:52.000000,-27,1,58,-0.0,0.0,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.031250,-27,2,59,-0.0,0.0,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.062500,-27,1,59,-0.0,0.0,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.093750,-27,1,58,-0.0,0.0,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.125000,-27,1,59,-0.0,0.0,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.156250,-27,1,59,0.0,0.832765,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.187500,-27,1,59,0.01,0.832765,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.218750,-27,1,58,-0.03,0.832765,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.250000,-27,1,58,-0.05,0.832765,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.281250,-27,1,59,0.13,0.832765,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.312500,-27,1,59,0.66,0.832765,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.343750,-27,1,59,1.37,0.832765,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.375000,-27,1,59,2.06,0.832765,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.406250,-27,1,59,2.79,1.180231,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.437500,-27,1,58,3.8,1.180231,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.468750,-27,1,59,5.06,1.180231,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.500000,-27,1,58,6.2,1.180231,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.531250,-27,1,59,7.15,1.180231,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.562500,-27,1,59,8.31,1.180231,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.593750,-27,1,59,10.09,1.180231,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.625000,-27,1,59,11.88,1.180231,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.656250,-27,2,59,13.14,1.618462,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.687500,-27,1,59,14.65,1.618462,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.718750,-27,1,59,17.91,1.618462,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.750000,-27,1,58,22.9,1.618462,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 2018-06-29 08:44:52.781250,-27,1,59,27.58,1.618462,32.15,76.0,NO_ACTIVITY,NO_ACTIVITY,Subject_1 ... Download the CSV here ``` -------------------------------- ### End-to-end Edge Impulse Workflow Prompt Source: https://docs.edgeimpulse.com/tutorials/end-to-end/motion-recognition-using-agent A comprehensive prompt designed to guide an AI agent through the Edge Impulse project lifecycle, requiring user input at each critical decision point. ```markdown Run an end-to-end Edge Impulse workflow for me, pausing to ask me questions at each step: 1. Fetch my project info and show me a summary (name, ID, sample counts per label). Ask me: does this look right, or should we use a different project? 2. Check whether I have enough training data. If not, ask me: do I want to upload files from a local folder, or generate synthetic data? Wait for my answer before proceeding. 3. Review the training/testing split. If fewer than 20% of samples are in the test set, ask me: should we move some samples over? 4. Start a training job. While it runs, show me the job URL so I can monitor it. When it finishes, show me the accuracy and loss. Ask me: are these results good enough, or should we adjust and retrain? 5. Run model testing and show the confusion matrix and per-class F1 scores. Ask me: is there a class I want to improve before exporting? 6. Ask me: what deployment format do I want? (Arduino, C++ library, TFLite, ONNX, or other) Then build and download the artifact to ./build. 7. Summarise what was done and suggest next steps based on the results. Stop and wait for my input at each question. Do not skip ahead. ``` -------------------------------- ### List and validate training samples Source: https://docs.edgeimpulse.com/tutorials/end-to-end/motion-recognition-using-agent Use this prompt to identify potential labeling inconsistencies by comparing sample IDs against filenames. ```text List all training samples and flag any that look mislabelled in my Edge Impulse project — show me sample IDs where the label doesn't match the file name ``` -------------------------------- ### Build and Run C++ SDK on Linux Source: https://docs.edgeimpulse.com/tutorials/end-to-end/motion-recognition-using-agent Commands to compile the Edge Impulse C++ SDK and execute inference on a sample CSV file. ```bash cd ./build/edge-impulse-sdk mkdir -p build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release make -j4 # Run inference on a sample CSV: ./edge-impulse-linux-runner --run-impulse --sample ./data/idle/sample_001.csv ``` -------------------------------- ### Render CardOpenStudioTutorial component Source: https://docs.edgeimpulse.com/tutorials/end-to-end/visual-regression Usage of the tutorial component to link to the public Edge Impulse project. ```jsx ``` -------------------------------- ### Bulk-relabel training samples Source: https://docs.edgeimpulse.com/tutorials/end-to-end/motion-recognition-using-agent Automate the relabeling process for samples matching specific filename patterns. ```text Relabel all training samples whose filename contains "gesture_idle" to "idle" in my Edge Impulse project ``` -------------------------------- ### Execute Edge Impulse Data Forwarder Source: https://docs.edgeimpulse.com/tutorials/end-to-end/temp-anomaly-detection-opta-plc Command to initiate the data forwarding process from the Opta PLC to the Edge Impulse platform. ```bash edge-impulse-data-forwarder ``` -------------------------------- ### Run Impulse via CLI Source: https://docs.edgeimpulse.com/tutorials/end-to-end/image-classification Commands to execute the deployed model on a connected device via serial connection. ```bash $ edge-impulse-run-impulse ``` ```bash $ edge-impulse-run-impulse --debug ``` ```bash $ edge-impulse-run-impulse --continuous ``` -------------------------------- ### Run Impulse via Serial Source: https://docs.edgeimpulse.com/tutorials/end-to-end/motion-recognition Executes the deployed model on the connected device to perform real-time sensor sampling and classification. ```bash $ edge-impulse-run-impulse ``` -------------------------------- ### Run Edge Impulse Linux Runner Source: https://docs.edgeimpulse.com/tutorials/end-to-end/object-detection-bounding-boxes Command to build, download, and execute the model on a Linux-based development board. ```bash edge-impulse-linux-runner ``` -------------------------------- ### Run Continuous Inference Source: https://docs.edgeimpulse.com/tutorials/end-to-end/motion-recognition Executes the model in continuous sampling mode for ongoing gesture recognition. ```bash $ edge-impulse-run-impulse --continuous ``` -------------------------------- ### Configure Edge Impulse Credentials Source: https://docs.edgeimpulse.com/tutorials/end-to-end/motion-recognition-using-agent Set the required environment variables to authenticate the agent with your Edge Impulse project. ```md EI_API_KEY="ei_..." EI_PROJECT_ID="12345" ``` -------------------------------- ### Arduino Data Forwarder Sketch Source: https://docs.edgeimpulse.com/tutorials/end-to-end/temp-anomaly-detection-opta-plc Reads temperature data from an analog pin and formats it for the Edge Impulse data forwarder. ```cpp void setup() { Serial.begin(115200); while (!Serial); pinMode(TEMP_SENS, INPUT); Serial.println("Edge Impulse Data Forwarder Example"); } void loop() { float temperature = analogRead(TEMP_SENS) * (10.0 / 1024.0); // Convert to voltage Serial.print("Temperature: "); Serial.println(temperature); // Send data in edge-impulse-data-forwarder format Serial.print("1,"); Serial.println(temperature); delay(1000); } ``` -------------------------------- ### Enable HR/HRV runtime features Source: https://docs.edgeimpulse.com/tutorials/end-to-end/hr-hrv-estimation Use this macro to conditionally include heart rate calculation variables in your deployment. ```cpp #if EI_DSP_ENABLE_RUNTIME_HR == 1 ei_impulse_result_hr_t hr_calcs; #endif ``` -------------------------------- ### Automate train-test split Source: https://docs.edgeimpulse.com/tutorials/end-to-end/motion-recognition-using-agent Randomly move a percentage of samples from the training set to the testing set to maintain an 80/20 distribution. ```text Move 20% of training samples for each label to the testing set in my Edge Impulse project, picking them randomly ``` -------------------------------- ### Simulate Real-time Classification Source: https://docs.edgeimpulse.com/tutorials/end-to-end/obd-automotive-data Plays back a CSV recording to simulate real-time classification of OBD-II signals using a trained model. ```python python3 play_csv_to_eim.py \ --model ./obd_fault.eim \ --csv ./airleak_MAF_NOx.csv \ --axes "RPM [RPM],PEDAL INPUT [%],MAF [g/s],NOx [ppm]" \ --hz 2 --window-ms 2000 --step-ms 1000 --label-col fault_label ``` -------------------------------- ### Define Opta PLC Pin Constants Source: https://docs.edgeimpulse.com/tutorials/end-to-end/temp-anomaly-detection-opta-plc Assigns hardware pins for the user button, heaters, and temperature sensor to named constants. ```cpp #define BTN BTN_USER // User button on Opta WiFi #define HEAT_LEFT 2 // Left heater control pin #define HEAT_RIGHT 3 // Right heater control pin #define TEMP_SENS A7 // Temperature sensor analog pin ``` -------------------------------- ### BibTeX Citation for Automotive Diagnostics Paper Source: https://docs.edgeimpulse.com/tutorials/end-to-end/obd-automotive-data Use this BibTeX entry to cite the research paper on federated automotive diagnostics. ```bibtex @inproceedings{jordan2024semantics, author = {Jordan, E. and Serrano, M. and Gyrard, A. and Song, E. and Roth, T. and Wollman, D.}, title = {Semantics for Enhancing Communications- and Edge-Intelligence-enabled Smart Sensors: A Practical Use Case in Federated Automotive Diagnostics}, booktitle = {IECON 2024 - 50th Annual Conference of the IEEE Industrial Electronics Society}, address = {Chicago, IL, USA}, year = {2024}, pages = {1--6}, doi = {10.1109/IECON55916.2024.10905565} } ``` -------------------------------- ### Test Heater Control Source: https://docs.edgeimpulse.com/tutorials/end-to-end/temp-anomaly-detection-opta-plc Toggles the heater pins high and low to verify physical activation of the connected hardware. ```cpp void setup() { pinMode(HEAT_LEFT, OUTPUT); pinMode(HEAT_RIGHT, OUTPUT); } void loop() { digitalWrite(HEAT_LEFT, HIGH); digitalWrite(HEAT_RIGHT, HIGH); delay(1000); digitalWrite(HEAT_LEFT, LOW); digitalWrite(HEAT_RIGHT, LOW); delay(1000); } ``` -------------------------------- ### Access Live Classification Feed Source: https://docs.edgeimpulse.com/tutorials/end-to-end/object-detection-bounding-boxes URL output provided by the runner to view camera feed and classification results in a browser. ```text Want to see a feed of the camera and live classification in your browser? Go to http://192.168.1.19:4912 ``` -------------------------------- ### Test Temperature Sensor Reading Source: https://docs.edgeimpulse.com/tutorials/end-to-end/temp-anomaly-detection-opta-plc Reads analog values from the temperature sensor and outputs them to the Serial Monitor for verification. ```cpp void setup() { Serial.begin(9600); pinMode(TEMP_SENS, INPUT); } void loop() { int sensorValue = analogRead(TEMP_SENS); Serial.println(sensorValue); delay(250); } ``` -------------------------------- ### Update Inference Sketch with Shared Variable Source: https://docs.edgeimpulse.com/tutorials/end-to-end/temp-anomaly-detection-opta-plc Define a global variable to store inference results, allowing the PLC ladder logic to access the data produced by the sketch. ```cpp float anomaly_score; // Shared variable to store the inference result void setup() { Serial.begin(115200); pinMode(A7, INPUT); // Sensor input } void loop() { float sensorValue = analogRead(A7) * (10.0 / 1024.0); // Read sensor value anomaly_score = run_inference(sensorValue); // Store inference result delay(1000); // Adjust as needed } ``` -------------------------------- ### CSV Header Format Source: https://docs.edgeimpulse.com/tutorials/end-to-end/obd-automotive-data Required header structure for OBD-II data files, including time, label, and signal columns. ```text time (ms.),fault_label,RPM [RPM],PEDAL INPUT [%],MAF [g/s],NOx [ppm] ``` -------------------------------- ### Define HR result structure Source: https://docs.edgeimpulse.com/tutorials/end-to-end/hr-hrv-estimation This structure defines the output format for heart rate calculations in beats per minute. ```cpp typedef struct { float heart_rate; // The calculated heart rate in beats per minute (BPM) } ei_impulse_result_hr_t; ``` -------------------------------- ### Remove low-quality samples Source: https://docs.edgeimpulse.com/tutorials/end-to-end/motion-recognition-using-agent Filter out unwanted data by deleting samples associated with a specific label. ```text Delete all training samples with label "unknown" in my Edge Impulse project ``` -------------------------------- ### Collect OBD-II Data Source: https://docs.edgeimpulse.com/tutorials/end-to-end/obd-automotive-data Logs data from an ELM327 device using the specified model and CSV configuration. ```python python3 collect_obd_data.py \ --model ./obd_fault.eim \ --csv ./airleak_MAF_NOx.csv \ --axes "RPM [RPM],PEDAL INPUT [%],MAF [g/s],NOx [ppm]" \ --hz 2 --window-ms 2000 --step-ms 1000 --label-col fault_label ``` -------------------------------- ### Define CardOpenStudioTutorial component Source: https://docs.edgeimpulse.com/tutorials/end-to-end/visual-regression A React component used to provide a direct link to a pre-configured Edge Impulse project. ```javascript export const CardOpenStudioTutorial = ({href}) => Skip the setup: clone a ready-to-use Edge Impulse project with the dataset, impulse, and trained model. ; ``` -------------------------------- ### Disable Moving Average Filter Source: https://docs.edgeimpulse.com/tutorials/end-to-end/keyword-spotting Code block to remove from ei_run_classifier.h to disable the moving average filter, which may help with unbalanced datasets at the cost of increased false positives. ```cpp for (size_t ix = 0; ix < EI_CLASSIFIER_LABEL_COUNT; ix++) { result->classification[ix].value = run_moving_average_filter(&classifier_maf[ix], result->classification[ix].value); } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.