Auto-evaluate: Pipelining
General idea: Run segmentation/evaluation in parallel when auto-evaluate
is checked
Workflow
- After a motion recording in the dataset was segmented, the
SegmentationController
will report the individualSegmentationResult
in a topic - The UI subscribed to the topic, and if
auto-evaluate
was checked, it will immediately begin to evalute theSegmentationResult
one-by-one in parallel (while still segmenting) - The UI caches the individual
EvaluationResult
s - With the last
SegmentationResult
being evaluated, the UI will trigger the total evaluation by providing the vector of cachedEvaluationResult
s to theEvaluationController
(basically we just need to make the corresponding function in theEvaluationController
public, but see (pseudo-)code below) - The
EvaluationController
will then report theEvaluationResult
as usual for the UI to display. - We could make a new function in the
EvaluationController
for this so the UI doesn't have to assembly the expectedEvaluationResult
. E.g.:
armarx::EvaluationResultPtr
armarx::EvaluationController::evaluateTotalResultAndPack(std::vector<armarx::EvaluationResult> evaluationResults)
{
armarx::EvaluationResultPtr result = new armarx::EvaluationResult();
result->name = "Evaluation results";
// isGroup, isGroupExpanded, blah blah
// Push total result to "Evaluation results"
result->subResults.push_back(armarx::EvaluationController::evaluateTotalResult(evaluationResults);
// Initialize "Individual results" group and push evaluationResults into its subResults
armarx::EvaluationResultPtr individiaulResults = //...
individualResults->subResults.push_back_vector(evaluationResults); // I wish C++ could do that. Use .insert, end(), begin(), end()...
// Push "Individual results" to "Evaluation results"
result->subResults.push_back(individualResults);
return result;
}
Possible caveats
-
reportEvaluationProgress
must be tweaked in order to push the right progress to the evaluation progress bar in the UI- Possible fix: Each
SegmentationResult
struct could have two new members:int resultNumber
andint resultsTotal
, where1 <= resultNumber <= resultsTotal
andresultsTotal = segmentationResults.size()
. TheEvaluationController
can make use of that then.
- Possible fix: Each
- The
auto-evaluate
checkbox needs to be disabled when the segmentation was started, otherwise it could miss results- Possible fix: Cache
SegmentationResult
s anyway => No need to disable checkbox. But then, what if the user changes his mind again? DismissEvaluationResult
s? - Possible fix: Remove checkbox and replace it with a new button
Segment & Evaluate
- Possible fix: Cache