Deep Learning Widget
Overview
The DeepLearning_Widget library provides the Qt UI for loading TorchScript models, binding DataManager inputs and outputs, capturing static memory tensors into the session DataBank, and running single-frame, batch, and recurrent inference.
Core model logic lives in the DeepLearning library; this widget coordinates SlotAssembler, DeepLearningState, and InferenceController from the GUI.
Source location
src/WhiskerToolbox/DeepLearning_Widget/
Directory structure
DeepLearning_Widget/
├── DeepLearningWidgetRegistration.hpp/cpp ← EditorRegistry module entry
├── Core/
│ ├── DeepLearningState.hpp/cpp ← EditorState subclass
│ └── SlotAssembler.hpp/cpp ← Binding assembly + inference
├── Inference/
│ ├── InferenceController.hpp/cpp ← Run orchestration
│ ├── BatchInferenceWorker.hpp/cpp ← Single-range batch worker
│ ├── MultiIntervalBatchWorker.hpp/cpp ← Multi-interval batch worker
│ ├── WriteReservation.hpp ← Thread-safe result buffer
│ ├── BatchInferenceResult.hpp ← FrameResult / offline result types
│ └── ResultProcessor.hpp/cpp ← Timer-driven merge into DataManager
└── UI/
├── DeepLearningViewWidget.hpp/cpp ← View panel
├── DeepLearningPropertiesWidget.hpp/cpp ← Properties panel coordinator
├── DataBank/ ← Memory bank capture + preview
└── Helpers/ ← Per-slot schema-driven sub-widgets