BatchInferenceWorker
BatchInferenceWorker
Runs offline batch inference for one contiguous frame range on a QThread.
#include <BatchInferenceWorker.hpp>
Inherits from QThread
Public Signals
| Name | |
|---|---|
| void | progressChanged(int current, int total) Emitted during batch inference; may originate from the worker thread. |
Public Functions
| Name | |
|---|---|
| BatchInferenceWorker(SlotAssembler * assembler, DataManager * dm, MediaOverrides media_overrides, std::vector< SlotBindingData > input_bindings, std::vector< dl::MemoryFrameBinding > memory_frames, std::vector< OutputBindingData > output_bindings, int start_frame, int end_frame, ImageSize source_image_size, int batch_size, std::shared_ptr< WriteReservation > reservation, std::shared_ptr< std::atomic< bool > > cancel_flag, QObject * parent =[nullptr]) Constructor for BatchInferenceWorker. |
|
| bool | success() const Whether the batch run completed without error. |
| std::string const & | errorMessage() const Non-empty when success() is false. |
Protected Functions
| Name | |
|---|---|
| void | run() override Executes batch inference on the worker thread. |
Public Signals Documentation
signal progressChanged
void progressChanged(
int current,
int total
)Emitted during batch inference; may originate from the worker thread.
Public Functions Documentation
function BatchInferenceWorker
BatchInferenceWorker(
SlotAssembler * assembler,
DataManager * dm,
MediaOverrides media_overrides,
std::vector< SlotBindingData > input_bindings,
std::vector< dl::MemoryFrameBinding > memory_frames,
std::vector< OutputBindingData > output_bindings,
int start_frame,
int end_frame,
ImageSize source_image_size,
int batch_size,
std::shared_ptr< WriteReservation > reservation,
std::shared_ptr< std::atomic< bool > > cancel_flag,
QObject * parent =nullptr
)Constructor for BatchInferenceWorker.
Parameters:
- assembler Non-owning pointer; caller retains ownership.
- dm Non-owning DataManager for encoding inputs and writing outputs.
- reservation Shared buffer for progressive result delivery.
- cancel_flag Shared flag polled between batches; set by InferenceController::cancel().
- parent Optional QObject parent.
function success
bool success() constWhether the batch run completed without error.
function errorMessage
std::string const & errorMessage() constNon-empty when success() is false.
Protected Functions Documentation
function run
void run() overrideExecutes batch inference on the worker thread.
Updated on 2026-11-13 at 20:25:41 +0000