Use ABSL_LOG in MediaPipe.
This is needed in Chrome builds to avoid collisions with its own LOG. PiperOrigin-RevId: 561436864
This commit is contained in:
committed by
Copybara-Service
parent
f60da2120d
commit
c92570f844
@@ -146,10 +146,10 @@ cc_library(
|
||||
":annotation_cc_proto",
|
||||
":box_util",
|
||||
"//mediapipe/framework/port:integral_types",
|
||||
"//mediapipe/framework/port:logging",
|
||||
"//mediapipe/util/tracking:box_tracker_cc_proto",
|
||||
"@com_google_absl//absl/container:btree",
|
||||
"@com_google_absl//absl/container:flat_hash_set",
|
||||
"@com_google_absl//absl/log:absl_log",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -182,10 +182,10 @@ cc_library(
|
||||
":belief_decoder_config_cc_proto",
|
||||
":box",
|
||||
":epnp",
|
||||
"//mediapipe/framework/port:logging",
|
||||
"//mediapipe/framework/port:opencv_core",
|
||||
"//mediapipe/framework/port:opencv_imgproc",
|
||||
"//mediapipe/framework/port:status",
|
||||
"@com_google_absl//absl/log:absl_log",
|
||||
"@com_google_absl//absl/status",
|
||||
"@eigen_archive//:eigen3",
|
||||
],
|
||||
@@ -277,6 +277,7 @@ cc_library(
|
||||
"//mediapipe/framework/deps:file_path",
|
||||
"//mediapipe/framework/port:opencv_core",
|
||||
"//mediapipe/framework/port:ret_check",
|
||||
"@com_google_absl//absl/log:absl_log",
|
||||
"@com_google_absl//absl/memory",
|
||||
"@com_google_absl//absl/strings:str_format",
|
||||
"@com_google_absl//absl/types:span",
|
||||
@@ -322,6 +323,7 @@ cc_library(
|
||||
"//mediapipe/framework/deps:file_path",
|
||||
"//mediapipe/framework/port:opencv_core",
|
||||
"//mediapipe/framework/port:ret_check",
|
||||
"@com_google_absl//absl/log:absl_log",
|
||||
"@com_google_absl//absl/memory",
|
||||
"@com_google_absl//absl/strings:str_format",
|
||||
"@com_google_absl//absl/types:span",
|
||||
@@ -369,11 +371,11 @@ cc_library(
|
||||
"//mediapipe/framework:calculator_framework",
|
||||
"//mediapipe/framework/formats:detection_cc_proto",
|
||||
"//mediapipe/framework/formats:location_data_cc_proto",
|
||||
"//mediapipe/framework/port:logging",
|
||||
"//mediapipe/framework/port:map_util",
|
||||
"//mediapipe/framework/port:re2",
|
||||
"//mediapipe/framework/port:status",
|
||||
"@com_google_absl//absl/container:node_hash_set",
|
||||
"@com_google_absl//absl/log:absl_log",
|
||||
"@com_google_absl//absl/strings",
|
||||
],
|
||||
alwayslink = 1,
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
|
||||
#include "Eigen/Core"
|
||||
#include "Eigen/Dense"
|
||||
#include "absl/log/absl_log.h"
|
||||
#include "absl/status/status.h"
|
||||
#include "mediapipe/framework/port/canonical_errors.h"
|
||||
#include "mediapipe/framework/port/logging.h"
|
||||
#include "mediapipe/framework/port/opencv_imgproc_inc.h"
|
||||
#include "mediapipe/framework/port/status.h"
|
||||
#include "mediapipe/modules/objectron/calculators/annotation_data.pb.h"
|
||||
@@ -220,7 +220,7 @@ absl::Status Decoder::Lift2DTo3D(
|
||||
auto status = SolveEpnp(projection_matrix, portrait, input_points_2d,
|
||||
&output_points_3d);
|
||||
if (!status.ok()) {
|
||||
LOG(ERROR) << status;
|
||||
ABSL_LOG(ERROR) << status;
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
#include <vector>
|
||||
|
||||
#include "absl/container/node_hash_set.h"
|
||||
#include "absl/log/absl_log.h"
|
||||
#include "absl/strings/str_split.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "absl/strings/strip.h"
|
||||
#include "mediapipe/framework/calculator_framework.h"
|
||||
#include "mediapipe/framework/formats/detection.pb.h"
|
||||
#include "mediapipe/framework/formats/location_data.pb.h"
|
||||
#include "mediapipe/framework/port/logging.h"
|
||||
#include "mediapipe/framework/port/map_util.h"
|
||||
#include "mediapipe/framework/port/re2.h"
|
||||
#include "mediapipe/framework/port/status.h"
|
||||
@@ -264,11 +264,11 @@ bool FilterDetectionCalculator::IsValidLabel(const std::string& label) {
|
||||
|
||||
bool FilterDetectionCalculator::IsValidScore(float score) {
|
||||
if (options_.has_min_score() && score < options_.min_score()) {
|
||||
LOG(ERROR) << "Filter out detection with low score " << score;
|
||||
ABSL_LOG(ERROR) << "Filter out detection with low score " << score;
|
||||
return false;
|
||||
}
|
||||
if (options_.has_max_score() && score > options_.max_score()) {
|
||||
LOG(ERROR) << "Filter out detection with high score " << score;
|
||||
ABSL_LOG(ERROR) << "Filter out detection with high score " << score;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "mediapipe/modules/objectron/calculators/frame_annotation_tracker.h"
|
||||
|
||||
#include "absl/container/flat_hash_set.h"
|
||||
#include "mediapipe/framework/port/logging.h"
|
||||
#include "absl/log/absl_log.h"
|
||||
#include "mediapipe/modules/objectron/calculators/annotation_data.pb.h"
|
||||
#include "mediapipe/modules/objectron/calculators/box_util.h"
|
||||
#include "mediapipe/util/tracking/box_tracker.pb.h"
|
||||
@@ -53,8 +53,8 @@ FrameAnnotation FrameAnnotationTracker::ConsolidateTrackingResult(
|
||||
}
|
||||
}
|
||||
if (!ref_box.has_id() || ref_box.id() < 0) {
|
||||
LOG(ERROR) << "Can't find matching tracked box for object id: "
|
||||
<< object_id << ". Likely lost tracking of it.";
|
||||
ABSL_LOG(ERROR) << "Can't find matching tracked box for object id: "
|
||||
<< object_id << ". Likely lost tracking of it.";
|
||||
keys_to_be_deleted.push_back(detected_obj.first);
|
||||
continue;
|
||||
}
|
||||
|
||||
+2
-1
@@ -17,6 +17,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "Eigen/Dense"
|
||||
#include "absl/log/absl_log.h"
|
||||
#include "absl/memory/memory.h"
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "absl/types/span.h"
|
||||
@@ -137,7 +138,7 @@ absl::Status Lift2DFrameAnnotationTo3DCalculator::ProcessCPU(
|
||||
auto status = decoder_->Lift2DTo3D(projection_matrix_, /*portrait*/ false,
|
||||
output_objects);
|
||||
if (!status.ok()) {
|
||||
LOG(ERROR) << status;
|
||||
ABSL_LOG(ERROR) << status;
|
||||
return status;
|
||||
}
|
||||
AssignObjectIdAndTimestamp(cc->InputTimestamp().Microseconds(),
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "Eigen/Dense"
|
||||
#include "absl/log/absl_log.h"
|
||||
#include "absl/memory/memory.h"
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "absl/types/span.h"
|
||||
@@ -148,7 +149,7 @@ absl::Status TensorsToObjectsCalculator::ProcessCPU(
|
||||
auto status = decoder_->Lift2DTo3D(projection_matrix_, /*portrait*/ true,
|
||||
output_objects);
|
||||
if (!status.ok()) {
|
||||
LOG(ERROR) << status;
|
||||
ABSL_LOG(ERROR) << status;
|
||||
return status;
|
||||
}
|
||||
Project3DTo2D(/*portrait*/ true, output_objects);
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "Eigen/Dense"
|
||||
#include "absl/log/absl_log.h"
|
||||
#include "absl/memory/memory.h"
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "absl/types/span.h"
|
||||
@@ -154,7 +155,7 @@ absl::Status TfLiteTensorsToObjectsCalculator::ProcessCPU(
|
||||
auto status = decoder_->Lift2DTo3D(projection_matrix_, /*portrait*/ true,
|
||||
output_objects);
|
||||
if (!status.ok()) {
|
||||
LOG(ERROR) << status;
|
||||
ABSL_LOG(ERROR) << status;
|
||||
return status;
|
||||
}
|
||||
Project3DTo2D(/*portrait*/ true, output_objects);
|
||||
|
||||
Reference in New Issue
Block a user