Internal change

PiperOrigin-RevId: 557015628
This commit is contained in:
MediaPipe Team
2023-08-14 22:16:20 -07:00
committed by Copybara-Service
parent 0da296536b
commit a392561b31
@@ -19,6 +19,7 @@
#include "mediapipe/framework/port/integral_types.h"
#include "mediapipe/framework/port/proto_ns.h"
#include "mediapipe/framework/port/status.h"
#include "mediapipe/framework/port/status_macros.h"
#include "mediapipe/util/label_map.pb.h"
#include "mediapipe/util/resource_util.h"
@@ -85,7 +86,8 @@ absl::Status DetectionLabelIdToTextCalculator::Open(CalculatorContext* cc) {
ASSIGN_OR_RETURN(string_path,
PathToResourceAsFile(options.label_map_path()));
std::string label_map_string;
MP_RETURN_IF_ERROR(file::GetContents(string_path, &label_map_string));
MP_RETURN_IF_ERROR(
mediapipe::GetResourceContents(string_path, &label_map_string));
std::istringstream stream(label_map_string);
std::string line;