Internal change.

PiperOrigin-RevId: 527010360
This commit is contained in:
MediaPipe Team 2023-04-25 10:39:36 -07:00 committed by Copybara-Service
parent 9e30b00685
commit 17f5b95387
14 changed files with 18 additions and 15 deletions

View File

@ -273,7 +273,7 @@ defined in the enclosing protobuf in order to be traversed using
## Cycles
<!-- TODO: add discussion of PreviousLoopbackCalculator -->
<!-- TODO -->
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

View File

@ -164,7 +164,7 @@ class Contract {
std::tuple<T...> 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 {

View File

@ -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(); }

View File

@ -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 {

View File

@ -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,

View File

@ -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;
};

View File

@ -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;

View File

@ -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;

View File

@ -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_);

View File

@ -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 =

View File

@ -106,7 +106,7 @@ public class ExternalTextureRenderer {
*
* <p>Before calling this, {@link #setup} must have been called.
*
* <p>NOTE: Calls {@link SurfaceTexture#updateTexImage()} on passed surface texture.
* <p>NOTE -} on passed surface texture.
*/
public void render(SurfaceTexture surfaceTexture) {
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);

View File

@ -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",

View File

@ -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

View File

@ -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)