diff --git a/docs/framework_concepts/graphs.md b/docs/framework_concepts/graphs.md index 5f9c68e08..23e20d052 100644 --- a/docs/framework_concepts/graphs.md +++ b/docs/framework_concepts/graphs.md @@ -273,7 +273,7 @@ defined in the enclosing protobuf in order to be traversed using ## Cycles - + By default, MediaPipe requires calculator graphs to be acyclic and treats cycles in a graph as errors. If a graph is intended to have cycles, the cycles need to diff --git a/mediapipe/framework/api2/contract.h b/mediapipe/framework/api2/contract.h index 90e4c38cd..9b92212cb 100644 --- a/mediapipe/framework/api2/contract.h +++ b/mediapipe/framework/api2/contract.h @@ -164,7 +164,7 @@ class Contract { std::tuple items; - // TODO: when forwarding nested items (e.g. ports), check for conflicts. + // TODO -, check for conflicts. decltype(ExtractNestedItems(items)) all_items{ExtractNestedItems(items)}; constexpr auto inputs() const { diff --git a/mediapipe/framework/calculator_base.h b/mediapipe/framework/calculator_base.h index 19f37f9de..4bd3d7398 100644 --- a/mediapipe/framework/calculator_base.h +++ b/mediapipe/framework/calculator_base.h @@ -150,7 +150,7 @@ class CalculatorBase { // Packets may be output during a call to Close(). However, output packets // are silently discarded if Close() is called after a graph run has ended. // - // NOTE: If Close() needs to perform an action only when processing is + // NOTE - needs to perform an action only when processing is // complete, Close() must check if cc->GraphStatus() is OK. virtual absl::Status Close(CalculatorContext* cc) { return absl::OkStatus(); } diff --git a/mediapipe/framework/calculator_context.h b/mediapipe/framework/calculator_context.h index 284226d92..4eafea79f 100644 --- a/mediapipe/framework/calculator_context.h +++ b/mediapipe/framework/calculator_context.h @@ -111,7 +111,7 @@ class CalculatorContext { // Returns the status of the graph run. // - // NOTE: This method should only be called during CalculatorBase::Close(). + // NOTE -. absl::Status GraphStatus() const { return graph_status_; } ProfilingContext* GetProfilingContext() const { diff --git a/mediapipe/framework/calculator_runner.h b/mediapipe/framework/calculator_runner.h index fb1020de1..350fb535c 100644 --- a/mediapipe/framework/calculator_runner.h +++ b/mediapipe/framework/calculator_runner.h @@ -66,7 +66,7 @@ class CalculatorRunner { explicit CalculatorRunner(const std::string& node_config_string); // Convenience constructor to initialize a calculator which uses indexes // (not tags) for all its fields. - // NOTE: This constructor calls proto_ns::TextFormat::ParseFromString(), which + // NOTE -, which // is not available when using lite protos. CalculatorRunner(const std::string& calculator_type, const std::string& options_string, int num_inputs, diff --git a/mediapipe/framework/output_side_packet.h b/mediapipe/framework/output_side_packet.h index 9a0c8cbd2..44eb07085 100644 --- a/mediapipe/framework/output_side_packet.h +++ b/mediapipe/framework/output_side_packet.h @@ -30,7 +30,7 @@ class OutputSidePacket { // Sets the output side packet. The Packet must contain the data. // - // NOTE: Set() cannot report errors via the return value. It uses an error + // NOTE - cannot report errors via the return value. It uses an error // callback function to report errors. virtual void Set(const Packet& packet) = 0; }; diff --git a/mediapipe/framework/output_side_packet_impl.h b/mediapipe/framework/output_side_packet_impl.h index 7e7d639cd..7b16eb32b 100644 --- a/mediapipe/framework/output_side_packet_impl.h +++ b/mediapipe/framework/output_side_packet_impl.h @@ -48,7 +48,7 @@ class OutputSidePacketImpl : public OutputSidePacket { // Sets the output side packet. The Packet must contain the data. // - // NOTE: Set() cannot report errors via the return value. It uses an error + // NOTE - cannot report errors via the return value. It uses an error // callback function to report errors. void Set(const Packet& packet) override; diff --git a/mediapipe/framework/output_stream.h b/mediapipe/framework/output_stream.h index 191c26fd7..55679066d 100644 --- a/mediapipe/framework/output_stream.h +++ b/mediapipe/framework/output_stream.h @@ -50,7 +50,7 @@ class OutputStream { // the only packet in the stream. // Violation of any of these conditions causes a CHECK-failure. // - // NOTE: AddPacket() cannot report errors via the return value. Instead of a + // NOTE - cannot report errors via the return value. Instead of a // CHECK-failure, a subclass of OutputStream should use a callback function // to report errors. virtual void AddPacket(const Packet& packet) = 0; diff --git a/mediapipe/framework/scheduler_queue.h b/mediapipe/framework/scheduler_queue.h index f6777f42b..345da7dc2 100644 --- a/mediapipe/framework/scheduler_queue.h +++ b/mediapipe/framework/scheduler_queue.h @@ -102,7 +102,7 @@ class SchedulerQueue : public TaskQueue { // Implements the TaskQueue interface. void RunNextTask() override; - // NOTE: After calling SetRunning(true), the caller must call + // NOTE -, the caller must call // SubmitWaitingTasksToExecutor since tasks may have been added while the // queue was not running. void SetRunning(bool running) ABSL_LOCKS_EXCLUDED(mutex_); diff --git a/mediapipe/graphs/instant_motion_tracking/calculators/tracked_anchor_manager_calculator.cc b/mediapipe/graphs/instant_motion_tracking/calculators/tracked_anchor_manager_calculator.cc index 446aee781..9468b901e 100644 --- a/mediapipe/graphs/instant_motion_tracking/calculators/tracked_anchor_manager_calculator.cc +++ b/mediapipe/graphs/instant_motion_tracking/calculators/tracked_anchor_manager_calculator.cc @@ -25,7 +25,7 @@ constexpr char kAnchorsTag[] = "ANCHORS"; constexpr char kBoxesInputTag[] = "BOXES"; constexpr char kBoxesOutputTag[] = "START_POS"; constexpr char kCancelTag[] = "CANCEL_ID"; -// TODO: Find optimal Height/Width (0.1-0.3) +// TODO - constexpr float kBoxEdgeSize = 0.2f; // Used to establish tracking box dimensions constexpr float kUsToMs = diff --git a/mediapipe/java/com/google/mediapipe/glutil/ExternalTextureRenderer.java b/mediapipe/java/com/google/mediapipe/glutil/ExternalTextureRenderer.java index 4dd35f865..2dc6112a3 100644 --- a/mediapipe/java/com/google/mediapipe/glutil/ExternalTextureRenderer.java +++ b/mediapipe/java/com/google/mediapipe/glutil/ExternalTextureRenderer.java @@ -106,7 +106,7 @@ public class ExternalTextureRenderer { * *

Before calling this, {@link #setup} must have been called. * - *

NOTE: Calls {@link SurfaceTexture#updateTexImage()} on passed surface texture. + *

NOTE -} on passed surface texture. */ public void render(SurfaceTexture surfaceTexture) { GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT); diff --git a/mediapipe/tasks/cc/text/tokenizers/BUILD b/mediapipe/tasks/cc/text/tokenizers/BUILD index a55f91316..01908cd2c 100644 --- a/mediapipe/tasks/cc/text/tokenizers/BUILD +++ b/mediapipe/tasks/cc/text/tokenizers/BUILD @@ -12,7 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -package(default_visibility = ["//mediapipe/calculators/tensor:__subpackages__"]) +default_visibility = ["//mediapipe/calculators/tensor:__subpackages__"] + +package(default_visibility = default_visibility) licenses(["notice"]) @@ -34,6 +36,7 @@ cc_library( hdrs = [ "bert_tokenizer.h", ], + visibility = default_visibility + ["//mediapipe/tasks:users"], deps = [ ":tokenizer", "//mediapipe/framework/port:integral_types", diff --git a/mediapipe/tasks/cc/vision/image_segmenter/calculators/segmentation_postprocessor_gl.cc b/mediapipe/tasks/cc/vision/image_segmenter/calculators/segmentation_postprocessor_gl.cc index 5b212069f..96451617f 100644 --- a/mediapipe/tasks/cc/vision/image_segmenter/calculators/segmentation_postprocessor_gl.cc +++ b/mediapipe/tasks/cc/vision/image_segmenter/calculators/segmentation_postprocessor_gl.cc @@ -581,7 +581,7 @@ SegmentationPostprocessorGl::GetSegmentationResultGpu( // Step 2.5: For SOFTMAX, apply softmax shaders (max, transformAndSum, and // normalization) to create softmax-transformed chunks before channel // extraction. - // NOTE: exp(x-C) / sum_over_x(exp(x-C)) = exp(x) / sum_over_x(exp(x)). So + // NOTE - / sum_over_x(exp(x-C)) = exp(x) / sum_over_x(exp(x)). So // theoretically we can skip the max shader step entirely. However, // applying it does bring all our values into a nice (0, 1] range, so it // will likely be better for precision, especially when dealing with an diff --git a/mediapipe/util/tracking/box_tracker.h b/mediapipe/util/tracking/box_tracker.h index 8654e97fd..31ac5c117 100644 --- a/mediapipe/util/tracking/box_tracker.h +++ b/mediapipe/util/tracking/box_tracker.h @@ -200,7 +200,7 @@ class BoxTracker { // Cancels all ongoing tracks. To avoid race conditions all NewBoxTrack's in // flight will also be canceled. Future NewBoxTrack's will be canceled. - // NOTE: To resume execution, you have to call ResumeTracking() before + // NOTE - before // issuing more NewBoxTrack calls. void CancelAllOngoingTracks() ABSL_LOCKS_EXCLUDED(status_mutex_); void ResumeTracking() ABSL_LOCKS_EXCLUDED(status_mutex_); @@ -208,7 +208,7 @@ class BoxTracker { // Waits for all ongoing tracks to complete. // Optionally accepts a timeout in microseconds (== 0 for infinite wait). // Returns true on success, false if timeout is reached. - // NOTE: If WaitForAllOngoingTracks timed out, CancelAllOngoingTracks() must + // NOTE - must // be called before destructing the BoxTracker object or dangeling running // threads might try to access invalid data. bool WaitForAllOngoingTracks(int timeout_us = 0)