1 Data source
2 Classes and data
| Class folder | Images | Train / validation |
|---|
The sketch must be compiled with these values (firmware-v002 and later refuse a weights file of the wrong size). firmware-v003 also reads the class names from header/config.json at boot, but their count must equal NUM_CLASSES, so adding or removing a class means editing NUM_CLASSES and reflashing:
(no classes yet)
Add images from the webcam
Frames are center-cropped to a square, resized to 240x240 and saved as JPEG straight into images/<class>/ (SD folder) or the zip. Burst takes 10 fresh camera frames back to back, plus the delay you set between them, while the button is red, then saves them. Burst frames are near-duplicates, so move or tilt the object between bursts.
Sample browser
Review steps through one class at a time: mark bad images, then delete them all with one confirmation. Or open a class below and click an image to see its heatmap, delete it, or move it.
3 Train
Model layout
These are compile-time settings in the sketch (INPUT_SIZE, CONV1_FILTERS, CONV2_FILTERS). Copy the lines from section 2 into the sketch after changing them. The 3x3 kernel is fixed in the firmware loops. Images on the card stay 240x240, so changing the size needs no new photos, only a retrain. Cost grows with the square of the input size. Changing the layout discards the model in memory.
Training settings
Training never saves by itself. Save the model in section 6 when you are happy with it.
4 Analyze
Confusion matrix
No evaluation yet. It runs automatically when training ends.
Per-class precision and recall
Misclassified images
Click one to inspect it, then delete it or move it to the right class.
5 Infer (live)
Each live frame goes through the same path as a stored image: square crop, 240x240 JPEG, decode, nearest-pixel resize to 64x64.
6 Save
7 Console
8 Serial monitor
115200 baud, a newline is added to what you send. Close the Arduino IDE serial monitor first. Opening the port can reboot the board, and a reboot may drop the connection: press Connect again. Desktop Chrome or Edge only.
Device view
With the box ticked, firmware-v005 sends its camera JPEG (and a heatmap) every 10th inference, each saved image, and a slow live preview while collecting. Frame lines are shown here instead of in the monitor text. With a model in memory that has the same layout, the page runs the same JPEG through its own copy of the network and compares.
9 LoRa network
Each device runs the CNN on its own camera and sends a short LoRa summary every report period (30 s default): how many frames it saw of each class. Connect one device in section 8. This page adds up the summaries from every device it hears, plus its own, over the window below. Class 0 is the quiet base class: when only class 0 is seen, only the date and time are shown.
Summed result
Devices
Event log
Send a message
Sent through the connected device (section 8). Its own line and every reply from other devices appear in the event log above, with the time, the device and the signal strength.
Settings of the connected device
"Show commands and settings" prints the command list in the serial monitor (section 8) with the current value of every setting and whether it is the default or saved in the device. The defaults themselves are in the USER SETTINGS block at the top of the firmware.
No device info yet. All devices must use the same channel. Name, report period, confidence and channel are saved in the device.
10 LoRa history since connected
Everything this page has heard since the serial monitor was first connected: totals per device, a graph with one line per class, and CSV export. Import a saved CSV file to look at it (view only, your live data keeps collecting), or use Import CSV and continue to load it into the history so new reports are added after it. A messages CSV can be imported too, and you can pick several files at once. Section 9 only shows the last few minutes. The devices send counts per report period, so these totals are the sum of every report heard while this page was connected, not the device's own count since it booted.
Totals
Graph
Hover over or tap a point on the graph to see which devices it came from.
Click a class name to hide or show its line. A step adds up every report heard in that time (all devices, or the one selected).