Project import generated by Copybara.
PiperOrigin-RevId: 267280553
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
```
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user