Architecture data flow
This file describes the step-by-step data flow for a single inspection cycle and for retraining.
Normal inspection cycle
- Sole enters camera view.
- Position determination fires a trigger (sensor or AI).
- Video stream → frame captures one still frame from the active camera.
- Image preparing normalizes, filters, crops, resizes, and rotates the frame according to the channel config.
- Main Server receives the prepared image.
- Main Server routes the image to the matching YOLO instance for that channel.
- YOLO instance loads weights from AI Model and runs inference.
- YOLO instance returns:
- detected defect classes;
- bounding boxes;
- confidence scores.
- Main Server builds an event record:
- sole ID;
- channel ID;
- timestamp;
- original image reference;
- annotated image reference;
- defect probability / class.
- Main Server writes the event to DB.
- WEB UI fetches and displays the event.
- Expert / operator reviews the result and marks it correct or incorrect.
- WEB UI sends the label back to Main Server, which updates the event in DB.
Retraining flow
- Operator selects a date range in the WEB UI retraining panel.
- WEB UI requests retraining from Main Server.
- Main Server queries DB for verified events in the selected range.
- Main Server assembles / augments images into the Learning Dataset.
- Optionally, Artificial image generator adds synthetic disturbances.
- Learning module trains / fine-tunes a model on the dataset.
- Learning module stores new weights in AI Model.
- YOLO instances can be reloaded with the new weights (hot-reload or restart).
- WEB UI shows retraining status and metrics.
Development / debug flow
- Fake input data produces frames offline.
- OR gate selects between real camera pipeline and fake input.
- Selected frames go through Image preparing and then the same inference path.
- Results are stored in DB and shown in WEB UI, exactly like production.
File / data references
- Event record keeps references, not embedded binary images (unless required).
- Images should be stored on disk with stable paths; DB stores the paths.
- Annotated images are generated after inference and saved alongside originals.