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 \
build-essential \
ca-certificates \
<<<<<<< HEAD
=======
curl \
>>>>>>> Project import generated by Copybara.
git \
wget \
unzip \
@ -39,11 +36,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libopencv-video-dev \
software-properties-common && \
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 && \
>>>>>>> Project import generated by Copybara.
apt-get clean && \
rm -rf /var/lib/apt/lists/*

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -34,13 +34,10 @@
#include "tensorflow/core/framework/tensor_shape.h"
#include "tensorflow/core/framework/tensor_util.h"
<<<<<<< HEAD
=======
#if !defined(__ANDROID__) && !defined(__APPLE__)
#include "tensorflow/core/profiler/lib/traceme.h"
#endif
>>>>>>> Project import generated by Copybara.
namespace tf = ::tensorflow;
namespace mediapipe {
@ -442,11 +439,6 @@ class TensorFlowInferenceCalculator : public CalculatorBase {
session_run_throttle->Acquire(1);
}
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;
{
#if !defined(__ANDROID__) && !defined(__APPLE__)
@ -456,7 +448,6 @@ class TensorFlowInferenceCalculator : public CalculatorBase {
{} /* target_node_names */, &outputs);
}
>>>>>>> Project import generated by Copybara.
if (session_run_throttle != nullptr) {
session_run_throttle->Release(1);
}

View File

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

View File

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

View File

@ -154,10 +154,6 @@ class OpenCvVideoDecoderCalculator : public CalculatorBase {
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
// previous frame, the new frame will be discarded.
if (prev_timestamp_ < timestamp) {
@ -166,7 +162,6 @@ class OpenCvVideoDecoderCalculator : public CalculatorBase {
decoded_frames_++;
}
>>>>>>> Project import generated by Copybara.
return ::mediapipe::OkStatus();
}
@ -189,10 +184,7 @@ class OpenCvVideoDecoderCalculator : public CalculatorBase {
int frame_count_;
int decoded_frames_ = 0;
ImageFormat::Format format_;
<<<<<<< HEAD
=======
Timestamp prev_timestamp_ = Timestamp::Unset();
>>>>>>> Project import generated by Copybara.
};
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
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
<<<<<<< HEAD
configuring the adder node with an alternative input stream hander,
=======
configuring the adder node with an alternative input stream handler,
>>>>>>> Project import generated by Copybara.
`EarlyCloseInputStreamHandler`.
## 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
using the MediaPipe C++ APIs.
<<<<<<< HEAD
=======
### Feature Extration for YouTube-8M Challenge
[Feature Extration for YouTube-8M Challenge](./youtube_8m.md) shows how to use
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](./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
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)
>>>>>>> Project import generated by Copybara.
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
@ -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.
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).
>>>>>>> Project import generated by Copybara.
```c++
class CalculatorBase {

View File

@ -643,11 +643,7 @@ Initialize the asset manager in `onCreate(Bundle)` before initializing
`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.,
>>>>>>> Project import generated by Copybara.
// binary graphs.
AndroidAssetUtil.initializeNativeAssetManager(this);
```

View File

@ -6,11 +6,7 @@ This codelab uses MediaPipe on an iOS device.
### 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
>>>>>>> Project import generated by Copybara.
graph on iOS.
### 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
- [Technical questions](#technical-questions)
- [Bugs and feature requests](#bugs-and-feature-requests)
Below are the various ways to get help:
>>>>>>> Project import generated by Copybara.
### Technical questions
@ -20,14 +11,6 @@ For help with technical or algorithmic questions, visit
[Stack Overflow](https://stackoverflow.com/questions/tagged/mediapipe) to find
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
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
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)
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.
Option 1. Use package manager tool to install the pre-compiled OpenCV
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
option 2 or 3 to install OpenCV 3 or above.
@ -90,26 +83,6 @@ To build and run iOS apps:
)
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",
srcs = glob(
[
@ -126,7 +99,6 @@ To build and run iOS apps:
linkstatic = 1,
visibility = ["//visibility:public"],
)
>>>>>>> Project import generated by Copybara.
```
4. Run the [Hello World desktop example](./hello_world_desktop.md).
@ -194,26 +166,6 @@ To build and run iOS apps:
)
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",
srcs = glob(
[
@ -230,7 +182,6 @@ To build and run iOS apps:
linkstatic = 1,
visibility = ["//visibility:public"],
)
>>>>>>> Project import generated by Copybara.
```
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)
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.
Option 1. Use HomeBrew package manager tool to install the pre-compiled
OpenCV libraries. FFmpeg will be installed via OpenCV.
>>>>>>> Project import generated by Copybara.
```bash
$ brew install opencv
@ -306,35 +250,6 @@ To build and run iOS apps:
$ 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`],
[`opencv_macos.BUILD`], and [`ffmpeg_macos.BUILD`] files like the following:
@ -387,7 +302,6 @@ To build and run iOS apps:
visibility = ["//visibility:public"],
)
>>>>>>> Project import generated by Copybara.
```
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
```
<<<<<<< HEAD
7. Install OpenCV.
Option 1. Use package manager tool to install the pre-compiled OpenCV
libraries.
=======
7. Install OpenCV and FFmpeg.
Option 1. Use package manager tool to install the pre-compiled OpenCV
libraries. FFmpeg will be installed via libopencv-video-dev.
>>>>>>> Project import generated by Copybara.
```bash
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(
<<<<<<< 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",
srcs = glob(
[
@ -531,7 +418,6 @@ To build and run iOS apps:
linkstatic = 1,
visibility = ["//visibility:public"],
)
>>>>>>> Project import generated by Copybara.
```
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.
1. [Install Docker](https://docs.docker.com/install/#supported-platforms) on
<<<<<<< HEAD
your host sytem.
=======
your host system.
>>>>>>> Project import generated by Copybara.
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!
```
<<<<<<< HEAD
<!-- 4. Uncomment the last line of the Dockerfile
=======
4. Build Mediapipe [Android demos](./examples.md).
```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
>>>>>>> Project import generated by Copybara.
```bash
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
[`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
[`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_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
<<<<<<< HEAD
MediaPipe is 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
focuses on development by demonstrating how to prepare video data for training
a TensorFlow model.
@ -22,11 +18,7 @@ process new data sets, in the documentation of
### Preparing an example data set
<<<<<<< HEAD
1. Checkout mediapipe repository
=======
1. Checkout the mediapipe repository
>>>>>>> Project import generated by Copybara.
```bash
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
<<<<<<< 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).
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)
```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.
<<<<<<< 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).
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.
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
[`REGISTER_CALCULATOR`] macro using the [`registration.h`] library. Note that
[`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
>>>>>>> Project import generated by Copybara.
the same namespace prefix.
## Out Of Memory error

View File

@ -75,11 +75,7 @@ public class MainActivity extends AppCompatActivity {
previewDisplayView = new SurfaceView(this);
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.,
>>>>>>> Project import generated by Copybara.
// binary graphs.
AndroidAssetUtil.initializeNativeAssetManager(this);

View File

@ -76,11 +76,7 @@ public class MainActivity extends AppCompatActivity {
previewDisplayView = new SurfaceView(this);
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.,
>>>>>>> Project import generated by Copybara.
// binary graphs.
AndroidAssetUtil.initializeNativeAssetManager(this);

View File

@ -76,11 +76,7 @@ public class MainActivity extends AppCompatActivity {
previewDisplayView = new SurfaceView(this);
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.,
>>>>>>> Project import generated by Copybara.
// binary graphs.
AndroidAssetUtil.initializeNativeAssetManager(this);

View File

@ -76,11 +76,7 @@ public class MainActivity extends AppCompatActivity {
previewDisplayView = new SurfaceView(this);
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.,
>>>>>>> Project import generated by Copybara.
// binary graphs.
AndroidAssetUtil.initializeNativeAssetManager(this);

View File

@ -76,11 +76,7 @@ public class MainActivity extends AppCompatActivity {
previewDisplayView = new SurfaceView(this);
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.,
>>>>>>> Project import generated by Copybara.
// binary graphs.
AndroidAssetUtil.initializeNativeAssetManager(this);

View File

@ -76,11 +76,7 @@ public class MainActivity extends AppCompatActivity {
previewDisplayView = new SurfaceView(this);
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.,
>>>>>>> Project import generated by Copybara.
// binary graphs.
AndroidAssetUtil.initializeNativeAssetManager(this);

View File

@ -76,11 +76,7 @@ public class MainActivity extends AppCompatActivity {
previewDisplayView = new SurfaceView(this);
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.,
>>>>>>> Project import generated by Copybara.
// binary graphs.
AndroidAssetUtil.initializeNativeAssetManager(this);

View File

@ -76,11 +76,7 @@ public class MainActivity extends AppCompatActivity {
previewDisplayView = new SurfaceView(this);
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.,
>>>>>>> Project import generated by Copybara.
// binary graphs.
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
--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">
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<<<<<<< HEAD
=======
<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">
<rect key="frame" x="57" y="248" width="260" height="151"/>
@ -31,34 +29,18 @@
<nil key="highlightedColor"/>
</label>
</subviews>
>>>>>>> Project import generated by Copybara.
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<accessibility key="accessibilityConfiguration" label="PreviewDisplayView">
<bool key="isElement" value="YES"/>
</accessibility>
</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>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
<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="_noCameraLabel" destination="emf-N5-sEd" id="91G-3Z-cU3"/>
>>>>>>> Project import generated by Copybara.
</connections>
</viewController>
<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">
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<<<<<<< HEAD
=======
<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">
<rect key="frame" x="57" y="248" width="260" height="151"/>
@ -31,7 +29,6 @@
<nil key="highlightedColor"/>
</label>
</subviews>
>>>>>>> Project import generated by Copybara.
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<accessibility key="accessibilityConfiguration" label="PreviewDisplayView">
<bool key="isElement" value="YES"/>
@ -42,12 +39,8 @@
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
<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="_noCameraLabel" destination="emf-N5-sEd" id="91G-3Z-cU3"/>
>>>>>>> Project import generated by Copybara.
</connections>
</viewController>
<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">
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<<<<<<< HEAD
=======
<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">
<rect key="frame" x="57" y="248" width="260" height="151"/>
@ -31,7 +29,6 @@
<nil key="highlightedColor"/>
</label>
</subviews>
>>>>>>> Project import generated by Copybara.
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<accessibility key="accessibilityConfiguration" label="PreviewDisplayView">
<bool key="isElement" value="YES"/>
@ -42,12 +39,8 @@
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
<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="_noCameraLabel" destination="emf-N5-sEd" id="91G-3Z-cU3"/>
>>>>>>> Project import generated by Copybara.
</connections>
</viewController>
<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">
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<<<<<<< HEAD
=======
<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">
<rect key="frame" x="57" y="248" width="260" height="151"/>
@ -31,7 +29,6 @@
<nil key="highlightedColor"/>
</label>
</subviews>
>>>>>>> Project import generated by Copybara.
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<accessibility key="accessibilityConfiguration" label="PreviewDisplayView">
<bool key="isElement" value="YES"/>
@ -42,12 +39,8 @@
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
<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="_noCameraLabel" destination="emf-N5-sEd" id="91G-3Z-cU3"/>
>>>>>>> Project import generated by Copybara.
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>

View File

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

View File

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

View File

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

View File

@ -520,11 +520,7 @@ class OstreamStream : public proto_ns::io::ZeroCopyOutputStream {
return WriteBuffer();
}
void BackUp(int count) override { buffer_used_ -= count; }
<<<<<<< HEAD
proto_int64 ByteCount() const override { return position_; }
=======
int64_t ByteCount() const override { return position_; }
>>>>>>> Project import generated by Copybara.
private:
// 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.
<<<<<<< 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 min_bound = Timestamp::Done();
for (const auto& stream : input_stream_managers_) {
@ -126,7 +120,6 @@ class FixedSizeInputStreamHandler : public DefaultInputStreamHandler {
stream_timestamp = PreviousAllowedInStream(stream_timestamp);
}
min_bound = std::min(min_bound, stream_timestamp);
>>>>>>> Project import generated by Copybara.
}
return min_bound;
}
@ -214,11 +207,7 @@ class FixedSizeInputStreamHandler : public DefaultInputStreamHandler {
}
// input_timestamp is recalculated here to process the most recent packets.
EraseSurplusPackets(true);
<<<<<<< HEAD
input_timestamp = MinTimestampOrBound();
=======
input_timestamp = MinTimestampToProcess();
>>>>>>> Project import generated by Copybara.
DefaultInputStreamHandler::FillInputSet(input_timestamp, input_set);
pending_ = false;
}

View File

@ -64,11 +64,7 @@ android_library(
],
visibility = ["//visibility:public"],
deps = [
<<<<<<< HEAD
"//third_party/java/jsr305_annotations",
=======
"@com_google_code_findbugs//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.
*
* <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
>>>>>>> Project import generated by Copybara.
* height should be swapped.
*/
// TODO: Clean up setSurfaceTexture methods.

View File

@ -655,13 +655,10 @@ AudioDecoder::~AudioDecoder() {
RETURN_IF_ERROR(processor->Open(stream_id, stream));
audio_processor_.emplace(stream_id, std::move(processor));
<<<<<<< HEAD
=======
CHECK(InsertIfNotPresent(
&stream_index_to_stream_id_,
options.audio_stream(*options_index_ptr).stream_index(),
stream_id));
>>>>>>> Project import generated by Copybara.
CHECK(InsertIfNotPresent(&stream_id_to_audio_options_index_,
stream_id, *options_index_ptr));
CHECK(InsertIfNotPresent(&audio_options_index_to_stream_id,
@ -759,14 +756,9 @@ AudioDecoder::~AudioDecoder() {
::mediapipe::Status AudioDecoder::FillAudioHeader(
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(
audio_processor_,
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.";
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
// 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
>>>>>>> Project import generated by Copybara.
// video this means every 26.5h with 1 PTS tick = 1/90000 of a second.
// Example timeline:
// CorrectPtsForRollover(0) -> 0
@ -213,10 +209,7 @@ class AudioDecoder {
::mediapipe::Status Flush();
std::map<int, int> stream_id_to_audio_options_index_;
<<<<<<< HEAD
=======
std::map<int, int> stream_index_to_stream_id_;
>>>>>>> Project import generated by Copybara.
std::map<int, std::unique_ptr<AudioPacketProcessor>> audio_processor_;
// 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/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.|
<<<<<<< HEAD
=======
|`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/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.|
@ -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/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.|
<<<<<<< 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.|
>>>>>>> Project import generated by Copybara.
### Keys related to image class segmentation
| key | type | python call / c++ call | description |

View File

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

View File

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

View File

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

View File

@ -59,10 +59,7 @@ class MediaSequenceTest(tf.test.TestCase):
ms.set_image_height(47, example)
ms.set_image_width(47, example)
ms.set_image_frame_rate(0.47, example)
<<<<<<< HEAD
=======
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_channels(47, 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_width(47, example)
ms.set_instance_segmentation_object_class_index((47, 49), example)
<<<<<<< HEAD
=======
ms.set_bbox_parts((b"HEAD", b"TOE"), example)
>>>>>>> Project import generated by Copybara.
# feature lists
ms.add_image_encoded(b"test", 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_path_line=$((sdk_block+3))'i'
<<<<<<< HEAD
git checkout $workspace_file
=======
>>>>>>> Project import generated by Copybara.
if [ $platform == "darwin" ]; then
sed -i -e "$ndk_path_line\\
\ \ \ \ path = \"${android_ndk_path}/android-ndk-${ndk_version}\",

View File

@ -20,11 +20,7 @@ cc_library(
name = "libffmpeg",
srcs = glob(
[
<<<<<<< HEAD
"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"]),

View File

@ -13,21 +13,12 @@ cc_library(
name = "opencv",
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_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",
>>>>>>> Project import generated by Copybara.
],
),
hdrs = glob(["include/opencv2/**/*.h*"]),