Project import generated by Copybara.

PiperOrigin-RevId: 267280553
This commit is contained in:
MediaPipe Team 2019-09-04 19:10:42 -07:00 committed by jqtang
parent af67642055
commit dc9216dc59
57 changed files with 0 additions and 582 deletions

View File

@ -24,10 +24,7 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \ build-essential \
ca-certificates \ ca-certificates \
<<<<<<< HEAD
=======
curl \ curl \
>>>>>>> Project import generated by Copybara.
git \ git \
wget \ wget \
unzip \ unzip \
@ -39,11 +36,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libopencv-video-dev \ libopencv-video-dev \
software-properties-common && \ software-properties-common && \
add-apt-repository -y ppa:openjdk-r/ppa && \ add-apt-repository -y ppa:openjdk-r/ppa && \
<<<<<<< HEAD
apt-get update && apt-get install -y openjdk-11-jdk && \
=======
apt-get update && apt-get install -y openjdk-8-jdk && \ apt-get update && apt-get install -y openjdk-8-jdk && \
>>>>>>> Project import generated by Copybara.
apt-get clean && \ apt-get clean && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*

View File

@ -68,8 +68,6 @@ mediapipe_cc_proto_library(
) )
proto_library( proto_library(
<<<<<<< HEAD
=======
name = "stabilized_log_calculator_proto", name = "stabilized_log_calculator_proto",
srcs = ["stabilized_log_calculator.proto"], srcs = ["stabilized_log_calculator.proto"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
@ -87,7 +85,6 @@ mediapipe_cc_proto_library(
) )
proto_library( proto_library(
>>>>>>> Project import generated by Copybara.
name = "time_series_framer_calculator_proto", name = "time_series_framer_calculator_proto",
srcs = ["time_series_framer_calculator.proto"], srcs = ["time_series_framer_calculator.proto"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
@ -177,8 +174,6 @@ cc_library(
) )
cc_library( cc_library(
<<<<<<< HEAD
=======
name = "stabilized_log_calculator", name = "stabilized_log_calculator",
srcs = ["stabilized_log_calculator.cc"], srcs = ["stabilized_log_calculator.cc"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
@ -195,7 +190,6 @@ cc_library(
) )
cc_library( cc_library(
>>>>>>> Project import generated by Copybara.
name = "spectrogram_calculator", name = "spectrogram_calculator",
srcs = ["spectrogram_calculator.cc"], srcs = ["spectrogram_calculator.cc"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
@ -306,8 +300,6 @@ cc_test(
) )
cc_test( cc_test(
<<<<<<< HEAD
=======
name = "stabilized_log_calculator_test", name = "stabilized_log_calculator_test",
srcs = ["stabilized_log_calculator_test.cc"], srcs = ["stabilized_log_calculator_test.cc"],
deps = [ deps = [
@ -326,7 +318,6 @@ cc_test(
) )
cc_test( cc_test(
>>>>>>> Project import generated by Copybara.
name = "time_series_framer_calculator_test", name = "time_series_framer_calculator_test",
srcs = ["time_series_framer_calculator_test.cc"], srcs = ["time_series_framer_calculator_test.cc"],
deps = [ deps = [

View File

@ -64,11 +64,7 @@ class AudioDecoderCalculator : public CalculatorBase {
cc->Outputs().Tag("AUDIO").Set<Matrix>(); cc->Outputs().Tag("AUDIO").Set<Matrix>();
if (cc->Outputs().HasTag("AUDIO_HEADER")) { if (cc->Outputs().HasTag("AUDIO_HEADER")) {
<<<<<<< HEAD
cc->Outputs().Tag("AUDIO_HEADER").Set<mediapipe::TimeSeriesHeader>();
=======
cc->Outputs().Tag("AUDIO_HEADER").SetNone(); cc->Outputs().Tag("AUDIO_HEADER").SetNone();
>>>>>>> Project import generated by Copybara.
} }
return ::mediapipe::OkStatus(); return ::mediapipe::OkStatus();
} }

View File

@ -90,13 +90,8 @@ class FramewiseTransformCalculatorBase : public CalculatorBase {
private: private:
// Takes header and options, and sets up state including calling // Takes header and options, and sets up state including calling
// set_num_output_channels() on the base object. // set_num_output_channels() on the base object.
<<<<<<< HEAD
virtual ::mediapipe::Status ConfigureTransform(
const TimeSeriesHeader& header, const CalculatorOptions& options) = 0;
=======
virtual ::mediapipe::Status ConfigureTransform(const TimeSeriesHeader& header, virtual ::mediapipe::Status ConfigureTransform(const TimeSeriesHeader& header,
CalculatorContext* cc) = 0; CalculatorContext* cc) = 0;
>>>>>>> Project import generated by Copybara.
// Takes a vector<double> corresponding to an input frame, and // Takes a vector<double> corresponding to an input frame, and
// perform the specific transformation to produce an output frame. // perform the specific transformation to produce an output frame.
@ -113,11 +108,7 @@ class FramewiseTransformCalculatorBase : public CalculatorBase {
RETURN_IF_ERROR(time_series_util::FillTimeSeriesHeaderIfValid( RETURN_IF_ERROR(time_series_util::FillTimeSeriesHeaderIfValid(
cc->Inputs().Index(0).Header(), &input_header)); cc->Inputs().Index(0).Header(), &input_header));
<<<<<<< HEAD
::mediapipe::Status status = ConfigureTransform(input_header, cc->Options());
=======
::mediapipe::Status status = ConfigureTransform(input_header, cc); ::mediapipe::Status status = ConfigureTransform(input_header, cc);
>>>>>>> Project import generated by Copybara.
auto output_header = new TimeSeriesHeader(input_header); auto output_header = new TimeSeriesHeader(input_header);
output_header->set_num_channels(num_output_channels_); output_header->set_num_channels(num_output_channels_);
@ -184,17 +175,9 @@ class MfccCalculator : public FramewiseTransformCalculatorBase {
} }
private: private:
<<<<<<< HEAD
::mediapipe::Status ConfigureTransform(
const TimeSeriesHeader& header,
const CalculatorOptions& options) override {
MfccCalculatorOptions mfcc_options;
time_series_util::FillOptionsExtensionOrDie(options, &mfcc_options);
=======
::mediapipe::Status ConfigureTransform(const TimeSeriesHeader& header, ::mediapipe::Status ConfigureTransform(const TimeSeriesHeader& header,
CalculatorContext* cc) override { CalculatorContext* cc) override {
MfccCalculatorOptions mfcc_options = cc->Options<MfccCalculatorOptions>(); MfccCalculatorOptions mfcc_options = cc->Options<MfccCalculatorOptions>();
>>>>>>> Project import generated by Copybara.
mfcc_.reset(new audio_dsp::Mfcc()); mfcc_.reset(new audio_dsp::Mfcc());
int input_length = header.num_channels(); int input_length = header.num_channels();
// Set up the parameters to the Mfcc object. // Set up the parameters to the Mfcc object.
@ -250,18 +233,10 @@ class MelSpectrumCalculator : public FramewiseTransformCalculatorBase {
} }
private: private:
<<<<<<< HEAD
::mediapipe::Status ConfigureTransform(
const TimeSeriesHeader& header,
const CalculatorOptions& options) override {
MelSpectrumCalculatorOptions mel_spectrum_options;
time_series_util::FillOptionsExtensionOrDie(options, &mel_spectrum_options);
=======
::mediapipe::Status ConfigureTransform(const TimeSeriesHeader& header, ::mediapipe::Status ConfigureTransform(const TimeSeriesHeader& header,
CalculatorContext* cc) override { CalculatorContext* cc) override {
MelSpectrumCalculatorOptions mel_spectrum_options = MelSpectrumCalculatorOptions mel_spectrum_options =
cc->Options<MelSpectrumCalculatorOptions>(); cc->Options<MelSpectrumCalculatorOptions>();
>>>>>>> Project import generated by Copybara.
mel_filterbank_.reset(new audio_dsp::MelFilterbank()); mel_filterbank_.reset(new audio_dsp::MelFilterbank());
int input_length = header.num_channels(); int input_length = header.num_channels();
set_num_output_channels(mel_spectrum_options.channel_count()); set_num_output_channels(mel_spectrum_options.channel_count());

View File

@ -64,13 +64,8 @@ void CopyVectorToChannel(const std::vector<float>& vec, Matrix* matrix,
::mediapipe::Status RationalFactorResampleCalculator::Open( ::mediapipe::Status RationalFactorResampleCalculator::Open(
CalculatorContext* cc) { CalculatorContext* cc) {
<<<<<<< HEAD
RationalFactorResampleCalculatorOptions resample_options;
time_series_util::FillOptionsExtensionOrDie(cc->Options(), &resample_options);
=======
RationalFactorResampleCalculatorOptions resample_options = RationalFactorResampleCalculatorOptions resample_options =
cc->Options<RationalFactorResampleCalculatorOptions>(); cc->Options<RationalFactorResampleCalculatorOptions>();
>>>>>>> Project import generated by Copybara.
if (!resample_options.has_target_sample_rate()) { if (!resample_options.has_target_sample_rate()) {
return tool::StatusInvalid( return tool::StatusInvalid(

View File

@ -71,15 +71,8 @@ class SpectrogramCalculator : public CalculatorBase {
// Input stream with TimeSeriesHeader. // Input stream with TimeSeriesHeader.
); );
<<<<<<< HEAD
SpectrogramCalculatorOptions spectrogram_options;
time_series_util::FillOptionsExtensionOrDie(cc->Options(),
&spectrogram_options);
=======
SpectrogramCalculatorOptions spectrogram_options = SpectrogramCalculatorOptions spectrogram_options =
cc->Options<SpectrogramCalculatorOptions>(); cc->Options<SpectrogramCalculatorOptions>();
>>>>>>> Project import generated by Copybara.
if (!spectrogram_options.allow_multichannel_input()) { if (!spectrogram_options.allow_multichannel_input()) {
if (spectrogram_options.output_type() == if (spectrogram_options.output_type() ==
SpectrogramCalculatorOptions::COMPLEX) { SpectrogramCalculatorOptions::COMPLEX) {
@ -177,14 +170,8 @@ REGISTER_CALCULATOR(SpectrogramCalculator);
const float SpectrogramCalculator::kLnPowerToDb = 4.342944819032518; const float SpectrogramCalculator::kLnPowerToDb = 4.342944819032518;
::mediapipe::Status SpectrogramCalculator::Open(CalculatorContext* cc) { ::mediapipe::Status SpectrogramCalculator::Open(CalculatorContext* cc) {
<<<<<<< HEAD
SpectrogramCalculatorOptions spectrogram_options;
time_series_util::FillOptionsExtensionOrDie(cc->Options(),
&spectrogram_options);
=======
SpectrogramCalculatorOptions spectrogram_options = SpectrogramCalculatorOptions spectrogram_options =
cc->Options<SpectrogramCalculatorOptions>(); cc->Options<SpectrogramCalculatorOptions>();
>>>>>>> Project import generated by Copybara.
if (spectrogram_options.frame_duration_seconds() <= 0.0) { if (spectrogram_options.frame_duration_seconds() <= 0.0) {
::mediapipe::InvalidArgumentErrorBuilder(MEDIAPIPE_LOC) ::mediapipe::InvalidArgumentErrorBuilder(MEDIAPIPE_LOC)
@ -233,13 +220,10 @@ const float SpectrogramCalculator::kLnPowerToDb = 4.342944819032518;
std::vector<double> window; std::vector<double> window;
switch (spectrogram_options.window_type()) { switch (spectrogram_options.window_type()) {
<<<<<<< HEAD
=======
case SpectrogramCalculatorOptions::COSINE: case SpectrogramCalculatorOptions::COSINE:
audio_dsp::CosineWindow().GetPeriodicSamples(frame_duration_samples_, audio_dsp::CosineWindow().GetPeriodicSamples(frame_duration_samples_,
&window); &window);
break; break;
>>>>>>> Project import generated by Copybara.
case SpectrogramCalculatorOptions::HANN: case SpectrogramCalculatorOptions::HANN:
audio_dsp::HannWindow().GetPeriodicSamples(frame_duration_samples_, audio_dsp::HannWindow().GetPeriodicSamples(frame_duration_samples_,
&window); &window);

View File

@ -58,10 +58,7 @@ message SpectrogramCalculatorOptions {
enum WindowType { enum WindowType {
HANN = 0; HANN = 0;
HAMMING = 1; HAMMING = 1;
<<<<<<< HEAD
=======
COSINE = 2; COSINE = 2;
>>>>>>> Project import generated by Copybara.
} }
optional WindowType window_type = 6 [default = HANN]; optional WindowType window_type = 6 [default = HANN];

View File

@ -206,13 +206,8 @@ void TimeSeriesFramerCalculator::FrameOutput(CalculatorContext* cc) {
} }
::mediapipe::Status TimeSeriesFramerCalculator::Open(CalculatorContext* cc) { ::mediapipe::Status TimeSeriesFramerCalculator::Open(CalculatorContext* cc) {
<<<<<<< HEAD
TimeSeriesFramerCalculatorOptions framer_options;
time_series_util::FillOptionsExtensionOrDie(cc->Options(), &framer_options);
=======
TimeSeriesFramerCalculatorOptions framer_options = TimeSeriesFramerCalculatorOptions framer_options =
cc->Options<TimeSeriesFramerCalculatorOptions>(); cc->Options<TimeSeriesFramerCalculatorOptions>();
>>>>>>> Project import generated by Copybara.
RET_CHECK_GT(framer_options.frame_duration_seconds(), 0.0) RET_CHECK_GT(framer_options.frame_duration_seconds(), 0.0)
<< "Invalid or missing frame_duration_seconds. " << "Invalid or missing frame_duration_seconds. "

View File

@ -162,10 +162,7 @@ cc_library(
deps = [ deps = [
":concatenate_vector_calculator_cc_proto", ":concatenate_vector_calculator_cc_proto",
"//mediapipe/framework:calculator_framework", "//mediapipe/framework:calculator_framework",
<<<<<<< HEAD
=======
"//mediapipe/framework/formats:landmark_cc_proto", "//mediapipe/framework/formats:landmark_cc_proto",
>>>>>>> Project import generated by Copybara.
"//mediapipe/framework/port:ret_check", "//mediapipe/framework/port:ret_check",
"//mediapipe/framework/port:status", "//mediapipe/framework/port:status",
"@org_tensorflow//tensorflow/lite:framework", "@org_tensorflow//tensorflow/lite:framework",
@ -527,10 +524,7 @@ cc_library(
deps = [ deps = [
":split_vector_calculator_cc_proto", ":split_vector_calculator_cc_proto",
"//mediapipe/framework:calculator_framework", "//mediapipe/framework:calculator_framework",
<<<<<<< HEAD
=======
"//mediapipe/framework/formats:landmark_cc_proto", "//mediapipe/framework/formats:landmark_cc_proto",
>>>>>>> Project import generated by Copybara.
"//mediapipe/framework/port:ret_check", "//mediapipe/framework/port:ret_check",
"//mediapipe/framework/port:status", "//mediapipe/framework/port:status",
"//mediapipe/util:resource_util", "//mediapipe/util:resource_util",
@ -636,8 +630,6 @@ cc_test(
) )
cc_library( cc_library(
<<<<<<< HEAD
=======
name = "matrix_to_vector_calculator", name = "matrix_to_vector_calculator",
srcs = ["matrix_to_vector_calculator.cc"], srcs = ["matrix_to_vector_calculator.cc"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
@ -673,7 +665,6 @@ cc_test(
) )
cc_library( cc_library(
>>>>>>> Project import generated by Copybara.
name = "merge_calculator", name = "merge_calculator",
srcs = ["merge_calculator.cc"], srcs = ["merge_calculator.cc"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],

View File

@ -16,10 +16,7 @@
#include <vector> #include <vector>
<<<<<<< HEAD
=======
#include "mediapipe/framework/formats/landmark.pb.h" #include "mediapipe/framework/formats/landmark.pb.h"
>>>>>>> Project import generated by Copybara.
#include "tensorflow/lite/interpreter.h" #include "tensorflow/lite/interpreter.h"
namespace mediapipe { namespace mediapipe {
@ -45,10 +42,7 @@ typedef ConcatenateVectorCalculator<TfLiteTensor>
ConcatenateTfLiteTensorVectorCalculator; ConcatenateTfLiteTensorVectorCalculator;
REGISTER_CALCULATOR(ConcatenateTfLiteTensorVectorCalculator); REGISTER_CALCULATOR(ConcatenateTfLiteTensorVectorCalculator);
<<<<<<< HEAD
=======
typedef ConcatenateVectorCalculator<::mediapipe::NormalizedLandmark> typedef ConcatenateVectorCalculator<::mediapipe::NormalizedLandmark>
ConcatenateLandmarkVectorCalculator; ConcatenateLandmarkVectorCalculator;
REGISTER_CALCULATOR(ConcatenateLandmarkVectorCalculator); REGISTER_CALCULATOR(ConcatenateLandmarkVectorCalculator);
>>>>>>> Project import generated by Copybara.
} // namespace mediapipe } // namespace mediapipe

View File

@ -16,10 +16,7 @@
#include <vector> #include <vector>
<<<<<<< HEAD
=======
#include "mediapipe/framework/formats/landmark.pb.h" #include "mediapipe/framework/formats/landmark.pb.h"
>>>>>>> Project import generated by Copybara.
#include "tensorflow/lite/interpreter.h" #include "tensorflow/lite/interpreter.h"
namespace mediapipe { namespace mediapipe {
@ -41,10 +38,7 @@ namespace mediapipe {
typedef SplitVectorCalculator<TfLiteTensor> SplitTfLiteTensorVectorCalculator; typedef SplitVectorCalculator<TfLiteTensor> SplitTfLiteTensorVectorCalculator;
REGISTER_CALCULATOR(SplitTfLiteTensorVectorCalculator); REGISTER_CALCULATOR(SplitTfLiteTensorVectorCalculator);
<<<<<<< HEAD
=======
typedef SplitVectorCalculator<::mediapipe::NormalizedLandmark> typedef SplitVectorCalculator<::mediapipe::NormalizedLandmark>
SplitLandmarkVectorCalculator; SplitLandmarkVectorCalculator;
REGISTER_CALCULATOR(SplitLandmarkVectorCalculator); REGISTER_CALCULATOR(SplitLandmarkVectorCalculator);
>>>>>>> Project import generated by Copybara.
} // namespace mediapipe } // namespace mediapipe

View File

@ -244,11 +244,7 @@ REGISTER_CALCULATOR(ImageTransformationCalculator);
rotation_ = DegreesToRotationMode( rotation_ = DegreesToRotationMode(
cc->InputSidePackets().Tag("ROTATION_DEGREES").Get<int>()); cc->InputSidePackets().Tag("ROTATION_DEGREES").Get<int>());
} else { } else {
<<<<<<< HEAD
rotation_ = DegreesToRotationMode(options_.rotation_mode());
=======
rotation_ = options_.rotation_mode(); rotation_ = options_.rotation_mode();
>>>>>>> Project import generated by Copybara.
} }
scale_mode_ = ParseScaleMode(options_.scale_mode(), DEFAULT_SCALE_MODE); scale_mode_ = ParseScaleMode(options_.scale_mode(), DEFAULT_SCALE_MODE);

View File

@ -188,8 +188,6 @@ mediapipe_cc_proto_library(
) )
mediapipe_cc_proto_library( mediapipe_cc_proto_library(
<<<<<<< HEAD
=======
name = "tensorflow_session_from_frozen_graph_calculator_cc_proto", name = "tensorflow_session_from_frozen_graph_calculator_cc_proto",
srcs = ["tensorflow_session_from_frozen_graph_calculator.proto"], srcs = ["tensorflow_session_from_frozen_graph_calculator.proto"],
cc_deps = [ cc_deps = [
@ -201,7 +199,6 @@ mediapipe_cc_proto_library(
) )
mediapipe_cc_proto_library( mediapipe_cc_proto_library(
>>>>>>> Project import generated by Copybara.
name = "tensorflow_session_from_saved_model_generator_cc_proto", name = "tensorflow_session_from_saved_model_generator_cc_proto",
srcs = ["tensorflow_session_from_saved_model_generator.proto"], srcs = ["tensorflow_session_from_saved_model_generator.proto"],
cc_deps = ["//mediapipe/framework:packet_generator_cc_proto"], cc_deps = ["//mediapipe/framework:packet_generator_cc_proto"],
@ -459,8 +456,6 @@ cc_library(
) )
cc_library( cc_library(
<<<<<<< HEAD
=======
name = "tensorflow_session_from_frozen_graph_calculator", name = "tensorflow_session_from_frozen_graph_calculator",
srcs = ["tensorflow_session_from_frozen_graph_calculator.cc"], srcs = ["tensorflow_session_from_frozen_graph_calculator.cc"],
features = ["no_layering_check"], features = ["no_layering_check"],
@ -490,7 +485,6 @@ cc_library(
) )
cc_library( cc_library(
>>>>>>> Project import generated by Copybara.
name = "tensorflow_session_from_frozen_graph_generator", name = "tensorflow_session_from_frozen_graph_generator",
srcs = ["tensorflow_session_from_frozen_graph_generator.cc"], srcs = ["tensorflow_session_from_frozen_graph_generator.cc"],
features = ["no_layering_check"], features = ["no_layering_check"],
@ -784,8 +778,6 @@ cc_test(
) )
cc_test( cc_test(
<<<<<<< HEAD
=======
name = "tensorflow_session_from_frozen_graph_calculator_test", name = "tensorflow_session_from_frozen_graph_calculator_test",
srcs = ["tensorflow_session_from_frozen_graph_calculator_test.cc"], srcs = ["tensorflow_session_from_frozen_graph_calculator_test.cc"],
data = [":test_frozen_graph"], data = [":test_frozen_graph"],
@ -816,7 +808,6 @@ cc_test(
) )
cc_test( cc_test(
>>>>>>> Project import generated by Copybara.
name = "tensorflow_session_from_frozen_graph_generator_test", name = "tensorflow_session_from_frozen_graph_generator_test",
srcs = ["tensorflow_session_from_frozen_graph_generator_test.cc"], srcs = ["tensorflow_session_from_frozen_graph_generator_test.cc"],
data = [":test_frozen_graph"], data = [":test_frozen_graph"],

View File

@ -34,13 +34,10 @@
#include "tensorflow/core/framework/tensor_shape.h" #include "tensorflow/core/framework/tensor_shape.h"
#include "tensorflow/core/framework/tensor_util.h" #include "tensorflow/core/framework/tensor_util.h"
<<<<<<< HEAD
=======
#if !defined(__ANDROID__) && !defined(__APPLE__) #if !defined(__ANDROID__) && !defined(__APPLE__)
#include "tensorflow/core/profiler/lib/traceme.h" #include "tensorflow/core/profiler/lib/traceme.h"
#endif #endif
>>>>>>> Project import generated by Copybara.
namespace tf = ::tensorflow; namespace tf = ::tensorflow;
namespace mediapipe { namespace mediapipe {
@ -442,11 +439,6 @@ class TensorFlowInferenceCalculator : public CalculatorBase {
session_run_throttle->Acquire(1); session_run_throttle->Acquire(1);
} }
const int64 run_start_time = absl::ToUnixMicros(clock_->TimeNow()); const int64 run_start_time = absl::ToUnixMicros(clock_->TimeNow());
<<<<<<< HEAD
const tf::Status tf_status =
session_->Run(input_tensors, output_tensor_names,
{} /* target_node_names */, &outputs);
=======
tf::Status tf_status; tf::Status tf_status;
{ {
#if !defined(__ANDROID__) && !defined(__APPLE__) #if !defined(__ANDROID__) && !defined(__APPLE__)
@ -456,7 +448,6 @@ class TensorFlowInferenceCalculator : public CalculatorBase {
{} /* target_node_names */, &outputs); {} /* target_node_names */, &outputs);
} }
>>>>>>> Project import generated by Copybara.
if (session_run_throttle != nullptr) { if (session_run_throttle != nullptr) {
session_run_throttle->Release(1); session_run_throttle->Release(1);
} }

View File

@ -62,8 +62,6 @@ proto_library(
) )
proto_library( proto_library(
<<<<<<< HEAD
=======
name = "tflite_tensors_to_classification_calculator_proto", name = "tflite_tensors_to_classification_calculator_proto",
srcs = ["tflite_tensors_to_classification_calculator.proto"], srcs = ["tflite_tensors_to_classification_calculator.proto"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
@ -71,7 +69,6 @@ proto_library(
) )
proto_library( proto_library(
>>>>>>> Project import generated by Copybara.
name = "tflite_tensors_to_landmarks_calculator_proto", name = "tflite_tensors_to_landmarks_calculator_proto",
srcs = ["tflite_tensors_to_landmarks_calculator.proto"], srcs = ["tflite_tensors_to_landmarks_calculator.proto"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
@ -127,8 +124,6 @@ mediapipe_cc_proto_library(
) )
mediapipe_cc_proto_library( mediapipe_cc_proto_library(
<<<<<<< HEAD
=======
name = "tflite_tensors_to_classification_calculator_cc_proto", name = "tflite_tensors_to_classification_calculator_cc_proto",
srcs = ["tflite_tensors_to_classification_calculator.proto"], srcs = ["tflite_tensors_to_classification_calculator.proto"],
cc_deps = ["//mediapipe/framework:calculator_cc_proto"], cc_deps = ["//mediapipe/framework:calculator_cc_proto"],
@ -137,7 +132,6 @@ mediapipe_cc_proto_library(
) )
mediapipe_cc_proto_library( mediapipe_cc_proto_library(
>>>>>>> Project import generated by Copybara.
name = "tflite_tensors_to_landmarks_calculator_cc_proto", name = "tflite_tensors_to_landmarks_calculator_cc_proto",
srcs = ["tflite_tensors_to_landmarks_calculator.proto"], srcs = ["tflite_tensors_to_landmarks_calculator.proto"],
cc_deps = ["//mediapipe/framework:calculator_cc_proto"], cc_deps = ["//mediapipe/framework:calculator_cc_proto"],
@ -332,8 +326,6 @@ cc_library(
alwayslink = 1, alwayslink = 1,
) )
<<<<<<< HEAD
=======
cc_test( cc_test(
name = "tflite_tensors_to_classification_calculator_test", name = "tflite_tensors_to_classification_calculator_test",
srcs = ["tflite_tensors_to_classification_calculator_test.cc"], srcs = ["tflite_tensors_to_classification_calculator_test.cc"],
@ -353,7 +345,6 @@ cc_test(
], ],
) )
>>>>>>> Project import generated by Copybara.
cc_library( cc_library(
name = "tflite_tensors_to_detections_calculator", name = "tflite_tensors_to_detections_calculator",
srcs = ["tflite_tensors_to_detections_calculator.cc"], srcs = ["tflite_tensors_to_detections_calculator.cc"],
@ -383,8 +374,6 @@ cc_library(
) )
cc_library( cc_library(
<<<<<<< HEAD
=======
name = "tflite_tensors_to_classification_calculator", name = "tflite_tensors_to_classification_calculator",
srcs = ["tflite_tensors_to_classification_calculator.cc"], srcs = ["tflite_tensors_to_classification_calculator.cc"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
@ -416,7 +405,6 @@ cc_library(
) )
cc_library( cc_library(
>>>>>>> Project import generated by Copybara.
name = "tflite_tensors_to_landmarks_calculator", name = "tflite_tensors_to_landmarks_calculator",
srcs = ["tflite_tensors_to_landmarks_calculator.cc"], srcs = ["tflite_tensors_to_landmarks_calculator.cc"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],

View File

@ -434,14 +434,9 @@ REGISTER_CALCULATOR(TfLiteInferenceCalculator);
use_quantized_tensors_ = false; use_quantized_tensors_ = false;
} else { } else {
RET_CHECK_EQ(interpreter_->AllocateTensors(), kTfLiteOk); RET_CHECK_EQ(interpreter_->AllocateTensors(), kTfLiteOk);
<<<<<<< HEAD
use_quantized_tensors_ = (interpreter_->tensor(0)->quantization.type ==
kTfLiteAffineQuantization);
=======
use_quantized_tensors_ = use_quantized_tensors_ =
(interpreter_->tensor(interpreter_->inputs()[0])->quantization.type == (interpreter_->tensor(interpreter_->inputs()[0])->quantization.type ==
kTfLiteAffineQuantization); kTfLiteAffineQuantization);
>>>>>>> Project import generated by Copybara.
if (use_quantized_tensors_) gpu_inference_ = false; if (use_quantized_tensors_) gpu_inference_ = false;
} }

View File

@ -154,10 +154,6 @@ class OpenCvVideoDecoderCalculator : public CalculatorBase {
cv::COLOR_BGRA2RGBA); cv::COLOR_BGRA2RGBA);
} }
} }
<<<<<<< HEAD
cc->Outputs().Tag("VIDEO").Add(image_frame.release(), timestamp);
decoded_frames_++;
=======
// If the timestamp of the current frame is not greater than the one of the // If the timestamp of the current frame is not greater than the one of the
// previous frame, the new frame will be discarded. // previous frame, the new frame will be discarded.
if (prev_timestamp_ < timestamp) { if (prev_timestamp_ < timestamp) {
@ -166,7 +162,6 @@ class OpenCvVideoDecoderCalculator : public CalculatorBase {
decoded_frames_++; decoded_frames_++;
} }
>>>>>>> Project import generated by Copybara.
return ::mediapipe::OkStatus(); return ::mediapipe::OkStatus();
} }
@ -189,10 +184,7 @@ class OpenCvVideoDecoderCalculator : public CalculatorBase {
int frame_count_; int frame_count_;
int decoded_frames_ = 0; int decoded_frames_ = 0;
ImageFormat::Format format_; ImageFormat::Format format_;
<<<<<<< HEAD
=======
Timestamp prev_timestamp_ = Timestamp::Unset(); Timestamp prev_timestamp_ = Timestamp::Unset();
>>>>>>> Project import generated by Copybara.
}; };
REGISTER_CALCULATOR(OpenCvVideoDecoderCalculator); REGISTER_CALCULATOR(OpenCvVideoDecoderCalculator);

View File

@ -61,11 +61,7 @@ ordering and ignores packet timestamps, which will eliminate this inconvenience.
By default, MediaPipe calls the `Close()` method of a non-source calculator when By default, MediaPipe calls the `Close()` method of a non-source calculator when
all of its input streams are done. In the example graph, we want to stop the all of its input streams are done. In the example graph, we want to stop the
adder node as soon as the integer source is done. This is accomplished by adder node as soon as the integer source is done. This is accomplished by
<<<<<<< HEAD
configuring the adder node with an alternative input stream hander,
=======
configuring the adder node with an alternative input stream handler, configuring the adder node with an alternative input stream handler,
>>>>>>> Project import generated by Copybara.
`EarlyCloseInputStreamHandler`. `EarlyCloseInputStreamHandler`.
## Relevant Source Code ## Relevant Source Code

View File

@ -85,14 +85,11 @@ and model details are described in the
[Hello World for C++](./hello_world_desktop.md) shows how to run a simple graph [Hello World for C++](./hello_world_desktop.md) shows how to run a simple graph
using the MediaPipe C++ APIs. using the MediaPipe C++ APIs.
<<<<<<< HEAD
=======
### Feature Extration for YouTube-8M Challenge ### Feature Extration for YouTube-8M Challenge
[Feature Extration for YouTube-8M Challenge](./youtube_8m.md) shows how to use [Feature Extration for YouTube-8M Challenge](./youtube_8m.md) shows how to use
MediaPipe to prepare training data for the YouTube-8M Challenge. MediaPipe to prepare training data for the YouTube-8M Challenge.
>>>>>>> Project import generated by Copybara.
### Preparing Data Sets with MediaSequence ### Preparing Data Sets with MediaSequence
[Preparing Data Sets with MediaSequence](./media_sequence.md) shows how to use [Preparing Data Sets with MediaSequence](./media_sequence.md) shows how to use

View File

@ -17,11 +17,7 @@ packets and produces zero or more output streams and/or side packets.
### CalculatorBase ### CalculatorBase
A calculator is created by defining a new sub-class of the A calculator is created by defining a new sub-class of the
<<<<<<< HEAD
[`CalculatorBase`](http://github.com/google/mediapipe/mediapipe/framework/calculator_base.cc)
=======
[`CalculatorBase`](https://github.com/google/mediapipe/tree/master/mediapipe/framework/calculator_base.cc) [`CalculatorBase`](https://github.com/google/mediapipe/tree/master/mediapipe/framework/calculator_base.cc)
>>>>>>> Project import generated by Copybara.
class, implementing a number of methods, and registering the new sub-class with class, implementing a number of methods, and registering the new sub-class with
Mediapipe. At a minimum, a new calculator must implement the below four methods Mediapipe. At a minimum, a new calculator must implement the below four methods
@ -35,11 +31,7 @@ Mediapipe. At a minimum, a new calculator must implement the below four methods
* After all calls to `Process()` finish or when all input streams close, the framework calls `Close()`. This function is always called if `Open()` was called and succeeded and even if the graph run terminated because of an error. No inputs are available via any input streams during `Close()`, but it still has access to input side packets and therefore may write outputs. After `Close()` returns, the calculator should be considered a dead node. The calculator object is destroyed as soon as the graph finishes running. * After all calls to `Process()` finish or when all input streams close, the framework calls `Close()`. This function is always called if `Open()` was called and succeeded and even if the graph run terminated because of an error. No inputs are available via any input streams during `Close()`, but it still has access to input side packets and therefore may write outputs. After `Close()` returns, the calculator should be considered a dead node. The calculator object is destroyed as soon as the graph finishes running.
The following are code snippets from The following are code snippets from
<<<<<<< HEAD
[CalculatorBase.h](http://github.com/google/mediapipe/mediapipe/framework/calculator_base.h).
=======
[CalculatorBase.h](https://github.com/google/mediapipe/tree/master/mediapipe/framework/calculator_base.h). [CalculatorBase.h](https://github.com/google/mediapipe/tree/master/mediapipe/framework/calculator_base.h).
>>>>>>> Project import generated by Copybara.
```c++ ```c++
class CalculatorBase { class CalculatorBase {

View File

@ -643,11 +643,7 @@ Initialize the asset manager in `onCreate(Bundle)` before initializing
`eglManager`: `eglManager`:
``` ```
<<<<<<< HEAD
// Initilize asset manager so that MediaPipe native libraries can access the app assets, e.g.,
=======
// Initialize asset manager so that MediaPipe native libraries can access the app assets, e.g., // Initialize asset manager so that MediaPipe native libraries can access the app assets, e.g.,
>>>>>>> Project import generated by Copybara.
// binary graphs. // binary graphs.
AndroidAssetUtil.initializeNativeAssetManager(this); AndroidAssetUtil.initializeNativeAssetManager(this);
``` ```

View File

@ -6,11 +6,7 @@ This codelab uses MediaPipe on an iOS device.
### What you will learn ### What you will learn
<<<<<<< HEAD
How to develop an Android application that uses MediaPipe and run a MediaPipe
=======
How to develop an iOS application that uses MediaPipe and run a MediaPipe How to develop an iOS application that uses MediaPipe and run a MediaPipe
>>>>>>> Project import generated by Copybara.
graph on iOS. graph on iOS.
### What you will build ### What you will build

View File

@ -1,18 +1,9 @@
<<<<<<< HEAD
## Getting help
- [Technical questions](#technical-questions)
- [Bugs and Feature requests](#bugs-and-feature-requests)
Below are the various ways to get help
=======
## Getting Help ## Getting Help
- [Technical questions](#technical-questions) - [Technical questions](#technical-questions)
- [Bugs and feature requests](#bugs-and-feature-requests) - [Bugs and feature requests](#bugs-and-feature-requests)
Below are the various ways to get help: Below are the various ways to get help:
>>>>>>> Project import generated by Copybara.
### Technical questions ### Technical questions
@ -20,14 +11,6 @@ For help with technical or algorithmic questions, visit
[Stack Overflow](https://stackoverflow.com/questions/tagged/mediapipe) to find [Stack Overflow](https://stackoverflow.com/questions/tagged/mediapipe) to find
answers and support from the MediaPipe community. answers and support from the MediaPipe community.
<<<<<<< HEAD
### Bugs and Feature requests
To report bugs or make feature requests,
[file an issue on GitHub](https://github.com/google/mediapipe/mediapipe/issues).
Please choose the appropriate repository for the project from the
[MediaPipe repo](https://github.com/google/mediapipe/mediapipe)
=======
### Bugs and feature requests ### Bugs and feature requests
To report bugs or make feature requests, To report bugs or make feature requests,
@ -56,4 +39,3 @@ Describe the problem clearly here. Be sure to convey here why it's a bug in Medi
### Source code / logs ### Source code / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached instead of being pasted into the issue as text. Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached instead of being pasted into the issue as text.
>>>>>>> Project import generated by Copybara.

View File

@ -49,17 +49,10 @@ To build and run iOS apps:
[documentation](https://docs.bazel.build/versions/master/install-ubuntu.html) [documentation](https://docs.bazel.build/versions/master/install-ubuntu.html)
to install any version of Bazel manually. to install any version of Bazel manually.
<<<<<<< HEAD
3. Install OpenCV.
Option 1. Use package manager tool to install the pre-compiled OpenCV
libraries.
=======
3. Install OpenCV and FFmpeg. 3. Install OpenCV and FFmpeg.
Option 1. Use package manager tool to install the pre-compiled OpenCV Option 1. Use package manager tool to install the pre-compiled OpenCV
libraries. FFmpeg will be installed via libopencv-video-dev. libraries. FFmpeg will be installed via libopencv-video-dev.
>>>>>>> Project import generated by Copybara.
Note: Debian 9 and Ubuntu 16.04 provide OpenCV 2.4.9. You may want to take Note: Debian 9 and Ubuntu 16.04 provide OpenCV 2.4.9. You may want to take
option 2 or 3 to install OpenCV 3 or above. option 2 or 3 to install OpenCV 3 or above.
@ -90,26 +83,6 @@ To build and run iOS apps:
) )
cc_library( cc_library(
<<<<<<< HEAD
name = "opencv",
srcs = glob(
[
"lib/libopencv_core.so*",
"lib/libopencv_highgui.so*",
"lib/libopencv_imgcodecs.so*",
"lib/libopencv_imgproc.so*",
"lib/libopencv_video.so*",
"lib/libopencv_videoio.so*",
],
),
hdrs = glob(["include/opencv4/**/*.h*"]),
includes = ["include/opencv4/"],
linkstatic = 1,
visibility = ["//visibility:public"],
)
=======
name = "opencv", name = "opencv",
srcs = glob( srcs = glob(
[ [
@ -126,7 +99,6 @@ To build and run iOS apps:
linkstatic = 1, linkstatic = 1,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
>>>>>>> Project import generated by Copybara.
``` ```
4. Run the [Hello World desktop example](./hello_world_desktop.md). 4. Run the [Hello World desktop example](./hello_world_desktop.md).
@ -194,26 +166,6 @@ To build and run iOS apps:
) )
cc_library( cc_library(
<<<<<<< HEAD
name = "opencv",
srcs = glob(
[
"lib/libopencv_core.so*",
"lib/libopencv_highgui.so*",
"lib/libopencv_imgcodecs.so*",
"lib/libopencv_imgproc.so*",
"lib/libopencv_video.so*",
"lib/libopencv_videoio.so*",
],
),
hdrs = glob(["include/opencv4/**/*.h*"]),
includes = ["include/opencv4/"],
linkstatic = 1,
visibility = ["//visibility:public"],
)
=======
name = "opencv", name = "opencv",
srcs = glob( srcs = glob(
[ [
@ -230,7 +182,6 @@ To build and run iOS apps:
linkstatic = 1, linkstatic = 1,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
>>>>>>> Project import generated by Copybara.
``` ```
4. Run the [Hello World desktop example](./hello_world_desktop.md). 4. Run the [Hello World desktop example](./hello_world_desktop.md).
@ -284,17 +235,10 @@ To build and run iOS apps:
[documentation](https://docs.bazel.build/versions/master/install-ubuntu.html) [documentation](https://docs.bazel.build/versions/master/install-ubuntu.html)
to install any version of Bazel manually. to install any version of Bazel manually.
<<<<<<< HEAD
4. Install OpenCV.
Option 1. Use HomeBrew package manager tool to install the pre-compiled
OpenCV libraries.
=======
4. Install OpenCV and FFmpeg. 4. Install OpenCV and FFmpeg.
Option 1. Use HomeBrew package manager tool to install the pre-compiled Option 1. Use HomeBrew package manager tool to install the pre-compiled
OpenCV libraries. FFmpeg will be installed via OpenCV. OpenCV libraries. FFmpeg will be installed via OpenCV.
>>>>>>> Project import generated by Copybara.
```bash ```bash
$ brew install opencv $ brew install opencv
@ -306,35 +250,6 @@ To build and run iOS apps:
$ port install opencv $ port install opencv
``` ```
<<<<<<< HEAD
Note: when using MacPorts, please edit the [`WORKSAPCE`] and
[`opencv_linux.BUILD`] files like the following:
```bash
new_local_repository(
name = "macos_opencv",
build_file = "@//third_party:opencv_macos.BUILD",
path = "/opt",
)
cc_library(
name = "opencv",
srcs = glob(
[
"local/lib/libopencv_core.dylib",
"local/lib/libopencv_highgui.dylib",
"local/lib/libopencv_imgcodecs.dylib",
"local/lib/libopencv_imgproc.dylib",
"local/lib/libopencv_video.dylib",
"local/lib/libopencv_videoio.dylib",
],
),
hdrs = glob(["local/include/opencv2/**/*.h*"]),
includes = ["local/include/"],
linkstatic = 1,
visibility = ["//visibility:public"],
)
=======
Note: when using MacPorts, please edit the [`WORKSAPCE`], Note: when using MacPorts, please edit the [`WORKSAPCE`],
[`opencv_macos.BUILD`], and [`ffmpeg_macos.BUILD`] files like the following: [`opencv_macos.BUILD`], and [`ffmpeg_macos.BUILD`] files like the following:
@ -387,7 +302,6 @@ To build and run iOS apps:
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
>>>>>>> Project import generated by Copybara.
``` ```
5. Run the [Hello World desktop example](./hello_world_desktop.md). 5. Run the [Hello World desktop example](./hello_world_desktop.md).
@ -457,17 +371,10 @@ To build and run iOS apps:
username@DESKTOP-TMVLBJ1:~$ cd mediapipe username@DESKTOP-TMVLBJ1:~$ cd mediapipe
``` ```
<<<<<<< HEAD
7. Install OpenCV.
Option 1. Use package manager tool to install the pre-compiled OpenCV
libraries.
=======
7. Install OpenCV and FFmpeg. 7. Install OpenCV and FFmpeg.
Option 1. Use package manager tool to install the pre-compiled OpenCV Option 1. Use package manager tool to install the pre-compiled OpenCV
libraries. FFmpeg will be installed via libopencv-video-dev. libraries. FFmpeg will be installed via libopencv-video-dev.
>>>>>>> Project import generated by Copybara.
```bash ```bash
username@DESKTOP-TMVLBJ1:~/mediapipe$ sudo apt-get install libopencv-core-dev libopencv-highgui-dev \ username@DESKTOP-TMVLBJ1:~/mediapipe$ sudo apt-get install libopencv-core-dev libopencv-highgui-dev \
@ -495,26 +402,6 @@ To build and run iOS apps:
) )
cc_library( cc_library(
<<<<<<< HEAD
name = "opencv",
srcs = glob(
[
"lib/libopencv_core.so*",
"lib/libopencv_highgui.so*",
"lib/libopencv_imgcodecs.so*",
"lib/libopencv_imgproc.so*",
"lib/libopencv_video.so*",
"lib/libopencv_videoio.so*",
],
),
hdrs = glob(["include/opencv4/**/*.h*"]),
includes = ["include/opencv4/"],
linkstatic = 1,
visibility = ["//visibility:public"],
)
=======
name = "opencv", name = "opencv",
srcs = glob( srcs = glob(
[ [
@ -531,7 +418,6 @@ To build and run iOS apps:
linkstatic = 1, linkstatic = 1,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
>>>>>>> Project import generated by Copybara.
``` ```
8. Run the [Hello World desktop example](./hello_world_desktop.md). 8. Run the [Hello World desktop example](./hello_world_desktop.md).
@ -561,11 +447,7 @@ To build and run iOS apps:
This will use a Docker image that will isolate mediapipe's installation from the rest of the system. This will use a Docker image that will isolate mediapipe's installation from the rest of the system.
1. [Install Docker](https://docs.docker.com/install/#supported-platforms) on 1. [Install Docker](https://docs.docker.com/install/#supported-platforms) on
<<<<<<< HEAD
your host sytem.
=======
your host system. your host system.
>>>>>>> Project import generated by Copybara.
2. Build a docker image with tag "mediapipe". 2. Build a docker image with tag "mediapipe".
@ -610,9 +492,6 @@ This will use a Docker image that will isolate mediapipe's installation from the
# Hello World! # Hello World!
``` ```
<<<<<<< HEAD
<!-- 4. Uncomment the last line of the Dockerfile
=======
4. Build Mediapipe [Android demos](./examples.md). 4. Build Mediapipe [Android demos](./examples.md).
```bash ```bash
@ -638,7 +517,6 @@ This will use a Docker image that will isolate mediapipe's installation from the
``` ```
<!-- 5. Uncomment the last line of the Dockerfile <!-- 5. Uncomment the last line of the Dockerfile
>>>>>>> Project import generated by Copybara.
```bash ```bash
RUN bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/demo:object_detection_tensorflow_demo RUN bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/demo:object_detection_tensorflow_demo
@ -728,10 +606,7 @@ The steps below use Android Studio to build and install a MediaPipe example app.
[`WORKSAPCE`]: https://github.com/google/mediapipe/tree/master/WORKSPACE [`WORKSAPCE`]: https://github.com/google/mediapipe/tree/master/WORKSPACE
[`opencv_linux.BUILD`]: https://github.com/google/mediapipe/tree/master/third_party/opencv_linux.BUILD [`opencv_linux.BUILD`]: https://github.com/google/mediapipe/tree/master/third_party/opencv_linux.BUILD
<<<<<<< HEAD
=======
[`opencv_macos.BUILD`]: https://github.com/google/mediapipe/tree/master/third_party/opencv_macos.BUILD [`opencv_macos.BUILD`]: https://github.com/google/mediapipe/tree/master/third_party/opencv_macos.BUILD
[`ffmpeg_macos.BUILD`]:https://github.com/google/mediapipe/tree/master/third_party/ffmpeg_macos.BUILD [`ffmpeg_macos.BUILD`]:https://github.com/google/mediapipe/tree/master/third_party/ffmpeg_macos.BUILD
>>>>>>> Project import generated by Copybara.
[`setup_opencv.sh`]: https://github.com/google/mediapipe/tree/master/setup_opencv.sh [`setup_opencv.sh`]: https://github.com/google/mediapipe/tree/master/setup_opencv.sh
[`setup_android_sdk_and_ndk.sh`]: https://github.com/google/mediapipe/tree/master/setup_android_sdk_and_ndk.sh [`setup_android_sdk_and_ndk.sh`]: https://github.com/google/mediapipe/tree/master/setup_android_sdk_and_ndk.sh

View File

@ -1,10 +1,6 @@
## Preparing Data Sets with MediaSequence ## Preparing Data Sets with MediaSequence
<<<<<<< HEAD
MediaPipe is useful and general framework for media processing that can
=======
MediaPipe is a useful and general framework for media processing that can MediaPipe is a useful and general framework for media processing that can
>>>>>>> Project import generated by Copybara.
assist with research, development, and deployment of ML models. This example assist with research, development, and deployment of ML models. This example
focuses on development by demonstrating how to prepare video data for training focuses on development by demonstrating how to prepare video data for training
a TensorFlow model. a TensorFlow model.
@ -22,11 +18,7 @@ process new data sets, in the documentation of
### Preparing an example data set ### Preparing an example data set
<<<<<<< HEAD
1. Checkout mediapipe repository
=======
1. Checkout the mediapipe repository 1. Checkout the mediapipe repository
>>>>>>> Project import generated by Copybara.
```bash ```bash
git clone https://github.com/google/mediapipe.git git clone https://github.com/google/mediapipe.git

View File

@ -78,13 +78,9 @@ Debug to Release. Note that this is set independently for each target.
## Building an iOS app from the command line ## Building an iOS app from the command line
<<<<<<< HEAD
1. Build one of the example apps for iOS. We will be using the
=======
1. Modify the `bundle_id` field of the app's ios_application rule to use your own identifier, e.g. for [Face Detection GPU App example](./face_detection_mobile_gpu.md), you need to modify the line 26 of the [BUILD file](https://github.com/google/mediapipe/blob/master/mediapipe/examples/ios/facedetectiongpu/BUILD). 1. Modify the `bundle_id` field of the app's ios_application rule to use your own identifier, e.g. for [Face Detection GPU App example](./face_detection_mobile_gpu.md), you need to modify the line 26 of the [BUILD file](https://github.com/google/mediapipe/blob/master/mediapipe/examples/ios/facedetectiongpu/BUILD).
2. Build one of the example apps for iOS. We will be using the 2. Build one of the example apps for iOS. We will be using the
>>>>>>> Project import generated by Copybara.
[Face Detection GPU App example](./face_detection_mobile_gpu.md) [Face Detection GPU App example](./face_detection_mobile_gpu.md)
```bash ```bash
@ -94,15 +90,6 @@ Debug to Release. Note that this is set independently for each target.
You may see a permission request from `codesign` in order to sign the app. You may see a permission request from `codesign` in order to sign the app.
<<<<<<< HEAD
2. In Xcode, open the `Devices and Simulators` window (command-shift-2).
3. Make sure your device is connected. You will see a list of installed apps.
Press the "+" button under the list, and select the `.ipa` file built by
Bazel.
4. You can now run the app on your device.
=======
3. In Xcode, open the `Devices and Simulators` window (command-shift-2). 3. In Xcode, open the `Devices and Simulators` window (command-shift-2).
4. Make sure your device is connected. You will see a list of installed apps. 4. Make sure your device is connected. You will see a list of installed apps.
@ -110,4 +97,3 @@ Debug to Release. Note that this is set independently for each target.
Bazel. Bazel.
5. You can now run the app on your device. 5. You can now run the app on your device.
>>>>>>> Project import generated by Copybara.

View File

@ -41,11 +41,7 @@ When the library for a calculator is linked into an application binary, the
calculator is automatically registered by name through the calculator is automatically registered by name through the
[`REGISTER_CALCULATOR`] macro using the [`registration.h`] library. Note that [`REGISTER_CALCULATOR`] macro using the [`registration.h`] library. Note that
[`REGISTER_CALCULATOR`] can register a calculator with a namespace prefix, [`REGISTER_CALCULATOR`] can register a calculator with a namespace prefix,
<<<<<<< HEAD
identical to its C++ namespace. In this case, the calcultor graph must also use
=======
identical to its C++ namespace. In this case, the calculator graph must also use identical to its C++ namespace. In this case, the calculator graph must also use
>>>>>>> Project import generated by Copybara.
the same namespace prefix. the same namespace prefix.
## Out Of Memory error ## Out Of Memory error

View File

@ -75,11 +75,7 @@ public class MainActivity extends AppCompatActivity {
previewDisplayView = new SurfaceView(this); previewDisplayView = new SurfaceView(this);
setupPreviewDisplayView(); setupPreviewDisplayView();
<<<<<<< HEAD
// Initilize asset manager so that MediaPipe native libraries can access the app assets, e.g.,
=======
// Initialize asset manager so that MediaPipe native libraries can access the app assets, e.g., // Initialize asset manager so that MediaPipe native libraries can access the app assets, e.g.,
>>>>>>> Project import generated by Copybara.
// binary graphs. // binary graphs.
AndroidAssetUtil.initializeNativeAssetManager(this); AndroidAssetUtil.initializeNativeAssetManager(this);

View File

@ -76,11 +76,7 @@ public class MainActivity extends AppCompatActivity {
previewDisplayView = new SurfaceView(this); previewDisplayView = new SurfaceView(this);
setupPreviewDisplayView(); setupPreviewDisplayView();
<<<<<<< HEAD
// Initilize asset manager so that MediaPipe native libraries can access the app assets, e.g.,
=======
// Initialize asset manager so that MediaPipe native libraries can access the app assets, e.g., // Initialize asset manager so that MediaPipe native libraries can access the app assets, e.g.,
>>>>>>> Project import generated by Copybara.
// binary graphs. // binary graphs.
AndroidAssetUtil.initializeNativeAssetManager(this); AndroidAssetUtil.initializeNativeAssetManager(this);

View File

@ -76,11 +76,7 @@ public class MainActivity extends AppCompatActivity {
previewDisplayView = new SurfaceView(this); previewDisplayView = new SurfaceView(this);
setupPreviewDisplayView(); setupPreviewDisplayView();
<<<<<<< HEAD
// Initilize asset manager so that MediaPipe native libraries can access the app assets, e.g.,
=======
// Initialize asset manager so that MediaPipe native libraries can access the app assets, e.g., // Initialize asset manager so that MediaPipe native libraries can access the app assets, e.g.,
>>>>>>> Project import generated by Copybara.
// binary graphs. // binary graphs.
AndroidAssetUtil.initializeNativeAssetManager(this); AndroidAssetUtil.initializeNativeAssetManager(this);

View File

@ -76,11 +76,7 @@ public class MainActivity extends AppCompatActivity {
previewDisplayView = new SurfaceView(this); previewDisplayView = new SurfaceView(this);
setupPreviewDisplayView(); setupPreviewDisplayView();
<<<<<<< HEAD
// Initilize asset manager so that MediaPipe native libraries can access the app assets, e.g.,
=======
// Initialize asset manager so that MediaPipe native libraries can access the app assets, e.g., // Initialize asset manager so that MediaPipe native libraries can access the app assets, e.g.,
>>>>>>> Project import generated by Copybara.
// binary graphs. // binary graphs.
AndroidAssetUtil.initializeNativeAssetManager(this); AndroidAssetUtil.initializeNativeAssetManager(this);

View File

@ -76,11 +76,7 @@ public class MainActivity extends AppCompatActivity {
previewDisplayView = new SurfaceView(this); previewDisplayView = new SurfaceView(this);
setupPreviewDisplayView(); setupPreviewDisplayView();
<<<<<<< HEAD
// Initilize asset manager so that MediaPipe native libraries can access the app assets, e.g.,
=======
// Initialize asset manager so that MediaPipe native libraries can access the app assets, e.g., // Initialize asset manager so that MediaPipe native libraries can access the app assets, e.g.,
>>>>>>> Project import generated by Copybara.
// binary graphs. // binary graphs.
AndroidAssetUtil.initializeNativeAssetManager(this); AndroidAssetUtil.initializeNativeAssetManager(this);

View File

@ -76,11 +76,7 @@ public class MainActivity extends AppCompatActivity {
previewDisplayView = new SurfaceView(this); previewDisplayView = new SurfaceView(this);
setupPreviewDisplayView(); setupPreviewDisplayView();
<<<<<<< HEAD
// Initilize asset manager so that MediaPipe native libraries can access the app assets, e.g.,
=======
// Initialize asset manager so that MediaPipe native libraries can access the app assets, e.g., // Initialize asset manager so that MediaPipe native libraries can access the app assets, e.g.,
>>>>>>> Project import generated by Copybara.
// binary graphs. // binary graphs.
AndroidAssetUtil.initializeNativeAssetManager(this); AndroidAssetUtil.initializeNativeAssetManager(this);

View File

@ -76,11 +76,7 @@ public class MainActivity extends AppCompatActivity {
previewDisplayView = new SurfaceView(this); previewDisplayView = new SurfaceView(this);
setupPreviewDisplayView(); setupPreviewDisplayView();
<<<<<<< HEAD
// Initilize asset manager so that MediaPipe native libraries can access the app assets, e.g.,
=======
// Initialize asset manager so that MediaPipe native libraries can access the app assets, e.g., // Initialize asset manager so that MediaPipe native libraries can access the app assets, e.g.,
>>>>>>> Project import generated by Copybara.
// binary graphs. // binary graphs.
AndroidAssetUtil.initializeNativeAssetManager(this); AndroidAssetUtil.initializeNativeAssetManager(this);

View File

@ -76,11 +76,7 @@ public class MainActivity extends AppCompatActivity {
previewDisplayView = new SurfaceView(this); previewDisplayView = new SurfaceView(this);
setupPreviewDisplayView(); setupPreviewDisplayView();
<<<<<<< HEAD
// Initilize asset manager so that MediaPipe native libraries can access the app assets, e.g.,
=======
// Initialize asset manager so that MediaPipe native libraries can access the app assets, e.g., // Initialize asset manager so that MediaPipe native libraries can access the app assets, e.g.,
>>>>>>> Project import generated by Copybara.
// binary graphs. // binary graphs.
AndroidAssetUtil.initializeNativeAssetManager(this); AndroidAssetUtil.initializeNativeAssetManager(this);

View File

@ -46,57 +46,3 @@ bazel-bin/mediapipe/examples/desktop/object_detection/object_detection_tensorflo
--input_side_packets=input_video_path=/path/to/input/file,output_video_path=/path/to/output/file --input_side_packets=input_video_path=/path/to/input/file,output_video_path=/path/to/output/file
--alsologtostderr --alsologtostderr
``` ```
<<<<<<< HEAD
**TFlite Face Detection**
To build the face detection demo using a TFLite model on desktop, use:
```
bazel build -c opt mediapipe/examples/desktop/face_detection:face_detection_tflite --define MEDIAPIPE_DISABLE_GPU=1
```
and run it using:
```
bazel-bin/mediapipe/examples/desktop/face_detection/face_detection_tflite \
--calculator_graph_config_file=mediapipe/graphs/face_detection/face_detection_desktop_tflite_graph.pbtxt \
--input_side_packets=input_video_path=/path/to/input/file,output_video_path=/path/to/output/file \
--alsologtostderr
```
**TFlite Hand Detection**
To build the hand detection demo using a TFLite model on desktop, use:
```
bazel build -c opt mediapipe/examples/desktop/hand_tracking:hand_tracking_tflite --define MEDIAPIPE_DISABLE_GPU=1
```
and run it using:
```
bazel-bin/mediapipe/examples/desktop/hand_tracking/hand_tracking_tflite \
--calculator_graph_config_file=mediapipe/graphs/hand_tracking/hand_detection_desktop_tflite_graph.pbtxt \
--input_side_packets=input_video_path=/path/to/input/file,output_video_path=/path/to/output/file \
--alsologtostderr
```
**TFlite Hand Tracking**
To build the hand tracking demo using a TFLite model on desktop, use:
```
bazel build -c opt mediapipe/examples/desktop/hand_tracking:hand_tracking_tflite --define MEDIAPIPE_DISABLE_GPU=1
```
and run it using:
```
bazel-bin/mediapipe/examples/desktop/hand_tracking/hand_tracking_tflite \
--calculator_graph_config_file=mediapipe/graphs/hand_tracking/hand_tracking_with_flag_desktop_tflite_graph.pbtxt \
--input_side_packets=input_video_path=/path/to/input/file,output_video_path=/path/to/output/file \
--alsologtostderr
```
=======
>>>>>>> Project import generated by Copybara.

View File

@ -20,8 +20,6 @@
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="EfB-xq-knP"> <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="EfB-xq-knP">
<rect key="frame" x="0.0" y="20" width="375" height="647"/> <rect key="frame" x="0.0" y="20" width="375" height="647"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<<<<<<< HEAD
=======
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Camera access needed for this demo. Please enable camera access in the Settings app." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="emf-N5-sEd"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Camera access needed for this demo. Please enable camera access in the Settings app." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="emf-N5-sEd">
<rect key="frame" x="57" y="248" width="260" height="151"/> <rect key="frame" x="57" y="248" width="260" height="151"/>
@ -31,34 +29,18 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
>>>>>>> Project import generated by Copybara.
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<accessibility key="accessibilityConfiguration" label="PreviewDisplayView"> <accessibility key="accessibilityConfiguration" label="PreviewDisplayView">
<bool key="isElement" value="YES"/> <bool key="isElement" value="YES"/>
</accessibility> </accessibility>
</view> </view>
<<<<<<< HEAD
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Camera access needed for this demo. Please enable camera access in the Settings app." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YAx-c6-1kr">
<rect key="frame" x="57" y="258" width="260" height="151"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
=======
>>>>>>> Project import generated by Copybara.
</subviews> </subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view> </view>
<connections> <connections>
<<<<<<< HEAD
<outlet property="_liveView" destination="EfB-xq-knP" id="wac-VF-etz"/>
<outlet property="_noCameraLabel" destination="YAx-c6-1kr" id="Oiz-pZ-Vh7"/>
=======
<outlet property="_liveView" destination="EfB-xq-knP" id="JQp-2n-q9q"/> <outlet property="_liveView" destination="EfB-xq-knP" id="JQp-2n-q9q"/>
<outlet property="_noCameraLabel" destination="emf-N5-sEd" id="91G-3Z-cU3"/> <outlet property="_noCameraLabel" destination="emf-N5-sEd" id="91G-3Z-cU3"/>
>>>>>>> Project import generated by Copybara.
</connections> </connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>

View File

@ -20,8 +20,6 @@
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="EfB-xq-knP"> <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="EfB-xq-knP">
<rect key="frame" x="0.0" y="20" width="375" height="647"/> <rect key="frame" x="0.0" y="20" width="375" height="647"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<<<<<<< HEAD
=======
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Camera access needed for this demo. Please enable camera access in the Settings app." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="emf-N5-sEd"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Camera access needed for this demo. Please enable camera access in the Settings app." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="emf-N5-sEd">
<rect key="frame" x="57" y="248" width="260" height="151"/> <rect key="frame" x="57" y="248" width="260" height="151"/>
@ -31,7 +29,6 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
>>>>>>> Project import generated by Copybara.
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<accessibility key="accessibilityConfiguration" label="PreviewDisplayView"> <accessibility key="accessibilityConfiguration" label="PreviewDisplayView">
<bool key="isElement" value="YES"/> <bool key="isElement" value="YES"/>
@ -42,12 +39,8 @@
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view> </view>
<connections> <connections>
<<<<<<< HEAD
<outlet property="_liveView" destination="EfB-xq-knP" id="wac-VF-etz"/>
=======
<outlet property="_liveView" destination="EfB-xq-knP" id="JQp-2n-q9q"/> <outlet property="_liveView" destination="EfB-xq-knP" id="JQp-2n-q9q"/>
<outlet property="_noCameraLabel" destination="emf-N5-sEd" id="91G-3Z-cU3"/> <outlet property="_noCameraLabel" destination="emf-N5-sEd" id="91G-3Z-cU3"/>
>>>>>>> Project import generated by Copybara.
</connections> </connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>

View File

@ -20,8 +20,6 @@
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="EfB-xq-knP"> <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="EfB-xq-knP">
<rect key="frame" x="0.0" y="20" width="375" height="647"/> <rect key="frame" x="0.0" y="20" width="375" height="647"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<<<<<<< HEAD
=======
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Camera access needed for this demo. Please enable camera access in the Settings app." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="emf-N5-sEd"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Camera access needed for this demo. Please enable camera access in the Settings app." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="emf-N5-sEd">
<rect key="frame" x="57" y="248" width="260" height="151"/> <rect key="frame" x="57" y="248" width="260" height="151"/>
@ -31,7 +29,6 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
>>>>>>> Project import generated by Copybara.
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<accessibility key="accessibilityConfiguration" label="PreviewDisplayView"> <accessibility key="accessibilityConfiguration" label="PreviewDisplayView">
<bool key="isElement" value="YES"/> <bool key="isElement" value="YES"/>
@ -42,12 +39,8 @@
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view> </view>
<connections> <connections>
<<<<<<< HEAD
<outlet property="_liveView" destination="EfB-xq-knP" id="wac-VF-etz"/>
=======
<outlet property="_liveView" destination="EfB-xq-knP" id="JQp-2n-q9q"/> <outlet property="_liveView" destination="EfB-xq-knP" id="JQp-2n-q9q"/>
<outlet property="_noCameraLabel" destination="emf-N5-sEd" id="91G-3Z-cU3"/> <outlet property="_noCameraLabel" destination="emf-N5-sEd" id="91G-3Z-cU3"/>
>>>>>>> Project import generated by Copybara.
</connections> </connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>

View File

@ -20,8 +20,6 @@
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="EfB-xq-knP"> <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="EfB-xq-knP">
<rect key="frame" x="0.0" y="20" width="375" height="647"/> <rect key="frame" x="0.0" y="20" width="375" height="647"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<<<<<<< HEAD
=======
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Camera access needed for this demo. Please enable camera access in the Settings app." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="emf-N5-sEd"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Camera access needed for this demo. Please enable camera access in the Settings app." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="emf-N5-sEd">
<rect key="frame" x="57" y="248" width="260" height="151"/> <rect key="frame" x="57" y="248" width="260" height="151"/>
@ -31,7 +29,6 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
>>>>>>> Project import generated by Copybara.
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<accessibility key="accessibilityConfiguration" label="PreviewDisplayView"> <accessibility key="accessibilityConfiguration" label="PreviewDisplayView">
<bool key="isElement" value="YES"/> <bool key="isElement" value="YES"/>
@ -42,12 +39,8 @@
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view> </view>
<connections> <connections>
<<<<<<< HEAD
<outlet property="_liveView" destination="EfB-xq-knP" id="wac-VF-etz"/>
=======
<outlet property="_liveView" destination="EfB-xq-knP" id="JQp-2n-q9q"/> <outlet property="_liveView" destination="EfB-xq-knP" id="JQp-2n-q9q"/>
<outlet property="_noCameraLabel" destination="emf-N5-sEd" id="91G-3Z-cU3"/> <outlet property="_noCameraLabel" destination="emf-N5-sEd" id="91G-3Z-cU3"/>
>>>>>>> Project import generated by Copybara.
</connections> </connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>

View File

@ -139,11 +139,7 @@ mediapipe_cc_proto_library(
":stream_handler_cc_proto", ":stream_handler_cc_proto",
"@com_google_protobuf//:cc_wkt_protos", "@com_google_protobuf//:cc_wkt_protos",
], ],
<<<<<<< HEAD
visibility = ["//mediapipe:__subpackages__"],
=======
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
>>>>>>> Project import generated by Copybara.
deps = [":calculator_proto"], deps = [":calculator_proto"],
) )
@ -159,11 +155,7 @@ mediapipe_cc_proto_library(
mediapipe_cc_proto_library( mediapipe_cc_proto_library(
name = "calculator_options_cc_proto", name = "calculator_options_cc_proto",
srcs = ["calculator_options.proto"], srcs = ["calculator_options.proto"],
<<<<<<< HEAD
visibility = ["//mediapipe:__subpackages__"],
=======
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
>>>>>>> Project import generated by Copybara.
deps = [":calculator_options_proto"], deps = [":calculator_options_proto"],
) )

View File

@ -32,15 +32,12 @@ proto_library(
) )
proto_library( proto_library(
<<<<<<< HEAD
=======
name = "classification_proto", name = "classification_proto",
srcs = ["classification.proto"], srcs = ["classification.proto"],
visibility = ["//mediapipe:__subpackages__"], visibility = ["//mediapipe:__subpackages__"],
) )
proto_library( proto_library(
>>>>>>> Project import generated by Copybara.
name = "image_format_proto", name = "image_format_proto",
srcs = ["image_format.proto"], srcs = ["image_format.proto"],
visibility = ["//mediapipe:__subpackages__"], visibility = ["//mediapipe:__subpackages__"],
@ -73,8 +70,6 @@ mediapipe_cc_proto_library(
) )
mediapipe_cc_proto_library( mediapipe_cc_proto_library(
<<<<<<< HEAD
=======
name = "classification_cc_proto", name = "classification_cc_proto",
srcs = ["classification.proto"], srcs = ["classification.proto"],
visibility = ["//mediapipe:__subpackages__"], visibility = ["//mediapipe:__subpackages__"],
@ -82,7 +77,6 @@ mediapipe_cc_proto_library(
) )
mediapipe_cc_proto_library( mediapipe_cc_proto_library(
>>>>>>> Project import generated by Copybara.
name = "image_format_cc_proto", name = "image_format_cc_proto",
srcs = ["image_format.proto"], srcs = ["image_format.proto"],
visibility = [ visibility = [

View File

@ -32,11 +32,7 @@ namespace mediapipe {
namespace { namespace {
// Shows validation success for a graph and a subgraph. // Shows validation success for a graph and a subgraph.
<<<<<<< HEAD
TEST(ValidatedGraphConfigTest, InitilizeGraphFromProtos) {
=======
TEST(ValidatedGraphConfigTest, InitializeGraphFromProtos) { TEST(ValidatedGraphConfigTest, InitializeGraphFromProtos) {
>>>>>>> Project import generated by Copybara.
auto config_1 = ParseTextProtoOrDie<CalculatorGraphConfig>(R"( auto config_1 = ParseTextProtoOrDie<CalculatorGraphConfig>(R"(
type: "PassThroughGraph" type: "PassThroughGraph"
input_stream: "INPUT:stream_1" input_stream: "INPUT:stream_1"
@ -106,11 +102,7 @@ TEST(ValidatedGraphConfigTest, InitializeGraphFromProtos) {
} }
// Shows validation failure due to an unregistered subgraph. // Shows validation failure due to an unregistered subgraph.
<<<<<<< HEAD
TEST(ValidatedGraphConfigTest, InitilizeGraphFromLinker) {
=======
TEST(ValidatedGraphConfigTest, InitializeGraphFromLinker) { TEST(ValidatedGraphConfigTest, InitializeGraphFromLinker) {
>>>>>>> Project import generated by Copybara.
EXPECT_FALSE(SubgraphRegistry::IsRegistered("DubQuadTestSubgraph")); EXPECT_FALSE(SubgraphRegistry::IsRegistered("DubQuadTestSubgraph"));
ValidatedGraphConfig builder_1; ValidatedGraphConfig builder_1;
::mediapipe::Status status_1 = ::mediapipe::Status status_1 =
@ -122,11 +114,7 @@ TEST(ValidatedGraphConfigTest, InitializeGraphFromLinker) {
} }
// Shows validation success for a graph and a template subgraph. // Shows validation success for a graph and a template subgraph.
<<<<<<< HEAD
TEST(ValidatedGraphConfigTest, InitilizeTemplateFromProtos) {
=======
TEST(ValidatedGraphConfigTest, InitializeTemplateFromProtos) { TEST(ValidatedGraphConfigTest, InitializeTemplateFromProtos) {
>>>>>>> Project import generated by Copybara.
mediapipe::tool::TemplateParser::Parser parser; mediapipe::tool::TemplateParser::Parser parser;
CalculatorGraphTemplate config_1; CalculatorGraphTemplate config_1;
CHECK(parser.ParseFromString(R"( CHECK(parser.ParseFromString(R"(

View File

@ -520,11 +520,7 @@ class OstreamStream : public proto_ns::io::ZeroCopyOutputStream {
return WriteBuffer(); return WriteBuffer();
} }
void BackUp(int count) override { buffer_used_ -= count; } void BackUp(int count) override { buffer_used_ -= count; }
<<<<<<< HEAD
proto_int64 ByteCount() const override { return position_; }
=======
int64_t ByteCount() const override { return position_; } int64_t ByteCount() const override { return position_; }
>>>>>>> Project import generated by Copybara.
private: private:
// Writes the buffer to the ostream. // Writes the buffer to the ostream.

View File

@ -108,12 +108,6 @@ class FixedSizeInputStreamHandler : public DefaultInputStreamHandler {
} }
// Returns the lowest timestamp of a packet ready to process. // Returns the lowest timestamp of a packet ready to process.
<<<<<<< HEAD
Timestamp MinTimestampOrBound() {
Timestamp min_bound = Timestamp::Done();
for (const auto& stream : input_stream_managers_) {
min_bound = std::min(min_bound, stream->MinTimestampOrBound(nullptr));
=======
Timestamp MinTimestampToProcess() { Timestamp MinTimestampToProcess() {
Timestamp min_bound = Timestamp::Done(); Timestamp min_bound = Timestamp::Done();
for (const auto& stream : input_stream_managers_) { for (const auto& stream : input_stream_managers_) {
@ -126,7 +120,6 @@ class FixedSizeInputStreamHandler : public DefaultInputStreamHandler {
stream_timestamp = PreviousAllowedInStream(stream_timestamp); stream_timestamp = PreviousAllowedInStream(stream_timestamp);
} }
min_bound = std::min(min_bound, stream_timestamp); min_bound = std::min(min_bound, stream_timestamp);
>>>>>>> Project import generated by Copybara.
} }
return min_bound; return min_bound;
} }
@ -214,11 +207,7 @@ class FixedSizeInputStreamHandler : public DefaultInputStreamHandler {
} }
// input_timestamp is recalculated here to process the most recent packets. // input_timestamp is recalculated here to process the most recent packets.
EraseSurplusPackets(true); EraseSurplusPackets(true);
<<<<<<< HEAD
input_timestamp = MinTimestampOrBound();
=======
input_timestamp = MinTimestampToProcess(); input_timestamp = MinTimestampToProcess();
>>>>>>> Project import generated by Copybara.
DefaultInputStreamHandler::FillInputSet(input_timestamp, input_set); DefaultInputStreamHandler::FillInputSet(input_timestamp, input_set);
pending_ = false; pending_ = false;
} }

View File

@ -64,11 +64,7 @@ android_library(
], ],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
<<<<<<< HEAD
"//third_party/java/jsr305_annotations",
=======
"@com_google_code_findbugs//jar", "@com_google_code_findbugs//jar",
"@com_google_guava_android//jar", "@com_google_guava_android//jar",
>>>>>>> Project import generated by Copybara.
], ],
) )

View File

@ -88,11 +88,7 @@ public class ExternalTextureConverter implements TextureFrameProducer {
* Sets the input surface texture. * Sets the input surface texture.
* *
* <p>The provided width and height will be the size of the converted texture, so if the input * <p>The provided width and height will be the size of the converted texture, so if the input
<<<<<<< HEAD
* surface texture is rotated (as expressed by its transfomration matrix) the provided width and
=======
* surface texture is rotated (as expressed by its transformation matrix) the provided width and * surface texture is rotated (as expressed by its transformation matrix) the provided width and
>>>>>>> Project import generated by Copybara.
* height should be swapped. * height should be swapped.
*/ */
// TODO: Clean up setSurfaceTexture methods. // TODO: Clean up setSurfaceTexture methods.

View File

@ -655,13 +655,10 @@ AudioDecoder::~AudioDecoder() {
RETURN_IF_ERROR(processor->Open(stream_id, stream)); RETURN_IF_ERROR(processor->Open(stream_id, stream));
audio_processor_.emplace(stream_id, std::move(processor)); audio_processor_.emplace(stream_id, std::move(processor));
<<<<<<< HEAD
=======
CHECK(InsertIfNotPresent( CHECK(InsertIfNotPresent(
&stream_index_to_stream_id_, &stream_index_to_stream_id_,
options.audio_stream(*options_index_ptr).stream_index(), options.audio_stream(*options_index_ptr).stream_index(),
stream_id)); stream_id));
>>>>>>> Project import generated by Copybara.
CHECK(InsertIfNotPresent(&stream_id_to_audio_options_index_, CHECK(InsertIfNotPresent(&stream_id_to_audio_options_index_,
stream_id, *options_index_ptr)); stream_id, *options_index_ptr));
CHECK(InsertIfNotPresent(&audio_options_index_to_stream_id, CHECK(InsertIfNotPresent(&audio_options_index_to_stream_id,
@ -759,14 +756,9 @@ AudioDecoder::~AudioDecoder() {
::mediapipe::Status AudioDecoder::FillAudioHeader( ::mediapipe::Status AudioDecoder::FillAudioHeader(
const AudioStreamOptions& stream_option, TimeSeriesHeader* header) const { const AudioStreamOptions& stream_option, TimeSeriesHeader* header) const {
<<<<<<< HEAD
const std::unique_ptr<AudioPacketProcessor>* processor_ptr_ =
FindOrNull(audio_processor_, stream_option.stream_index());
=======
const std::unique_ptr<AudioPacketProcessor>* processor_ptr_ = FindOrNull( const std::unique_ptr<AudioPacketProcessor>* processor_ptr_ = FindOrNull(
audio_processor_, audio_processor_,
FindOrDie(stream_index_to_stream_id_, stream_option.stream_index())); FindOrDie(stream_index_to_stream_id_, stream_option.stream_index()));
>>>>>>> Project import generated by Copybara.
RET_CHECK(processor_ptr_ && *processor_ptr_) << "audio stream is not open."; RET_CHECK(processor_ptr_ && *processor_ptr_) << "audio stream is not open.";
RETURN_IF_ERROR((*processor_ptr_)->FillHeader(header)); RETURN_IF_ERROR((*processor_ptr_)->FillHeader(header));

View File

@ -82,11 +82,7 @@ class BasePacketProcessor {
// Corrects the given PTS for MPEG PTS rollover. Assumed to be called with // Corrects the given PTS for MPEG PTS rollover. Assumed to be called with
// the PTS of each frame in decode order. We detect a rollover whenever the // the PTS of each frame in decode order. We detect a rollover whenever the
<<<<<<< HEAD
// PTS timestamp changes by more than 2^33/2 (half the timstamp space). For
=======
// PTS timestamp changes by more than 2^33/2 (half the timestamp space). For // PTS timestamp changes by more than 2^33/2 (half the timestamp space). For
>>>>>>> Project import generated by Copybara.
// video this means every 26.5h with 1 PTS tick = 1/90000 of a second. // video this means every 26.5h with 1 PTS tick = 1/90000 of a second.
// Example timeline: // Example timeline:
// CorrectPtsForRollover(0) -> 0 // CorrectPtsForRollover(0) -> 0
@ -213,10 +209,7 @@ class AudioDecoder {
::mediapipe::Status Flush(); ::mediapipe::Status Flush();
std::map<int, int> stream_id_to_audio_options_index_; std::map<int, int> stream_id_to_audio_options_index_;
<<<<<<< HEAD
=======
std::map<int, int> stream_index_to_stream_id_; std::map<int, int> stream_index_to_stream_id_;
>>>>>>> Project import generated by Copybara.
std::map<int, std::unique_ptr<AudioPacketProcessor>> audio_processor_; std::map<int, std::unique_ptr<AudioPacketProcessor>> audio_processor_;
// Indexed by container stream index, true if the stream has not seen // Indexed by container stream index, true if the stream has not seen

View File

@ -438,10 +438,7 @@ tasks and tracking (or class) fields for tracking information.
|`region/class/string`|feature list bytes list|`add_bbox_class_string` / `AddBBoxClassString`|For each region, lists the string class. Multiple classes for one region require duplicating the region.| |`region/class/string`|feature list bytes list|`add_bbox_class_string` / `AddBBoxClassString`|For each region, lists the string class. Multiple classes for one region require duplicating the region.|
|`region/class/confidence`|feature list float list|`add_bbox_class_confidence` / `AddBBoxClassConfidence`|For each region, lists the confidence or weight for the class. Multiple classes for one region require duplicating the region.| |`region/class/confidence`|feature list float list|`add_bbox_class_confidence` / `AddBBoxClassConfidence`|For each region, lists the confidence or weight for the class. Multiple classes for one region require duplicating the region.|
|`region/embedding/float`|feature list float list|`add_bbox_embedding_floats` / `AddBBoxEmbeddingFloats`|For each region, provide an embedding as sequence of floats.| |`region/embedding/float`|feature list float list|`add_bbox_embedding_floats` / `AddBBoxEmbeddingFloats`|For each region, provide an embedding as sequence of floats.|
<<<<<<< HEAD
=======
|`region/parts`|context bytes list|`set_bbox_parts` / `SetBBoxParts`|The list of region parts expected in this example.| |`region/parts`|context bytes list|`set_bbox_parts` / `SetBBoxParts`|The list of region parts expected in this example.|
>>>>>>> Project import generated by Copybara.
|`region/embedding/ dimensions_per_region`|context int list|`set_bbox_embedding_dimensions_per_region` / `SetBBoxEmbeddingDimensionsPerRegion`|Provide the dimensions for each embedding.| |`region/embedding/ dimensions_per_region`|context int list|`set_bbox_embedding_dimensions_per_region` / `SetBBoxEmbeddingDimensionsPerRegion`|Provide the dimensions for each embedding.|
|`region/embedding/format`|context string|`set_bbox_embedding_format` / `SetBBoxEmbeddingFormat`|Provides the encoding format, if any, for region embeddings.| |`region/embedding/format`|context string|`set_bbox_embedding_format` / `SetBBoxEmbeddingFormat`|Provides the encoding format, if any, for region embeddings.|
|`region/embedding/encoded`|feature list bytes list|`add_bbox_embedding_encoded` / `AddBBoxEmbeddingEncoded`|For each region, provide an encoded embedding.| |`region/embedding/encoded`|feature list bytes list|`add_bbox_embedding_encoded` / `AddBBoxEmbeddingEncoded`|For each region, provide an encoded embedding.|
@ -462,10 +459,7 @@ tasks and tracking (or class) fields for tracking information.
|`image/height`|context int|`set_image_height` / `SetImageHeight`|The height of the image in pixels.| |`image/height`|context int|`set_image_height` / `SetImageHeight`|The height of the image in pixels.|
|`image/width`|context int|`set_image_width` / `SetImageWidth`|The width of the image in pixels.| |`image/width`|context int|`set_image_width` / `SetImageWidth`|The width of the image in pixels.|
|`image/frame_rate`|context float|`set_image_frame_rate` / `SetImageFrameRate`|The rate of images in frames per second.| |`image/frame_rate`|context float|`set_image_frame_rate` / `SetImageFrameRate`|The rate of images in frames per second.|
<<<<<<< HEAD
=======
|`image/data_path`|context bytes|`set_image_data_path` / `SetImageDataPath`|The path of the image file if it did not come from a media clip.| |`image/data_path`|context bytes|`set_image_data_path` / `SetImageDataPath`|The path of the image file if it did not come from a media clip.|
>>>>>>> Project import generated by Copybara.
### Keys related to image class segmentation ### Keys related to image class segmentation
| key | type | python call / c++ call | description | | key | type | python call / c++ call | description |

View File

@ -253,11 +253,8 @@ const char kRegionEmbeddingDimensionsPerRegionKey[] =
"region/embedding/dimensions_per_region"; "region/embedding/dimensions_per_region";
// The format encoding embeddings as strings. // The format encoding embeddings as strings.
const char kRegionEmbeddingFormatKey[] = "region/embedding/format"; const char kRegionEmbeddingFormatKey[] = "region/embedding/format";
<<<<<<< HEAD
=======
// The list of region parts expected in this example. // The list of region parts expected in this example.
const char kRegionPartsKey[] = "region/parts"; const char kRegionPartsKey[] = "region/parts";
>>>>>>> Project import generated by Copybara.
// Feature list keys: // Feature list keys:
// The normalized coordinates of the bounding boxes are provided in four lists // The normalized coordinates of the bounding boxes are provided in four lists
@ -440,11 +437,8 @@ void ClearPoint(const std::string& prefix,
kRegionEmbeddingDimensionsPerRegionKey, prefix) \ kRegionEmbeddingDimensionsPerRegionKey, prefix) \
FIXED_PREFIX_BYTES_CONTEXT_FEATURE(CONCAT_STR2(identifier, EmbeddingFormat), \ FIXED_PREFIX_BYTES_CONTEXT_FEATURE(CONCAT_STR2(identifier, EmbeddingFormat), \
kRegionEmbeddingFormatKey, prefix) \ kRegionEmbeddingFormatKey, prefix) \
<<<<<<< HEAD
=======
FIXED_PREFIX_VECTOR_BYTES_CONTEXT_FEATURE(CONCAT_STR2(identifier, Parts), \ FIXED_PREFIX_VECTOR_BYTES_CONTEXT_FEATURE(CONCAT_STR2(identifier, Parts), \
kRegionPartsKey, prefix) \ kRegionPartsKey, prefix) \
>>>>>>> Project import generated by Copybara.
FIXED_PREFIX_INT64_FEATURE_LIST(CONCAT_STR2(identifier, Timestamp), \ FIXED_PREFIX_INT64_FEATURE_LIST(CONCAT_STR2(identifier, Timestamp), \
kRegionTimestampKey, prefix) \ kRegionTimestampKey, prefix) \
FIXED_PREFIX_INT64_FEATURE_LIST( \ FIXED_PREFIX_INT64_FEATURE_LIST( \
@ -481,11 +475,8 @@ const char kImageClassLabelIndexKey[] = "image/class/label/index";
const char kImageClassLabelStringKey[] = "image/class/label/string"; const char kImageClassLabelStringKey[] = "image/class/label/string";
// The listing from discrete instance indices to class indices they embody. // The listing from discrete instance indices to class indices they embody.
const char kImageObjectClassIndexKey[] = "image/object/class/index"; const char kImageObjectClassIndexKey[] = "image/object/class/index";
<<<<<<< HEAD
=======
// The path of the image file if it did not come from a media clip. // The path of the image file if it did not come from a media clip.
const char kImageDataPathKey[] = "image/data_path"; const char kImageDataPathKey[] = "image/data_path";
>>>>>>> Project import generated by Copybara.
// Feature list keys: // Feature list keys:
// The encoded image frame. // The encoded image frame.
@ -515,11 +506,8 @@ const char kImageLabelConfidenceKey[] = "image/label/confidence";
kImageFrameRateKey, prefix) \ kImageFrameRateKey, prefix) \
FIXED_PREFIX_FLOAT_CONTEXT_FEATURE(CONCAT_STR2(identifier, Saturation), \ FIXED_PREFIX_FLOAT_CONTEXT_FEATURE(CONCAT_STR2(identifier, Saturation), \
kImageSaturationKey, prefix) \ kImageSaturationKey, prefix) \
<<<<<<< HEAD
=======
FIXED_PREFIX_BYTES_CONTEXT_FEATURE(CONCAT_STR2(identifier, DataPath), \ FIXED_PREFIX_BYTES_CONTEXT_FEATURE(CONCAT_STR2(identifier, DataPath), \
kImageDataPathKey, prefix) \ kImageDataPathKey, prefix) \
>>>>>>> Project import generated by Copybara.
FIXED_PREFIX_VECTOR_INT64_CONTEXT_FEATURE( \ FIXED_PREFIX_VECTOR_INT64_CONTEXT_FEATURE( \
CONCAT_STR2(identifier, ClassLabelIndex), kImageClassLabelIndexKey, \ CONCAT_STR2(identifier, ClassLabelIndex), kImageClassLabelIndexKey, \
prefix) \ prefix) \

View File

@ -291,11 +291,8 @@ REGION_TIMESTAMP_KEY = "region/timestamp"
# If regions are aligned to image frames, this field preserves the original # If regions are aligned to image frames, this field preserves the original
# timestamps. # timestamps.
REGION_UNMODIFIED_TIMESTAMP_KEY = "region/unmodified_timestamp" REGION_UNMODIFIED_TIMESTAMP_KEY = "region/unmodified_timestamp"
<<<<<<< HEAD
=======
# The list of region parts expected in this example. # The list of region parts expected in this example.
REGION_PARTS_KEY = "region/parts" REGION_PARTS_KEY = "region/parts"
>>>>>>> Project import generated by Copybara.
# The dimensions of each embedding per region / bounding box. # The dimensions of each embedding per region / bounding box.
REGION_EMBEDDING_DIMENSIONS_PER_REGION_KEY = ( REGION_EMBEDDING_DIMENSIONS_PER_REGION_KEY = (
"region/embedding/dimensions_per_region") "region/embedding/dimensions_per_region")
@ -366,12 +363,9 @@ def _create_region_with_prefix(name, prefix):
prefix=prefix, module_dict=globals()) prefix=prefix, module_dict=globals())
msu.create_float_list_feature_list(name + "_point_y", REGION_POINT_Y_KEY, msu.create_float_list_feature_list(name + "_point_y", REGION_POINT_Y_KEY,
prefix=prefix, module_dict=globals()) prefix=prefix, module_dict=globals())
<<<<<<< HEAD
=======
msu.create_bytes_list_context_feature(name + "_parts", msu.create_bytes_list_context_feature(name + "_parts",
REGION_PARTS_KEY, REGION_PARTS_KEY,
prefix=prefix, module_dict=globals()) prefix=prefix, module_dict=globals())
>>>>>>> Project import generated by Copybara.
msu.create_float_list_context_feature( msu.create_float_list_context_feature(
name + "_embedding_dimensions_per_region", name + "_embedding_dimensions_per_region",
REGION_EMBEDDING_DIMENSIONS_PER_REGION_KEY, REGION_EMBEDDING_DIMENSIONS_PER_REGION_KEY,
@ -462,11 +456,8 @@ IMAGE_TIMESTAMP_KEY = "image/timestamp"
IMAGE_LABEL_INDEX_KEY = "image/label/index" IMAGE_LABEL_INDEX_KEY = "image/label/index"
IMAGE_LABEL_STRING_KEY = "image/label/string" IMAGE_LABEL_STRING_KEY = "image/label/string"
IMAGE_LABEL_CONFIDENCE_KEY = "image/label/confidence" IMAGE_LABEL_CONFIDENCE_KEY = "image/label/confidence"
<<<<<<< HEAD
=======
# The path of the image file if it did not come from a media clip. # The path of the image file if it did not come from a media clip.
IMAGE_DATA_PATH_KEY = "image/data_path" IMAGE_DATA_PATH_KEY = "image/data_path"
>>>>>>> Project import generated by Copybara.
def _create_image_with_prefix(name, prefix): def _create_image_with_prefix(name, prefix):
@ -494,11 +485,8 @@ def _create_image_with_prefix(name, prefix):
msu.create_int_list_context_feature( msu.create_int_list_context_feature(
name + "_object_class_index", IMAGE_OBJECT_CLASS_INDEX_KEY, name + "_object_class_index", IMAGE_OBJECT_CLASS_INDEX_KEY,
prefix=prefix, module_dict=globals()) prefix=prefix, module_dict=globals())
<<<<<<< HEAD
=======
msu.create_bytes_context_feature(name + "_data_path", IMAGE_DATA_PATH_KEY, msu.create_bytes_context_feature(name + "_data_path", IMAGE_DATA_PATH_KEY,
prefix=prefix, module_dict=globals()) prefix=prefix, module_dict=globals())
>>>>>>> Project import generated by Copybara.
msu.create_int_feature_list(name + "_timestamp", IMAGE_TIMESTAMP_KEY, msu.create_int_feature_list(name + "_timestamp", IMAGE_TIMESTAMP_KEY,
prefix=prefix, module_dict=globals()) prefix=prefix, module_dict=globals())

View File

@ -409,8 +409,6 @@ TEST(MediaSequenceTest, RoundTripBBoxPoint) {
} }
} }
<<<<<<< HEAD
=======
TEST(MediaSequenceTest, RoundTripRegionParts) { TEST(MediaSequenceTest, RoundTripRegionParts) {
tensorflow::SequenceExample sequence; tensorflow::SequenceExample sequence;
std::vector<std::string> parts = {"HEAD", "FEET"}; std::vector<std::string> parts = {"HEAD", "FEET"};
@ -420,7 +418,6 @@ TEST(MediaSequenceTest, RoundTripRegionParts) {
EXPECT_EQ(GetBBoxPartsSize(sequence), 0); EXPECT_EQ(GetBBoxPartsSize(sequence), 0);
} }
>>>>>>> Project import generated by Copybara.
TEST(MediaSequenceTest, RoundTripPredictedBBox) { TEST(MediaSequenceTest, RoundTripPredictedBBox) {
tensorflow::SequenceExample sequence; tensorflow::SequenceExample sequence;
std::vector<std::vector<Location>> bboxes = { std::vector<std::vector<Location>> bboxes = {
@ -540,8 +537,6 @@ TEST(MediaSequenceTest, RoundTripImageFrameRate) {
ASSERT_EQ(GetImageFrameRate(sequence), frame_rate); ASSERT_EQ(GetImageFrameRate(sequence), frame_rate);
} }
<<<<<<< HEAD
=======
TEST(MediaSequenceTest, RoundTripImageDataPath) { TEST(MediaSequenceTest, RoundTripImageDataPath) {
tensorflow::SequenceExample sequence; tensorflow::SequenceExample sequence;
std::string data_path = "test"; std::string data_path = "test";
@ -549,7 +544,6 @@ TEST(MediaSequenceTest, RoundTripImageDataPath) {
ASSERT_EQ(data_path, GetImageDataPath(sequence)); ASSERT_EQ(data_path, GetImageDataPath(sequence));
} }
>>>>>>> Project import generated by Copybara.
TEST(MediaSequenceTest, RoundTripFeatureFloats) { TEST(MediaSequenceTest, RoundTripFeatureFloats) {
tensorflow::SequenceExample sequence; tensorflow::SequenceExample sequence;
int num_features = 3; int num_features = 3;

View File

@ -59,10 +59,7 @@ class MediaSequenceTest(tf.test.TestCase):
ms.set_image_height(47, example) ms.set_image_height(47, example)
ms.set_image_width(47, example) ms.set_image_width(47, example)
ms.set_image_frame_rate(0.47, example) ms.set_image_frame_rate(0.47, example)
<<<<<<< HEAD
=======
ms.set_image_data_path(b"test", example) ms.set_image_data_path(b"test", example)
>>>>>>> Project import generated by Copybara.
ms.set_forward_flow_format(b"test", example) ms.set_forward_flow_format(b"test", example)
ms.set_forward_flow_channels(47, example) ms.set_forward_flow_channels(47, example)
ms.set_forward_flow_colorspace(b"test", example) ms.set_forward_flow_colorspace(b"test", example)
@ -78,10 +75,7 @@ class MediaSequenceTest(tf.test.TestCase):
ms.set_instance_segmentation_height(47, example) ms.set_instance_segmentation_height(47, example)
ms.set_instance_segmentation_width(47, example) ms.set_instance_segmentation_width(47, example)
ms.set_instance_segmentation_object_class_index((47, 49), example) ms.set_instance_segmentation_object_class_index((47, 49), example)
<<<<<<< HEAD
=======
ms.set_bbox_parts((b"HEAD", b"TOE"), example) ms.set_bbox_parts((b"HEAD", b"TOE"), example)
>>>>>>> Project import generated by Copybara.
# feature lists # feature lists
ms.add_image_encoded(b"test", example) ms.add_image_encoded(b"test", example)
ms.add_image_timestamp(47, example) ms.add_image_timestamp(47, example)

View File

@ -93,10 +93,6 @@ ndk_path_line=$((ndk_block+2))'i'
sdk_block=$(grep -n 'android_sdk_repository(' $workspace_file | awk -F ":" '{print $1}') sdk_block=$(grep -n 'android_sdk_repository(' $workspace_file | awk -F ":" '{print $1}')
sdk_path_line=$((sdk_block+3))'i' sdk_path_line=$((sdk_block+3))'i'
<<<<<<< HEAD
git checkout $workspace_file
=======
>>>>>>> Project import generated by Copybara.
if [ $platform == "darwin" ]; then if [ $platform == "darwin" ]; then
sed -i -e "$ndk_path_line\\ sed -i -e "$ndk_path_line\\
\ \ \ \ path = \"${android_ndk_path}/android-ndk-${ndk_version}\", \ \ \ \ path = \"${android_ndk_path}/android-ndk-${ndk_version}\",

View File

@ -20,11 +20,7 @@ cc_library(
name = "libffmpeg", name = "libffmpeg",
srcs = glob( srcs = glob(
[ [
<<<<<<< HEAD
"lib/x86_64-linux-gnu/libav*.so*",
=======
"lib/x86_64-linux-gnu/libav*.so", "lib/x86_64-linux-gnu/libav*.so",
>>>>>>> Project import generated by Copybara.
], ],
), ),
hdrs = glob(["include/x86_64-linux-gnu/libav*/*.h"]), hdrs = glob(["include/x86_64-linux-gnu/libav*/*.h"]),

View File

@ -13,21 +13,12 @@ cc_library(
name = "opencv", name = "opencv",
srcs = glob( srcs = glob(
[ [
<<<<<<< HEAD
"lib/x86_64-linux-gnu/libopencv_core.so*",
"lib/x86_64-linux-gnu/libopencv_highgui.so*",
"lib/x86_64-linux-gnu/libopencv_imgcodecs.so*",
"lib/x86_64-linux-gnu/libopencv_imgproc.so*",
"lib/x86_64-linux-gnu/libopencv_video.so*",
"lib/x86_64-linux-gnu/libopencv_videoio.so*",
=======
"lib/x86_64-linux-gnu/libopencv_core.so", "lib/x86_64-linux-gnu/libopencv_core.so",
"lib/x86_64-linux-gnu/libopencv_highgui.so", "lib/x86_64-linux-gnu/libopencv_highgui.so",
"lib/x86_64-linux-gnu/libopencv_imgcodecs.so", "lib/x86_64-linux-gnu/libopencv_imgcodecs.so",
"lib/x86_64-linux-gnu/libopencv_imgproc.so", "lib/x86_64-linux-gnu/libopencv_imgproc.so",
"lib/x86_64-linux-gnu/libopencv_video.so", "lib/x86_64-linux-gnu/libopencv_video.so",
"lib/x86_64-linux-gnu/libopencv_videoio.so", "lib/x86_64-linux-gnu/libopencv_videoio.so",
>>>>>>> Project import generated by Copybara.
], ],
), ),
hdrs = glob(["include/opencv2/**/*.h*"]), hdrs = glob(["include/opencv2/**/*.h*"]),