Class to execute a sequence of Operation, depending on the workflow phase (training, validation, etc.).
|
|
| OperationsSequence (bool verbose=false) |
| | OperationsSequence (const std::vector< Operation::Specs > &pipelineConfig, bool verbose=false) |
| | Constructs an operation sequence from a sequence of specification, each for a different operation.
|
| | OperationsSequence (const std::vector< std::shared_ptr< Operation > > &operations, const std::vector< Phase > &phases={}, bool verbose=false) |
| | Constructs an operation sequence from a sequence of operations and, optionally, the phase at which each of them will be executed.
|
|
| OperationsSequence (const OperationsSequence &that)=delete |
|
OperationsSequence & | operator= (const OperationsSequence &that)=delete |
|
| OperationsSequence (OperationsSequence &&that)=default |
|
OperationsSequence & | operator= (OperationsSequence &&that)=default |
| Status | addOperation (const Operation::Specs &specs) |
| | Add an operation specified by a configuration spec.
|
| Status | addOperation (std::shared_ptr< Operation > op, Phase phase=Phase::Always) |
| | Add an existing operation.
|
|
Status | process (DataItem &item, Phase phase=Phase::Always) const |
| | Apply sequence of operations on all elements of the data item.
|
|
std::shared_ptr< SharedImageSet > | process (std::shared_ptr< SharedImageSet > input, Phase phase=Phase::Always) const |
| | Helper function to apply the sequence of operations on one input image.
|
|
std::pair< std::shared_ptr< SharedImageSet >, std::shared_ptr< SharedImageSet > > | process (std::shared_ptr< SharedImageSet > input, std::shared_ptr< SharedImageSet > label, Phase phase=Phase::Always) const |
| | Helper function to apply the sequence of operations on input image and label.
|
|
std::vector< std::string > | getOperationNames () const |
| | Returns the names of the operations added so far.
|
|
std::vector< std::shared_ptr< Operation > > | operations () const |
| | Returns a vector of shared_ptrs to the operations added so far.
|
|
std::vector< Phase > | phases () const |
| | Returns a vector of the phases of the operations added so far.
|
|
bool | ok () const |
| | Returns whether the operations sequence setup was successful.
|
|
Status | status () const |
| | Returns status of the operations sequence setup.
|
|
void | resetOperationSeeds () |
| | Resets the random generator seeding of all the operations that where explicitly configured with a "seed" parameter.
|
|
void | setOperationSeeds (uint32_t seed) |
| | Sets the random generator seeding of all the operations.
|
|
void | setVerbose (bool verbose) |
| | Set the verbose flag.
|
|
void | setOperationsComputingDevice (ML::ComputingDevice device) |
| | Set the computing device of all current operations.
|
|
void | setErrorOnUnexpectedBehaviour (bool treatWarningsAsErrors) |
| | Treat unexpected behaviour warnings as errors.
|
| bool | doesNotModifyInput () const |
| | Returns true if the operation is guaranteed to not modify its input (either because it computes its output out-of-place or because it is a no-op).
|
| bool ImFusion::ML::OperationsSequence::doesNotModifyInput |
( |
| ) |
const |
Returns true if the operation is guaranteed to not modify its input (either because it computes its output out-of-place or because it is a no-op).
This can be used to decide whether a copy of the input should be made before calling the OperationsSequence::process function. Note that this only relates to the overloads taking specific elements as inputs (e.g. images, keypoints, etc.), since the OperationsSequence::process(DataItem& item) function always modifies its input.