MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / DetectionOutputAccessor

Method DetectionOutputAccessor

utils/GraphUtils.cpp:529–552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

527}
528
529DetectionOutputAccessor::DetectionOutputAccessor(const std::string &labels_path,
530 std::vector<TensorShape> &imgs_tensor_shapes,
531 std::ostream &output_stream)
532 : _labels(), _tensor_shapes(std::move(imgs_tensor_shapes)), _output_stream(output_stream)
533{
534 _labels.clear();
535
536 std::ifstream ifs;
537
538 try
539 {
540 ifs.exceptions(std::ifstream::badbit);
541 ifs.open(labels_path, std::ios::in | std::ios::binary);
542
543 for (std::string line; !std::getline(ifs, line).fail();)
544 {
545 _labels.emplace_back(line);
546 }
547 }
548 catch (const std::ifstream::failure &e)
549 {
550 ARM_COMPUTE_ERROR_VAR("Accessing %s: %s", labels_path.c_str(), e.what());
551 }
552}
553
554template <typename T>
555void DetectionOutputAccessor::access_predictions_tensor(ITensor &tensor)

Callers

nothing calls this directly

Calls 3

clearMethod · 0.45
openMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected