Compare commits

...
843 Commits
Author SHA1 Message Date
Sebastian SchmidtandCopybara-Service 91a3c54d55 Internal change
PiperOrigin-RevId: 537405687
2023-06-02 14:12:35 -07:00
MediaPipe TeamandCopybara-Service b69f93fca6 Internal change
PiperOrigin-RevId: 537381138
2023-06-02 12:31:55 -07:00
Copybara-Service 09bad328ad Merge pull request #4485 from priankakariatyml:ios-delegate-fixes
PiperOrigin-RevId: 537369166
2023-06-02 11:49:18 -07:00
MediaPipe TeamandCopybara-Service 280bd320b4 Fix more OSS warnings and build errors
-Wc++98-compat-extra-semi
* in type_map.h

-Winconsistent-missing-override
* in gl_texture_buffer.h

-Wdeprecated-declarations
* usage of (absl) Status in
  * status_util.cc
  * api2/packet.h
  * output_stream_shard.cc

-Wimplicit-const-int-float-conversion
* Adds a static_cast to handle the precision loss when converting from large ints to floating point

ANNOTATE_THREAD_NAME
* explicitly uses ABSL_ANNOTATE_THREAD_NAME instead. This is useful in Chromium's build where there are multiple ANNOTATE_THREAD_NAME symbols

Also ran clang-format over all of each edited file

PiperOrigin-RevId: 537351290
2023-06-02 10:46:42 -07:00
MediaPipe TeamandCopybara-Service 9045a74ba3 Internal change
PiperOrigin-RevId: 537175065
2023-06-01 17:48:03 -07:00
Joe FernandezandCopybara-Service a6e63fa320 Adding redirects for old pages and updating pages for upgraded legacy solutions
PiperOrigin-RevId: 537145433
2023-06-01 15:31:42 -07:00
MediaPipe TeamandCopybara-Service 15aff443b1 Internal change
PiperOrigin-RevId: 537089863
2023-06-01 12:00:44 -07:00
Sebastian SchmidtandCopybara-Service 194a301dd8 Update WASM files for 0.10.1 release
PiperOrigin-RevId: 537078723
2023-06-01 11:22:40 -07:00
Paul WankadiaandCopybara-Service f21ee4c197 Update MediaPipe to RE2 release 2023-06-01.
Note that RE2 has taken a dependency on Abseil, so the `main` branch
should be used from now on. The `abseil` branch will go away soon...

PiperOrigin-RevId: 536829679
2023-05-31 14:52:24 -07:00
Prianka Liz Kariat e3b03866dc Removed unwanted import from MPPImageClassifier.h 2023-05-31 20:35:12 +05:30
Sebastian SchmidtandCopybara-Service d76b48ec8b Add MP_DISABLE_GPU to .so target
PiperOrigin-RevId: 536537732
2023-05-30 16:18:02 -07:00
Copybara-Service 32e48dd2d9 Merge pull request #4486 from priankakariatyml:ios-gesture-recognizer-impl
PiperOrigin-RevId: 536516003
2023-05-30 14:53:04 -07:00
Sebastian SchmidtandCopybara-Service b7c940ef8a Internal change
PiperOrigin-RevId: 536499053
2023-05-30 13:51:06 -07:00
MediaPipe TeamandCopybara-Service 01cfb92e35 Add MultiLandmarksSmoothingCalculator
PiperOrigin-RevId: 536490704
2023-05-30 13:20:55 -07:00
MediaPipe TeamandCopybara-Service c73027926f Add MultiLandmarksSmoothingCalculator
PiperOrigin-RevId: 536478601
2023-05-30 12:37:05 -07:00
MediaPipe TeamandCopybara-Service a432559123 Port LandmarksSmoothingCalculator to api2
PiperOrigin-RevId: 536474279
2023-05-30 12:20:23 -07:00
Sebastian SchmidtandCopybara-Service 96357b1910 Internal change
PiperOrigin-RevId: 536457269
2023-05-30 11:21:17 -07:00
MediaPipe TeamandCopybara-Service 056881f4a9 Only apply face landmarks smoothing for stream mode (VIDEO and LIVE_STREAM).
PiperOrigin-RevId: 536455842
2023-05-30 11:16:43 -07:00
Prianka Liz Kariat aa7308498b Fixed typo 2023-05-30 23:38:04 +05:30
Copybara-Service fabde5f129 Merge pull request #4467 from priankakariatyml:ios-hand-landmarker-containers
PiperOrigin-RevId: 536447484
2023-05-30 10:49:22 -07:00
Copybara-Service 21eeac9fd7 Merge pull request #4464 from priankakariatyml:ios-gesture-recognizer-updates
PiperOrigin-RevId: 536421680
2023-05-30 09:24:06 -07:00
Prianka Liz Kariat b154dde19f Added iOS Gesture Recognizer implementation 2023-05-29 22:47:17 +05:30
Prianka Liz Kariat 6073d693d0 Added a method in iOS Object Detector to process packets for callbacks 2023-05-29 22:38:22 +05:30
Prianka Liz Kariat 250b11f5d1 Added a method in iOS image classifier to process result for the callback 2023-05-29 22:37:59 +05:30
MediaPipe TeamandCopybara-Service 759e9fd56e Reorganize the face stylizer test data.
PiperOrigin-RevId: 536074239
2023-05-28 19:28:14 -07:00
MediaPipe TeamandCopybara-Service 2e2b4d183e add “users” group to visibility
PiperOrigin-RevId: 536022725
2023-05-28 10:49:31 -07:00
MediaPipe TeamandCopybara-Service d4c7ed2217 Internal change
PiperOrigin-RevId: 535751178
2023-05-26 17:26:29 -07:00
Sebastian SchmidtandCopybara-Service fddc3facf0 Add FaceLandmarker Result API
PiperOrigin-RevId: 535735431
2023-05-26 16:04:47 -07:00
MediaPipe TeamandCopybara-Service e483b31fcf Internal change
PiperOrigin-RevId: 535636593
2023-05-26 09:23:37 -07:00
Prianka Liz Kariat 41d0f89fd1 Updated variable names in MPPHandLandmarkerOptionsHelpers 2023-05-26 21:06:29 +05:30
Prianka Liz Kariat 2428ba49a3 Fixed typo in MPPHandLandmarkerOptions 2023-05-26 21:02:14 +05:30
Prianka Liz Kariat 881c6e2eef Fixed typo in MPPHandLandmarkerResult 2023-05-26 21:00:59 +05:30
Prianka Liz Kariat bec7aeec22 Fixed typo in MPPHandLandmarkerOptions 2023-05-26 20:59:13 +05:30
Prianka Liz Kariat ff064e536c Added new line 2023-05-26 20:57:32 +05:30
Prianka Liz Kariat b442367fc9 Fixed formatting 2023-05-26 20:57:13 +05:30
Prianka Liz Kariat 23d97292a6 Updated face detector to use new methods from vision task runner 2023-05-26 18:49:24 +05:30
Prianka Liz Kariat 6fabc35ce7 Removed gesture recognizer implementation 2023-05-26 18:49:08 +05:30
Prianka Liz Kariat ddf4d3fbd3 Added iOS hand landmarker options helpers 2023-05-26 10:58:30 +05:30
Prianka Liz Kariat 5ad7c9fd89 Added iOS hand landmarker options 2023-05-26 10:58:12 +05:30
Prianka Liz Kariat f124cad095 Added iOS hand landmarker result 2023-05-26 10:57:58 +05:30
Copybara-Service f4337356fe Merge pull request #4465 from priankakariatyml:ios-landmark-test-cpp-utils
PiperOrigin-RevId: 535441782
2023-05-25 17:26:30 -07:00
MediaPipe TeamandCopybara-Service e2cb327060 Give an example of the expected protoType syntax
PiperOrigin-RevId: 535413303
2023-05-25 15:47:15 -07:00
MediaPipe TeamandCopybara-Service e8f2541cbd Internal update
PiperOrigin-RevId: 535376471
2023-05-25 14:03:43 -07:00
Jiuqiang TangandCopybara-Service 169bdf15b4 Make an option for adjusting the face alignment output image size, and add a "transformation_matrix" output stream of the face stylizer graph.
PiperOrigin-RevId: 535319310
2023-05-25 11:21:06 -07:00
MediaPipe TeamandCopybara-Service ea314ba455 Fix license typos.
PiperOrigin-RevId: 535309354
2023-05-25 10:53:37 -07:00
Sebastian SchmidtandCopybara-Service c7703bfb21 Add FaceLandmarkerOptions API
PiperOrigin-RevId: 535292669
2023-05-25 10:05:08 -07:00
Prianka Liz Kariat 1ec4ae44a5 Added C++ utils for parsing protos from text files for iOS tests. 2023-05-25 20:53:07 +05:30
Prianka Liz Kariat 52f3333cc1 Added MPPGesture Recognizer implementation 2023-05-25 20:44:16 +05:30
Prianka Liz Kariat e6fd39b3ee Updated the vision task runner to split the method that creates normalized rect based on ROI 2023-05-25 20:43:51 +05:30
Prianka Liz Kariat 9483ac4651 Updated iOS gesture recognizer results to initialize hand gestures with a default index 2023-05-25 20:42:24 +05:30
Khanh LeVietandCopybara-Service 952021f497 Remove unused MediaPipe Tasks Android sample
PiperOrigin-RevId: 535259478
2023-05-25 08:05:39 -07:00
MediaPipe TeamandCopybara-Service 3ac903787a Internal change
PiperOrigin-RevId: 535162357
2023-05-25 01:49:30 -07:00
Copybara-Service 034caf3d87 Merge pull request #4430 from kinaryml:python-gpu-support
PiperOrigin-RevId: 535133616
2023-05-24 23:53:00 -07:00
Sebastian SchmidtandCopybara-Service 1baf72e46b Internal change
PiperOrigin-RevId: 535131938
2023-05-24 23:45:16 -07:00
MediaPipe TeamandCopybara-Service 7800d238e9 add needed enum type for choose fuse pipeline.
PiperOrigin-RevId: 535076733
2023-05-24 20:17:54 -07:00
MediaPipe TeamandCopybara-Service c8ee09796b Internal change
PiperOrigin-RevId: 534959867
2023-05-24 13:26:53 -07:00
Copybara-Service b84e6f97dd Merge pull request #4456 from priankakariatyml:ios-code-review-fixes
PiperOrigin-RevId: 534957807
2023-05-24 13:22:31 -07:00
Sebastian SchmidtandCopybara-Service a7b81c7d10 Change "numberOfHands" property name to "numHands".
PiperOrigin-RevId: 534927982
2023-05-24 11:54:47 -07:00
Jiuqiang TangandCopybara-Service 7facc925ba Allow FaceStylizerGraph to miss base options.
Fix the color issue when the graph is running on gpu and "face alignment only" mode.

PiperOrigin-RevId: 534912498
2023-05-24 11:14:30 -07:00
Sebastian SchmidtandCopybara-Service acfaf3f1b6 Add unit test for FaceDetector iOS
PiperOrigin-RevId: 534874603
2023-05-24 09:40:08 -07:00
Sebastian SchmidtandCopybara-Service d9f316e12a Rename ObjectDetctionResult to ObjectDetectorResult
PiperOrigin-RevId: 534858600
2023-05-24 09:00:00 -07:00
Sebastian SchmidtandCopybara-Service 2017fcc9ab Add FaceDetector iOS API
PiperOrigin-RevId: 534858193
2023-05-24 08:55:03 -07:00
Prianka Liz Kariat 1aa44abcab Revert "Added support to set delegates in MPPBaseOptions"
This reverts commit 1e1693d9aa.
2023-05-24 20:25:45 +05:30
Prianka Liz Kariat 8f1a56f3c2 Fixed typos 2023-05-24 20:24:41 +05:30
Prianka Liz Kariat 1e1693d9aa Added support to set delegates in MPPBaseOptions 2023-05-24 20:24:34 +05:30
Prianka Liz Kariat e2e90dcac6 Merge branch 'master' into ios-code-review-fixes 2023-05-24 19:57:46 +05:30
Prianka Liz Kariat 69017381af Updated MPPObjectDetectorResult Helpers to return empty result instead of nil 2023-05-24 19:57:38 +05:30
MediaPipe TeamandCopybara-Service bc035d9146 This will fix the multiple typos in the tasks files.
PiperOrigin-RevId: 534679277
2023-05-23 21:49:34 -07:00
MediaPipe TeamandCopybara-Service 201b2d739d Fix c++98-compat-extra-semi warnings
PiperOrigin-RevId: 534624086
2023-05-23 18:03:29 -07:00
MediaPipe TeamandCopybara-Service 3dcfca3a73 Fix deprecated usages
* In status_builder.h to use absl::Status directly
* In type_map.h to use kTypeId.hash_code() directly

PiperOrigin-RevId: 534622923
2023-05-23 17:58:58 -07:00
Sebastian SchmidtandCopybara-Service e8ee934bf9 Use empty keypoint array for Detection if no keypoints are detected
PiperOrigin-RevId: 534572162
2023-05-23 15:10:00 -07:00
Copybara-Service 1523cc48a1 Merge pull request #4447 from priankakariatyml:ios-code-review-fixes
PiperOrigin-RevId: 534526451
2023-05-23 12:55:35 -07:00
Sebastian SchmidtandCopybara-Service 1fe78180c8 Add quality scores to Segmenter tasks
PiperOrigin-RevId: 534497957
2023-05-23 11:37:26 -07:00
Prianka Liz Kariat 3eb97ae1ff Updated Image classifier result to return empty results if packet can't be validated. 2023-05-23 20:54:42 +05:30
Prianka Liz Kariat fda001b666 Updated error tests to use XCTAssertEqualObjects 2023-05-23 19:31:14 +05:30
Sebastian SchmidtandCopybara-Service 87f525c76b Internal change
PiperOrigin-RevId: 534264040
2023-05-22 20:01:41 -07:00
Sebastian SchmidtandCopybara-Service 51730ec25c Add iOS support for MPMask
PiperOrigin-RevId: 534155657
2023-05-22 13:00:05 -07:00
MediaPipe TeamandCopybara-Service 102cffdf4c Add some helpful error messages in case GL texture creation fails.
PiperOrigin-RevId: 534029187
2023-05-22 05:03:51 -07:00
Sebastian SchmidtandCopybara-Service 7c28c5d58f Fix rendering of MPMask and MPImage clone
PiperOrigin-RevId: 533551170
2023-05-19 14:26:18 -07:00
Copybara-Service a6457d87b2 Merge pull request #4433 from priankakariatyml:ios-remove-delegate
PiperOrigin-RevId: 533472159
2023-05-19 09:24:26 -07:00
Copybara-Service 9044d62f61 Merge pull request #4422 from priankakariatyml:ios-gesture-recognizer-files
PiperOrigin-RevId: 533471803
2023-05-19 09:19:20 -07:00
Prianka Liz Kariat f219829b1d Removed support for Delegates from iOS 2023-05-19 17:42:57 +05:30
MediaPipe TeamandCopybara-Service 937a6b1422 Internal change
PiperOrigin-RevId: 533327411
2023-05-18 20:19:42 -07:00
MediaPipe TeamandCopybara-Service c248525eeb internal update
PiperOrigin-RevId: 533197055
2023-05-18 11:39:35 -07:00
MediaPipe TeamandCopybara-Service a1755044ea Internal change
PiperOrigin-RevId: 533187060
2023-05-18 11:10:42 -07:00
MediaPipe TeamandCopybara-Service 03b901a443 Internal change
PiperOrigin-RevId: 533150010
2023-05-18 09:16:35 -07:00
Kinar RandGitHub b5148c8ce3 Update setup.py 2023-05-18 18:32:45 +05:30
Kinar RandGitHub 01fdeaf1e1 Update Dockerfile 2023-05-18 18:29:22 +05:30
Kinar RandGitHub 6100f0e76e Update base_options.py 2023-05-18 18:09:39 +05:30
Kinar RandGitHub f63baaf8d2 Update BUILD 2023-05-18 18:08:04 +05:30
Kinar RandGitHub b5072c59e7 Update BUILD 2023-05-18 15:41:08 +05:30
Kinar RandGitHub 14dba421c4 Update BUILD 2023-05-18 13:23:44 +05:30
Kinar RandGitHub 620ff3508a Update BUILD 2023-05-18 12:51:08 +05:30
Kinar RandGitHub 126df20658 Included CPU binary graphs in setup.py 2023-05-18 11:00:12 +05:30
Prianka Liz Kariat bb5fcc2d64 Fixed Typos 2023-05-18 10:00:31 +05:30
Prianka Liz Kariat e905a9fe39 Removed roi methods from MPPGestureRecognizer 2023-05-18 09:52:23 +05:30
Rachel HornungandCopybara-Service 25458138a9 #MediaPipe Add ConcatenateStringVectorCalculator.
PiperOrigin-RevId: 532956844
2023-05-17 17:11:20 -07:00
MediaPipe TeamandCopybara-Service 02230f65d1 Internal change
PiperOrigin-RevId: 532934867
2023-05-17 15:54:32 -07:00
Sebastian SchmidtandCopybara-Service 1fb98f5ebd Don't double build ARM64 arch on M1 Macs
PiperOrigin-RevId: 532934646
2023-05-17 15:50:05 -07:00
Sebastian SchmidtandCopybara-Service a4d0e68bee Internal change
PiperOrigin-RevId: 532890317
2023-05-17 13:37:25 -07:00
Prianka Liz Kariat dc7c018b39 Added clearing of all graph options protos in MPPGestureRecognizerOptions Helpers 2023-05-17 22:03:10 +05:30
Prianka Liz Kariat d6d5a94845 Reverted copy of gesture recognizer result containers 2023-05-17 21:59:26 +05:30
Prianka Liz Kariat 36b7514b19 Removed srcs in MPPGestureRecognizer target 2023-05-17 21:56:31 +05:30
Prianka Liz Kariat dcb0414d4b Added MPPGestureRecognizer header 2023-05-17 21:53:25 +05:30
Prianka Liz Kariat 501b4bbc7b Added MPPGestureRecognizerResultHelpers 2023-05-17 21:52:05 +05:30
Prianka Liz Kariat ebd1545506 Added MPPGestureRecognizerOptionsHelpers 2023-05-17 21:51:40 +05:30
Prianka Liz Kariat a4c280310b Added delegates in iOS gesture recognizer options 2023-05-17 21:50:53 +05:30
Prianka Liz Kariat ae2901459d Updated property types in MPPGestureRecognizerResult 2023-05-17 21:50:11 +05:30
kinaryml 45addac249 Testing MediaPipe Python with GPU support 2023-05-17 10:55:40 +05:30
vrabaudandCopybara-Service 4f8520af10 Internal change
PiperOrigin-RevId: 532611846
2023-05-16 16:48:54 -07:00
MediaPipe TeamandCopybara-Service 5af496201b internal updating of flatbuffers
PiperOrigin-RevId: 532601578
2023-05-16 16:08:39 -07:00
MediaPipe TeamandCopybara-Service 609a57f167 Internal change
PiperOrigin-RevId: 532597768
2023-05-16 15:56:25 -07:00
Copybara-Service 7eb5cab22d Merge pull request #4397 from priankakariatyml:ios-remove-opencv-dep
PiperOrigin-RevId: 532553181
2023-05-16 13:15:53 -07:00
Sebastian SchmidtandCopybara-Service 024f782cd9 Warn users that do not invoke "close()"
PiperOrigin-RevId: 532507235
2023-05-16 10:50:38 -07:00
Sebastian SchmidtandCopybara-Service d53fbf2aeb Update links in README.md
PiperOrigin-RevId: 532506851
2023-05-16 10:45:30 -07:00
Sebastian SchmidtandCopybara-Service 8bf6c63e92 Write TFLite model to Wasm file system
PiperOrigin-RevId: 532482502
2023-05-16 09:25:44 -07:00
MediaPipe TeamandCopybara-Service d7fa4b95b5 Internal change.
PiperOrigin-RevId: 532474319
2023-05-16 08:56:30 -07:00
MediaPipe TeamandCopybara-Service e0eef9791e Internal change
PiperOrigin-RevId: 532113907
2023-05-15 08:06:33 -07:00
MediaPipe TeamandCopybara-Service fc9538533c Improve loop calculator documentation and add additional specializations
The documentation is confusing since it was unclear where e.g. BeginLoopWithIterableCalculator comes from. Also, input_to_loop_body wasn't connected to anything. loop_internal_ts is more confusing than helpful. This CL cleans up the docs. It also adds specializations for CPU image and GPU texture buffers to be used for the recompose effect.

PiperOrigin-RevId: 532083714
2023-05-15 05:58:58 -07:00
MediaPipe TeamandCopybara-Service 12ba644393 Internal change
PiperOrigin-RevId: 531582116
2023-05-12 12:57:28 -07:00
Copybara-Service c7ba201e6a Merge pull request #4372 from priankakariatyml:ios-image-classifier-async-fixes
PiperOrigin-RevId: 531517080
2023-05-12 08:50:14 -07:00
Copybara-Service 785f549130 Merge pull request #4401 from priankakariatyml:ios-typo-fixes
PiperOrigin-RevId: 531223233
2023-05-11 09:26:08 -07:00
Prianka Liz Kariat 4c32ff493e Fixed typo in MPPObjectDetectorOptions 2023-05-11 14:04:40 +05:30
MediaPipe TeamandCopybara-Service 64af919107 Internal change
PiperOrigin-RevId: 531007009
2023-05-10 14:38:19 -07:00
Sebastian SchmidtandCopybara-Service 1666f3ed80 Add .close() method to ImageSegmenterResult/InteractiveSegmenterResult/PoseLandmarkerResult
PiperOrigin-RevId: 530973944
2023-05-10 12:37:48 -07:00
Prianka Liz Kariat 419701c615 Removed opencv dependency from MPPVIsionTaskRunner 2023-05-10 13:09:44 +05:30
Mark McDonaldandCopybara-Service a7ede9235c Internal change
PiperOrigin-RevId: 530806084
2023-05-09 22:34:07 -07:00
MediaPipe TeamandCopybara-Service ea1643f7f8 Internal update
PiperOrigin-RevId: 530777692
2023-05-09 19:47:43 -07:00
MediaPipe TeamandCopybara-Service f824424700 When returning multiple output streams together, keep them alive until callback.
PiperOrigin-RevId: 530771884
2023-05-09 19:00:00 -07:00
MediaPipe TeamandCopybara-Service e391c76433 Include object_detector_metadata_schema.fbs and image_segmenter_metadata_schema.fbs
PiperOrigin-RevId: 530769920
2023-05-09 18:45:01 -07:00
MediaPipe Teamandjqtang f95a782399 Internal change
PiperOrigin-RevId: 530751565
2023-05-09 17:03:20 -07:00
MediaPipe TeamandCopybara-Service 6ff39c418c Internal change
PiperOrigin-RevId: 530751097
2023-05-09 17:01:45 -07:00
MediaPipe TeamandCopybara-Service dd1779840d Update model_maker requirements.txt for release
PiperOrigin-RevId: 530748415
2023-05-09 16:49:41 -07:00
Sebastian SchmidtandGitHub a469f0151b Merge pull request #4386 from priankakariatyml/ios-cocoapods-opencv-fixes
Removed opencv framework from MPPVisionTaskRunner dependendencies
2023-05-09 17:08:32 -06:00
MediaPipe TeamandCopybara-Service f77481f303 MediaPipe GPU: Log renderer.
We currently log GL version, but since we support multiple backends, logging the renderer as well takes away any doubt what is being used at runtime.

PiperOrigin-RevId: 530736209
2023-05-09 15:57:31 -07:00
Sebastian SchmidtandCopybara-Service bea5eb766d Move Java Connections arrays to Task class
PiperOrigin-RevId: 530719994
2023-05-09 14:52:33 -07:00
Sebastian SchmidtandCopybara-Service 6f3c80ae8a Prevent property mangling for options types
PiperOrigin-RevId: 530707361
2023-05-09 14:05:05 -07:00
Jiuqiang TangandCopybara-Service 05c565898a Add image_segmenter_metadata_schema and object_detector_metadata_schema python files to the mediapipe python wheels.
PiperOrigin-RevId: 530674961
2023-05-09 12:02:31 -07:00
MediaPipe TeamandCopybara-Service 08d19739e0 Allow passing --resource_root_dir to resolve asset lookups.
PiperOrigin-RevId: 530618235
2023-05-09 08:40:11 -07:00
MediaPipe TeamandCopybara-Service 9de52a4a30 Internal change
PiperOrigin-RevId: 530562491
2023-05-09 03:48:49 -07:00
Prianka Liz Kariat 99e3d355cb Removed opencv framework dep from MPPVisionTaskRunner deps 2023-05-09 11:28:19 +05:30
MediaPipe TeamandCopybara-Service 10776ef86f Added error message if no provisioning profile found
PiperOrigin-RevId: 530498369
2023-05-08 22:20:19 -07:00
Sebastian SchmidtandCopybara-Service 65cb5f4e6b Do not depend on *.ts files in ts_declaration
PiperOrigin-RevId: 530435849
2023-05-08 16:20:18 -07:00
Copybara-Service ee8d0383d6 Merge pull request #4380 from priankakariatyml:ios-cocoapods-fixes
PiperOrigin-RevId: 530409793
2023-05-08 14:35:09 -07:00
MediaPipe TeamandCopybara-Service 83a8743a8b Internal change
PiperOrigin-RevId: 530408554
2023-05-08 14:31:04 -07:00
MediaPipe TeamandCopybara-Service b40f0d3b72 Internal change
PiperOrigin-RevId: 530385895
2023-05-08 13:04:51 -07:00
Sebastian SchmidtandCopybara-Service ae8bedd352 Inline constants for FaceLandmarksConnections
PiperOrigin-RevId: 530384171
2023-05-08 12:58:18 -07:00
Sebastian SchmidtandCopybara-Service e3c2f31ddf Update WASM files for Alpha 14
PiperOrigin-RevId: 530341569
2023-05-08 10:31:46 -07:00
Shuang LiuandCopybara-Service 0c75c76623 Fix a typo.
PiperOrigin-RevId: 530339315
2023-05-08 10:24:29 -07:00
Prianka Liz Kariat 4a192a6d87 Updated formatting in MPPImageClassifier 2023-05-08 16:58:00 +05:30
Prianka Liz Kariat db732e2913 Updated formatting in MPPImageClassifierOptions 2023-05-08 16:57:17 +05:30
Prianka Liz Kariat 443418f6d5 Updated formatting 2023-05-08 16:45:16 +05:30
Prianka Liz Kariat 946042aca1 Reverted addition of flow limiter calculator in image classifier iOS 2023-05-08 16:33:09 +05:30
Prianka Liz Kariat 1865643486 Fixed deps in ios task BUILD file 2023-05-08 16:32:04 +05:30
Prianka Liz Kariat 26810b6b84 Reverted back to using containers and options in BUILD 2023-05-08 16:30:40 +05:30
Prianka Liz Kariat f86188f8e1 Merged with master 2023-05-08 16:24:54 +05:30
Copybara-Service 1360977730 Merge pull request #4373 from priankakariatyml:ios-object-detector-async-fixes
PiperOrigin-RevId: 530233608
2023-05-08 01:14:01 -07:00
MediaPipe TeamandCopybara-Service 613f645c74 Update CalculatorOptions to encourage proto3 options
PiperOrigin-RevId: 530127533
2023-05-07 11:25:43 -07:00
MediaPipe TeamandCopybara-Service 876987b389 Remove auxiliary landmarks in PoseLandmarker API results.
PiperOrigin-RevId: 529989746
2023-05-06 12:58:00 -07:00
Sebastian SchmidtandCopybara-Service ddb84702f6 Simplify MPMask by removing the Type Enums from the public API
PiperOrigin-RevId: 529975377
2023-05-06 10:26:13 -07:00
Sebastian SchmidtandCopybara-Service e9fc66277a Simplify MPImage API by removing the Type Enums from the public API
PiperOrigin-RevId: 529960399
2023-05-06 07:49:46 -07:00
Sebastian SchmidtandCopybara-Service 8a6fe90759 Remove single-channel types from MPImage
PiperOrigin-RevId: 529956549
2023-05-06 07:04:14 -07:00
MediaPipe TeamandCopybara-Service 800a7b4a27 Object detector handle empty packet when no object is detected.
PiperOrigin-RevId: 529919638
2023-05-06 01:11:01 -07:00
MediaPipe TeamandCopybara-Service cc8847def5 Update one-class segmentation category mask behavior on CPU to match latest API
PiperOrigin-RevId: 529917830
2023-05-06 00:55:26 -07:00
Sebastian SchmidtandCopybara-Service fb7f06b509 Remove error check that canvas must be defined
PiperOrigin-RevId: 529906685
2023-05-05 23:22:40 -07:00
Sebastian SchmidtandCopybara-Service 6aad5742c3 Internal
PiperOrigin-RevId: 529890599
2023-05-05 21:51:51 -07:00
Sebastian SchmidtandCopybara-Service e707c84a3d Create a MediaPipe Mask Type
PiperOrigin-RevId: 529868427
2023-05-05 19:23:43 -07:00
Prianka Liz Kariat f713be7b6d Updated deps names in iOS test targets 2023-05-06 06:13:51 +05:30
MediaPipe TeamandCopybara-Service 3562a7f7dc Update one-class segmentation category mask behavior on GPU to match latest API
PiperOrigin-RevId: 529853658
2023-05-05 17:32:06 -07:00
Prianka Liz Kariat 9f0dd03851 Updated comments 2023-05-06 05:15:23 +05:30
Prianka Liz Kariat d79c0bbd39 Updated formatting 2023-05-06 05:10:05 +05:30
Prianka Liz Kariat 72d6081263 Declared arrays for duplicate depepndencies 2023-05-06 04:59:19 +05:30
Prianka Liz Kariat 648a24a97b Added conditional building of opencv xc framework to test targets 2023-05-06 04:58:59 +05:30
Prianka Liz Kariat 4349ac48b0 Changed opencv framework version to 4.5.3 2023-05-06 04:39:09 +05:30
Prianka Liz Kariat d22a1318f6 Updated condition checks in third_party/BUILD 2023-05-06 04:37:09 +05:30
Prianka Liz Kariat 26fce393e8 Removed opencv framework target from vision runner deps 2023-05-06 04:36:49 +05:30
Prianka Liz Kariat 1daf4d74ee Updated common dependencies to link in helpers 2023-05-06 04:35:51 +05:30
Prianka Liz Kariat 6427c49d2d Aded version of dependency to podspec template 2023-05-06 04:25:24 +05:30
Prianka Liz Kariat 78224aaee6 Updated shell script to build ios opencv from source 2023-05-06 04:24:36 +05:30
Prianka Liz Kariat 2fa03a3699 Added flow limiter calculator and conditionally selected xcframework in iOS framework targets 2023-05-06 04:23:49 +05:30
Sebastian SchmidtandCopybara-Service f6d0a5e03a Make the timestamp the second argument in all xForVideo() methods
PiperOrigin-RevId: 529814792
2023-05-05 14:29:33 -07:00
Copybara-Service 13187208ac Merge pull request #4355 from priankakariatyml:ios-opencv-build-from-source
PiperOrigin-RevId: 529800547
2023-05-05 13:34:46 -07:00
Sebastian SchmidtandCopybara-Service f065910559 Create non-callback APIs for APIs that return callbacks.
PiperOrigin-RevId: 529799515
2023-05-05 13:30:36 -07:00
MediaPipe TeamandCopybara-Service ecc8dca8ba Internal change
PiperOrigin-RevId: 529752098
2023-05-05 10:28:38 -07:00
MediaPipe TeamandCopybara-Service c24e7a250c Internal change
PiperOrigin-RevId: 529617578
2023-05-04 23:01:32 -07:00
Sebastian SchmidtandCopybara-Service 18d893c697 Add scribble support to InteractiveSegmenter Web API
PiperOrigin-RevId: 529594131
2023-05-04 20:44:26 -07:00
MediaPipe TeamandCopybara-Service 61cfe2ca9b Object Detector remove nms operation from exported tflite
PiperOrigin-RevId: 529559380
2023-05-04 17:36:11 -07:00
MediaPipe Teamandjqtang 12b0b6fad1 Internal change
PiperOrigin-RevId: 529495239
2023-05-04 14:51:19 -07:00
Prianka Liz Kariat 1db1c29f50 Added code comments 2023-05-05 01:04:04 +05:30
Prianka Liz Kariat 330976ce9e Added utils of containers and core to MPPTaskCommon to avoid warnings in xcode 2023-05-04 23:51:41 +05:30
Prianka Liz Kariat 47013d289e Added flow limiter calculator in MediaPipeTasksCommon 2023-05-04 23:19:12 +05:30
MediaPipe TeamandCopybara-Service 64cad80543 Internal change.
PiperOrigin-RevId: 529449175
2023-05-04 10:33:40 -07:00
Prianka Liz Kariat 253662149e Updated pixel format types in object detector 2023-05-04 23:03:03 +05:30
Sebastian SchmidtandCopybara-Service 767db32d69 Support multiple poses for PoseLandmarker
PiperOrigin-RevId: 529430797
2023-05-04 09:29:12 -07:00
Prianka Liz Kariat 3df4f7db64 Updated time out for object detector 2023-05-04 20:00:29 +05:30
Prianka Liz Kariat 08282d9fd7 Updated time out for image classifier async tests 2023-05-04 19:59:39 +05:30
Prianka Liz Kariat a4e11eac78 Added constants for time out 2023-05-04 19:55:19 +05:30
Prianka Liz Kariat 00712d727e Updated wait time for object detector tests 2023-05-04 19:53:06 +05:30
Prianka Liz Kariat 33ae23c53a Increased wait time for image classifier asynchronous tests 2023-05-04 19:51:54 +05:30
Prianka Liz Kariat 8ec0724b65 Updated documentation to include note about rgba images 2023-05-04 19:44:11 +05:30
Prianka Liz Kariat ddd1515f88 Updated documentation 2023-05-04 19:40:15 +05:30
Prianka Liz Kariat d401439daa Updated formatting 2023-05-04 19:22:11 +05:30
Prianka Liz Kariat 1136d4d515 Updated CVPixelBuffer to support pixel format type of 32RGBA 2023-05-04 18:58:49 +05:30
Prianka Liz Kariat 7a7f27c34b Merge branch 'ios-normalized-keypoint-hash' into ios-object-detector-async-fixes 2023-05-04 17:21:36 +05:30
Prianka Liz Kariat 381ffcb474 Added hash implementation for iOS normalized keypoint 2023-05-04 17:10:07 +05:30
Prianka Liz Kariat 87593a2ade Updated docuemntation of MPPObjectDetector 2023-05-04 17:05:17 +05:30
Prianka Liz Kariat ab135190e5 Updated iOS object detector to use delegates instead of callbacks for async calls 2023-05-04 17:03:40 +05:30
Prianka Liz Kariat a21c08bf4d Added method for creating unique dispatch queue names in MPPVisionTaskRunner 2023-05-04 17:00:12 +05:30
Prianka Liz Kariat e47bb16544 Added validation of C++ image classification result packet in MPPImageClassifierResult+Helpers.mm 2023-05-04 16:52:58 +05:30
Prianka Liz Kariat ab4b07646c Updated MPPImageClassifier to use delegates instead of completion blocks for callback. 2023-05-04 16:43:18 +05:30
Prianka Liz Kariat 1323a5271c Added method to create unique dispatch queue names in MPPVisionTaskRunner 2023-05-04 16:39:43 +05:30
Jiuqiang TangandCopybara-Service c6e3f08282 Expose FaceAligner and LanguageDetector to be public MediaPipe Tasks Python API.
PiperOrigin-RevId: 529227382
2023-05-03 16:38:49 -07:00
MediaPipe TeamandCopybara-Service b350f72394 Support MultiHW AVG Architecture for object detector
PiperOrigin-RevId: 529221127
2023-05-03 16:12:59 -07:00
Copybara-Service 8c324fbd77 Merge pull request #4325 from kinaryml:language-detector-python
PiperOrigin-RevId: 529213966
2023-05-03 15:50:42 -07:00
MediaPipe TeamandCopybara-Service a09e39d431 Add TransformerParameters proto
PiperOrigin-RevId: 529213840
2023-05-03 15:46:50 -07:00
Yuqi LiandCopybara-Service e428bdb7e8 internal change.
PiperOrigin-RevId: 529181374
2023-05-03 13:37:16 -07:00
MediaPipe TeamandCopybara-Service 606b83ac65 Internal change
PiperOrigin-RevId: 529180655
2023-05-03 13:32:44 -07:00
MediaPipe TeamandCopybara-Service 7c955246aa Support scribble input for Interactive Segmenter Java API
PiperOrigin-RevId: 529177660
2023-05-03 13:22:09 -07:00
Copybara-Service e84e90e5b2 Merge pull request #4361 from kinaryml:face-aligner-python
PiperOrigin-RevId: 529165597
2023-05-03 12:39:23 -07:00
MediaPipe TeamandCopybara-Service c780559214 Internal change
PiperOrigin-RevId: 529161249
2023-05-03 12:20:44 -07:00
MediaPipe TeamandCopybara-Service 09662749ea Support scribble input for Interactive Segmenter
PiperOrigin-RevId: 529156049
2023-05-03 12:01:10 -07:00
MediaPipe TeamandCopybara-Service baa8fc68a1 Make uploading to GPU optional in Image.GetGpuBuffer().
PiperOrigin-RevId: 529066617
2023-05-03 05:57:58 -07:00
MediaPipe TeamandCopybara-Service 3789156a41 Internal change
PiperOrigin-RevId: 529011480
2023-05-03 00:29:13 -07:00
MediaPipe TeamandCopybara-Service 1dea01aecc Internal change
PiperOrigin-RevId: 528996603
2023-05-02 22:57:38 -07:00
MediaPipe TeamandCopybara-Service c698381e48 Internal change
PiperOrigin-RevId: 528939095
2023-05-02 18:05:31 -07:00
Jiuqiang TangandCopybara-Service bf11fb313e Expose PoseLandmarker as a public MediaPipe Tasks Python API.
PiperOrigin-RevId: 528882303
2023-05-02 14:04:01 -07:00
Jiuqiang TangandCopybara-Service 4d9812af43 Pose detector uses advanced_gpu_api for gpu inference to resolve unsupported gpu op issue.
PiperOrigin-RevId: 528879218
2023-05-02 13:52:26 -07:00
Yuqi LiandCopybara-Service 9ce16fddeb nit: format the documentation of LandmarksDetectionResult.
PiperOrigin-RevId: 528848566
2023-05-02 11:56:47 -07:00
MediaPipe TeamandCopybara-Service 421c9e8e97 Fix typo
PiperOrigin-RevId: 528829423
2023-05-02 10:51:47 -07:00
MediaPipe TeamandCopybara-Service 4d112c132f Fix msan errors.
PiperOrigin-RevId: 528825081
2023-05-02 10:37:50 -07:00
Jiuqiang TangandCopybara-Service 60055f6fee Add more comments and usage example of the face stylizer graph.
PiperOrigin-RevId: 528823127
2023-05-02 10:32:43 -07:00
MediaPipe TeamandCopybara-Service 7fdbbee5be Internal change
PiperOrigin-RevId: 528799585
2023-05-02 09:07:29 -07:00
MediaPipe TeamandCopybara-Service 5b93477589 internal change
PiperOrigin-RevId: 528719459
2023-05-02 02:17:18 -07:00
Chuo-Ling ChangandCopybara-Service 3719aaef7e Fix typo.
PiperOrigin-RevId: 528693117
2023-05-01 23:52:45 -07:00
MediaPipe TeamandCopybara-Service 0a8be0d09d Internal change
PiperOrigin-RevId: 528632873
2023-05-01 18:40:33 -07:00
Jiuqiang TangandCopybara-Service fca728d226 Set face alignment image width and hight to 256.
PiperOrigin-RevId: 528583074
2023-05-01 15:01:39 -07:00
Jiuqiang TangandCopybara-Service 162a999887 Check the output stream tag rather than the input stream tag in face stylizer graph.
PiperOrigin-RevId: 528555024
2023-05-01 13:14:32 -07:00
MediaPipe TeamandCopybara-Service 5526e96b21 Internal change for proto library outputs.
PiperOrigin-RevId: 528539840
2023-05-01 12:17:29 -07:00
Yuqi LiandCopybara-Service 085f8265fb Internal change
PiperOrigin-RevId: 528517562
2023-05-01 11:01:23 -07:00
Kinar RandGitHub 544e4b66f7 Merge branch 'google:master' into face-aligner-python 2023-05-01 22:56:00 +05:30
MediaPipe TeamandCopybara-Service cab619f8da Fix typo in README
PiperOrigin-RevId: 528506206
2023-05-01 10:25:05 -07:00
Jiuqiang TangandCopybara-Service b9a9da5de5 Ignore fetching face stylizer model when the graph doesn't output stylized face images.
PiperOrigin-RevId: 528504312
2023-05-01 10:18:41 -07:00
kinaryml bd039f8b65 Updated necessary BUILD files 2023-05-01 05:56:52 -07:00
kinaryml 209d78f36c Added the Face Aligner Python API 2023-05-01 05:55:46 -07:00
MediaPipe TeamandCopybara-Service ad4ae6559b Add an extra op to rescale face stylizer generation output from [-1, 1] to [0, 1].
This conversion is to support running the model on both GPU and CPU.

PiperOrigin-RevId: 528400297
2023-04-30 23:14:29 -07:00
MediaPipe TeamandCopybara-Service 80b19fff4b Internal Change
PiperOrigin-RevId: 528399911
2023-04-30 23:10:21 -07:00
Jiuqiang TangandCopybara-Service c29e43dda0 Add the "FACE_ALIGNMENT" output stream to the face stylizer graph.
PiperOrigin-RevId: 528345204
2023-04-30 16:59:36 -07:00
MediaPipe TeamandCopybara-Service c450283715 Add a filegroup for referencing model.
PiperOrigin-RevId: 528251316
2023-04-30 01:19:19 -07:00
Sebastian SchmidtandCopybara-Service 8e510a3255 Invoke PoseListener callback while C++ Packet is still active
PiperOrigin-RevId: 528061429
2023-04-28 21:22:02 -07:00
Sebastian SchmidtandCopybara-Service 253f13ad62 Invoke callback for InteractiveSegmenter while C++ Packets are active
PiperOrigin-RevId: 528053621
2023-04-28 20:34:17 -07:00
Sebastian SchmidtandCopybara-Service d5c5457d25 Only log warnings once if color conversion is not specified
PiperOrigin-RevId: 528052009
2023-04-28 20:24:17 -07:00
Sebastian SchmidtandCopybara-Service a9721ae2fb Invoke callback for ImageSegmenter while C++ Packets are active
PiperOrigin-RevId: 528047220
2023-04-28 20:01:10 -07:00
Sebastian SchmidtandCopybara-Service e15add2475 Shorten MPImage API
PiperOrigin-RevId: 528039371
2023-04-28 19:00:17 -07:00
Esha UbowejaandCopybara-Service b1f93b3b27 Fixes HAND_ROIS_FROM_LANDMARKS output to be hand_rects_from_landmarks output stream.
PiperOrigin-RevId: 528024796
2023-04-28 17:25:05 -07:00
Sebastian SchmidtandCopybara-Service 874cc9dea3 Update PoseLandmarker to return MPImage
PiperOrigin-RevId: 528022223
2023-04-28 17:13:07 -07:00
Sebastian SchmidtandCopybara-Service dcef6df1cb Update InteractiveSegmenter to return MPImage
PiperOrigin-RevId: 528010944
2023-04-28 16:13:51 -07:00
Copybara-Service bbbc0f98c5 Merge pull request #4268 from priankakariatyml:object-detector-objc-tests
PiperOrigin-RevId: 527991967
2023-04-28 14:52:20 -07:00
Sebastian SchmidtandCopybara-Service 2c1d9c6582 Update ImageSegmenter to return MPImage
PiperOrigin-RevId: 527990991
2023-04-28 14:48:30 -07:00
Sebastian SchmidtandCopybara-Service a544098100 Update FaceStylizer to return MPImage
PiperOrigin-RevId: 527980696
2023-04-28 14:05:11 -07:00
Copybara-Service 5cffb3973f Merge pull request #4303 from kinaryml:pose-landmarker-python
PiperOrigin-RevId: 527948047
2023-04-28 11:59:28 -07:00
Copybara-Service 2bb1b454ea Merge pull request #4300 from priankakariatyml:ios-text-cocoapods-force-load
PiperOrigin-RevId: 527932547
2023-04-28 11:06:44 -07:00
MediaPipe TeamandCopybara-Service 3dce259bf6 Internal change
PiperOrigin-RevId: 527931585
2023-04-28 11:02:26 -07:00
MediaPipe TeamandCopybara-Service b2fbb2ddab Internal change
PiperOrigin-RevId: 527909361
2023-04-28 09:43:56 -07:00
MediaPipe TeamandCopybara-Service cf22c97143 Add the TFLite conversion API to BlazeFaceStylizer in model maker.
PiperOrigin-RevId: 527806005
2023-04-28 00:30:51 -07:00
kinaryml 3b06772d9a Fixed BUILD 2023-04-27 21:13:31 -07:00
kinaryml 305866ccae Updated BUILD files to use the open sourced Language Detector model 2023-04-27 21:11:53 -07:00
Kinar RandGitHub 76c8251faf Merge branch 'google:master' into language-detector-python 2023-04-28 09:28:54 +05:30
Sebastian SchmidtandCopybara-Service 5d9761cbfd Update tests and demos to call "close".
PiperOrigin-RevId: 527746909
2023-04-27 18:58:57 -07:00
Sebastian SchmidtandCopybara-Service 28b9b8d8a3 Open-sources LanguageDetector model.
PiperOrigin-RevId: 527745108
2023-04-27 18:47:07 -07:00
Sebastian SchmidtandCopybara-Service 5e41d47f3a Add "close()" method to MP Web Tasks
PiperOrigin-RevId: 527726737
2023-04-27 17:16:40 -07:00
Sebastian SchmidtandCopybara-Service b7e46ec528 Update WASM files for Alpha 13
PiperOrigin-RevId: 527707613
2023-04-27 15:58:03 -07:00
Prianka Liz Kariat 82840b8e28 Removed comments 2023-04-28 03:30:47 +05:30
Prianka Liz Kariat fec11735a3 Updated formatting 2023-04-28 03:30:21 +05:30
Prianka Liz Kariat bdede4f94e Updated select conditions 2023-04-28 03:26:29 +05:30
Prianka Liz Kariat aafb0162f4 Added config settings to select building iOS xcframework from source for certain configs 2023-04-28 03:17:22 +05:30
Prianka Liz Kariat ad4513784c Added build file for ios opencv from sources 2023-04-28 03:16:08 +05:30
Prianka Liz Kariat 2a0aa86ca9 Added http_archive to download opencv sources 2023-04-28 03:14:41 +05:30
Prianka Liz Kariat 8e82e91095 Added config for fat simulator builds 2023-04-28 03:13:14 +05:30
Sebastian SchmidtandCopybara-Service 4e1270c18f Internal
PiperOrigin-RevId: 527680530
2023-04-27 14:14:54 -07:00
MediaPipe TeamandCopybara-Service 212f110c65 Add nose in facemesh drawing
PiperOrigin-RevId: 527644154
2023-04-27 12:00:37 -07:00
MediaPipe TeamandCopybara-Service 3ca2427cc8 Blendshapes graph take smoothed face landmarks as input.
PiperOrigin-RevId: 527640341
2023-04-27 11:46:40 -07:00
MediaPipe TeamandCopybara-Service 82b8e4d7bf Update the face stylizer config to match the latest encoder and detector config.
PiperOrigin-RevId: 527637477
2023-04-27 11:37:16 -07:00
Copybara-Service 4fd77e38fb Merge pull request #4269 from shmishra99:master
PiperOrigin-RevId: 527634460
2023-04-27 11:27:15 -07:00
Sebastian SchmidtandCopybara-Service 1b82821f15 Add support for single-channel images to MPImage
PiperOrigin-RevId: 527629970
2023-04-27 11:12:34 -07:00
Sebastian SchmidtandCopybara-Service a5852b0513 Internal change
PiperOrigin-RevId: 527623223
2023-04-27 10:50:36 -07:00
Copybara-Service cd47080057 Merge pull request #4351 from kuaashish:master
PiperOrigin-RevId: 527619288
2023-04-27 10:37:23 -07:00
Sebastian SchmidtandCopybara-Service d5157a039e Add .github workspace import
PiperOrigin-RevId: 527617546
2023-04-27 10:31:44 -07:00
Sebastian SchmidtandCopybara-Service b457060c3a Generify tests for MPImage
PiperOrigin-RevId: 527611864
2023-04-27 10:12:30 -07:00
Sebastian SchmidtandCopybara-Service bc3434108e Update MPImage to use containers
PiperOrigin-RevId: 527596164
2023-04-27 09:18:05 -07:00
Jiuqiang TangandCopybara-Service 7c70c62465 Fix typo and improve comments.
PiperOrigin-RevId: 527580369
2023-04-27 08:10:29 -07:00
MediaPipe TeamandCopybara-Service 7b055df211 Internal change
PiperOrigin-RevId: 527473249
2023-04-26 22:14:32 -07:00
MediaPipe TeamandCopybara-Service 2122b5d7be Internal change
PiperOrigin-RevId: 527430483
2023-04-26 18:17:56 -07:00
MediaPipe TeamandCopybara-Service b05fd21709 Refactor the loss functions to initialize the VGG loss function in the init function to avoid duplicated initialization.
PiperOrigin-RevId: 527424556
2023-04-26 17:49:19 -07:00
MediaPipe TeamandCopybara-Service baed44ab10 Internal change
PiperOrigin-RevId: 527416263
2023-04-26 17:12:34 -07:00
MediaPipe TeamandCopybara-Service a45d1f5e90 Internal change.
PiperOrigin-RevId: 527374728
2023-04-26 14:27:58 -07:00
Prianka Liz Kariat 261e02e491 Fixed case name 2023-04-27 02:55:58 +05:30
Prianka Liz Kariat ee2665ad13 Added missing input files in vision library 2023-04-27 02:54:50 +05:30
Prianka Liz Kariat 1d8e24b9aa Updated documentation 2023-04-27 02:47:52 +05:30
Prianka Liz Kariat a8cb1f1dad Updated default values 2023-04-27 02:47:19 +05:30
Prianka Liz Kariat 1e776e8e01 Fixed indendation issues 2023-04-27 02:31:30 +05:30
Prianka Liz Kariat 9c98435027 Updated iOS framework names 2023-04-27 02:15:16 +05:30
MediaPipe TeamandCopybara-Service c44cc30ece DetectionPostProcessingGraph for post processing raw tensors from detection models.
PiperOrigin-RevId: 527363291
2023-04-26 13:44:54 -07:00
MediaPipe TeamandCopybara-Service 48aa88f39d Change object detector learning rate decay to cosine decay.
PiperOrigin-RevId: 527337105
2023-04-26 12:13:17 -07:00
kuaashishandGitHub 6f97203562 Rename 18-other-issues.md to 19-other-issues.md 2023-04-26 16:38:23 +05:30
kuaashishandGitHub 5f505b09e3 Rename 17-solution-legacy-issue-template.yaml to 18-solution-legacy-issue-template.yaml 2023-04-26 16:38:05 +05:30
kuaashishandGitHub 275eb31a8f Rename 16-documentation-issue-template.yaml to 17-documentation-issue-template.yaml 2023-04-26 16:37:44 +05:30
kuaashishandGitHub f9d14157ff Rename 15-bug-issue-template.yaml to 16-bug-issue-template.yaml 2023-04-26 16:37:28 +05:30
kuaashishandGitHub 9c8fe490d4 Rename 14-build-install-issue-template.yaml to 15-build-install-issue-template.yaml 2023-04-26 16:36:58 +05:30
kuaashishandGitHub f36f2c64b5 Rename 16-feature-request-issue-template.yaml to 14-feature-request-issue-template.yaml 2023-04-26 16:36:33 +05:30
kuaashishandGitHub d6b4067319 Rename 15-feature-request-issue-template.yaml to 16-feature-request-issue-template.yaml 2023-04-26 16:35:44 +05:30
kuaashishandGitHub 7d6ccb2dd1 Rename 14-feature-request-issue-template.yaml to 15-feature-request-issue-template.yaml 2023-04-26 16:35:16 +05:30
kuaashishandGitHub 728cb26644 Rename 13-feature-request-issue-template.yaml to 14-feature-request-issue-template.yaml 2023-04-26 16:34:48 +05:30
kuaashishandGitHub 4046b97416 Rename 50-other-issues.md to 18-other-issues.md 2023-04-26 16:32:41 +05:30
kuaashishandGitHub 00f355e301 Rename Solution(Legacy_issue_template).yaml to 17-solution-legacy-issue-template.yaml 2023-04-26 16:32:06 +05:30
kuaashishandGitHub a002e24080 Rename Documentation_issue_template.yaml to 16-documentation-issue-template.yaml 2023-04-26 16:31:16 +05:30
kuaashishandGitHub d15701a5e0 Rename bug_issue_template.yaml to 15-bug-issue-template.yaml 2023-04-26 16:30:46 +05:30
kuaashishandGitHub a99b0d6b9c Rename build.install_issue_template.yaml to 14-build-install-issue-template.yaml 2023-04-26 16:30:23 +05:30
kuaashishandGitHub badccdd87b Rename feature_request_issue_template.yaml to 13-feature-request-issue-template.yaml 2023-04-26 16:29:49 +05:30
kuaashishandGitHub 2d69c48e39 Rename studio_issue_template.yaml to 12-studio-issue-template.yaml 2023-04-26 16:27:12 +05:30
kuaashishandGitHub 17bee87b27 Rename model_maker_issue_template.yaml to 11-model-maker-issue-template.yaml 2023-04-26 16:26:39 +05:30
kuaashishandGitHub db2592a04d Rename task_issue_template.yaml to 00-task-issue-template.yaml 2023-04-26 16:24:20 +05:30
MediaPipe TeamandCopybara-Service 507ed0d91d Add custom metadata for object detection model with out-of-graph nms.
PiperOrigin-RevId: 527083453
2023-04-25 14:58:51 -07:00
MediaPipe TeamandCopybara-Service 17f5b95387 Internal change.
PiperOrigin-RevId: 527010360
2023-04-25 10:41:52 -07:00
Sebastian SchmidtandCopybara-Service 9e30b00685 Invoke the FaceStylizer callback even if no faces are detected
PiperOrigin-RevId: 527008261
2023-04-25 10:35:12 -07:00
Jiuqiang TangandCopybara-Service 3bc8276678 Remove "All Rights Reserved." in copyright headers.
PiperOrigin-RevId: 526982992
2023-04-25 09:06:29 -07:00
MediaPipe TeamandCopybara-Service 0fc6118680 Internal change.
PiperOrigin-RevId: 526892368
2023-04-25 01:30:43 -07:00
MediaPipe TeamandCopybara-Service 56df724c36 Add customizable face stylizer module in MediaPipe model maker
PiperOrigin-RevId: 526883862
2023-04-25 00:47:45 -07:00
Prianka Liz Kariat 3390325250 Updated documentation 2023-04-25 11:23:38 +05:30
Prianka Liz Kariat 6ac39c9b93 Updated name of common objects pod 2023-04-25 04:26:13 +05:30
Prianka Liz Kariat d63d3f61d7 Added podspec for CommonObjects and Vision tasks 2023-04-25 04:22:40 +05:30
Prianka Liz Kariat 8b44a7f181 Updated text podspec 2023-04-25 04:22:18 +05:30
Prianka Liz Kariat 472947818e Updated ios cocoapods build script 2023-04-25 04:22:03 +05:30
Prianka Liz Kariat 6eee726025 Updated build rules for iOS frameworks to duplicate symbols 2023-04-25 04:21:41 +05:30
Jiuqiang TangandCopybara-Service a0eb1b696c Internal changes.
PiperOrigin-RevId: 526759809
2023-04-24 14:45:35 -07:00
MediaPipe TeamandCopybara-Service 33c8c68bba Add a default_applicable_licenses to model_maker/python/vision/core.
PiperOrigin-RevId: 526716940
2023-04-24 12:08:34 -07:00
kinaryml ca5fca1db7 Mark index as unused 2023-04-24 11:26:36 -07:00
kinaryml b511822815 Removed an unnecessary check and updated tests to check if the masks are generated or not 2023-04-24 11:23:27 -07:00
MediaPipe TeamandCopybara-Service ceb911ae06 Add nullable annotation to AudioDataProducer#setAudioConsumer
PiperOrigin-RevId: 526697945
2023-04-24 11:10:07 -07:00
Sebastian SchmidtandCopybara-Service 61854dc6a3 Create Pose Detector Web API
PiperOrigin-RevId: 526672533
2023-04-24 09:53:05 -07:00
Jiuqiang TangandCopybara-Service 6773188e26 Make FaceLandmarksConnections to be a public class.
PiperOrigin-RevId: 526667505
2023-04-24 09:34:14 -07:00
Sebastian SchmidtandCopybara-Service 35cf8c35f2 Internal change
PiperOrigin-RevId: 526658482
2023-04-24 09:01:55 -07:00
MediaPipe TeamandCopybara-Service abded49e5b Internal change
PiperOrigin-RevId: 526300079
2023-04-22 10:52:14 -07:00
MediaPipe TeamandCopybara-Service a6c1bb6324 Internal change
PiperOrigin-RevId: 526235882
2023-04-22 00:28:52 -07:00
MediaPipe TeamandCopybara-Service 58dcbc9833 Internal change
PiperOrigin-RevId: 526117263
2023-04-21 13:12:47 -07:00
kinaryml 0b1eb39870 Updated copyright 2023-04-21 11:48:06 -07:00
kinaryml 2a2a55d1b8 Added Language Detector Python API and fixed a typo in Interactive Segmenter Options' docstring 2023-04-21 11:46:21 -07:00
MediaPipe TeamandCopybara-Service a6c35e9ba5 Fixes the typos in tasks internal files.
PiperOrigin-RevId: 526063515
2023-04-21 09:46:39 -07:00
Sebastian SchmidtandCopybara-Service 9be748db00 Create MPImage type for Web
PiperOrigin-RevId: 525873209
2023-04-20 16:01:04 -07:00
Sebastian SchmidtandCopybara-Service e9bb849503 Fix Typo
PiperOrigin-RevId: 525861968
2023-04-20 15:15:13 -07:00
MediaPipe TeamandCopybara-Service bd73617e5c Internal change
PiperOrigin-RevId: 525854969
2023-04-20 14:47:17 -07:00
MediaPipe TeamandCopybara-Service 02bdb9aba0 Internal change
PiperOrigin-RevId: 525845988
2023-04-20 14:14:58 -07:00
MediaPipe TeamandCopybara-Service 983932b6dd This will fix the multiple typos in the new tasks internal files
PiperOrigin-RevId: 525788850
2023-04-20 10:43:35 -07:00
MediaPipe TeamandCopybara-Service d4c7ad0411 Internal change
PiperOrigin-RevId: 525775875
2023-04-20 10:00:01 -07:00
MediaPipe TeamandCopybara-Service a89ec882b0 Internal change
PiperOrigin-RevId: 525774601
2023-04-20 09:55:35 -07:00
Kinar RandGitHub 9032bce577 Update copyright 2023-04-20 13:21:56 +05:30
Kinar RandGitHub 21ddba0d60 Update copyright 2023-04-20 13:21:31 +05:30
MediaPipe TeamandCopybara-Service 331692577e Internal change
PiperOrigin-RevId: 525660743
2023-04-19 23:47:59 -07:00
Copybara-Service 44aa607e06 Merge pull request #4302 from kinaryml:segmenter-python-add-labels
PiperOrigin-RevId: 525571089
2023-04-19 15:46:20 -07:00
Sebastian SchmidtandCopybara-Service ffbd799b8d Extract shared types to create and test landmarks
PiperOrigin-RevId: 525568412
2023-04-19 15:37:42 -07:00
MediaPipe TeamandCopybara-Service 476c7efc18 Remove uses of ATOMIC_VAR_INIT
ATOMIC_VAR_INIT has a trivial definition
`#define ATOMIC_VAR_INIT(value) (value)`,
is deprecated in C17/C++20, and will be removed in newer standards in
newer GCC/Clang (e.g. https://reviews.llvm.org/D144196).

PiperOrigin-RevId: 525534393
2023-04-19 13:26:47 -07:00
MediaPipe TeamandCopybara-Service 5bd3282515 Internal change
PiperOrigin-RevId: 525513792
2023-04-19 12:05:44 -07:00
MediaPipe TeamandCopybara-Service 3231591f7f draw right eye with blue color
PiperOrigin-RevId: 525508840
2023-04-19 11:47:38 -07:00
MediaPipe TeamandCopybara-Service b2586e7e3b Internal change
PiperOrigin-RevId: 525495248
2023-04-19 11:01:13 -07:00
MediaPipe TeamandCopybara-Service eb62479190 Internal change
PiperOrigin-RevId: 525487344
2023-04-19 10:35:49 -07:00
Bekzhan BekbolatulyandCopybara-Service 9818ebb630 Internal change
PiperOrigin-RevId: 525476655
2023-04-19 09:58:22 -07:00
MediaPipe TeamandCopybara-Service 0aea6d90a8 Internal change
PiperOrigin-RevId: 525407296
2023-04-19 04:10:02 -07:00
MediaPipe TeamandCopybara-Service 01f4439d83 Internal change
PiperOrigin-RevId: 525399975
2023-04-19 03:33:01 -07:00
MediaPipe TeamandCopybara-Service de84696be6 Internal change
PiperOrigin-RevId: 525390694
2023-04-19 02:39:54 -07:00
MediaPipe TeamandCopybara-Service b83fa5b67d Internal change
PiperOrigin-RevId: 525365673
2023-04-19 00:17:50 -07:00
MediaPipe TeamandCopybara-Service 8c8ba9511a Internal change
PiperOrigin-RevId: 525358261
2023-04-18 23:33:46 -07:00
kinaryml f87ffd92a0 Removed optional for defaults in some tasks and updated various tests to be consistent with that of Pose Landmarker's 2023-04-18 23:28:10 -07:00
kinaryml 00f966655b Fixed a typo in a docstring 2023-04-18 22:48:37 -07:00
kinaryml 1688d0fa79 Added more pose landmarker tests and updated face landmarker tests to cover all the results 2023-04-18 22:45:46 -07:00
Kinar RandGitHub 39742b6641 Merge branch 'google:master' into pose-landmarker-python 2023-04-19 10:21:23 +05:30
kinaryml a1aab66c8d Fixed a typo in docstring 2023-04-18 21:50:27 -07:00
kinaryml 67b72e4fe9 Code cleanup 2023-04-18 21:43:38 -07:00
kinaryml 1cb404bea1 Changed labels to be a property 2023-04-18 21:31:14 -07:00
Kinar RandGitHub d621df8046 Merge branch 'google:master' into segmenter-python-add-labels 2023-04-19 09:51:42 +05:30
Sebastian SchmidtandCopybara-Service d7039c90dc Update WASM for Alpha 11
PiperOrigin-RevId: 525245471
2023-04-18 14:07:07 -07:00
Prianka Liz Kariat 99420d35f3 Update build_ios_framework.sh 2023-04-19 00:25:10 +05:30
Copybara-Service e15d98298f Merge pull request #4280 from kinaryml:image-segmenter-python-api-updates
PiperOrigin-RevId: 525204893
2023-04-18 11:36:09 -07:00
Prianka Liz Kariat f75eb57956 Update build_ios_framework.sh 2023-04-18 23:46:05 +05:30
Prianka Liz Kariat 0c4d405479 Updated bazelrc with required config 2023-04-18 23:21:14 +05:30
Prianka Liz Kariat eb0aa5056a Updated documentation 2023-04-18 23:20:11 +05:30
Prianka Liz Kariat d7c96dea6a Updated formatting of files 2023-04-18 23:10:47 +05:30
Prianka Liz Kariat 24bd7a6b9f Merge branch 'master' into ios-text-cocoapods-force-load 2023-04-18 23:03:56 +05:30
Prianka Liz Kariat 49b2c7c2cc Added iOS task text cocoapods podspec 2023-04-18 23:02:58 +05:30
Prianka Liz Kariat 7ad2b7b32f Added shell script for building cocoapods archive 2023-04-18 23:02:35 +05:30
Prianka Liz Kariat a774399630 Added targets for iOS text frameworks 2023-04-18 23:02:16 +05:30
MediaPipe TeamandCopybara-Service 64d1e74c20 Internal MediaPipe Tasks change
PiperOrigin-RevId: 525182282
2023-04-18 10:20:03 -07:00
MediaPipe TeamandCopybara-Service 3e0ed2ced0 Internal Changes
PiperOrigin-RevId: 525180095
2023-04-18 10:14:08 -07:00
kinaryml 1919b0e341 Updated docstrings for get_labels 2023-04-18 02:54:03 -07:00
kinaryml 723cb2a919 Populate labels using model metadata for the ImageSegmenter Python API 2023-04-18 02:49:13 -07:00
MediaPipe TeamandCopybara-Service 88a10de345 Internal change
PiperOrigin-RevId: 525084368
2023-04-18 02:15:02 -07:00
MediaPipe TeamandCopybara-Service b4e27c137e Internal change
PiperOrigin-RevId: 525069421
2023-04-18 00:54:16 -07:00
MediaPipe TeamandCopybara-Service 63cd09951d Internal change
PiperOrigin-RevId: 525030969
2023-04-17 21:17:08 -07:00
MediaPipe TeamandCopybara-Service 43fd744296 Internal Changes
PiperOrigin-RevId: 524997017
2023-04-17 17:43:40 -07:00
Sebastian SchmidtandCopybara-Service 47e55fcf2f Add HAND_CONNECTIONS to HandLandmarker and GestureRecognizer
PiperOrigin-RevId: 524951052
2023-04-17 14:31:40 -07:00
MediaPipe TeamandCopybara-Service 2564fec44c Internal MediaPipe Tasks change.
PiperOrigin-RevId: 524942203
2023-04-17 14:09:14 -07:00
Sebastian SchmidtandCopybara-Service b147002b7e Support new output format for InteractiveSegmenter
PiperOrigin-RevId: 524940992
2023-04-17 14:04:56 -07:00
MediaPipe TeamandCopybara-Service 48cc96cf3c Internal change
PiperOrigin-RevId: 524517985
2023-04-15 06:18:05 -07:00
MediaPipe TeamandCopybara-Service 547d3c00a7 Internal change
PiperOrigin-RevId: 524496413
2023-04-15 02:34:17 -07:00
MediaPipe TeamandCopybara-Service b63a0e15a3 Internal change
PiperOrigin-RevId: 524485761
2023-04-15 01:00:05 -07:00
MediaPipe TeamandCopybara-Service 1c3a061038 Internal change
PiperOrigin-RevId: 524481964
2023-04-15 00:24:46 -07:00
MediaPipe TeamandCopybara-Service 5fc0d26d8d Internal change
PiperOrigin-RevId: 524457848
2023-04-14 21:33:14 -07:00
Copybara-Service cd4ae32a10 Merge pull request #4288 from google:pr4279
PiperOrigin-RevId: 524443045
2023-04-14 19:54:49 -07:00
MediaPipe TeamandCopybara-Service 411ffaeb43 Update Java interactive segmenter to output both confidence masks and category mask optionally.
PiperOrigin-RevId: 524442070
2023-04-14 19:45:27 -07:00
Jiuqiang TangandCopybara-Service e14a88052a Remove resizing and rotation from face stylizer's postprocessing step.
The resizing and rotation logic is useful when the pipeline needs to paste the stylized face image back to the original image. To only output the stylized face image, resizing and rotation may result to strange outputs.

PiperOrigin-RevId: 524441372
2023-04-14 19:37:52 -07:00
Copybara-Service 8b3395edfb Merge pull request #4283 from priankakariatyml:ios-timestamp-renaming
PiperOrigin-RevId: 524420908
2023-04-14 17:13:17 -07:00
MediaPipe TeamandCopybara-Service e1643a5abb Fix in preparation for Emscripten updates
PiperOrigin-RevId: 524414804
2023-04-14 16:40:34 -07:00
Jiuqiang TangandCopybara-Service 67ed42d9c6 Always link the "pose_landmarks_detector_graph" target.
PiperOrigin-RevId: 524397174
2023-04-14 15:14:20 -07:00
Sebastian SchmidtandCopybara-Service d3903f885a Update Flatbuffers to 23.1.21
PiperOrigin-RevId: 524391723
2023-04-14 14:50:38 -07:00
kinaryml 5f5ce22020 Added the PoseLandmarker Python API and a simple test 2023-04-14 14:09:15 -07:00
MediaPipe TeamandCopybara-Service abd6574c6d Internal MediaPipe Tasks change.
PiperOrigin-RevId: 524377097
2023-04-14 13:49:31 -07:00
Sebastian SchmidtandCopybara-Service 92f45c98d8 Support new output format for ImageSegmenter
PiperOrigin-RevId: 524371021
2023-04-14 13:25:10 -07:00
MediaPipe TeamandCopybara-Service f5197a3adc Expose get_graph_config function for task_runner.
PiperOrigin-RevId: 524365682
2023-04-14 13:03:32 -07:00
MediaPipe TeamandCopybara-Service dbeb5a8126 Add Pose Landmarker Java API
PiperOrigin-RevId: 524359521
2023-04-14 12:36:37 -07:00
Sebastian SchmidtandCopybara-Service 3f1fc6f520 Add model links to NPM Readme
PiperOrigin-RevId: 524353352
2023-04-14 12:15:28 -07:00
MediaPipe TeamandCopybara-Service 77d1761c7f Added CoreAudio and MediaToolbox to BUILD file
PiperOrigin-RevId: 524352900
2023-04-14 12:10:59 -07:00
Bekzhan BekbolatulyandCopybara-Service 54d208aa5c Internal change
PiperOrigin-RevId: 524345939
2023-04-14 11:44:36 -07:00
MediaPipe TeamandCopybara-Service 257fa01b68 Internal MediaPipe Tasks change.
PiperOrigin-RevId: 524345005
2023-04-14 11:40:18 -07:00
MediaPipe TeamandCopybara-Service 27038f534a Internal change.
PiperOrigin-RevId: 524336899
2023-04-14 11:11:07 -07:00
Jiuqiang TangandCopybara-Service 534da98ccb Internal changes
PiperOrigin-RevId: 524334347
2023-04-14 11:01:53 -07:00
MediaPipe TeamandCopybara-Service dfc604f500 Patch for FileLocator and asset scripts not working together
PiperOrigin-RevId: 524320143
2023-04-14 10:11:24 -07:00
Jiuqiang TangandCopybara-Service e6bb9e29c0 Internal change
PiperOrigin-RevId: 524317439
2023-04-14 10:01:01 -07:00
Bekzhan BekbolatulyandCopybara-Service 89e6b824ae Update TF version to 2023-04-12
PiperOrigin-RevId: 524301262
2023-04-14 08:49:05 -07:00
MediaPipe TeamandCopybara-Service 6da95183bc Internal change
PiperOrigin-RevId: 524259260
2023-04-14 04:48:00 -07:00
MediaPipe TeamandCopybara-Service 1fd0f9328e Internal change
PiperOrigin-RevId: 524249794
2023-04-14 03:50:01 -07:00
MediaPipe TeamandCopybara-Service 215465bee0 Internal change
PiperOrigin-RevId: 524229420
2023-04-14 01:50:30 -07:00
MediaPipe TeamandCopybara-Service 06bbd9c599 Internal change
PiperOrigin-RevId: 524212873
2023-04-14 00:09:30 -07:00
Prianka Liz Kariat 7b1b94416a Updated timestamp variable name 2023-04-14 12:13:46 +05:30
MediaPipe TeamandCopybara-Service f934b220b2 Internal change
PiperOrigin-RevId: 524202659
2023-04-13 23:01:20 -07:00
kinaryml a745b71f97 Removed unused import 2023-04-13 21:11:20 -07:00
kinaryml a036bf70cc Removed Activation from ImageSegmenterOptions 2023-04-13 21:09:01 -07:00
MediaPipe TeamandCopybara-Service 18ef79ac9f add face renderer for adapter
PiperOrigin-RevId: 524148938
2023-04-13 17:41:19 -07:00
Sebastian Schmidt 17f2d0e1e5 Add Face Landmarks Connection constants for the Python API 2023-04-13 14:19:10 -06:00
Sebastian SchmidtandGitHub f712eed6c3 Merge pull request #4286 from google/revert-4279-face-landmarker-python-add-connection-constants
Revert "Add Face Landmarks Connection constants for the Python API"
2023-04-13 14:14:02 -06:00
yichunkuoandGitHub 7cbf0033b0 Revert "Add Face Landmarks Connection constants for the Python API" 2023-04-14 04:12:33 +08:00
MediaPipe TeamandCopybara-Service a59b29ea24 Add jni functions to get image size from a list of image
PiperOrigin-RevId: 524080111
2023-04-13 13:05:42 -07:00
kinaryml a03fa448dc Explicitly state the modes in the tests for ImageSegmenterOptions and InteractiveSegmenterOptions 2023-04-13 11:55:37 -07:00
MediaPipe TeamandCopybara-Service ad169b9123 Add support for more standard scaling options in GlSurfaceViewRenderer.
PiperOrigin-RevId: 524062033
2023-04-13 11:52:45 -07:00
MediaPipe TeamandCopybara-Service c63b30dff5 Internal change
PiperOrigin-RevId: 524059494
2023-04-13 11:45:04 -07:00
MediaPipe TeamandCopybara-Service 055accece8 Internal Change
PiperOrigin-RevId: 524035898
2023-04-13 11:43:20 -07:00
yichunkuoandGitHub 78499b0bd0 Merge pull request #4279 from kinaryml/face-landmarker-python-add-connection-constants
Add Face Landmarks Connection constants for the Python API
2023-04-14 02:35:22 +08:00
Fergus HendersonandCopybara-Service c392ed2c09 Internal change
PiperOrigin-RevId: 524012087
2023-04-13 08:49:36 -07:00
MediaPipe TeamandCopybara-Service d095829c7c Internal cleanup.
PiperOrigin-RevId: 524005450
2023-04-13 08:19:29 -07:00
Prianka Liz Kariat 2c154e20cc Updated all references of timestampMs to timestampInMilliseconds 2023-04-13 17:56:09 +05:30
MediaPipe TeamandCopybara-Service 6af4b433f4 Internal change
PiperOrigin-RevId: 523965337
2023-04-13 04:36:16 -07:00
MediaPipe TeamandCopybara-Service 3fdd7f3618 Internal change
PiperOrigin-RevId: 523930101
2023-04-13 01:28:41 -07:00
kinaryml 4d5f081232 Reformatted face_landmarker.py 2023-04-13 01:18:37 -07:00
Kinar RandGitHub dc56eb2bb1 Update face_landmarker.py 2023-04-13 13:40:49 +05:30
Kinar RandGitHub 5185489c21 Update face_landmarker.py 2023-04-13 13:30:00 +05:30
MediaPipe TeamandCopybara-Service c8b9cec7ef Internal change
PiperOrigin-RevId: 523916108
2023-04-13 00:16:17 -07:00
MediaPipe TeamandCopybara-Service d96b6e7ed9 Make confidence and category masks both optional for GPU multi-class segmentation.
PiperOrigin-RevId: 523838907
2023-04-12 16:41:14 -07:00
Sebastian SchmidtandCopybara-Service f23dd69db1 Fix yet another Windows compile error
PiperOrigin-RevId: 523835509
2023-04-12 16:26:27 -07:00
Sebastian SchmidtandCopybara-Service d0e8a9e09b Internal change
PiperOrigin-RevId: 523827005
2023-04-12 15:49:58 -07:00
MediaPipe TeamandCopybara-Service 0179f0c456 Update TensorsToFaceLandmarksGraph to support face mesh v2 model.
PiperOrigin-RevId: 523814749
2023-04-12 15:03:26 -07:00
Sebastian SchmidtandCopybara-Service 468d10e947 Update WASM files for Alpha 10
PiperOrigin-RevId: 523810757
2023-04-12 14:47:22 -07:00
Copybara-Service dd62b0831a Merge pull request #4254 from priankakariatyml:ios-gesture-recognizer
PiperOrigin-RevId: 523808915
2023-04-12 14:40:31 -07:00
kinaryml 3f68f90238 Deprecated output_type for the ImageSegmenter and InteractiveSegmenter APIs 2023-04-12 14:37:16 -07:00
MediaPipe TeamandCopybara-Service a71c697d90 Internal change
PiperOrigin-RevId: 523797476
2023-04-12 13:58:11 -07:00
MediaPipe TeamandCopybara-Service 27c38f00ec Add pose landmarker C++ API.
PiperOrigin-RevId: 523795237
2023-04-12 13:51:54 -07:00
MediaPipe TeamandCopybara-Service c7aecb42ff Internal change
PiperOrigin-RevId: 523785788
2023-04-12 13:16:33 -07:00
kinaryml fec96ee679 Added some face landmarks constants 2023-04-12 13:03:46 -07:00
MediaPipe TeamandCopybara-Service 9a10375de6 internal change
PiperOrigin-RevId: 523773255
2023-04-12 12:27:59 -07:00
MediaPipe TeamandCopybara-Service ca0da8d26f Fix wrong function name of ConvertToDetection
PiperOrigin-RevId: 523760961
2023-04-12 11:42:48 -07:00
MediaPipe TeamandCopybara-Service 776dceb588 Build category mask without resizing tensors to image size.
PiperOrigin-RevId: 523754567
2023-04-12 11:22:30 -07:00
MediaPipe TeamandCopybara-Service 049ba8bbca Internal change
PiperOrigin-RevId: 523751152
2023-04-12 11:10:43 -07:00
Sebastian SchmidtandCopybara-Service f9a2d0995d Fix Windows compilation error
PiperOrigin-RevId: 523739720
2023-04-12 10:34:21 -07:00
MediaPipe TeamandCopybara-Service efab342a52 Internal change
PiperOrigin-RevId: 523733431
2023-04-12 10:16:15 -07:00
MediaPipe TeamandCopybara-Service 5bcdea2952 Internal MediaPipe Tasks change.
PiperOrigin-RevId: 523729183
2023-04-12 09:59:21 -07:00
MediaPipe TeamandCopybara-Service f41a912250 Internal change
PiperOrigin-RevId: 523703537
2023-04-12 08:14:13 -07:00
MediaPipe TeamandCopybara-Service 2eefc862c2 Internal change
PiperOrigin-RevId: 523632081
2023-04-12 01:25:23 -07:00
MediaPipe TeamandCopybara-Service a7c6910625 Internal change
PiperOrigin-RevId: 523616811
2023-04-11 23:52:14 -07:00
MediaPipe TeamandCopybara-Service 52e934a539 Internal change
PiperOrigin-RevId: 523611358
2023-04-11 23:13:45 -07:00
MediaPipe TeamandCopybara-Service f923f6bcda Internal change
PiperOrigin-RevId: 523589395
2023-04-11 21:03:38 -07:00
MediaPipe TeamandCopybara-Service c9aa24b0e7 Support proto3 node_option in api2 graph_builder
PiperOrigin-RevId: 523587324
2023-04-11 20:49:35 -07:00
MediaPipe TeamandCopybara-Service b6a19ea9e8 Add shaders that support better landscape rendering with GlSurfaceViewRenderer.
PiperOrigin-RevId: 523579769
2023-04-11 20:10:40 -07:00
Sebastian SchmidtandCopybara-Service 1b947df0c2 Allow relative URLs for WASM loading
PiperOrigin-RevId: 523572715
2023-04-11 19:25:03 -07:00
MediaPipe TeamandCopybara-Service e2b13523f1 F16 texture support in GPU multiclass TensorsToSegmentation
PiperOrigin-RevId: 523512145
2023-04-11 14:58:57 -07:00
Sebastian SchmidtandCopybara-Service 738aea7a06 Update WASM files for alpha 9
PiperOrigin-RevId: 523458140
2023-04-11 11:33:14 -07:00
Sebastian SchmidtandCopybara-Service 221d545080 Create Language Detection Web API
PiperOrigin-RevId: 523445524
2023-04-11 10:47:29 -07:00
Sebastian SchmidtandCopybara-Service b66b0e0c72 Internal change
PiperOrigin-RevId: 523429555
2023-04-11 09:56:46 -07:00
Prianka Liz Kariat 0fcf92d7d5 Updated iOS Image Classifier to reflect new calculation for normalized rect 2023-04-11 18:18:35 +05:30
Prianka Liz Kariat 114a11dc4e Updated iOS tests to reflect the new orientation calculation. 2023-04-11 18:11:58 +05:30
Prianka Liz Kariat 27353310c3 Updated normalized rect calculation for some angles in MPPVisionTaskRunner 2023-04-11 18:11:33 +05:30
Prianka Liz Kariat 089361cd89 Split macros into helpers in Objective C Tests 2023-04-11 17:37:54 +05:30
MediaPipe TeamandCopybara-Service a448790300 Internal change
PiperOrigin-RevId: 523351901
2023-04-11 03:23:24 -07:00
MediaPipe TeamandCopybara-Service 9793654364 Update Halide build rules for MediaPipe to use Halide v15.0.1
PiperOrigin-RevId: 523351862
2023-04-11 03:18:54 -07:00
MediaPipe TeamandCopybara-Service de7560c825 Internal change
PiperOrigin-RevId: 523339435
2023-04-11 02:11:41 -07:00
MediaPipe TeamandCopybara-Service b8ebbbea0b Internal change
PiperOrigin-RevId: 523324063
2023-04-11 00:46:49 -07:00
MediaPipe TeamandCopybara-Service a4172cb03f Internal change
PiperOrigin-RevId: 523306493
2023-04-10 22:50:58 -07:00
MediaPipe TeamandCopybara-Service 3bb411e99d Special treatment for 1-class segmentation category mask output on GPU.
PiperOrigin-RevId: 523271622
2023-04-10 19:13:38 -07:00
Sebastian SchmidtandCopybara-Service 87ec846ed6 Enable TextClassifier and TextEmbedder on Windows Python
PiperOrigin-RevId: 523233995
2023-04-10 15:57:19 -07:00
MediaPipe TeamandCopybara-Service c1f17138cf Upgrades and fixes for image segmentation category mask on GPU
PiperOrigin-RevId: 523204584
2023-04-10 13:58:20 -07:00
MediaPipe TeamandCopybara-Service 02fed0b7d1 Cover the existing graph expansion behavior in regard to executors with unit tests.
PiperOrigin-RevId: 523192292
2023-04-10 13:07:51 -07:00
Sebastian SchmidtandCopybara-Service e5f28bc136 Make AudioTools compile when build from python:framework_bindings
PiperOrigin-RevId: 523158401
2023-04-10 11:00:15 -07:00
Copybara-Service b685f53c6b Merge pull request #4263 from kinaryml:face-stylizer-python-tests
PiperOrigin-RevId: 523152290
2023-04-10 10:39:50 -07:00
Shivam Mishra 89491df8c1 Migrate stale management probot to Github action 2023-04-10 22:38:14 +05:30
Prianka Liz Kariat d06cf68c70 Removed detect in image with region of interest api from iOS Object Detector 2023-04-10 19:28:46 +05:30
Prianka Liz Kariat a2bab54640 Added iOS Object Detector Objective D tests 2023-04-10 19:25:37 +05:30
Prianka Liz Kariat adfe47d456 Removed roi apis from iOS object detector 2023-04-10 19:24:58 +05:30
Prianka Liz Kariat 0fd60285b5 Updated roi not allowed check in ios vision task runner 2023-04-10 19:23:32 +05:30
MediaPipe TeamandCopybara-Service c036b9f408 Adds a LanguageDetector Java API.
PiperOrigin-RevId: 522895455
2023-04-08 22:31:28 -07:00
MediaPipe TeamandCopybara-Service 4f77504af6 Internal change
PiperOrigin-RevId: 522787446
2023-04-08 03:01:54 -07:00
kinaryml 18d5beb598 Updated FaceStylizer API to align with the new Base Vision Task API changes 2023-04-08 01:38:48 -07:00
MediaPipe TeamandCopybara-Service 7b067a1fda Add face landmarks connection for java API.
PiperOrigin-RevId: 522728488
2023-04-07 18:27:39 -07:00
Sebastian SchmidtandCopybara-Service e19b49ba13 Fix indent
PiperOrigin-RevId: 522715076
2023-04-07 16:59:03 -07:00
Sebastian SchmidtandCopybara-Service 2efcf30eea Add FaceLandmarksConnections to Web API
PiperOrigin-RevId: 522713874
2023-04-07 16:53:57 -07:00
Sebastian SchmidtandCopybara-Service 938b501d15 Don't use OffscreenCanvas on Safari
PiperOrigin-RevId: 522689566
2023-04-07 14:51:18 -07:00
Jiuqiang TangandCopybara-Service 8cedb82df1 Expose face stylizer and interactive segmenter to be public mediapipe python API.
PiperOrigin-RevId: 522654239
2023-04-07 12:12:49 -07:00
MediaPipe TeamandCopybara-Service a1ce19f68e Internal change
PiperOrigin-RevId: 522631851
2023-04-07 10:47:36 -07:00
MediaPipe TeamandCopybara-Service e3185e3df0 Internal change
PiperOrigin-RevId: 522614549
2023-04-07 09:30:36 -07:00
Jiuqiang TangandCopybara-Service bca0a92c2e Add FaceToRectCalculator.
PiperOrigin-RevId: 522595752
2023-04-07 07:44:51 -07:00
MediaPipe TeamandCopybara-Service b0d3595291 Internal change
PiperOrigin-RevId: 522541374
2023-04-07 00:30:49 -07:00
MediaPipe TeamandCopybara-Service c6b3090d0e Internal change
PiperOrigin-RevId: 522534050
2023-04-06 23:31:15 -07:00
MediaPipe TeamandCopybara-Service 6c523cd21f Internal change
PiperOrigin-RevId: 522529789
2023-04-06 22:56:06 -07:00
MediaPipe TeamandCopybara-Service bae14a83b2 Internal change
PiperOrigin-RevId: 522524565
2023-04-06 22:13:38 -07:00
MediaPipe TeamandCopybara-Service 4e5f20f212 Internal change
PiperOrigin-RevId: 522494903
2023-04-06 19:02:16 -07:00
Copybara-Service 6495f8624b Merge pull request #4241 from kinaryml:interactive-segmenter-python
PiperOrigin-RevId: 522470912
2023-04-06 16:47:46 -07:00
MediaPipe TeamandCopybara-Service 38f838513a Enable defining and using internal executor within a subgraph
PiperOrigin-RevId: 522449982
2023-04-06 15:18:56 -07:00
Prianka Liz Kariat fe5ca09030 Added MPPGestureRecognizerOptions.m 2023-04-07 01:01:39 +05:30
Prianka Liz Kariat 49c614280f Added MPPGestureRecognizerOptions 2023-04-07 00:58:53 +05:30
Prianka Liz Kariat 6f5b12d056 Added MPPGestureRecognizerResult 2023-04-07 00:58:26 +05:30
Prianka Liz Kariat 1992dfdf2c Added MPPClassifierOptions 2023-04-07 00:57:52 +05:30
Prianka Liz Kariat 9ce300c711 Added MPPClassifierOptions 2023-04-07 00:57:33 +05:30
Prianka Liz Kariat 5272980c2e Added MPPLandmarkHelpers 2023-04-07 00:57:19 +05:30
Prianka Liz Kariat cfa261b34f Added MPPLandmark 2023-04-07 00:57:01 +05:30
Copybara-Service 81a405af1b Merge pull request #4253 from priankakariatyml:object-detector-sources
PiperOrigin-RevId: 522401491
2023-04-06 12:15:34 -07:00
MediaPipe TeamandCopybara-Service 489d684699 Internal change
PiperOrigin-RevId: 522398388
2023-04-06 12:04:03 -07:00
Sebastian SchmidtandCopybara-Service 3588be3342 Update WASM files for Alpha 8
PiperOrigin-RevId: 522376911
2023-04-06 10:49:32 -07:00
Copybara-Service 37334098b0 Merge pull request #4248 from Neilblaze:docs-fix_breaks
PiperOrigin-RevId: 522355500
2023-04-06 09:29:52 -07:00
Prianka Liz Kariat 30341024de Added MPPObjectDetector 2023-04-06 21:40:52 +05:30
Prianka Liz Kariat b01b3b84c4 Added MPPObjectDetectionResultHelpers 2023-04-06 21:40:09 +05:30
Prianka Liz Kariat 79c8cfb730 Added MPPObjectDetectorOptionsHelpers 2023-04-06 21:39:56 +05:30
MediaPipe TeamandCopybara-Service 7d8d3ab196 Add EDGETPU_NNAPI delegate option in MediaPipe tasks API
PiperOrigin-RevId: 522344828
2023-04-06 08:42:15 -07:00
MediaPipe TeamandCopybara-Service 97bd9c2157 Internal change
PiperOrigin-RevId: 522307800
2023-04-06 05:01:29 -07:00
MediaPipe TeamandCopybara-Service 2e256bebb5 Internal change
PiperOrigin-RevId: 522292310
2023-04-06 03:20:04 -07:00
MediaPipe TeamandCopybara-Service e894ae9cf4 Internal change
PiperOrigin-RevId: 522291640
2023-04-06 03:15:24 -07:00
MediaPipe TeamandCopybara-Service 289f51651f Make GraphTextureFrame constructor public.
PiperOrigin-RevId: 522287217
2023-04-06 02:54:16 -07:00
MediaPipe TeamandCopybara-Service a151e6485a Internal change
PiperOrigin-RevId: 522287183
2023-04-06 02:50:05 -07:00
MediaPipe TeamandCopybara-Service 3c083f5d2b Internal change
PiperOrigin-RevId: 522282159
2023-04-06 02:18:58 -07:00
MediaPipe TeamandCopybara-Service 8d8ab9a972 Internal change
PiperOrigin-RevId: 522275233
2023-04-06 01:35:59 -07:00
MediaPipe TeamandCopybara-Service 22186299c4 Internal change
PiperOrigin-RevId: 522263621
2023-04-06 00:21:14 -07:00
MediaPipe TeamandCopybara-Service d05508cb7b Internal change
PiperOrigin-RevId: 522260226
2023-04-06 00:00:50 -07:00
MediaPipe TeamandCopybara-Service 56552dbfb5 Internal change
PiperOrigin-RevId: 522255364
2023-04-05 23:28:50 -07:00
MediaPipe TeamandCopybara-Service 12ecc8139f Internal change
PiperOrigin-RevId: 522255287
2023-04-05 23:24:55 -07:00
MediaPipe TeamandCopybara-Service 56b3cd4350 Internal change
PiperOrigin-RevId: 522253757
2023-04-05 23:14:45 -07:00
MediaPipe TeamandCopybara-Service 0067a1b5c2 Internal changes
PiperOrigin-RevId: 522248624
2023-04-05 22:37:11 -07:00
MediaPipe TeamandCopybara-Service 5a1a9269e6 Internal Changes
PiperOrigin-RevId: 522247775
2023-04-05 22:31:13 -07:00
Copybara-Service 7455022980 Merge pull request #4165 from kinaryml:audio-record-api-python
PiperOrigin-RevId: 522240683
2023-04-05 21:46:20 -07:00
MediaPipe TeamandCopybara-Service 7ae4d0175a CL will fix the typos in the tasks files
PiperOrigin-RevId: 522240681
2023-04-05 21:42:19 -07:00
MediaPipe TeamandCopybara-Service d5def9e24d Image segmenter output both confidence masks and category mask optionally.
PiperOrigin-RevId: 522227345
2023-04-05 20:34:18 -07:00
Hadon NashandCopybara-Service 7fe87936e5 Internal change
PiperOrigin-RevId: 522206591
2023-04-05 18:15:29 -07:00
neilblaze 07c0756b5d fixed errors in docs
Signed-off-by: Pratyay Banerjee <[email protected]>
2023-04-06 05:19:13 +05:30
Sebastian SchmidtandCopybara-Service f67007d077 Remove platform information for x86
PiperOrigin-RevId: 522182423
2023-04-05 16:21:24 -07:00
MediaPipe TeamandCopybara-Service 065d750781 Add VEC32F4 support to ImageFrame
PiperOrigin-RevId: 522153305
2023-04-05 14:25:17 -07:00
MediaPipe TeamandCopybara-Service 6605f551e7 Object Detector add batch_size and train_data to get_steps_per_epoch.
PiperOrigin-RevId: 522149938
2023-04-05 14:11:29 -07:00
MediaPipe TeamandCopybara-Service 5615c1e459 Delete duplicate public APIs in object detector
PiperOrigin-RevId: 522098326
2023-04-05 10:58:08 -07:00
MediaPipe TeamandCopybara-Service c5bd34ddb0 Internal change
PiperOrigin-RevId: 522014435
2023-04-05 04:25:25 -07:00
MediaPipe TeamandCopybara-Service 425a3ee3f6 Internal change
PiperOrigin-RevId: 521993439
2023-04-05 02:26:02 -07:00
MediaPipe TeamandCopybara-Service 91264eab1f Internal change
PiperOrigin-RevId: 521982139
2023-04-05 01:20:21 -07:00
MediaPipe TeamandCopybara-Service 05801b9945 Internal change
PiperOrigin-RevId: 521981387
2023-04-05 01:16:13 -07:00
MediaPipe TeamandCopybara-Service 46f9270788 Internal change
PiperOrigin-RevId: 521980958
2023-04-05 01:10:15 -07:00
MediaPipe TeamandCopybara-Service 7417e48da4 Internal change
PiperOrigin-RevId: 521970274
2023-04-05 00:05:39 -07:00
Kinar RandGitHub 1068755d2c Merge branch 'master' into interactive-segmenter-python 2023-04-05 10:51:45 +05:30
MediaPipe TeamandCopybara-Service 1990fe00d3 Internal change
PiperOrigin-RevId: 521949598
2023-04-04 21:35:10 -07:00
MediaPipe TeamandCopybara-Service 7cb8c647ca Internal change
PiperOrigin-RevId: 521948037
2023-04-04 21:24:55 -07:00
MediaPipe TeamandCopybara-Service 190be2e1bd Internal change
PiperOrigin-RevId: 521911790
2023-04-04 17:44:29 -07:00
MediaPipe TeamandCopybara-Service f8b2aa0633 Internal change
PiperOrigin-RevId: 521909998
2023-04-04 17:35:57 -07:00
MediaPipe TeamandCopybara-Service 9554836145 Update java image segmenter to always output confidence masks and optionally output category mask.
PiperOrigin-RevId: 521852718
2023-04-04 13:39:33 -07:00
MediaPipe TeamandCopybara-Service 55bcfcb4f5 Internal change
PiperOrigin-RevId: 521834742
2023-04-04 12:30:54 -07:00
Sebastian SchmidtandCopybara-Service a98f6bf231 FaceDetector Web API
PiperOrigin-RevId: 521816795
2023-04-04 11:23:00 -07:00
MediaPipe TeamandCopybara-Service 33cad24a5a Update java image segmenter to always output confidence masks and optionally output category mask.
PiperOrigin-RevId: 521804641
2023-04-04 10:41:59 -07:00
Copybara-Service 7c2930102d Merge pull request #4192 from kinaryml:face-stylizer-python
PiperOrigin-RevId: 521781683
2023-04-04 09:18:19 -07:00
MediaPipe TeamandCopybara-Service 65a98be809 Fixed comment and added note.
PiperOrigin-RevId: 521772542
2023-04-04 08:40:04 -07:00
MediaPipe TeamandCopybara-Service ec1d84aff7 Internal change
PiperOrigin-RevId: 521718577
2023-04-04 03:59:47 -07:00
MediaPipe TeamandCopybara-Service e95f465d58 Internal change
PiperOrigin-RevId: 521716263
2023-04-04 03:44:56 -07:00
MediaPipe TeamandCopybara-Service 53fa35e40c Add FrameBuffer view on ImageFrame.
PiperOrigin-RevId: 521689386
2023-04-04 01:19:07 -07:00
MediaPipe TeamandCopybara-Service 367ccbfdf3 update ImageSegmenterGraph to always output confidence mask and optionally output category mask
PiperOrigin-RevId: 521679910
2023-04-04 00:25:22 -07:00
Joe FernandezandCopybara-Service c31a4681e5 Fix left navigation mediapipe.dev docs legacy solutions web pages
PiperOrigin-RevId: 521609493
2023-04-03 17:44:07 -07:00
MediaPipe TeamandCopybara-Service 7c7eb74ef2 Internal change
PiperOrigin-RevId: 521586389
2023-04-03 16:00:24 -07:00
jqtang 3c05df9c46 Merge pull request #4235 from priankakariatyml:ios-object-detection-containers
PiperOrigin-RevId: 521553151
2023-04-03 15:12:06 -07:00
Sebastian SchmidtandCopybara-Service e84799ee37 Internal change
PiperOrigin-RevId: 521483663
2023-04-03 09:45:42 -07:00
Prianka Liz Kariat 048cc51e13 Added new line 2023-04-03 20:15:35 +05:30
Prianka Liz Kariat 1ab9b138ef Added MPPObjectDetectorOptions 2023-04-03 20:14:41 +05:30
Prianka Liz Kariat 67fcf9196e Added MPPObjectDetectionResult 2023-04-03 20:14:26 +05:30
Prianka Liz Kariat 4943029d62 Added MPPDetectionHelpers 2023-04-03 20:11:44 +05:30
Prianka Liz Kariat 9421249de1 Added MPPDetection 2023-04-03 20:07:45 +05:30
MediaPipe TeamandCopybara-Service cfe91f3c8c Internal change
PiperOrigin-RevId: 521424672
2023-04-03 04:46:59 -07:00
MediaPipe TeamandCopybara-Service 4a490cd27c This CL fixes the multiple typos in the new task api solution
PiperOrigin-RevId: 521407588
2023-04-03 03:05:29 -07:00
MediaPipe TeamandCopybara-Service b5bbed8ebb Internal change
PiperOrigin-RevId: 521406957
2023-04-03 03:01:23 -07:00
MediaPipe TeamandCopybara-Service 696bedcaa1 Internal change
PiperOrigin-RevId: 521327449
2023-04-02 17:43:47 -07:00
MediaPipe TeamandCopybara-Service 1fa9b2c985 Internal change
PiperOrigin-RevId: 521279971
2023-04-02 08:32:09 -07:00
MediaPipe TeamandCopybara-Service 50a49fd16c Internal change
PiperOrigin-RevId: 521226781
2023-04-01 22:29:07 -07:00
MediaPipe TeamandCopybara-Service d9f940f8b2 Model Maker object detector change learning_rate_boundaries to learning_rate_epoch_boundaries.
PiperOrigin-RevId: 521024056
2023-03-31 15:19:26 -07:00
Jiuqiang TangandCopybara-Service 7f9fd4f154 Add the minimum version number requirement to sounddevice in requirements.txt.
PiperOrigin-RevId: 520998845
2023-03-31 13:27:42 -07:00
Sebastian SchmidtandCopybara-Service c40e0fb6d5 Internal change
PiperOrigin-RevId: 520956127
2023-03-31 10:33:27 -07:00
MediaPipe TeamandCopybara-Service 1ff80f906c draw mouth to shoulder line after connection, to align with python viz code
PiperOrigin-RevId: 520935390
2023-03-31 09:05:10 -07:00
MediaPipe TeamandCopybara-Service 4dcb9a2201 Internal change
PiperOrigin-RevId: 520875109
2023-03-31 03:06:43 -07:00
MediaPipe TeamandCopybara-Service 733216da7e Use "x86_32" instead of "i386" for Bazel CPU ID -- they are currently synonyms, but "i386" is likely to be deprecated and removed in the future.
PiperOrigin-RevId: 520865783
2023-03-31 02:06:53 -07:00
MediaPipe TeamandCopybara-Service 5fe4e1ad0e Internal change
PiperOrigin-RevId: 520861522
2023-03-31 01:39:07 -07:00
Alan KellyandCopybara-Service 6a6786673e Do not explicitly set XNNPACK delegate flags.
XNNPACK is now enabled by default for all types so the behaviour remains identical.

PiperOrigin-RevId: 520855384
2023-03-31 00:59:29 -07:00
MediaPipe TeamandCopybara-Service 88d68341de Migrate face stylizer model files to GCS to use downloadable models in model maker.
PiperOrigin-RevId: 520848629
2023-03-31 00:11:51 -07:00
MediaPipe TeamandCopybara-Service 4ce87866da Add landmarks smoothing filter when requested face num is 1.
PiperOrigin-RevId: 520825046
2023-03-30 21:30:24 -07:00
MediaPipe TeamandCopybara-Service ea9083c89d visualize blaze pose for controlnet
PiperOrigin-RevId: 520823020
2023-03-30 21:20:06 -07:00
Sebastian SchmidtandCopybara-Service 145fc1ed38 Don't overwrite detection options if not specified in setOptions()
PiperOrigin-RevId: 520790479
2023-03-30 17:56:05 -07:00
Jiuqiang TangandCopybara-Service 508c72ddc9 Internal changes
PiperOrigin-RevId: 520775988
2023-03-30 16:45:34 -07:00
MediaPipe TeamandCopybara-Service 1eeb89e95f Add the model configuration and training hyperparameters for BlazeFaceStylizer.
PiperOrigin-RevId: 520767282
2023-03-30 16:07:11 -07:00
MediaPipe TeamandCopybara-Service a4923ca7aa Internal compatible_with change
PiperOrigin-RevId: 520751319
2023-03-30 15:01:09 -07:00
MediaPipe TeamandCopybara-Service f8f7126bdd Internal change
PiperOrigin-RevId: 520726897
2023-03-30 13:27:19 -07:00
MediaPipe TeamandCopybara-Service d43579fe3e Internal change
PiperOrigin-RevId: 520717805
2023-03-30 12:56:44 -07:00
MediaPipe TeamandCopybara-Service 99ba7dd787 Rewrite audio buffer conversion in Eigen primitives
PiperOrigin-RevId: 520717550
2023-03-30 12:52:22 -07:00
Jiuqiang TangandCopybara-Service 984073bf73 Fix the "'<>' with anonymous inner classes is not supported" error.
PiperOrigin-RevId: 520705926
2023-03-30 12:05:08 -07:00
MediaPipe TeamandCopybara-Service d7fd5b0cf5 Fix incorrect rotation handling in C++ vision tasks
PiperOrigin-RevId: 520670536
2023-03-30 10:05:25 -07:00
MediaPipe TeamandCopybara-Service 0e951b8add Internal change
PiperOrigin-RevId: 520636929
2023-03-30 07:48:07 -07:00
MediaPipe TeamandCopybara-Service 15d81576aa Change getLabels method to public
PiperOrigin-RevId: 520537239
2023-03-29 22:12:52 -07:00
Sebastian SchmidtandCopybara-Service f9eb3defa0 Internal change
PiperOrigin-RevId: 520523622
2023-03-29 21:04:07 -07:00
Sebastian SchmidtandCopybara-Service ac52859f1d Gracefully fail resource path lookup for Python on Windows
PiperOrigin-RevId: 520513921
2023-03-29 20:14:29 -07:00
Sebastian SchmidtandCopybara-Service ee1807d8e3 Don't use Bazel runfiles on for Python on Windows
PiperOrigin-RevId: 520504539
2023-03-29 19:10:07 -07:00
Sebastian SchmidtandCopybara-Service eaa708a18d Enable TextClassifier and TextEmbedder on Windows Python
PiperOrigin-RevId: 520498308
2023-03-29 18:26:53 -07:00
Sebastian SchmidtandCopybara-Service df67b35348 Internal change
PiperOrigin-RevId: 520486540
2023-03-29 17:27:16 -07:00
Sebastian SchmidtandCopybara-Service 6be4aedcf7 Use mediapipe_proto_library for all MediaPipe Protos
PiperOrigin-RevId: 520451054
2023-03-29 15:00:59 -07:00
MediaPipe TeamandCopybara-Service 0c8f691a36 Internal changes
PiperOrigin-RevId: 520411557
2023-03-29 12:35:20 -07:00
MediaPipe TeamandCopybara-Service 8e9207a7de Internal change
PiperOrigin-RevId: 520373147
2023-03-29 10:24:10 -07:00
Sebastian SchmidtandCopybara-Service b3d999704f FaceStylizer Java API
PiperOrigin-RevId: 520344417
2023-03-29 08:37:50 -07:00
MediaPipe TeamandCopybara-Service 316bd05e86 Internal change
PiperOrigin-RevId: 520263349
2023-03-29 01:35:04 -07:00
Sebastian SchmidtandCopybara-Service dc132a5629 Don't use Bazel runfiles on for Python on Windows
PiperOrigin-RevId: 520174325
2023-03-28 17:04:16 -07:00
MediaPipe TeamandCopybara-Service 9ee02481b1 Fix object detector pascal voc dataloader issue
PiperOrigin-RevId: 520160549
2023-03-28 16:06:44 -07:00
Jiuqiang TangandCopybara-Service 1e77725a15 Add necessary java lite proto source code to mediapipe tasks aar for the face landmarker task.
PiperOrigin-RevId: 520143851
2023-03-28 15:01:50 -07:00
Sebastian SchmidtandCopybara-Service 62d86494b0 Allow users to pass canvas: undefined
PiperOrigin-RevId: 520142520
2023-03-28 14:56:19 -07:00
Jiuqiang TangandCopybara-Service bda2639376 Switch to use the isPresent() API since the isEmpty() is only available since java 11: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Optional.html#isEmpty().
PiperOrigin-RevId: 520099308
2023-03-28 12:20:55 -07:00
Sebastian SchmidtandCopybara-Service 5c295da6ff Return custom error if model download fails
PiperOrigin-RevId: 520066065
2023-03-28 10:30:03 -07:00
Jiuqiang TangandCopybara-Service d4ec485971 Add face landmarker and face geometry java lite proto source code into mediapipe tasks AAR.
PiperOrigin-RevId: 520049667
2023-03-28 09:29:45 -07:00
MediaPipe TeamandCopybara-Service b4e1f0236a Add EndLoopImageCalculator
PiperOrigin-RevId: 520033132
2023-03-28 08:20:56 -07:00
MediaPipe TeamandCopybara-Service 0ea7b220f4 Add a function to convert CoreAudio buffers into a MediaPipe time series matrix
PiperOrigin-RevId: 519968274
2023-03-28 02:36:36 -07:00
MediaPipe TeamandCopybara-Service a18a62ef04 Make AnnotationOverlayCalculator compatible with GLES2/WebGL1 by using GL_RGB as internal format instead of GL_RGB8 for the texture that OpenCV renders into.
PiperOrigin-RevId: 519933934
2023-03-27 23:13:16 -07:00
Jiuqiang TangandCopybara-Service 94db96fa5e Add MatrixDataProto.java to mediapipe aar.
PiperOrigin-RevId: 519925872
2023-03-27 22:22:17 -07:00
Sebastian SchmidtandCopybara-Service 105e7b7467 Add no-copy Image getter for JNIS
PiperOrigin-RevId: 519909198
2023-03-27 20:59:23 -07:00
Copybara-Service 59b3150fff Merge pull request #4194 from priankakariatyml:ios-image-classifier-tests
PiperOrigin-RevId: 519907148
2023-03-27 20:46:18 -07:00
MediaPipe TeamandCopybara-Service 004265bbbd remove the check that data streams need to be > 0 since we have a use case of:
input_stream: "ALLOW:"
output_stream: "STATE_CHANGE"
PiperOrigin-RevId: 519891414
2023-03-27 19:14:24 -07:00
MediaPipe TeamandCopybara-Service 5f8831660f Internal MediaPipe Tasks change.
PiperOrigin-RevId: 519878741
2023-03-27 17:55:28 -07:00
Liam Miller-CushonandCopybara-Service 2d553a57e8 Update path to Doclava
PiperOrigin-RevId: 519850747
2023-03-27 15:51:26 -07:00
Jiuqiang TangandCopybara-Service c3b4fa5627 Expose face detector and face landmarker as public MediaPipe Tasks Python API.
PiperOrigin-RevId: 519822084
2023-03-27 14:03:21 -07:00
Sebastian SchmidtandCopybara-Service 7dd5f9b6c6 Add face_landmarker to vision types
PiperOrigin-RevId: 519815735
2023-03-27 13:39:51 -07:00
MediaPipe TeamandCopybara-Service 1fdc82d7ec Internal change
PiperOrigin-RevId: 519805707
2023-03-27 13:02:37 -07:00
Sebastian SchmidtandCopybara-Service e2f2acca5e Update WASM files for alpha-6 release
PiperOrigin-RevId: 519738578
2023-03-27 09:09:08 -07:00
MediaPipe TeamandCopybara-Service 7fdec2ecdf FaceLandmarker Java API
PiperOrigin-RevId: 519704560
2023-03-27 06:35:03 -07:00
MediaPipe TeamandCopybara-Service 9f888435b7 Internal change
PiperOrigin-RevId: 519674123
2023-03-27 03:40:24 -07:00
MediaPipe TeamandCopybara-Service 5ccf986513 This CL fixes the multiple typos in the new task api solution
PiperOrigin-RevId: 519634122
2023-03-26 23:57:38 -07:00
kinaryml e364aeb359 Revised Interactive Segmenter API and added more tests 2023-03-25 00:44:30 -07:00
Jiuqiang TangandCopybara-Service 55b9bd9d5e Internal change
PiperOrigin-RevId: 519224694
2023-03-24 13:33:47 -07:00
MediaPipe TeamandCopybara-Service 97c271644a Open Source Object Detector
PiperOrigin-RevId: 519201221
2023-03-24 11:53:18 -07:00
Sebastian SchmidtandCopybara-Service 58a98bc7da Add FaceLandmarker Web API
PiperOrigin-RevId: 519198210
2023-03-24 11:41:24 -07:00
Jiuqiang TangandCopybara-Service d6256362ec Internal change
PiperOrigin-RevId: 519186057
2023-03-24 10:56:50 -07:00
Sebastian SchmidtandCopybara-Service 9f6b2cd577 Add convertFromClassifications() helper
PiperOrigin-RevId: 519181016
2023-03-24 10:39:17 -07:00
Sebastian SchmidtandCopybara-Service cec878df2b Add Matrix output type
PiperOrigin-RevId: 519158476
2023-03-24 09:11:03 -07:00
MediaPipe TeamandCopybara-Service 53e4e92505 Support single channel golden images.
PiperOrigin-RevId: 519158051
2023-03-24 09:06:41 -07:00
MediaPipe TeamandCopybara-Service c26965c842 Internal change
PiperOrigin-RevId: 519150182
2023-03-24 08:34:11 -07:00
MediaPipe TeamandCopybara-Service 712ea6f15b Internal change
PiperOrigin-RevId: 519013105
2023-03-23 18:08:55 -07:00
Hadon NashandCopybara-Service 8a55f11952 Internal change
PiperOrigin-RevId: 519010016
2023-03-23 17:51:26 -07:00
Sebastian SchmidtandCopybara-Service 6aab4e013d Typo Fix
PiperOrigin-RevId: 518994598
2023-03-23 16:35:23 -07:00
MediaPipe TeamandCopybara-Service 27a5a6d433 Internal Changes
PiperOrigin-RevId: 518976200
2023-03-23 15:20:50 -07:00
MediaPipe TeamandCopybara-Service 948e17f404 Internal change
PiperOrigin-RevId: 518906661
2023-03-23 10:57:43 -07:00
Sebastian SchmidtandCopybara-Service 7b20a8e056 Update the WASM files for alpha5 Web release
PiperOrigin-RevId: 518905561
2023-03-23 10:53:38 -07:00
Sebastian SchmidtandCopybara-Service 8e5eadbd4e Add WebGLTexture output for ImageSegmenter
PiperOrigin-RevId: 518886135
2023-03-23 09:47:35 -07:00
Sebastian SchmidtandCopybara-Service 1c9e6894f3 Allow users to pass canvas element
PiperOrigin-RevId: 518870611
2023-03-23 08:46:21 -07:00
Prianka Liz Kariat 58adb69c44 Removed unwanted iOS tests 2023-03-23 20:16:30 +05:30
Prianka Liz Kariat 8682a3ffd9 Updated formatted 2023-03-23 19:58:03 +05:30
Prianka Liz Kariat da8b60700b Added flow limiter calculator to iOS vision tasks 2023-03-23 19:53:35 +05:30
Prianka Liz Kariat f51736e32d Added flow limiting for live stream mode in MPPImageClassifier 2023-03-23 19:52:14 +05:30
Prianka Liz Kariat 59e0b1ba74 Added stream info for some modes in MPPImageClassifier 2023-03-23 19:51:25 +05:30
Prianka Liz Kariat aa760855ee Updated formatting 2023-03-23 19:48:50 +05:30
Prianka Liz Kariat 1685664bdb Fixed formatting 2023-03-23 19:45:53 +05:30
Prianka Liz Kariat 55483776ab Fixed Issue with Flow Limiter in MPPTaskInfo 2023-03-23 19:44:56 +05:30
Prianka Liz Kariat d4b60a781e Added MPPImageClassifier Objective C Tests 2023-03-23 18:44:01 +05:30
Prianka Liz Kariat 48190e6600 Updated method signatures in MPPImage+TestUtils 2023-03-23 18:43:30 +05:30
Prianka Liz Kariat 8077743bfc Linked in Opencv ios framework with vision tasks. 2023-03-23 18:42:57 +05:30
Prianka Liz Kariat 1904632282 Fixed incorrect method call for image mode 2023-03-23 18:42:12 +05:30
Prianka Liz Kariat 960e7a6283 Fixed incorrect method call in MPPImageClassifier for Image Mode 2023-03-23 18:41:50 +05:30
Prianka Liz Kariat 1c4be91a3a Fixed stream names in MPPImageClassifier 2023-03-23 18:41:27 +05:30
Prianka Liz Kariat ddce041725 Fixed incorrect stride value in MPPImageUtils 2023-03-23 18:40:53 +05:30
Prianka Liz Kariat 3227635ea0 Fixed bug in roi assignment 2023-03-23 18:40:15 +05:30
Prianka Liz Kariat 6e62c113fb Fixed iOS running mode display strings 2023-03-23 18:39:54 +05:30
MediaPipe TeamandCopybara-Service 5998e96eed Internal change
PiperOrigin-RevId: 518814155
2023-03-23 03:35:43 -07:00
MediaPipe TeamandCopybara-Service 58fa1e2ec3 Internal change
PiperOrigin-RevId: 518813508
2023-03-23 03:31:46 -07:00
kinaryml 6304756c93 Added Interactive Segmenter Python API and some tests 2023-03-23 02:00:18 -07:00
Prianka Liz Kariat 2e4e17d837 Added MPPImage Utils for tests 2023-03-23 13:13:03 +05:30
MediaPipe TeamandCopybara-Service eac6348fd3 Open-sources a LanguageDetector C++ API.
PiperOrigin-RevId: 518758730
2023-03-22 21:54:35 -07:00
kinaryml 29a4041353 Fixed a typo in docstring 2023-03-22 21:51:45 -07:00
kinaryml ca18b95510 Updated BUILD 2023-03-22 21:50:40 -07:00
kinaryml 8cba65c229 Updated BUILD 2023-03-22 21:50:07 -07:00
kinaryml 613bcf99f4 Removed model 2023-03-22 21:49:11 -07:00
kinaryml c0320b556c Removed unit tests 2023-03-22 21:47:38 -07:00
kinaryml da70497f35 Updated Face Stylizer implementation and tests 2023-03-22 21:15:04 -07:00
Kinar RandGitHub 3afe4cafc4 Merge branch 'master' into face-stylizer-python 2023-03-23 09:27:52 +05:30
Sebastian SchmidtandCopybara-Service 1a7be8a4c1 Internal change
PiperOrigin-RevId: 518747623
2023-03-22 20:44:34 -07:00
MediaPipe TeamandCopybara-Service 37111e8fa5 Internal change
PiperOrigin-RevId: 518657355
2023-03-22 13:29:29 -07:00
Sebastian SchmidtandCopybara-Service eda8cb6b42 Typo fix
PiperOrigin-RevId: 518603982
2023-03-22 10:20:06 -07:00
MediaPipe TeamandCopybara-Service cb2ee87705 Internal change
PiperOrigin-RevId: 518591192
2023-03-22 09:34:23 -07:00
Jiuqiang TangandCopybara-Service 21e0ff3d4e Skip unnecessary cpu<->gpu conversion if the input and output are already on the same storage.
PiperOrigin-RevId: 518573284
2023-03-22 08:22:38 -07:00
MediaPipe TeamandCopybara-Service 18b4caa7f3 Internal change
PiperOrigin-RevId: 518559368
2023-03-22 07:14:18 -07:00
Kinar RandGitHub 3c39aca52b Merge branch 'google:master' into audio-record-api-python 2023-03-22 11:46:28 +05:30
kinaryml 444cd00ee6 Moved audio_record.py to tasks/python/audio/core 2023-03-21 23:15:55 -07:00
Copybara-Service 5d2a719b54 Merge pull request #4027 from kinaryml:cosine-sim-python
PiperOrigin-RevId: 518431807
2023-03-21 17:59:48 -07:00
Sebastian SchmidtandCopybara-Service 788e8d8777 Fix crash when FaceLandmarker does not return a result
PiperOrigin-RevId: 518410060
2023-03-21 16:21:58 -07:00
Sebastian SchmidtandCopybara-Service bbd21e9a6d Add the FaceStylizer Web API
PiperOrigin-RevId: 518409812
2023-03-21 16:17:28 -07:00
Jiuqiang TangandCopybara-Service b71e1d14d3 Add missing dependency library targets to mediapipe_task_aar.
PiperOrigin-RevId: 518384666
2023-03-21 14:38:11 -07:00
Sebastian SchmidtandCopybara-Service 8bbf2621a4 Typo fix
PiperOrigin-RevId: 518380030
2023-03-21 14:31:49 -07:00
Sebastian SchmidtandCopybara-Service a5fc1d4baf Use Uint8ClampedArray for pixel output
PiperOrigin-RevId: 518362677
2023-03-21 13:22:10 -07:00
MediaPipe TeamandCopybara-Service 7d26daf723 Make sure calling GraphTextureFrame::getTextureName()+::release() on a non-GL thread doesn't result in a crash.
PiperOrigin-RevId: 518359778
2023-03-21 13:12:03 -07:00
MediaPipe TeamandCopybara-Service 88effb19e5 Add build variants for _gms to some MediaPipe libraries that use TFLite
This change alters some cc_library to cc_library_with_tflite to add _gms variants to some select MediaPipe libraries. This CL also makes minimal changes in the code to make the _gms variants buildable.

PiperOrigin-RevId: 518336242
2023-03-21 11:48:09 -07:00
Jiuqiang TangandCopybara-Service 384f77b5c3 Fix the proto src file names.
PiperOrigin-RevId: 518332541
2023-03-21 11:34:39 -07:00
MediaPipe TeamandCopybara-Service c2a3e99545 Internal change
PiperOrigin-RevId: 518330697
2023-03-21 11:29:04 -07:00
MediaPipe TeamandCopybara-Service 2be66e8eb0 Add interactive segmenter java API
PiperOrigin-RevId: 518303391
2023-03-21 09:59:19 -07:00
Copybara-Service 6e0542c16a Merge pull request #4141 from priankakariatyml:ios-image-classifier-impl-files
PiperOrigin-RevId: 518138209
2023-03-20 19:05:37 -07:00
Jiuqiang TangandCopybara-Service 5a924669b7 Temporarily disabling checking whether the executor is not set in a subgraph node. This is a workaround to allow the MediaPipe InferenceCalculator to have its own executor.
PiperOrigin-RevId: 518117759
2023-03-20 17:10:55 -07:00
Sebastian SchmidtandCopybara-Service 2651d30ebf Add ImageData output to GraphRunner
PiperOrigin-RevId: 517994561
2023-03-20 09:46:27 -07:00
Copybara-Service 54e4dfc853 Merge pull request #4177 from kinaryml:face-landmarker-python
PiperOrigin-RevId: 517979421
2023-03-20 08:47:47 -07:00
MediaPipe TeamandCopybara-Service 47fa1a9578 Internal change
PiperOrigin-RevId: 517886450
2023-03-20 00:25:47 -07:00
MediaPipe TeamandCopybara-Service 524acaaaa7 internal change
PiperOrigin-RevId: 517823184
2023-03-19 16:07:32 -07:00
Jiuqiang TangandCopybara-Service f06e4224b8 Allow ModelResourcesCalculator to use file_pointer_meta.
PiperOrigin-RevId: 517742722
2023-03-19 01:33:52 -07:00
MediaPipe TeamandCopybara-Service 2e5ea174fe Internal change
PiperOrigin-RevId: 517597924
2023-03-18 00:29:59 -07:00
Jiuqiang TangandCopybara-Service 6634d22161 Add LabelMapProto.java source code to MediaPipe AAR.
PiperOrigin-RevId: 517563190
2023-03-17 19:49:53 -07:00
Jiuqiang TangandCopybara-Service 6785bcc47d Add java_package and java_outer_classname to label_map.proto.
PiperOrigin-RevId: 517563000
2023-03-17 19:45:45 -07:00
Jiuqiang TangandCopybara-Service 065f1f38aa Fix the vision tasks aar build rule to solve the "cannot find symbol" error:
```
mediapipe/tasks/java/com/google/mediapipe/tasks/vision/imagesegmenter/ImageSegmenter.java:28: error: cannot find symbol
import com.google.mediapipe.tasks.TensorsToSegmentationCalculatorOptionsProto;
```

PiperOrigin-RevId: 517542284
2023-03-17 17:02:22 -07:00
Jiuqiang TangandCopybara-Service 0805d61bfe Add the source code TensorsToSegmentationCalculatorOptionsProto.java into tasks core's maven package.
PiperOrigin-RevId: 517516701
2023-03-17 15:01:33 -07:00
MediaPipe TeamandCopybara-Service 3dede1a9a5 Add label_map filtering into filter_detection drishti calculator.
PiperOrigin-RevId: 517515046
2023-03-17 14:53:48 -07:00
MediaPipe TeamandCopybara-Service 1a456dcbf9 Internal change
PiperOrigin-RevId: 517466009
2023-03-17 11:40:26 -07:00
MediaPipe TeamandCopybara-Service 24217e2ead Internal change
PiperOrigin-RevId: 517322105
2023-03-16 22:50:22 -07:00
kinaryml 1ba285d916 Updated a method name in face_landmarker_test.py 2023-03-16 15:10:39 -07:00
Sebastian SchmidtandCopybara-Service 75bc44d42a Add a comment to macos_opencv so it can be easily replaced with sed
PiperOrigin-RevId: 517225588
2023-03-16 14:19:14 -07:00
MediaPipe TeamandCopybara-Service 560945ad39 Internal Changes
PiperOrigin-RevId: 517219631
2023-03-16 13:58:02 -07:00
kinaryml 94dba82284 Renamed a test method to use the plural form 2023-03-16 12:54:38 -07:00
kinaryml b36b0bb3e8 Updated API and tests 2023-03-16 12:51:19 -07:00
kinaryml 2753c79fde Removed MatrixData dataclass and used NumPy to represent Matrix 2023-03-16 11:50:07 -07:00
MediaPipe TeamandCopybara-Service a9e956baa1 Add more details to the invoke call trace.
It is always useful information to know if the TPU invoke is Async or not, and if the GPU invoke on the old path or new path.
This can make it obvious in the perfetto trace.

PiperOrigin-RevId: 517162515
2023-03-16 10:37:32 -07:00
MediaPipe TeamandCopybara-Service 3b66ac0623 Import the saved Keras models of BlazeFaceStylizer components into MediaPipe model maker.
PiperOrigin-RevId: 517044265
2023-03-16 00:44:06 -07:00
kinaryml 9aea1be6f9 Removed geometry pipeline calculator 2023-03-15 23:51:12 -07:00
Kinar RandGitHub 15d90bd325 Merge branch 'master' into face-landmarker-python 2023-03-16 12:17:59 +05:30
Copybara-Service d84ccbadad Merge pull request #4158 from kinaryml:face-detector-python
PiperOrigin-RevId: 516970627
2023-03-15 17:13:37 -07:00
MediaPipe TeamandCopybara-Service 8f1ce5fef6 Add quality test for InteractiveSegmenter
PiperOrigin-RevId: 516968294
2023-03-15 17:02:34 -07:00
MediaPipe TeamandCopybara-Service 61bcddc671 Add Interactive Segmenter MediaPipe Task
PiperOrigin-RevId: 516954589
2023-03-15 16:05:18 -07:00
Sebastian SchmidtandCopybara-Service 43082482f8 Remove framework:Cocoa again
PiperOrigin-RevId: 516928735
2023-03-15 14:24:15 -07:00
MediaPipe TeamandCopybara-Service 59962bed27 ImageSegmenterGraph set activation type from metadata, and remove the activation config in C++ ImageSegmenterOptions.
PiperOrigin-RevId: 516893115
2023-03-15 12:13:00 -07:00
MediaPipe TeamandCopybara-Service a323825134 Internal change
PiperOrigin-RevId: 516882513
2023-03-15 11:35:49 -07:00
MediaPipe TeamandCopybara-Service 18d88c531a Internal MediaPipe Tasks change.
PiperOrigin-RevId: 516881879
2023-03-15 11:30:58 -07:00
MediaPipe TeamandCopybara-Service ce3cd94f45 Internal change
PiperOrigin-RevId: 516871638
2023-03-15 10:56:32 -07:00
kinaryml 80dd764605 Removed dummy packet creation and preserved face_geometry protobuf import 2023-03-15 10:52:16 -07:00
kinaryml 4a6015e65c Fixed some issues in the MatrixData container, revised the implementation and added more tests 2023-03-15 10:41:36 -07:00
kinaryml 06c37c6442 Updated mediapipe/python/BUILD and tests 2023-03-15 09:11:06 -07:00
Kinar RandGitHub 2af660321d Merge branch 'google:master' into face-landmarker-python 2023-03-15 21:22:35 +05:30
Fergus HendersonandCopybara-Service 04ffb8432e Fix typo.
PiperOrigin-RevId: 516834369
2023-03-15 08:41:40 -07:00
Sebastian SchmidtandCopybara-Service c8b56439af Fix typo
PiperOrigin-RevId: 516758040
2023-03-15 01:38:55 -07:00
Kinar RandGitHub 647db21fc3 Merge branch 'google:master' into face-landmarker-python 2023-03-15 11:03:15 +05:30
kinaryml d83f400b08 Updated API and tests 2023-03-14 22:32:39 -07:00
MediaPipe TeamandCopybara-Service f517eddce1 API for c++ ImageSegmenter to get labels
PiperOrigin-RevId: 516714139
2023-03-14 21:13:08 -07:00
MediaPipe TeamandCopybara-Service cafff14135 GeometryPipelineCalculator support single face landmarks input.
PiperOrigin-RevId: 516701488
2023-03-14 20:03:07 -07:00
MediaPipe TeamandCopybara-Service 141cf843ae Add getLabels to ImageSegmeter Java API
PiperOrigin-RevId: 516683339
2023-03-14 18:04:33 -07:00
Yuqi LiandCopybara-Service 51d9640d88 Add metadata writer for image segmentation.
PiperOrigin-RevId: 516671364
2023-03-14 17:00:30 -07:00
MediaPipe TeamandCopybara-Service 9a89b47572 Rename *ModelFile to *File for methods of ModelAssetBundleResources.
PiperOrigin-RevId: 516667461
2023-03-14 16:42:32 -07:00
Jiuqiang TangandCopybara-Service cd2cc971bb Registering FaceGeometry proto.
PiperOrigin-RevId: 516663848
2023-03-14 16:28:48 -07:00
Sebastian SchmidtandCopybara-Service f60fe739d3 Internal change
PiperOrigin-RevId: 516656029
2023-03-14 15:57:01 -07:00
Sebastian SchmidtandCopybara-Service 3e952a5f1f Update Node version to 16.19.0
PiperOrigin-RevId: 516654979
2023-03-14 15:52:32 -07:00
Sebastian SchmidtandCopybara-Service ec3cd45d61 Add InteractiveSegmenter Web API
PiperOrigin-RevId: 516654090
2023-03-14 15:48:38 -07:00
MediaPipe TeamandCopybara-Service 6774794d02 Add the dataset module for face stylizer in model maker.
PiperOrigin-RevId: 516628350
2023-03-14 14:11:20 -07:00
Hadon NashandCopybara-Service ade31b567b Internal change
PiperOrigin-RevId: 516626371
2023-03-14 14:04:57 -07:00
MediaPipe TeamandCopybara-Service ed3e728bb8 Internal change
PiperOrigin-RevId: 516607678
2023-03-14 12:57:24 -07:00
Jiuqiang TangandCopybara-Service fef8b9cb58 Registering FaceGeometry proto.
PiperOrigin-RevId: 516597971
2023-03-14 12:21:02 -07:00
MediaPipe TeamandCopybara-Service 854ab25ee9 Internal change.
PiperOrigin-RevId: 516594221
2023-03-14 12:11:18 -07:00
MediaPipe TeamandCopybara-Service 8a41a5e44d Update models.
PiperOrigin-RevId: 516575530
2023-03-14 11:06:20 -07:00
Sebastian SchmidtandCopybara-Service 5bba1f245f Internal change
PiperOrigin-RevId: 516550977
2023-03-14 09:46:41 -07:00
MediaPipe TeamandCopybara-Service c895867427 Expose FrameBuffer view on GpuBufferStorageYuvImage.
PiperOrigin-RevId: 516546716
2023-03-14 09:30:25 -07:00
MediaPipe TeamandCopybara-Service 2659ea0392 Internal change
PiperOrigin-RevId: 516535124
2023-03-14 08:44:40 -07:00
Alan KellyandCopybara-Service bc641a22a8 Internal change
PiperOrigin-RevId: 516520860
2023-03-14 07:41:20 -07:00
kinaryml 23681cde0d Revised face landmarker implementation and tests 2023-03-14 00:37:32 -07:00
Kinar RandGitHub 4a7489cd3a Merge branch 'google:master' into face-landmarker-python 2023-03-14 11:27:52 +05:30
MediaPipe TeamandCopybara-Service 46ba1d8051 Use ExternalFile to set metadata of GeometryPipelineCalculator.
PiperOrigin-RevId: 516384491
2023-03-13 18:50:33 -07:00
Jiuqiang TangandCopybara-Service 57f106e0a7 Wait until the metal backend finishes its work in the TensorsToImageCalculator.
PiperOrigin-RevId: 516360846
2023-03-13 16:56:46 -07:00
MediaPipe TeamandCopybara-Service 89857f33a2 Make ImageToTensorCalculator use kGpuService optionally
PiperOrigin-RevId: 516358053
2023-03-13 16:48:49 -07:00
Chris McClanahanandCopybara-Service 1b4a835be0 Internal change
PiperOrigin-RevId: 516349788
2023-03-13 16:09:56 -07:00
Sebastian SchmidtandCopybara-Service cb4b0ea93d Disable OpenCL dependency for OpenCV
PiperOrigin-RevId: 516341303
2023-03-13 15:37:53 -07:00
Esha UbowejaandCopybara-Service 0f58d89992 Preserves all elements of BASE_HAND_RECTS input streams in HandAssociationCalculator.
PiperOrigin-RevId: 516339343
2023-03-13 15:32:35 -07:00
Sebastian SchmidtandCopybara-Service c32ddcb04c Add alwayslink to face_stylizer_graph
PiperOrigin-RevId: 516330940
2023-03-13 14:58:39 -07:00
Sebastian SchmidtandCopybara-Service eac2e337f6 Sort vision tasks in README.md
PiperOrigin-RevId: 516312229
2023-03-13 13:53:20 -07:00
Sebastian SchmidtandCopybara-Service 85600ca326 Add Keypoint and Region-of-interest
PiperOrigin-RevId: 516299794
2023-03-13 13:10:40 -07:00
Sebastian SchmidtandCopybara-Service 490d1a7516 Refactor Web code for InteractiveSegmenter
PiperOrigin-RevId: 516254891
2023-03-13 10:43:24 -07:00
Copybara-Service d6fb7c365e Merge pull request #4145 from lucifertrj:poseDocs
PiperOrigin-RevId: 516231033
2023-03-13 09:22:34 -07:00
kinaryml efae2830f1 Updated face landmarker implementation and tests 2023-03-13 08:46:41 -07:00
Jiuqiang TangandCopybara-Service 1d2041b992 Internal change
PiperOrigin-RevId: 516220827
2023-03-13 08:43:21 -07:00
MediaPipe TeamandCopybara-Service ffea85e470 Internal change
PiperOrigin-RevId: 516179167
2023-03-13 05:13:01 -07:00
kinaryml 89be4c7b64 Added some files for the face landmarker implementation 2023-03-12 16:09:04 -07:00
MediaPipe TeamandCopybara-Service 131be2169a Add FaceDetector Java API
PiperOrigin-RevId: 515913662
2023-03-11 13:14:47 -08:00
MediaPipe TeamandCopybara-Service 296ee33be5 Add FaceLandmarker C++ API
PiperOrigin-RevId: 515912777
2023-03-11 13:05:21 -08:00
kinaryml 78e48825ae Make create_audio_record not a static method 2023-03-11 07:39:34 -08:00
MediaPipe TeamandCopybara-Service c94de4032d Fix preprocess Callable typing
PiperOrigin-RevId: 515818356
2023-03-10 21:50:46 -08:00
Jiuqiang TangandCopybara-Service 3e8fd58400 Make createAudioRecord a class method not a static method.
PiperOrigin-RevId: 515740313
2023-03-10 14:34:32 -08:00
Sebastian SchmidtandCopybara-Service db779ba78f Use drishti_proto_library for libraries in mediapipe/gpu
PiperOrigin-RevId: 515708036
2023-03-10 12:27:06 -08:00
MediaPipe TeamandCopybara-Service c9bd4f5957 Internal change
PiperOrigin-RevId: 515706419
2023-03-10 12:22:27 -08:00
MediaPipe TeamandCopybara-Service c3a32d76be Update face geometry proto java package name.
PiperOrigin-RevId: 515696170
2023-03-10 11:45:35 -08:00
MediaPipe TeamandCopybara-Service 296c343332 Revise the Halide Bazel build rules to be cleaner and more correct. The initial version we landed happened to work (at least in most cases) but had known workarounds in it. AFAICT, the issue seemed to be that the MediaPipe config_setting() values we were using didn't always resolve to the right thing when detecting the host cpu (vs the compile-target cpu), which is critical for Halide. I fixed this by avoiding the use of the MediaPipe config_settings entirely, using instead the public Bazel settings hosted at https://github.com/bazelbuild/platforms.
This revision builds and runs //mediapipe/util/frame_buffer:all correctly on my mac x86-64 laptop; I haven't yet attempted to build or test on any other platform, so there may well still be glitches, but I think this is more fundamentally sound than what we had before.

PiperOrigin-RevId: 515682507
2023-03-10 10:59:17 -08:00
Kinar RandGitHub 9d82000148 Update BUILD 2023-03-11 00:04:07 +05:30
Kinar RandGitHub f56a3088e3 Update audio_record_test.py 2023-03-11 00:02:41 +05:30
kinaryml 9787056508 Added the AudioRecord API 2023-03-10 10:17:03 -08:00
MediaPipe TeamandCopybara-Service 05b505c8e2 Introduce api to disable service default initialization.
PiperOrigin-RevId: 515501608
2023-03-09 18:57:39 -08:00
Sebastian SchmidtandCopybara-Service ef4a8cde42 Solve iOS build error for gpu_buffer.cc
PiperOrigin-RevId: 515473643
2023-03-09 16:28:58 -08:00
MediaPipe TeamandCopybara-Service 2d8f937913 Improve docstring of image classifier model spec.
PiperOrigin-RevId: 515466722
2023-03-09 16:06:40 -08:00
kinaryml 7463e48fd4 Added some files necessary for the Face Stylizer implementation 2023-03-09 02:39:21 -08:00
kinaryml f48909cab6 Fixed score's data type 2023-03-09 02:13:34 -08:00
kinaryml 24114ec2fe Updated comment in test 2023-03-09 01:41:42 -08:00
kinaryml 022838a7f3 Added Face Detector implementation and tests 2023-03-09 01:36:39 -08:00
Tarun JainandGitHub 54e597216b np used in the program but not imported 2023-03-04 22:58:12 +05:30
Prianka Liz Kariat 87df23f0fa Updated formatting of MPPRunningMode.h 2023-03-03 14:40:00 +05:30
Prianka Liz Kariat 7b8d92ba47 Updated formatting in MPPVisionTaskRunner 2023-03-03 14:39:22 +05:30
Prianka Liz Kariat 412476eba1 Added inline function to return display name of MPPRunningMode 2023-03-03 14:39:03 +05:30
Prianka Liz Kariat f2dfa7f474 Updated documentation of MPPVisionTaskRunner 2023-03-03 12:33:31 +05:30
Prianka Liz Kariat 160fa424b5 Updated documentation of MPPTaskRunner 2023-03-03 12:33:17 +05:30
Prianka Liz Kariat fee66069ac Updated error with info about unsupported mirrored orientations in MPPVisionTaskRunner 2023-03-03 12:19:14 +05:30
Prianka Liz Kariat 6253966901 Updated comments in MPPTaskRunner to include note about mirrored orientations 2023-03-03 12:15:25 +05:30
Prianka Liz Kariat 289b3b20de Added methods for common functionality in MPPImageClassifier 2023-03-03 12:01:45 +05:30
Prianka Liz Kariat 8aaabe4a02 Updated comments in MPPVisionTaskRunner 2023-03-03 11:18:36 +05:30
Prianka Liz Kariat d577727698 Updated MPPImageClassifier 2023-03-03 11:11:07 +05:30
Prianka Liz Kariat af82dc5e17 Updated comments in MPPImageClassifier 2023-03-03 11:10:20 +05:30
Prianka Liz Kariat 4b54f7f45f Fixed comments in MPPVisionTaskRunner 2023-03-03 10:57:39 +05:30
Tarun JainandGitHub 38ec8ae842 link updated 2023-03-02 21:04:53 +05:30
Tarun JainandGitHub 6e7018b826 Merge branch 'google:master' into master 2023-03-02 21:01:21 +05:30
Prianka Liz Kariat 09fa23088a Added TODO 2023-03-02 20:01:48 +05:30
Prianka Liz Kariat 33a34de03b Updated method signature in MPPTaskRunner 2023-03-02 19:50:00 +05:30
Prianka Liz Kariat fe7bb92859 Added dependency for image format 2023-03-02 19:49:42 +05:30
Prianka Liz Kariat 6eafddb8e2 Added MPPImageClassifier 2023-03-02 19:46:20 +05:30
Prianka Liz Kariat ee6171c833 Added MPPImageClassifierOptionsHelpers 2023-03-02 19:46:11 +05:30
Prianka Liz Kariat abb140ed2e Added MPPImageClassifierResultHelpers 2023-03-02 19:45:58 +05:30
Prianka Liz Kariat c871fc58ec Updated build targets of vision packet creator and task runner 2023-03-02 19:43:46 +05:30
Prianka Liz Kariat c625d6afdc Added methods to MPPVisionPacketCreator 2023-03-02 19:43:22 +05:30
Prianka Liz Kariat dc393b0bd4 Added methods to MPPVisionTaskRunner 2023-03-02 19:43:01 +05:30
Prianka Liz Kariat b76ab37394 Removed unwanted imports 2023-03-02 19:37:24 +05:30
Prianka Liz Kariat 045050fc85 Changed method Updated method calls to process packet map in iOS text tasks 2023-03-02 19:36:34 +05:30
Prianka Liz Kariat 6d7f172e9f Changed return type of process method in MPPTaskRunner 2023-03-02 19:35:05 +05:30
Prianka Liz Kariat 87ba86ace2 Added method to send packet map to C++ task runner 2023-03-02 19:34:44 +05:30
Tarun JainandGitHub c73ff261ad Fix Broken Link in Object Detection solutions 2023-02-24 19:37:30 +05:30
Kinar RandGitHub 2dc790dbd9 Merge branch 'google:master' into cosine-sim-python 2023-01-25 00:25:23 +05:30
kinaryml ea77a7c25d Undo commenting out remaining tests 2022-11-17 14:06:30 -08:00
kinaryml 87238705dd Updated cosine similarity utility 2022-11-17 14:03:07 -08:00
1649 changed files with 94500 additions and 13829 deletions
+3
View File
@@ -87,6 +87,9 @@ build:ios_fat --config=ios
build:ios_fat --ios_multi_cpus=armv7,arm64
build:ios_fat --watchos_cpus=armv7k
build:ios_sim_fat --config=ios
build:ios_sim_fat --ios_multi_cpus=x86_64,sim_arm64
build:darwin_x86_64 --apple_platform_type=macos
build:darwin_x86_64 --macos_minimum_os=10.12
build:darwin_x86_64 --cpu=darwin_x86_64
+1 -1
View File
@@ -1 +1 @@
5.2.0
6.1.1
-34
View File
@@ -1,34 +0,0 @@
# Copyright 2021 The MediaPipe Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
#
# This file was assembled from multiple pieces, whose use is documented
# throughout. Please refer to the TensorFlow dockerfiles documentation
# for more information.
# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 7
# Number of days of inactivity before a stale Issue or Pull Request is closed
daysUntilClose: 7
# Only issues or pull requests with all of these labels are checked if stale. Defaults to `[]` (disabled)
onlyLabels:
- stat:awaiting response
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you.
# Comment to post when removing the stale label. Set to `false` to disable
unmarkComment: false
closeComment: >
Closing as stale. Please reopen if you'd like to work on this further.
+66
View File
@@ -0,0 +1,66 @@
# Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
# This workflow alerts and then closes the stale issues/PRs after specific time
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: 'Close stale issues and PRs'
"on":
schedule:
- cron: "30 1 * * *"
permissions:
contents: read
issues: write
pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: 'actions/stale@v7'
with:
# Comma separated list of labels that can be assigned to issues to exclude them from being marked as stale.
exempt-issue-labels: 'override-stale'
# Comma separated list of labels that can be assigned to PRs to exclude them from being marked as stale.
exempt-pr-labels: "override-stale"
# Limit the No. of API calls in one run default value is 30.
operations-per-run: 500
# Prevent to remove stale label when PRs or issues are updated.
remove-stale-when-updated: false
# comment on issue if not active for more then 7 days.
stale-issue-message: 'This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.'
# comment on PR if not active for more then 14 days.
stale-pr-message: 'This PR has been marked stale because it has no recent activity since 14 days. It will be closed if no further activity occurs. Thank you.'
# comment on issue if stale for more then 7 days.
close-issue-message: This issue was closed due to lack of activity after being marked stale for past 7 days.
# comment on PR if stale for more then 14 days.
close-pr-message: This PR was closed due to lack of activity after being marked stale for past 14 days.
# Number of days of inactivity before an Issue Request becomes stale
days-before-issue-stale: 7
# Number of days of inactivity before a stale Issue is closed
days-before-issue-close: 7
# reason for closed the issue default value is not_planned
close-issue-reason: completed
# Number of days of inactivity before a stale PR is closed
days-before-pr-close: 14
# Number of days of inactivity before an PR Request becomes stale
days-before-pr-stale: 14
# Check for label to stale or close the issue/PR
any-of-labels: 'stat:awaiting response'
# override stale to stalled for PR
stale-pr-label: 'stale'
# override stale to stalled for Issue
stale-issue-label: "stale"
+1 -1
View File
@@ -61,7 +61,7 @@ RUN pip3 install tf_slim
RUN ln -s /usr/bin/python3 /usr/bin/python
# Install bazel
ARG BAZEL_VERSION=5.2.0
ARG BAZEL_VERSION=6.1.1
RUN mkdir /bazel && \
wget --no-check-certificate -O /bazel/installer.sh "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/b\
azel-${BAZEL_VERSION}-installer-linux-x86_64.sh" && \
+17
View File
@@ -199,3 +199,20 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
===========================================================================
For files under tasks/cc/text/language_detector/custom_ops/utils/utf/
===========================================================================
/*
* The authors of this software are Rob Pike and Ken Thompson.
* Copyright (c) 2002 by Lucent Technologies.
* Permission to use, copy, modify, and distribute this software for any
* purpose without fee is hereby granted, provided that this entire notice
* is included in all copies of any software which is or includes a copy
* or modification of this software and in all copies of the supporting
* documentation for such software.
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY
* REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
* OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
*/
+100 -109
View File
@@ -1,94 +1,121 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe
title: Home
nav_order: 1
---
![MediaPipe](https://mediapipe.dev/images/mediapipe_small.png)
--------------------------------------------------------------------------------
## Live ML anywhere
[MediaPipe](https://google.github.io/mediapipe/) offers cross-platform, customizable
ML solutions for live and streaming media.
![accelerated.png](https://mediapipe.dev/images/accelerated_small.png) | ![cross_platform.png](https://mediapipe.dev/images/cross_platform_small.png)
:------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------:
***End-to-End acceleration***: *Built-in fast ML inference and processing accelerated even on common hardware* | ***Build once, deploy anywhere***: *Unified solution works across Android, iOS, desktop/cloud, web and IoT*
![ready_to_use.png](https://mediapipe.dev/images/ready_to_use_small.png) | ![open_source.png](https://mediapipe.dev/images/open_source_small.png)
***Ready-to-use solutions***: *Cutting-edge ML solutions demonstrating full power of the framework* | ***Free and open source***: *Framework and solutions both under Apache 2.0, fully extensible and customizable*
----
**Attention:** *Thanks for your interest in MediaPipe! We are moving to
**Attention:** *We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation
site for MediaPipe starting April 3, 2023.*
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
*This notice and web page will be removed on April 3, 2023.*
![MediaPipe](https://developers.google.com/static/mediapipe/images/home/hero_01_1920.png)
----
**Attention**: MediaPipe Solutions Preview is an early release. [Learn
more](https://developers.google.com/mediapipe/solutions/about#notice).
## ML solutions in MediaPipe
**On-device machine learning for everyone**
Face Detection | Face Mesh | Iris | Hands | Pose | Holistic
:----------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------: | :------:
[![face_detection](https://mediapipe.dev/images/mobile/face_detection_android_gpu_small.gif)](https://google.github.io/mediapipe/solutions/face_detection) | [![face_mesh](https://mediapipe.dev/images/mobile/face_mesh_android_gpu_small.gif)](https://google.github.io/mediapipe/solutions/face_mesh) | [![iris](https://mediapipe.dev/images/mobile/iris_tracking_android_gpu_small.gif)](https://google.github.io/mediapipe/solutions/iris) | [![hand](https://mediapipe.dev/images/mobile/hand_tracking_android_gpu_small.gif)](https://google.github.io/mediapipe/solutions/hands) | [![pose](https://mediapipe.dev/images/mobile/pose_tracking_android_gpu_small.gif)](https://google.github.io/mediapipe/solutions/pose) | [![hair_segmentation](https://mediapipe.dev/images/mobile/holistic_tracking_android_gpu_small.gif)](https://google.github.io/mediapipe/solutions/holistic)
Delight your customers with innovative machine learning features. MediaPipe
contains everything that you need to customize and deploy to mobile (Android,
iOS), web, desktop, edge devices, and IoT, effortlessly.
Hair Segmentation | Object Detection | Box Tracking | Instant Motion Tracking | Objectron | KNIFT
:-------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------: | :---:
[![hair_segmentation](https://mediapipe.dev/images/mobile/hair_segmentation_android_gpu_small.gif)](https://google.github.io/mediapipe/solutions/hair_segmentation) | [![object_detection](https://mediapipe.dev/images/mobile/object_detection_android_gpu_small.gif)](https://google.github.io/mediapipe/solutions/object_detection) | [![box_tracking](https://mediapipe.dev/images/mobile/object_tracking_android_gpu_small.gif)](https://google.github.io/mediapipe/solutions/box_tracking) | [![instant_motion_tracking](https://mediapipe.dev/images/mobile/instant_motion_tracking_android_small.gif)](https://google.github.io/mediapipe/solutions/instant_motion_tracking) | [![objectron](https://mediapipe.dev/images/mobile/objectron_chair_android_gpu_small.gif)](https://google.github.io/mediapipe/solutions/objectron) | [![knift](https://mediapipe.dev/images/mobile/template_matching_android_cpu_small.gif)](https://google.github.io/mediapipe/solutions/knift)
* [See demos](https://goo.gle/mediapipe-studio)
* [Learn more](https://developers.google.com/mediapipe/solutions)
<!-- []() in the first cell is needed to preserve table formatting in GitHub Pages. -->
<!-- Whenever this table is updated, paste a copy to solutions/solutions.md. -->
## Get started
[]() | [Android](https://google.github.io/mediapipe/getting_started/android) | [iOS](https://google.github.io/mediapipe/getting_started/ios) | [C++](https://google.github.io/mediapipe/getting_started/cpp) | [Python](https://google.github.io/mediapipe/getting_started/python) | [JS](https://google.github.io/mediapipe/getting_started/javascript) | [Coral](https://github.com/google/mediapipe/tree/master/mediapipe/examples/coral/README.md)
:---------------------------------------------------------------------------------------- | :-------------------------------------------------------------: | :-----------------------------------------------------: | :-----------------------------------------------------: | :-----------------------------------------------------------: | :-----------------------------------------------------------: | :--------------------------------------------------------------------:
[Face Detection](https://google.github.io/mediapipe/solutions/face_detection) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅
[Face Mesh](https://google.github.io/mediapipe/solutions/face_mesh) | ✅ | ✅ | ✅ | ✅ | ✅ |
[Iris](https://google.github.io/mediapipe/solutions/iris) | ✅ | ✅ | ✅ | | |
[Hands](https://google.github.io/mediapipe/solutions/hands) | ✅ | ✅ | ✅ | ✅ | ✅ |
[Pose](https://google.github.io/mediapipe/solutions/pose) | ✅ | ✅ | ✅ | ✅ | ✅ |
[Holistic](https://google.github.io/mediapipe/solutions/holistic) | ✅ | ✅ | ✅ | ✅ | ✅ |
[Selfie Segmentation](https://google.github.io/mediapipe/solutions/selfie_segmentation) | ✅ | ✅ | ✅ | ✅ | ✅ |
[Hair Segmentation](https://google.github.io/mediapipe/solutions/hair_segmentation) | ✅ | | ✅ | | |
[Object Detection](https://google.github.io/mediapipe/solutions/object_detection) | ✅ | ✅ | ✅ | | | ✅
[Box Tracking](https://google.github.io/mediapipe/solutions/box_tracking) | ✅ | ✅ | ✅ | | |
[Instant Motion Tracking](https://google.github.io/mediapipe/solutions/instant_motion_tracking) | ✅ | | | | |
[Objectron](https://google.github.io/mediapipe/solutions/objectron) | ✅ | | ✅ | ✅ | ✅ |
[KNIFT](https://google.github.io/mediapipe/solutions/knift) | ✅ | | | | |
[AutoFlip](https://google.github.io/mediapipe/solutions/autoflip) | | | ✅ | | |
[MediaSequence](https://google.github.io/mediapipe/solutions/media_sequence) | | | ✅ | | |
[YouTube 8M](https://google.github.io/mediapipe/solutions/youtube_8m) | | | ✅ | | |
You can get started with MediaPipe Solutions by by checking out any of the
developer guides for
[vision](https://developers.google.com/mediapipe/solutions/vision/object_detector),
[text](https://developers.google.com/mediapipe/solutions/text/text_classifier),
and
[audio](https://developers.google.com/mediapipe/solutions/audio/audio_classifier)
tasks. If you need help setting up a development environment for use with
MediaPipe Tasks, check out the setup guides for
[Android](https://developers.google.com/mediapipe/solutions/setup_android), [web
apps](https://developers.google.com/mediapipe/solutions/setup_web), and
[Python](https://developers.google.com/mediapipe/solutions/setup_python).
See also
[MediaPipe Models and Model Cards](https://google.github.io/mediapipe/solutions/models)
for ML models released in MediaPipe.
## Solutions
## Getting started
MediaPipe Solutions provides a suite of libraries and tools for you to quickly
apply artificial intelligence (AI) and machine learning (ML) techniques in your
applications. You can plug these solutions into your applications immediately,
customize them to your needs, and use them across multiple development
platforms. MediaPipe Solutions is part of the MediaPipe [open source
project](https://github.com/google/mediapipe), so you can further customize the
solutions code to meet your application needs.
To start using MediaPipe
[solutions](https://google.github.io/mediapipe/solutions/solutions) with only a few
lines code, see example code and demos in
[MediaPipe in Python](https://google.github.io/mediapipe/getting_started/python) and
[MediaPipe in JavaScript](https://google.github.io/mediapipe/getting_started/javascript).
These libraries and resources provide the core functionality for each MediaPipe
Solution:
To use MediaPipe in C++, Android and iOS, which allow further customization of
the [solutions](https://google.github.io/mediapipe/solutions/solutions) as well as
building your own, learn how to
[install](https://google.github.io/mediapipe/getting_started/install) MediaPipe and
start building example applications in
[C++](https://google.github.io/mediapipe/getting_started/cpp),
[Android](https://google.github.io/mediapipe/getting_started/android) and
[iOS](https://google.github.io/mediapipe/getting_started/ios).
* **MediaPipe Tasks**: Cross-platform APIs and libraries for deploying
solutions. [Learn
more](https://developers.google.com/mediapipe/solutions/tasks).
* **MediaPipe models**: Pre-trained, ready-to-run models for use with each
solution.
The source code is hosted in the
[MediaPipe Github repository](https://github.com/google/mediapipe), and you can
run code search using
[Google Open Source Code Search](https://cs.opensource.google/mediapipe/mediapipe).
These tools let you customize and evaluate solutions:
## Publications
* **MediaPipe Model Maker**: Customize models for solutions with your data.
[Learn more](https://developers.google.com/mediapipe/solutions/model_maker).
* **MediaPipe Studio**: Visualize, evaluate, and benchmark solutions in your
browser. [Learn
more](https://developers.google.com/mediapipe/solutions/studio).
### Legacy solutions
We have ended support for [these MediaPipe Legacy Solutions](https://developers.google.com/mediapipe/solutions/guide#legacy)
as of March 1, 2023. All other MediaPipe Legacy Solutions will be upgraded to
a new MediaPipe Solution. See the [Solutions guide](https://developers.google.com/mediapipe/solutions/guide#legacy)
for details. The [code repository](https://github.com/google/mediapipe/tree/master/mediapipe)
and prebuilt binaries for all MediaPipe Legacy Solutions will continue to be
provided on an as-is basis.
For more on the legacy solutions, see the [documentation](https://github.com/google/mediapipe/tree/master/docs/solutions).
## Framework
To start using MediaPipe Framework, [install MediaPipe
Framework](https://developers.google.com/mediapipe/framework/getting_started/install)
and start building example applications in C++, Android, and iOS.
[MediaPipe Framework](https://developers.google.com/mediapipe/framework) is the
low-level component used to build efficient on-device machine learning
pipelines, similar to the premade MediaPipe Solutions.
Before using MediaPipe Framework, familiarize yourself with the following key
[Framework
concepts](https://developers.google.com/mediapipe/framework/framework_concepts/overview.md):
* [Packets](https://developers.google.com/mediapipe/framework/framework_concepts/packets.md)
* [Graphs](https://developers.google.com/mediapipe/framework/framework_concepts/graphs.md)
* [Calculators](https://developers.google.com/mediapipe/framework/framework_concepts/calculators.md)
## Community
* [Slack community](https://mediapipe.page.link/joinslack) for MediaPipe
users.
* [Discuss](https://groups.google.com/forum/#!forum/mediapipe) - General
community discussion around MediaPipe.
* [Awesome MediaPipe](https://mediapipe.page.link/awesome-mediapipe) - A
curated list of awesome MediaPipe related frameworks, libraries and
software.
## Contributing
We welcome contributions. Please follow these
[guidelines](https://github.com/google/mediapipe/blob/master/CONTRIBUTING.md).
We use GitHub issues for tracking requests and bugs. Please post questions to
the MediaPipe Stack Overflow with a `mediapipe` tag.
## Resources
### Publications
* [Bringing artworks to life with AR](https://developers.googleblog.com/2021/07/bringing-artworks-to-life-with-ar.html)
in Google Developers Blog
@@ -97,7 +124,8 @@ run code search using
* [SignAll SDK: Sign language interface using MediaPipe is now available for
developers](https://developers.googleblog.com/2021/04/signall-sdk-sign-language-interface-using-mediapipe-now-available.html)
in Google Developers Blog
* [MediaPipe Holistic - Simultaneous Face, Hand and Pose Prediction, on Device](https://ai.googleblog.com/2020/12/mediapipe-holistic-simultaneous-face.html)
* [MediaPipe Holistic - Simultaneous Face, Hand and Pose Prediction, on
Device](https://ai.googleblog.com/2020/12/mediapipe-holistic-simultaneous-face.html)
in Google AI Blog
* [Background Features in Google Meet, Powered by Web ML](https://ai.googleblog.com/2020/10/background-features-in-google-meet.html)
in Google AI Blog
@@ -125,43 +153,6 @@ run code search using
in Google AI Blog
* [MediaPipe: A Framework for Building Perception Pipelines](https://arxiv.org/abs/1906.08172)
## Videos
### Videos
* [YouTube Channel](https://www.youtube.com/c/MediaPipe)
## Events
* [MediaPipe Seattle Meetup, Google Building Waterside, 13 Feb 2020](https://mediapipe.page.link/seattle2020)
* [AI Nextcon 2020, 12-16 Feb 2020, Seattle](http://aisea20.xnextcon.com/)
* [MediaPipe Madrid Meetup, 16 Dec 2019](https://www.meetup.com/Madrid-AI-Developers-Group/events/266329088/)
* [MediaPipe London Meetup, Google 123 Building, 12 Dec 2019](https://www.meetup.com/London-AI-Tech-Talk/events/266329038)
* [ML Conference, Berlin, 11 Dec 2019](https://mlconference.ai/machine-learning-advanced-development/mediapipe-building-real-time-cross-platform-mobile-web-edge-desktop-video-audio-ml-pipelines/)
* [MediaPipe Berlin Meetup, Google Berlin, 11 Dec 2019](https://www.meetup.com/Berlin-AI-Tech-Talk/events/266328794/)
* [The 3rd Workshop on YouTube-8M Large Scale Video Understanding Workshop,
Seoul, Korea ICCV
2019](https://research.google.com/youtube8m/workshop2019/index.html)
* [AI DevWorld 2019, 10 Oct 2019, San Jose, CA](https://aidevworld.com)
* [Google Industry Workshop at ICIP 2019, 24 Sept 2019, Taipei, Taiwan](http://2019.ieeeicip.org/?action=page4&id=14#Google)
([presentation](https://docs.google.com/presentation/d/e/2PACX-1vRIBBbO_LO9v2YmvbHHEt1cwyqH6EjDxiILjuT0foXy1E7g6uyh4CesB2DkkEwlRDO9_lWfuKMZx98T/pub?start=false&loop=false&delayms=3000&slide=id.g556cc1a659_0_5))
* [Open sourced at CVPR 2019, 17~20 June, Long Beach, CA](https://sites.google.com/corp/view/perception-cv4arvr/mediapipe)
## Community
* [Awesome MediaPipe](https://mediapipe.page.link/awesome-mediapipe) - A
curated list of awesome MediaPipe related frameworks, libraries and software
* [Slack community](https://mediapipe.page.link/joinslack) for MediaPipe users
* [Discuss](https://groups.google.com/forum/#!forum/mediapipe) - General
community discussion around MediaPipe
## Alpha disclaimer
MediaPipe is currently in alpha at v0.7. We may be still making breaking API
changes and expect to get to stable APIs by v1.0.
## Contributing
We welcome contributions. Please follow these
[guidelines](https://github.com/google/mediapipe/blob/master/CONTRIBUTING.md).
We use GitHub issues for tracking requests and bugs. Please post questions to
the MediaPipe Stack Overflow with a `mediapipe` tag.
+120 -91
View File
@@ -54,6 +54,76 @@ load("@rules_foreign_cc//:workspace_definitions.bzl", "rules_foreign_cc_dependen
rules_foreign_cc_dependencies()
http_archive(
name = "com_google_protobuf",
sha256 = "87407cd28e7a9c95d9f61a098a53cf031109d451a7763e7dd1253abf8b4df422",
strip_prefix = "protobuf-3.19.1",
urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.19.1.tar.gz"],
patches = [
"@//third_party:com_google_protobuf_fixes.diff"
],
patch_args = [
"-p1",
],
)
# Load Zlib before initializing TensorFlow and the iOS build rules to guarantee
# that the target @zlib//:mini_zlib is available
http_archive(
name = "zlib",
build_file = "@//third_party:zlib.BUILD",
sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1",
strip_prefix = "zlib-1.2.11",
urls = [
"http://mirror.bazel.build/zlib.net/fossils/zlib-1.2.11.tar.gz",
"http://zlib.net/fossils/zlib-1.2.11.tar.gz", # 2017-01-15
],
patches = [
"@//third_party:zlib.diff",
],
patch_args = [
"-p1",
],
)
# iOS basic build deps.
http_archive(
name = "build_bazel_rules_apple",
sha256 = "3e2c7ae0ddd181c4053b6491dad1d01ae29011bc322ca87eea45957c76d3a0c3",
url = "https://github.com/bazelbuild/rules_apple/releases/download/2.1.0/rules_apple.2.1.0.tar.gz",
patches = [
# Bypass checking ios unit test runner when building MP ios applications.
"@//third_party:build_bazel_rules_apple_bypass_test_runner_check.diff"
],
patch_args = [
"-p1",
],
)
load(
"@build_bazel_rules_apple//apple:repositories.bzl",
"apple_rules_dependencies",
)
apple_rules_dependencies()
load(
"@build_bazel_rules_swift//swift:repositories.bzl",
"swift_rules_dependencies",
)
swift_rules_dependencies()
load(
"@build_bazel_rules_swift//swift:extras.bzl",
"swift_rules_extra_dependencies",
)
swift_rules_extra_dependencies()
load(
"@build_bazel_apple_support//lib:repositories.bzl",
"apple_support_dependencies",
)
apple_support_dependencies()
# This is used to select all contents of the archives for CMake-based packages to give CMake access to them.
all_content = """filegroup(name = "all", srcs = glob(["**"]), visibility = ["//visibility:public"])"""
@@ -133,19 +203,6 @@ http_archive(
urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.19.1.tar.gz"],
)
http_archive(
name = "com_google_protobuf",
sha256 = "87407cd28e7a9c95d9f61a098a53cf031109d451a7763e7dd1253abf8b4df422",
strip_prefix = "protobuf-3.19.1",
urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.19.1.tar.gz"],
patches = [
"@//third_party:com_google_protobuf_fixes.diff"
],
patch_args = [
"-p1",
],
)
load("@//third_party/flatbuffers:workspace.bzl", flatbuffers = "repo")
flatbuffers()
@@ -155,6 +212,9 @@ http_archive(
urls = ["https://github.com/google/multichannel-audio-tools/archive/1f6b1319f13282eda6ff1317be13de67f4723860.zip"],
sha256 = "fe346e1aee4f5069c4cbccb88706a9a2b2b4cf98aeb91ec1319be77e07dd7435",
repo_mapping = {"@com_github_glog_glog" : "@com_github_glog_glog_no_gflags"},
# TODO: Fix this in AudioTools directly
patches = ["@//third_party:com_google_audio_tools_fixes.diff"],
patch_args = ["-p1"]
)
http_archive(
@@ -179,6 +239,16 @@ http_archive(
repo_mapping = {"@com_google_glog" : "@com_github_glog_glog_no_gflags"},
)
http_archive(
name = "darts_clone",
build_file = "@//third_party:darts_clone.BUILD",
sha256 = "c97f55d05c98da6fcaf7f9ecc6a6dc6bc5b18b8564465f77abff8879d446491c",
strip_prefix = "darts-clone-e40ce4627526985a7767444b6ed6893ab6ff8983",
urls = [
"https://github.com/s-yata/darts-clone/archive/e40ce4627526985a7767444b6ed6893ab6ff8983.zip",
],
)
http_archive(
name = "org_tensorflow_text",
sha256 = "f64647276f7288d1b1fe4c89581d51404d0ce4ae97f2bcc4c19bd667549adca8",
@@ -196,10 +266,10 @@ http_archive(
http_archive(
name = "com_googlesource_code_re2",
sha256 = "e06b718c129f4019d6e7aa8b7631bee38d3d450dd980246bfaf493eb7db67868",
strip_prefix = "re2-fe4a310131c37f9a7e7f7816fa6ce2a8b27d65a8",
sha256 = "ef516fb84824a597c4d5d0d6d330daedb18363b5a99eda87d027e6bdd9cba299",
strip_prefix = "re2-03da4fc0857c285e3a26782f6bc8931c4c950df4",
urls = [
"https://github.com/google/re2/archive/fe4a310131c37f9a7e7f7816fa6ce2a8b27d65a8.tar.gz",
"https://github.com/google/re2/archive/03da4fc0857c285e3a26782f6bc8931c4c950df4.tar.gz",
],
)
@@ -270,7 +340,7 @@ new_local_repository(
# For local MacOS builds, the path should point to an opencv@3 installation.
# If you edit the path here, you will also need to update the corresponding
# prefix in "opencv_macos.BUILD".
path = "/usr/local",
path = "/usr/local", # e.g. /usr/local/Cellar for HomeBrew
)
new_local_repository(
@@ -305,6 +375,22 @@ http_archive(
url = "https://github.com/opencv/opencv/releases/download/3.2.0/opencv-3.2.0-ios-framework.zip",
)
# Building an opencv.xcframework from the OpenCV 4.5.3 sources is necessary for
# MediaPipe iOS Task Libraries to be supported on arm64(M1) Macs. An
# `opencv.xcframework` archive has not been released and it is recommended to
# build the same from source using a script provided in OpenCV 4.5.0 upwards.
# OpenCV is fixed to version to 4.5.3 since swift support can only be disabled
# from 4.5.3 upwards. This is needed to avoid errors when the library is linked
# in Xcode. Swift support will be added in when the final binary MediaPipe iOS
# Task libraries are built.
http_archive(
name = "ios_opencv_source",
sha256 = "a61e7a4618d353140c857f25843f39b2abe5f451b018aab1604ef0bc34cd23d5",
build_file = "@//third_party:opencv_ios_source.BUILD",
type = "zip",
url = "https://github.com/opencv/opencv/archive/refs/tags/4.5.3.zip",
)
http_archive(
name = "stblib",
strip_prefix = "stb-b42009b3b9d4ca35bc703f5310eedc74f584be58",
@@ -319,63 +405,6 @@ http_archive(
],
)
# Load Zlib before initializing TensorFlow and the iOS build rules to guarantee
# that the target @zlib//:mini_zlib is available
http_archive(
name = "zlib",
build_file = "@//third_party:zlib.BUILD",
sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1",
strip_prefix = "zlib-1.2.11",
urls = [
"http://mirror.bazel.build/zlib.net/fossils/zlib-1.2.11.tar.gz",
"http://zlib.net/fossils/zlib-1.2.11.tar.gz", # 2017-01-15
],
patches = [
"@//third_party:zlib.diff",
],
patch_args = [
"-p1",
],
)
# iOS basic build deps.
http_archive(
name = "build_bazel_rules_apple",
sha256 = "f94e6dddf74739ef5cb30f000e13a2a613f6ebfa5e63588305a71fce8a8a9911",
url = "https://github.com/bazelbuild/rules_apple/releases/download/1.1.3/rules_apple.1.1.3.tar.gz",
patches = [
# Bypass checking ios unit test runner when building MP ios applications.
"@//third_party:build_bazel_rules_apple_bypass_test_runner_check.diff"
],
patch_args = [
"-p1",
],
)
load(
"@build_bazel_rules_apple//apple:repositories.bzl",
"apple_rules_dependencies",
)
apple_rules_dependencies()
load(
"@build_bazel_rules_swift//swift:repositories.bzl",
"swift_rules_dependencies",
)
swift_rules_dependencies()
load(
"@build_bazel_rules_swift//swift:extras.bzl",
"swift_rules_extra_dependencies",
)
swift_rules_extra_dependencies()
load(
"@build_bazel_apple_support//lib:repositories.bzl",
"apple_support_dependencies",
)
apple_support_dependencies()
# More iOS deps.
http_archive(
@@ -455,9 +484,9 @@ http_archive(
)
# TensorFlow repo should always go after the other external dependencies.
# TF on 2023-03-08.
_TENSORFLOW_GIT_COMMIT = "24f7ee636d62e1f8d8330357f8bbd65956dfb84d"
_TENSORFLOW_SHA256 = "7f8a96dd99215c0cdc77230d3dbce43e60102b64a89203ad04aa09b0a187a4bd"
# TF on 2023-05-26.
_TENSORFLOW_GIT_COMMIT = "67d5c561981edc45daf3f9d73ddd1a77963733ca"
_TENSORFLOW_SHA256 = "0c8326285e9cb695313e194b97d388eea70bf8bf5b13e8f0962ca8eed5179ece"
http_archive(
name = "org_tensorflow",
urls = [
@@ -499,8 +528,8 @@ cc_crosstool(name = "crosstool")
# Node dependencies
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "5aae76dced38f784b58d9776e4ab12278bc156a9ed2b1d9fcd3e39921dc88fda",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.7.1/rules_nodejs-5.7.1.tar.gz"],
sha256 = "94070eff79305be05b7699207fbac5d2608054dd53e6109f7d00d923919ff45a",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.2/rules_nodejs-5.8.2.tar.gz"],
)
load("@build_bazel_rules_nodejs//:repositories.bzl", "build_bazel_rules_nodejs_dependencies")
@@ -554,32 +583,32 @@ new_local_repository(
http_archive(
name = "linux_halide",
sha256 = "f62b2914823d6e33d18693f5b74484f274523bf5402ce51988e24393d123b375",
strip_prefix = "Halide-15.0.0-x86-64-linux",
urls = ["https://github.com/halide/Halide/releases/download/v15.0.0/Halide-15.0.0-x86-64-linux-d7651f4b32f9dbd764f243134001f7554378d62d.tar.gz"],
sha256 = "d290fadf3f358c94aacf43c883de6468bb98883e26116920afd491ec0e440cd2",
strip_prefix = "Halide-15.0.1-x86-64-linux",
urls = ["https://github.com/halide/Halide/releases/download/v15.0.1/Halide-15.0.1-x86-64-linux-4c63f1befa1063184c5982b11b6a2cc17d4e5815.tar.gz"],
build_file = "@//third_party:halide.BUILD",
)
http_archive(
name = "macos_x86_64_halide",
sha256 = "3d832aed942080ea89aa832462c68fbb906f3055c440b7b6d35093d7c52f6aab",
strip_prefix = "Halide-15.0.0-x86-64-osx",
urls = ["https://github.com/halide/Halide/releases/download/v15.0.0/Halide-15.0.0-x86-64-osx-d7651f4b32f9dbd764f243134001f7554378d62d.tar.gz"],
sha256 = "48ff073ac1aee5c4aca941a4f043cac64b38ba236cdca12567e09d803594a61c",
strip_prefix = "Halide-15.0.1-x86-64-osx",
urls = ["https://github.com/halide/Halide/releases/download/v15.0.1/Halide-15.0.1-x86-64-osx-4c63f1befa1063184c5982b11b6a2cc17d4e5815.tar.gz"],
build_file = "@//third_party:halide.BUILD",
)
http_archive(
name = "macos_arm_64_halide",
sha256 = "b1fad3c9810122b187303d7031d9e35fb43761f345d18cc4492c00ed5877f641",
strip_prefix = "Halide-15.0.0-arm-64-osx",
urls = ["https://github.com/halide/Halide/releases/download/v15.0.0/Halide-15.0.0-arm-64-osx-d7651f4b32f9dbd764f243134001f7554378d62d.tar.gz"],
sha256 = "db5d20d75fa7463490fcbc79c89f0abec9c23991f787c8e3e831fff411d5395c",
strip_prefix = "Halide-15.0.1-arm-64-osx",
urls = ["https://github.com/halide/Halide/releases/download/v15.0.1/Halide-15.0.1-arm-64-osx-4c63f1befa1063184c5982b11b6a2cc17d4e5815.tar.gz"],
build_file = "@//third_party:halide.BUILD",
)
http_archive(
name = "windows_halide",
sha256 = "5acf6fe161dd375856a2b43f4bb0a32815ba958b0585ee312c44e008aa7b0b64",
strip_prefix = "Halide-15.0.0-x86-64-windows",
urls = ["https://github.com/halide/Halide/releases/download/v15.0.0/Halide-15.0.0-x86-64-windows-d7651f4b32f9dbd764f243134001f7554378d62d.zip"],
sha256 = "61fd049bd75ee918ac6c30d0693aac6048f63f8d1fc4db31001573e58eae8dae",
strip_prefix = "Halide-15.0.1-x86-64-windows",
urls = ["https://github.com/halide/Halide/releases/download/v15.0.1/Halide-15.0.1-x86-64-windows-4c63f1befa1063184c5982b11b6a2cc17d4e5815.zip"],
build_file = "@//third_party:halide.BUILD",
)
+2 -2
View File
@@ -16,11 +16,11 @@ py_binary(
srcs = ["build_java_api_docs.py"],
data = [
"//third_party/android/sdk:api/26.txt",
"//third_party/java/doclava/current:doclava.jar",
"//third_party/java/doclava:doclet.jar",
"//third_party/java/jsilver:jsilver_jar",
],
env = {
"DOCLAVA_JAR": "$(location //third_party/java/doclava/current:doclava.jar)",
"DOCLAVA_JAR": "$(location //third_party/java/doclava:doclet.jar)",
"JSILVER_JAR": "$(location //third_party/java/jsilver:jsilver_jar)",
},
deps = [
+13 -2
View File
@@ -1,4 +1,4 @@
# Copyright 2022 The MediaPipe Authors. All Rights Reserved.
# Copyright 2022 The MediaPipe Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -14,6 +14,7 @@
# ==============================================================================
"""Generate Java reference docs for MediaPipe."""
import pathlib
import shutil
from absl import app
from absl import flags
@@ -41,7 +42,9 @@ def main(_) -> None:
mp_root = pathlib.Path(__file__)
while (mp_root := mp_root.parent).name != 'mediapipe':
# Find the nearest `mediapipe` dir.
pass
if not mp_root.name:
# We've hit the filesystem root - abort.
raise FileNotFoundError('"mediapipe" root not found')
# Find the root from which all packages are relative.
root = mp_root.parent
@@ -51,6 +54,14 @@ def main(_) -> None:
if (mp_root / 'mediapipe').exists():
mp_root = mp_root / 'mediapipe'
# We need to copy this into the tasks dir to ensure we don't leave broken
# links in the generated docs.
old_api_dir = 'java/com/google/mediapipe/framework/image'
shutil.copytree(
mp_root / old_api_dir,
mp_root / 'tasks' / old_api_dir,
dirs_exist_ok=True)
gen_java.gen_java_docs(
package='com.google.mediapipe',
source_path=mp_root / 'tasks/java',
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2022 The MediaPipe Authors. All Rights Reserved.
# Copyright 2022 The MediaPipe Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2022 The MediaPipe Authors. All Rights Reserved.
# Copyright 2022 The MediaPipe Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -1,5 +1,6 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/framework/framework_concepts/graphs_cpp
title: Building Graphs in C++
parent: Graphs
nav_order: 1
@@ -12,6 +13,12 @@ nav_order: 1
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
C++ graph builder is a powerful tool for:
* Building complex graphs
+6
View File
@@ -13,6 +13,12 @@ nav_order: 1
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
Each calculator is a node of a graph. We describe how to create a new
calculator, how to initialize a calculator, how to perform its calculations,
input and output streams, timestamps, and options. Each node in the graph is
@@ -14,6 +14,12 @@ has_toc: false
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
## The basics
### Packet
+6
View File
@@ -13,6 +13,12 @@ nav_order: 5
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
## Overview
MediaPipe supports calculator nodes for GPU compute and rendering, and allows combining multiple GPU nodes, as well as mixing them with CPU based calculator nodes. There exist several GPU APIs on mobile platforms (eg, OpenGL ES, Metal and Vulkan). MediaPipe does not attempt to offer a single cross-API GPU abstraction. Individual nodes can be written using different APIs, allowing them to take advantage of platform specific features when needed.
+6
View File
@@ -13,6 +13,12 @@ nav_order: 2
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
## Graph
A `CalculatorGraphConfig` proto specifies the topology and functionality of a
+6
View File
@@ -13,6 +13,12 @@ nav_order: 3
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
Calculators communicate by sending and receiving packets. Typically a single
packet is sent along each input stream at each input timestamp. A packet can
contain any kind of data, such as a single frame of video or a single integer
@@ -13,6 +13,12 @@ nav_order: 6
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
## Real-time timestamps
MediaPipe calculator graphs are often used to process streams of video or audio
@@ -13,6 +13,12 @@ nav_order: 4
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
## Scheduling mechanics
Data processing in a MediaPipe graph occurs inside processing nodes defined as
+6
View File
@@ -15,6 +15,12 @@ nav_order: 1
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
Please follow instructions below to build Android example apps in the supported
MediaPipe [solutions](../solutions/solutions.md). To learn more about these
example apps, start from [Hello World! on Android](./hello_world_android.md).
@@ -14,6 +14,12 @@ nav_order: 3
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
***Experimental Only***
The MediaPipe Android Archive (AAR) library is a convenient way to use MediaPipe
+4 -8
View File
@@ -1,5 +1,6 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/
title: MediaPipe Android Solutions
parent: MediaPipe on Android
grand_parent: Getting Started
@@ -13,14 +14,9 @@ nav_order: 2
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We are moving to
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation
site for MediaPipe starting April 3, 2023. This content will not be moved to
the new site, but will remain available in the source code repository on an
as-is basis.*
*This notice and web page will be removed on April 3, 2023.*
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
+4 -8
View File
@@ -1,5 +1,6 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/
title: Building MediaPipe Examples
parent: Getting Started
nav_exclude: true
@@ -12,14 +13,9 @@ nav_exclude: true
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We are moving to
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation
site for MediaPipe starting April 3, 2023. This content will not be moved to
the new site, but will remain available in the source code repository on an
as-is basis.*
*This notice and web page will be removed on April 3, 2023.*
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
+6
View File
@@ -15,6 +15,12 @@ nav_order: 5
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
Please follow instructions below to build C++ command-line example apps in the
supported MediaPipe [solutions](../solutions/solutions.md). To learn more about
these example apps, start from [Hello World! in C++](./hello_world_cpp.md).
+9 -3
View File
@@ -13,6 +13,12 @@ nav_order: 9
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
### How to convert ImageFrames and GpuBuffers
The Calculators [`ImageFrameToGpuBufferCalculator`] and
@@ -47,7 +53,7 @@ calculators need only to be *thread-compatible* and not *thread-safe*.
In order to enable one calculator to process multiple inputs in parallel, there
are two possible approaches:
1. Define multiple calulator nodes and dispatch input packets to all nodes.
1. Define multiple calculator nodes and dispatch input packets to all nodes.
2. Make the calculator thread-safe and configure its [`max_in_flight`] setting.
The first approach can be followed using the calculators designed to distribute
@@ -89,12 +95,12 @@ while the application is running:
The first approach has the advantage of leveraging [`CalculatorGraphConfig`]
processing tools such as "subgraphs". The second approach has the advantage of
allowing active calculators and packets to remain in-flight while settings
change. Mediapipe contributors are currently investigating alternative approaches
change. MediaPipe contributors are currently investigating alternative approaches
to achieve both of these advantages.
### How to process realtime input streams
The mediapipe framework can be used to process data streams either online or
The MediaPipe framework can be used to process data streams either online or
offline. For offline processing, packets are pushed into the graph as soon as
calculators are ready to process those packets. For online processing, one
packet for each frame is pushed into the graph as that frame is recorded.
+4 -8
View File
@@ -1,5 +1,6 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/
title: Getting Started
nav_order: 2
has_children: true
@@ -12,13 +13,8 @@ has_children: true
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We are moving to
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation
site for MediaPipe starting April 3, 2023. This content will not be moved to
the new site, but will remain available in the source code repository on an
as-is basis.*
*This notice and web page will be removed on April 3, 2023.*
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
+6
View File
@@ -13,6 +13,12 @@ nav_order: 7
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
## OpenGL ES Support
MediaPipe supports OpenGL ES up to version 3.2 on Android/Linux and up to ES 3.0
@@ -14,6 +14,12 @@ nav_order: 1
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
## Introduction
This codelab uses MediaPipe on an Android device.
+6
View File
@@ -14,6 +14,12 @@ nav_order: 1
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
1. Ensure you have a working version of MediaPipe. See
[installation instructions](./install.md).
+6
View File
@@ -14,6 +14,12 @@ nav_order: 1
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
## Introduction
This codelab uses MediaPipe on an iOS device.
+6
View File
@@ -13,6 +13,12 @@ nav_order: 8
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
## Technical questions
For help with technical or algorithmic questions, visit
+7 -1
View File
@@ -13,6 +13,12 @@ nav_order: 6
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
Note: To interoperate with OpenCV, OpenCV 3.x to 4.1 are preferred. OpenCV
2.x currently works but interoperability support may be deprecated in the
future.
@@ -577,7 +583,7 @@ next section.
Option 1. Follow
[the official Bazel documentation](https://docs.bazel.build/versions/master/install-windows.html)
to install Bazel 5.2.0 or higher.
to install Bazel 6.1.1 or higher.
Option 2. Follow the official
[Bazel documentation](https://docs.bazel.build/versions/master/install-bazelisk.html)
+10 -4
View File
@@ -15,6 +15,12 @@ nav_order: 2
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
Please follow instructions below to build iOS example apps in the supported
MediaPipe [solutions](../solutions/solutions.md). To learn more about these
example apps, start from, start from
@@ -114,8 +120,8 @@ allows you to make use of automatic provisioning (see later section).
To install applications on an iOS device, you need a provisioning profile. There
are two options:
1. Automatic provisioning. This allows you to build and install an app to your
personal device. The provisining profile is managed by Xcode, and has to be
1. Automatic provisioning. This allows you to build and install an app on your
personal device. The provisioning profile is managed by Xcode, and has to be
updated often (it is valid for about a week).
2. Custom provisioning. This uses a provisioning profile associated with an
@@ -180,7 +186,7 @@ Profiles"`. If there are none, generate and download a profile on
Note: if you had previously set up automatic provisioning, you should remove the
`provisioning_profile.mobileprovision` symlink in each example's directory,
since it will take precedence over the common one. You can also overwrite it
with you own profile if you need a different profile for different apps.
with your own profile if you need a different profile for different apps.
1. Open `mediapipe/examples/ios/bundle_id.bzl`, and change the
`BUNDLE_ID_PREFIX` to a prefix associated with your provisioning profile.
@@ -197,7 +203,7 @@ Note: When you ask Xcode to run an app, by default it will use the Debug
configuration. Some of our demos are computationally heavy; you may want to use
the Release configuration for better performance.
Note: Due to an imcoptibility caused by one of our dependencies, MediaPipe
Note: Due to an incompatibility caused by one of our dependencies, MediaPipe
cannot be used for apps running on the iPhone Simulator on Apple Silicon (M1).
Tip: To switch build configuration in Xcode, click on the target menu, choose
+3 -7
View File
@@ -1,5 +1,6 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/
title: MediaPipe in JavaScript
parent: Getting Started
nav_order: 4
@@ -14,12 +15,7 @@ nav_order: 4
**Attention:** *Thanks for your interest in MediaPipe! We are moving to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation
site for MediaPipe starting April 3, 2023. This content will not be moved to
the new site, but will remain available in the source code repository on an
as-is basis.*
*This notice and web page will be removed on April 3, 2023.*
as the primary developer documentation site for MediaPipe starting April 3, 2023.*
----
+8 -1
View File
@@ -1,5 +1,6 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/
title: MediaPipe in Python
parent: Getting Started
has_children: true
@@ -14,6 +15,12 @@ nav_order: 3
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
## Ready-to-use Python Solutions
MediaPipe offers ready-to-use yet customizable Python solutions as a prebuilt
+7 -2
View File
@@ -12,6 +12,11 @@ nav_order: 1
1. TOC
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
The MediaPipe Python framework grants direct access to the core components of
the MediaPipe C++ framework such as Timestamp, Packet, and CalculatorGraph,
@@ -76,7 +81,7 @@ np.ndarray | mp::Matrix | create_ma
Google Proto Message | Google Proto Message | create_proto(proto) | get_proto(packet)
List\[Proto\] | std::vector\<Proto\> | n/a | get_proto_list(packet)
It's not uncommon that users create custom C++ classes and and send those into
It's not uncommon that users create custom C++ classes and send those into
the graphs and calculators. To allow the custom classes to be used in Python
with MediaPipe, you may extend the Packet API for a new data type in the
following steps:
@@ -229,7 +234,7 @@ three stages: initialization and setup, graph run, and graph shutdown.
output_packets.append(mp.packet_getter.get_str(packet)))
```
Option 2. Initialize a CalculatorGraph with with a binary protobuf file, and
Option 2. Initialize a CalculatorGraph with a binary protobuf file, and
observe the output stream(s).
```python
+6
View File
@@ -13,6 +13,12 @@ nav_order: 10
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
## Missing Python binary path
The error message:
+100 -109
View File
@@ -1,94 +1,121 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe
title: Home
nav_order: 1
---
![MediaPipe](https://mediapipe.dev/images/mediapipe_small.png)
--------------------------------------------------------------------------------
## Live ML anywhere
[MediaPipe](https://google.github.io/mediapipe/) offers cross-platform, customizable
ML solutions for live and streaming media.
![accelerated.png](https://mediapipe.dev/images/accelerated_small.png) | ![cross_platform.png](https://mediapipe.dev/images/cross_platform_small.png)
:------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------:
***End-to-End acceleration***: *Built-in fast ML inference and processing accelerated even on common hardware* | ***Build once, deploy anywhere***: *Unified solution works across Android, iOS, desktop/cloud, web and IoT*
![ready_to_use.png](https://mediapipe.dev/images/ready_to_use_small.png) | ![open_source.png](https://mediapipe.dev/images/open_source_small.png)
***Ready-to-use solutions***: *Cutting-edge ML solutions demonstrating full power of the framework* | ***Free and open source***: *Framework and solutions both under Apache 2.0, fully extensible and customizable*
----
**Attention:** *Thanks for your interest in MediaPipe! We are moving to
**Attention:** *We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation
site for MediaPipe starting April 3, 2023.*
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
*This notice and web page will be removed on April 3, 2023.*
![MediaPipe](https://developers.google.com/static/mediapipe/images/home/hero_01_1920.png)
----
**Attention**: MediaPipe Solutions Preview is an early release. [Learn
more](https://developers.google.com/mediapipe/solutions/about#notice).
## ML solutions in MediaPipe
**On-device machine learning for everyone**
Face Detection | Face Mesh | Iris | Hands | Pose | Holistic
:----------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------: | :------:
[![face_detection](https://mediapipe.dev/images/mobile/face_detection_android_gpu_small.gif)](https://google.github.io/mediapipe/solutions/face_detection) | [![face_mesh](https://mediapipe.dev/images/mobile/face_mesh_android_gpu_small.gif)](https://google.github.io/mediapipe/solutions/face_mesh) | [![iris](https://mediapipe.dev/images/mobile/iris_tracking_android_gpu_small.gif)](https://google.github.io/mediapipe/solutions/iris) | [![hand](https://mediapipe.dev/images/mobile/hand_tracking_android_gpu_small.gif)](https://google.github.io/mediapipe/solutions/hands) | [![pose](https://mediapipe.dev/images/mobile/pose_tracking_android_gpu_small.gif)](https://google.github.io/mediapipe/solutions/pose) | [![hair_segmentation](https://mediapipe.dev/images/mobile/holistic_tracking_android_gpu_small.gif)](https://google.github.io/mediapipe/solutions/holistic)
Delight your customers with innovative machine learning features. MediaPipe
contains everything that you need to customize and deploy to mobile (Android,
iOS), web, desktop, edge devices, and IoT, effortlessly.
Hair Segmentation | Object Detection | Box Tracking | Instant Motion Tracking | Objectron | KNIFT
:-------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------: | :---:
[![hair_segmentation](https://mediapipe.dev/images/mobile/hair_segmentation_android_gpu_small.gif)](https://google.github.io/mediapipe/solutions/hair_segmentation) | [![object_detection](https://mediapipe.dev/images/mobile/object_detection_android_gpu_small.gif)](https://google.github.io/mediapipe/solutions/object_detection) | [![box_tracking](https://mediapipe.dev/images/mobile/object_tracking_android_gpu_small.gif)](https://google.github.io/mediapipe/solutions/box_tracking) | [![instant_motion_tracking](https://mediapipe.dev/images/mobile/instant_motion_tracking_android_small.gif)](https://google.github.io/mediapipe/solutions/instant_motion_tracking) | [![objectron](https://mediapipe.dev/images/mobile/objectron_chair_android_gpu_small.gif)](https://google.github.io/mediapipe/solutions/objectron) | [![knift](https://mediapipe.dev/images/mobile/template_matching_android_cpu_small.gif)](https://google.github.io/mediapipe/solutions/knift)
* [See demos](https://goo.gle/mediapipe-studio)
* [Learn more](https://developers.google.com/mediapipe/solutions)
<!-- []() in the first cell is needed to preserve table formatting in GitHub Pages. -->
<!-- Whenever this table is updated, paste a copy to solutions/solutions.md. -->
## Get started
[]() | [Android](https://google.github.io/mediapipe/getting_started/android) | [iOS](https://google.github.io/mediapipe/getting_started/ios) | [C++](https://google.github.io/mediapipe/getting_started/cpp) | [Python](https://google.github.io/mediapipe/getting_started/python) | [JS](https://google.github.io/mediapipe/getting_started/javascript) | [Coral](https://github.com/google/mediapipe/tree/master/mediapipe/examples/coral/README.md)
:---------------------------------------------------------------------------------------- | :-------------------------------------------------------------: | :-----------------------------------------------------: | :-----------------------------------------------------: | :-----------------------------------------------------------: | :-----------------------------------------------------------: | :--------------------------------------------------------------------:
[Face Detection](https://google.github.io/mediapipe/solutions/face_detection) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅
[Face Mesh](https://google.github.io/mediapipe/solutions/face_mesh) | ✅ | ✅ | ✅ | ✅ | ✅ |
[Iris](https://google.github.io/mediapipe/solutions/iris) | ✅ | ✅ | ✅ | | |
[Hands](https://google.github.io/mediapipe/solutions/hands) | ✅ | ✅ | ✅ | ✅ | ✅ |
[Pose](https://google.github.io/mediapipe/solutions/pose) | ✅ | ✅ | ✅ | ✅ | ✅ |
[Holistic](https://google.github.io/mediapipe/solutions/holistic) | ✅ | ✅ | ✅ | ✅ | ✅ |
[Selfie Segmentation](https://google.github.io/mediapipe/solutions/selfie_segmentation) | ✅ | ✅ | ✅ | ✅ | ✅ |
[Hair Segmentation](https://google.github.io/mediapipe/solutions/hair_segmentation) | ✅ | | ✅ | | |
[Object Detection](https://google.github.io/mediapipe/solutions/object_detection) | ✅ | ✅ | ✅ | | | ✅
[Box Tracking](https://google.github.io/mediapipe/solutions/box_tracking) | ✅ | ✅ | ✅ | | |
[Instant Motion Tracking](https://google.github.io/mediapipe/solutions/instant_motion_tracking) | ✅ | | | | |
[Objectron](https://google.github.io/mediapipe/solutions/objectron) | ✅ | | ✅ | ✅ | ✅ |
[KNIFT](https://google.github.io/mediapipe/solutions/knift) | ✅ | | | | |
[AutoFlip](https://google.github.io/mediapipe/solutions/autoflip) | | | ✅ | | |
[MediaSequence](https://google.github.io/mediapipe/solutions/media_sequence) | | | ✅ | | |
[YouTube 8M](https://google.github.io/mediapipe/solutions/youtube_8m) | | | ✅ | | |
You can get started with MediaPipe Solutions by by checking out any of the
developer guides for
[vision](https://developers.google.com/mediapipe/solutions/vision/object_detector),
[text](https://developers.google.com/mediapipe/solutions/text/text_classifier),
and
[audio](https://developers.google.com/mediapipe/solutions/audio/audio_classifier)
tasks. If you need help setting up a development environment for use with
MediaPipe Tasks, check out the setup guides for
[Android](https://developers.google.com/mediapipe/solutions/setup_android), [web
apps](https://developers.google.com/mediapipe/solutions/setup_web), and
[Python](https://developers.google.com/mediapipe/solutions/setup_python).
See also
[MediaPipe Models and Model Cards](https://google.github.io/mediapipe/solutions/models)
for ML models released in MediaPipe.
## Solutions
## Getting started
MediaPipe Solutions provides a suite of libraries and tools for you to quickly
apply artificial intelligence (AI) and machine learning (ML) techniques in your
applications. You can plug these solutions into your applications immediately,
customize them to your needs, and use them across multiple development
platforms. MediaPipe Solutions is part of the MediaPipe [open source
project](https://github.com/google/mediapipe), so you can further customize the
solutions code to meet your application needs.
To start using MediaPipe
[solutions](https://google.github.io/mediapipe/solutions/solutions) with only a few
lines code, see example code and demos in
[MediaPipe in Python](https://google.github.io/mediapipe/getting_started/python) and
[MediaPipe in JavaScript](https://google.github.io/mediapipe/getting_started/javascript).
These libraries and resources provide the core functionality for each MediaPipe
Solution:
To use MediaPipe in C++, Android and iOS, which allow further customization of
the [solutions](https://google.github.io/mediapipe/solutions/solutions) as well as
building your own, learn how to
[install](https://google.github.io/mediapipe/getting_started/install) MediaPipe and
start building example applications in
[C++](https://google.github.io/mediapipe/getting_started/cpp),
[Android](https://google.github.io/mediapipe/getting_started/android) and
[iOS](https://google.github.io/mediapipe/getting_started/ios).
* **MediaPipe Tasks**: Cross-platform APIs and libraries for deploying
solutions. [Learn
more](https://developers.google.com/mediapipe/solutions/tasks).
* **MediaPipe models**: Pre-trained, ready-to-run models for use with each
solution.
The source code is hosted in the
[MediaPipe Github repository](https://github.com/google/mediapipe), and you can
run code search using
[Google Open Source Code Search](https://cs.opensource.google/mediapipe/mediapipe).
These tools let you customize and evaluate solutions:
## Publications
* **MediaPipe Model Maker**: Customize models for solutions with your data.
[Learn more](https://developers.google.com/mediapipe/solutions/model_maker).
* **MediaPipe Studio**: Visualize, evaluate, and benchmark solutions in your
browser. [Learn
more](https://developers.google.com/mediapipe/solutions/studio).
### Legacy solutions
We have ended support for [these MediaPipe Legacy Solutions](https://developers.google.com/mediapipe/solutions/guide#legacy)
as of March 1, 2023. All other MediaPipe Legacy Solutions will be upgraded to
a new MediaPipe Solution. See the [Solutions guide](https://developers.google.com/mediapipe/solutions/guide#legacy)
for details. The [code repository](https://github.com/google/mediapipe/tree/master/mediapipe)
and prebuilt binaries for all MediaPipe Legacy Solutions will continue to be
provided on an as-is basis.
For more on the legacy solutions, see the [documentation](https://github.com/google/mediapipe/tree/master/docs/solutions).
## Framework
To start using MediaPipe Framework, [install MediaPipe
Framework](https://developers.google.com/mediapipe/framework/getting_started/install)
and start building example applications in C++, Android, and iOS.
[MediaPipe Framework](https://developers.google.com/mediapipe/framework) is the
low-level component used to build efficient on-device machine learning
pipelines, similar to the premade MediaPipe Solutions.
Before using MediaPipe Framework, familiarize yourself with the following key
[Framework
concepts](https://developers.google.com/mediapipe/framework/framework_concepts/overview.md):
* [Packets](https://developers.google.com/mediapipe/framework/framework_concepts/packets.md)
* [Graphs](https://developers.google.com/mediapipe/framework/framework_concepts/graphs.md)
* [Calculators](https://developers.google.com/mediapipe/framework/framework_concepts/calculators.md)
## Community
* [Slack community](https://mediapipe.page.link/joinslack) for MediaPipe
users.
* [Discuss](https://groups.google.com/forum/#!forum/mediapipe) - General
community discussion around MediaPipe.
* [Awesome MediaPipe](https://mediapipe.page.link/awesome-mediapipe) - A
curated list of awesome MediaPipe related frameworks, libraries and
software.
## Contributing
We welcome contributions. Please follow these
[guidelines](https://github.com/google/mediapipe/blob/master/CONTRIBUTING.md).
We use GitHub issues for tracking requests and bugs. Please post questions to
the MediaPipe Stack Overflow with a `mediapipe` tag.
## Resources
### Publications
* [Bringing artworks to life with AR](https://developers.googleblog.com/2021/07/bringing-artworks-to-life-with-ar.html)
in Google Developers Blog
@@ -97,7 +124,8 @@ run code search using
* [SignAll SDK: Sign language interface using MediaPipe is now available for
developers](https://developers.googleblog.com/2021/04/signall-sdk-sign-language-interface-using-mediapipe-now-available.html)
in Google Developers Blog
* [MediaPipe Holistic - Simultaneous Face, Hand and Pose Prediction, on Device](https://ai.googleblog.com/2020/12/mediapipe-holistic-simultaneous-face.html)
* [MediaPipe Holistic - Simultaneous Face, Hand and Pose Prediction, on
Device](https://ai.googleblog.com/2020/12/mediapipe-holistic-simultaneous-face.html)
in Google AI Blog
* [Background Features in Google Meet, Powered by Web ML](https://ai.googleblog.com/2020/10/background-features-in-google-meet.html)
in Google AI Blog
@@ -125,43 +153,6 @@ run code search using
in Google AI Blog
* [MediaPipe: A Framework for Building Perception Pipelines](https://arxiv.org/abs/1906.08172)
## Videos
### Videos
* [YouTube Channel](https://www.youtube.com/c/MediaPipe)
## Events
* [MediaPipe Seattle Meetup, Google Building Waterside, 13 Feb 2020](https://mediapipe.page.link/seattle2020)
* [AI Nextcon 2020, 12-16 Feb 2020, Seattle](http://aisea20.xnextcon.com/)
* [MediaPipe Madrid Meetup, 16 Dec 2019](https://www.meetup.com/Madrid-AI-Developers-Group/events/266329088/)
* [MediaPipe London Meetup, Google 123 Building, 12 Dec 2019](https://www.meetup.com/London-AI-Tech-Talk/events/266329038)
* [ML Conference, Berlin, 11 Dec 2019](https://mlconference.ai/machine-learning-advanced-development/mediapipe-building-real-time-cross-platform-mobile-web-edge-desktop-video-audio-ml-pipelines/)
* [MediaPipe Berlin Meetup, Google Berlin, 11 Dec 2019](https://www.meetup.com/Berlin-AI-Tech-Talk/events/266328794/)
* [The 3rd Workshop on YouTube-8M Large Scale Video Understanding Workshop,
Seoul, Korea ICCV
2019](https://research.google.com/youtube8m/workshop2019/index.html)
* [AI DevWorld 2019, 10 Oct 2019, San Jose, CA](https://aidevworld.com)
* [Google Industry Workshop at ICIP 2019, 24 Sept 2019, Taipei, Taiwan](http://2019.ieeeicip.org/?action=page4&id=14#Google)
([presentation](https://docs.google.com/presentation/d/e/2PACX-1vRIBBbO_LO9v2YmvbHHEt1cwyqH6EjDxiILjuT0foXy1E7g6uyh4CesB2DkkEwlRDO9_lWfuKMZx98T/pub?start=false&loop=false&delayms=3000&slide=id.g556cc1a659_0_5))
* [Open sourced at CVPR 2019, 17~20 June, Long Beach, CA](https://sites.google.com/corp/view/perception-cv4arvr/mediapipe)
## Community
* [Awesome MediaPipe](https://mediapipe.page.link/awesome-mediapipe) - A
curated list of awesome MediaPipe related frameworks, libraries and software
* [Slack community](https://mediapipe.page.link/joinslack) for MediaPipe users
* [Discuss](https://groups.google.com/forum/#!forum/mediapipe) - General
community discussion around MediaPipe
## Alpha disclaimer
MediaPipe is currently in alpha at v0.7. We may be still making breaking API
changes and expect to get to stable APIs by v1.0.
## Contributing
We welcome contributions. Please follow these
[guidelines](https://github.com/google/mediapipe/blob/master/CONTRIBUTING.md).
We use GitHub issues for tracking requests and bugs. Please post questions to
the MediaPipe Stack Overflow with a `mediapipe` tag.
+1 -1
View File
@@ -1,3 +1,3 @@
MediaPipe
=====================================
Please see https://docs.mediapipe.dev.
Please see https://developers.google.com/mediapipe/
+4 -5
View File
@@ -1,7 +1,8 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/solutions/guide#legacy
title: AutoFlip (Saliency-aware Video Cropping)
parent: Solutions
parent: MediaPipe Legacy Solutions
nav_order: 14
---
@@ -20,12 +21,10 @@ nav_order: 14
**Attention:** *Thank you for your interest in MediaPipe Solutions.
We have ended support for this MediaPipe Legacy Solution as of March 1, 2023.
For more information, see the new
For more information, see the
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/guide#legacy)
site.*
*This notice and web page will be removed on April 3, 2023.*
----
## Overview
+4 -5
View File
@@ -1,7 +1,8 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/solutions/guide#legacy
title: Box Tracking
parent: Solutions
parent: MediaPipe Legacy Solutions
nav_order: 10
---
@@ -20,12 +21,10 @@ nav_order: 10
**Attention:** *Thank you for your interest in MediaPipe Solutions.
We have ended support for this MediaPipe Legacy Solution as of March 1, 2023.
For more information, see the new
For more information, see the
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/guide#legacy)
site.*
*This notice and web page will be removed on April 3, 2023.*
----
## Overview
+6 -7
View File
@@ -1,7 +1,8 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/solutions/vision/face_detector/
title: Face Detection
parent: Solutions
parent: MediaPipe Legacy Solutions
nav_order: 1
---
@@ -19,13 +20,11 @@ nav_order: 1
---
**Attention:** *Thank you for your interest in MediaPipe Solutions.
As of March 1, 2023, this solution is planned to be upgraded to a new MediaPipe
Solution. For more information, see the new
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/guide#legacy)
As of May 10, 2023, this solution was upgraded to a new MediaPipe
Solution. For more information, see the
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/vision/face_detector)
site.*
*This notice and web page will be removed on April 3, 2023.*
----
## Overview
+6 -7
View File
@@ -1,7 +1,8 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/solutions/vision/face_landmarker/
title: Face Mesh
parent: Solutions
parent: MediaPipe Legacy Solutions
nav_order: 2
---
@@ -19,13 +20,11 @@ nav_order: 2
---
**Attention:** *Thank you for your interest in MediaPipe Solutions.
As of March 1, 2023, this solution is planned to be upgraded to a new MediaPipe
Solution. For more information, see the new
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/guide#legacy)
As of May 10, 2023, this solution was upgraded to a new MediaPipe
Solution. For more information, see the
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/vision/face_landmarker)
site.*
*This notice and web page will be removed on April 3, 2023.*
----
## Overview
+6 -7
View File
@@ -1,7 +1,8 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/solutions/vision/image_segmenter/
title: Hair Segmentation
parent: Solutions
parent: MediaPipe Legacy Solutions
nav_order: 8
---
@@ -19,13 +20,11 @@ nav_order: 8
---
**Attention:** *Thank you for your interest in MediaPipe Solutions.
As of March 1, 2023, this solution is planned to be upgraded to a new MediaPipe
Solution. For more information, see the new
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/guide#legacy)
As of April 4, 2023, this solution was upgraded to a new MediaPipe
Solution. For more information, see the
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/vision/image_segmenter/)
site.*
*This notice and web page will be removed on April 3, 2023.*
----
![hair_segmentation_android_gpu_gif](https://mediapipe.dev/images/mobile/hair_segmentation_android_gpu.gif)
+6 -7
View File
@@ -1,7 +1,8 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/solutions/vision/hand_landmarker
title: Hands
parent: Solutions
parent: MediaPipe Legacy Solutions
nav_order: 4
---
@@ -19,13 +20,11 @@ nav_order: 4
---
**Attention:** *Thank you for your interest in MediaPipe Solutions.
As of March 1, 2023, this solution is planned to be upgraded to a new MediaPipe
Solution. For more information, see the new
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/guide#legacy)
As of March 1, 2023, this solution was upgraded to a new MediaPipe
Solution. For more information, see the
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/vision/hand_landmarker)
site.*
*This notice and web page will be removed on April 3, 2023.*
----
## Overview
+5 -6
View File
@@ -1,7 +1,8 @@
---
layout: default
layout: forward
target: https://github.com/google/mediapipe/blob/master/docs/solutions/holistic.md
title: Holistic
parent: Solutions
parent: MediaPipe Legacy Solutions
nav_order: 6
---
@@ -20,12 +21,10 @@ nav_order: 6
**Attention:** *Thank you for your interest in MediaPipe Solutions.
As of March 1, 2023, this solution is planned to be upgraded to a new MediaPipe
Solution. For more information, see the new
Solution. For more information, see the
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/guide#legacy)
site.*
*This notice and web page will be removed on April 3, 2023.*
----
## Overview
@@ -76,7 +75,7 @@ previous frame as a guide to the object region on the current one. However,
during fast movements, the tracker can lose the target, which requires the
detector to re-localize it in the image. MediaPipe Holistic uses
[pose](./pose.md) prediction (on every frame) as an additional ROI prior to
reduce the response time of the pipeline when reacting to fast movements. This
reducing the response time of the pipeline when reacting to fast movements. This
also enables the model to retain semantic consistency across the body and its
parts by preventing a mixup between left and right hands or body parts of one
person in the frame with another.
+4 -5
View File
@@ -1,7 +1,8 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/solutions/guide#legacy
title: Instant Motion Tracking
parent: Solutions
parent: MediaPipe Legacy Solutions
nav_order: 11
---
@@ -20,12 +21,10 @@ nav_order: 11
**Attention:** *Thank you for your interest in MediaPipe Solutions.
We have ended support for this MediaPipe Legacy Solution as of March 1, 2023.
For more information, see the new
For more information, see the
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/guide#legacy)
site.*
*This notice and web page will be removed on April 3, 2023.*
----
## Overview
+6 -7
View File
@@ -1,7 +1,8 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/solutions/vision/face_landmarker/
title: Iris
parent: Solutions
parent: MediaPipe Legacy Solutions
nav_order: 3
---
@@ -19,13 +20,11 @@ nav_order: 3
---
**Attention:** *Thank you for your interest in MediaPipe Solutions.
As of March 1, 2023, this solution is planned to be upgraded to a new MediaPipe
Solution. For more information, see the new
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/guide#legacy)
As of May 10, 2023, this solution was upgraded to a new MediaPipe
Solution. For more information, see the
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/vision/face_landmarker)
site.*
*This notice and web page will be removed on April 3, 2023.*
----
## Overview
+4 -5
View File
@@ -1,7 +1,8 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/solutions/guide#legacy
title: KNIFT (Template-based Feature Matching)
parent: Solutions
parent: MediaPipe Legacy Solutions
nav_order: 13
---
@@ -20,12 +21,10 @@ nav_order: 13
**Attention:** *Thank you for your interest in MediaPipe Solutions.
We have ended support for this MediaPipe Legacy Solution as of March 1, 2023.
For more information, see the new
For more information, see the
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/guide#legacy)
site.*
*This notice and web page will be removed on April 3, 2023.*
----
## Overview
+3 -4
View File
@@ -1,7 +1,8 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/solutions/guide#legacy
title: Dataset Preparation with MediaSequence
parent: Solutions
parent: MediaPipe Legacy Solutions
nav_order: 15
---
@@ -24,8 +25,6 @@ For more information, see the new
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/guide#legacy)
site.*
*This notice and web page will be removed on April 3, 2023.*
----
## Overview
+5 -4
View File
@@ -1,7 +1,8 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/solutions/guide#legacy
title: Models and Model Cards
parent: Solutions
parent: MediaPipe Legacy Solutions
nav_order: 30
---
@@ -22,8 +23,6 @@ MediaPipe Legacy Solutions will continue to be provided on an as-is basis.
We encourage you to check out the new MediaPipe Solutions at:
[https://developers.google.com/mediapipe/solutions](https://developers.google.com/mediapipe/solutions)*
*This notice and web page will be removed on April 3, 2023.*
----
### [Face Detection](https://google.github.io/mediapipe/solutions/face_detection)
@@ -108,6 +107,8 @@ one over the other.
* [TFLite model](https://storage.googleapis.com/mediapipe-assets/ssdlite_object_detection.tflite)
* [TFLite model quantized for EdgeTPU/Coral](https://github.com/google/mediapipe/tree/master/mediapipe/examples/coral/models/object-detector-quantized_edgetpu.tflite)
* [TensorFlow model](https://storage.googleapis.com/mediapipe-assets/object_detection_saved_model/archive.zip)
* [Model information](https://storage.googleapis.com/mediapipe-assets/object_detection_saved_model/README.md)
### [Objectron](https://google.github.io/mediapipe/solutions/objectron)
+8 -9
View File
@@ -1,7 +1,8 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/solutions/vision/object_detector/
title: Object Detection
parent: Solutions
parent: MediaPipe Legacy Solutions
nav_order: 9
---
@@ -19,13 +20,11 @@ nav_order: 9
---
**Attention:** *Thank you for your interest in MediaPipe Solutions.
As of March 1, 2023, this solution is planned to be upgraded to a new MediaPipe
Solution. For more information, see the new
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/guide#legacy)
As of March 1, 2023, this solution was upgraded to a new MediaPipe
Solution. For more information, see the
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/vision/object_detector/)
site.*
*This notice and web page will be removed on April 3, 2023.*
----
![object_detection_android_gpu.gif](https://mediapipe.dev/images/mobile/object_detection_android_gpu.gif)
@@ -118,9 +117,9 @@ on how to build MediaPipe examples.
* With a TensorFlow Model
This uses the
[TensorFlow model](https://github.com/google/mediapipe/tree/master/mediapipe/models/object_detection_saved_model)
[TensorFlow model](https://storage.googleapis.com/mediapipe-assets/object_detection_saved_model/archive.zip)
( see also
[model info](https://github.com/google/mediapipe/tree/master/mediapipe/models/object_detection_saved_model/README.md)),
[model info](https://storage.googleapis.com/mediapipe-assets/object_detection_saved_model/README.md)),
and the pipeline is implemented in this
[graph](https://github.com/google/mediapipe/tree/master/mediapipe/graphs/object_detection/object_detection_mobile_cpu.pbtxt).
@@ -0,0 +1,89 @@
---
layout: forward
target: https://developers.google.com/mediapipe/solutions/vision/object_detector
title: Object Detection
parent: MediaPipe Legacy Solutions
nav_order: 9
---
# MediaPipe Object Detection
{: .no_toc }
<details close markdown="block">
<summary>
Table of contents
</summary>
{: .text-delta }
1. TOC
{:toc}
</details>
---
**Attention:** *Thank you for your interest in MediaPipe Solutions.
As of March 1, 2023, this solution was upgraded to a new MediaPipe
Solution. For more information, see the
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/vision/object_detector)
site.*
----
### TensorFlow model
The model is trained on [MSCOCO 2014](http://cocodataset.org) dataset using [TensorFlow Object Detection API](https://github.com/tensorflow/models/tree/master/research/object_detection). It is a MobileNetV2-based SSD model with 0.5 depth multiplier. Detailed training configuration is in the provided `pipeline.config`. The model is a relatively compact model which has `0.171 mAP` to achieve real-time performance on mobile devices. You can compare it with other models from the [TensorFlow detection model zoo](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf1_detection_zoo.md).
### TFLite model
The TFLite model is converted from the TensorFlow above. The steps needed to convert the model are similar to [this tutorial](https://medium.com/tensorflow/training-and-serving-a-realtime-mobile-object-detector-in-30-minutes-with-cloud-tpus-b78971cf1193) with minor modifications. Assuming now we have a trained TensorFlow model which includes the checkpoint files and the training configuration file, for example the files provided in this repo:
* `model.ckpt.index`
* `model.ckpt.meta`
* `model.ckpt.data-00000-of-00001`
* `pipeline.config`
Make sure you have installed these [python libraries](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf1.md). Then to get the frozen graph, run the `export_tflite_ssd_graph.py` script from the `models/research` directory with this command:
```bash
$ PATH_TO_MODEL=path/to/the/model
$ bazel run object_detection:export_tflite_ssd_graph -- \
--pipeline_config_path ${PATH_TO_MODEL}/pipeline.config \
--trained_checkpoint_prefix ${PATH_TO_MODEL}/model.ckpt \
--output_directory ${PATH_TO_MODEL} \
--add_postprocessing_op=False
```
The exported model contains two files:
* `tflite_graph.pb`
* `tflite_graph.pbtxt`
The difference between this step and the one in [the tutorial](https://medium.com/tensorflow/training-and-serving-a-realtime-mobile-object-detector-in-30-minutes-with-cloud-tpus-b78971cf1193) is that we set `add_postprocessing_op` to False. In MediaPipe, we have provided all the calculators needed for post-processing such that we can exclude the custom TFLite ops for post-processing in the original graph, e.g., non-maximum suppression. This enables the flexibility to integrate with different post-processing algorithms and implementations.
Optional: You can install and use the [graph tool](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tools/graph_transforms) to inspect the input/output of the exported model:
```bash
$ bazel run graph_transforms:summarize_graph -- \
--in_graph=${PATH_TO_MODEL}/tflite_graph.pb
```
You should be able to see the input image size of the model is 320x320 and the outputs of the model are:
* `raw_outputs/box_encodings`
* `raw_outputs/class_predictions`
The last step is to convert the model to TFLite. You can look at [this guide](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/r1/convert/cmdline_examples.md) for more detail. For this example, you just need to run:
```bash
$ tflite_convert -- \
--graph_def_file=${PATH_TO_MODEL}/tflite_graph.pb \
--output_file=${PATH_TO_MODEL}/model.tflite \
--input_format=TENSORFLOW_GRAPHDEF \
--output_format=TFLITE \
--inference_type=FLOAT \
--input_shapes=1,320,320,3 \
--input_arrays=normalized_input_image_tensor \
--output_arrays=raw_outputs/box_encodings,raw_outputs/class_predictions
```
Now you have the TFLite model `model.tflite` ready to use with MediaPipe Object Detection graphs. Please see the examples for more detail.
+4 -5
View File
@@ -1,7 +1,8 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/solutions/guide#legacy
title: Objectron (3D Object Detection)
parent: Solutions
parent: MediaPipe Legacy Solutions
nav_order: 12
---
@@ -20,12 +21,10 @@ nav_order: 12
**Attention:** *Thank you for your interest in MediaPipe Solutions.
We have ended support for this MediaPipe Legacy Solution as of March 1, 2023.
For more information, see the new
For more information, see the
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/guide#legacy)
site.*
*This notice and web page will be removed on April 3, 2023.*
----
## Overview
+8 -8
View File
@@ -1,7 +1,8 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/solutions/vision/pose_landmarker/
title: Pose
parent: Solutions
parent: MediaPipe Legacy Solutions
has_children: true
has_toc: false
nav_order: 5
@@ -21,13 +22,11 @@ nav_order: 5
---
**Attention:** *Thank you for your interest in MediaPipe Solutions.
As of March 1, 2023, this solution is planned to be upgraded to a new MediaPipe
Solution. For more information, see the new
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/guide#legacy)
As of May 10, 2023, this solution was upgraded to a new MediaPipe
Solution. For more information, see the
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/vision/pose_landmarker)
site.*
*This notice and web page will be removed on April 3, 2023.*
----
## Overview
@@ -144,7 +143,7 @@ The landmark model in MediaPipe Pose predicts the location of 33 pose landmarks
:----------------------------------------------------------------------------------------------: |
*Fig 4. 33 pose landmarks.* |
Optionally, MediaPipe Pose can predicts a full-body
Optionally, MediaPipe Pose can predict a full-body
[segmentation mask](#segmentation_mask) represented as a two-class segmentation
(human or background).
@@ -269,6 +268,7 @@ Supported configuration options:
```python
import cv2
import mediapipe as mp
import numpy as np
mp_drawing = mp.solutions.drawing_utils
mp_drawing_styles = mp.solutions.drawing_styles
mp_pose = mp.solutions.pose
+6 -7
View File
@@ -1,8 +1,9 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/solutions/vision/pose_landmarker/
title: Pose Classification
parent: Pose
grand_parent: Solutions
grand_parent: MediaPipe Legacy Solutions
nav_order: 1
---
@@ -20,13 +21,11 @@ nav_order: 1
---
**Attention:** *Thank you for your interest in MediaPipe Solutions.
As of March 1, 2023, this solution is planned to be upgraded to a new MediaPipe
Solution. For more information, see the new
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/guide#legacy)
As of May 10, 2023, this solution was upgraded to a new MediaPipe
Solution. For more information, see the
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/vision/pose_landmarker/)
site.*
*This notice and web page will be removed on April 3, 2023.*
----
## Overview
+6 -7
View File
@@ -1,7 +1,8 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/solutions/vision/image_segmenter/
title: Selfie Segmentation
parent: Solutions
parent: MediaPipe Legacy Solutions
nav_order: 7
---
@@ -19,13 +20,11 @@ nav_order: 7
---
**Attention:** *Thank you for your interest in MediaPipe Solutions.
As of March 1, 2023, this solution is planned to be upgraded to a new MediaPipe
Solution. For more information, see the new
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/guide#legacy)
As of April 4, 2023, this solution was upgraded to a new MediaPipe
Solution. For more information, see the
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/vision/image_segmenter/)
site.*
*This notice and web page will be removed on April 3, 2023.*
----
## Overview
+5 -7
View File
@@ -1,20 +1,20 @@
---
layout: default
title: Solutions
layout: forward
target: https://developers.google.com/mediapipe/solutions/guide#legacy
title: MediaPipe Legacy Solutions
nav_order: 3
has_children: true
has_toc: false
---
# Solutions
# MediaPipe Legacy Solutions
{: .no_toc }
1. TOC
{:toc}
---
**Attention:** *Thank you for your interest in MediaPipe Solutions. We have
ended support for
**Attention:** *We have ended support for
[these MediaPipe Legacy Solutions](https://developers.google.com/mediapipe/solutions/guide#legacy)
as of March 1, 2023. All other
[MediaPipe Legacy Solutions will be upgraded](https://developers.google.com/mediapipe/solutions/guide#legacy)
@@ -25,8 +25,6 @@ be provided on an as-is basis. We encourage you to check out the new MediaPipe
Solutions at:
[https://developers.google.com/mediapipe/solutions](https://developers.google.com/mediapipe/solutions)*
*This notice and web page will be removed on June 1, 2023.*
----
MediaPipe offers open source cross-platform, customizable ML solutions for live
+4 -5
View File
@@ -1,7 +1,8 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/solutions/guide#legacy
title: YouTube-8M Feature Extraction and Model Inference
parent: Solutions
parent: MediaPipe Legacy Solutions
nav_order: 16
---
@@ -20,12 +21,10 @@ nav_order: 16
**Attention:** *Thank you for your interest in MediaPipe Solutions.
We have ended support for this MediaPipe Legacy Solution as of March 1, 2023.
For more information, see the new
For more information, see the
[MediaPipe Solutions](https://developers.google.com/mediapipe/solutions/guide#legacy)
site.*
*This notice and web page will be removed on April 3, 2023.*
----
MediaPipe is a useful and general framework for media processing that can assist
+8 -1
View File
@@ -1,5 +1,6 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/
title: Performance Benchmarking
parent: Tools
nav_order: 3
@@ -12,6 +13,12 @@ nav_order: 3
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
---
*Coming soon.*
Future mediapipe releases will include tools for visualizing and analysing the
+8 -1
View File
@@ -1,5 +1,6 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/
title: Tools
nav_order: 4
has_children: true
@@ -11,3 +12,9 @@ has_children: true
1. TOC
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
+8 -1
View File
@@ -1,5 +1,6 @@
---
layout: default
layout: forward
target: https://developers.google.com/mediapipe/
title: Tracing and Profiling
parent: Tools
nav_order: 2
@@ -12,6 +13,12 @@ nav_order: 2
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
----
The MediaPipe framework includes a built-in tracer and profiler. The tracer
records various timing events related to packet processing, including the start
and end time of each Calculator::Process call. The tracer writes trace log files
+6
View File
@@ -13,6 +13,12 @@ nav_order: 1
{:toc}
---
**Attention:** *Thanks for your interest in MediaPipe! We have moved to
[https://developers.google.com/mediapipe](https://developers.google.com/mediapipe)
as the primary developer documentation site for MediaPipe as of April 3, 2023.*
---
To help users understand the structure of their calculator graphs and to
understand the overall behavior of their machine learning inference pipelines,
we have built the [MediaPipe Visualizer](https://viz.mediapipe.dev/)
+1
View File
@@ -141,6 +141,7 @@ config_setting(
"ios_armv7",
"ios_arm64",
"ios_arm64e",
"ios_sim_arm64",
]
]
@@ -26,10 +26,11 @@
namespace mediapipe {
namespace {
static bool SafeMultiply(int x, int y, int* result) {
static_assert(sizeof(int64) >= 2 * sizeof(int),
static_assert(sizeof(int64_t) >= 2 * sizeof(int),
"Unable to detect overflow after multiplication");
const int64 big = static_cast<int64>(x) * static_cast<int64>(y);
if (big > static_cast<int64>(INT_MIN) && big < static_cast<int64>(INT_MAX)) {
const int64_t big = static_cast<int64_t>(x) * static_cast<int64_t>(y);
if (big > static_cast<int64_t>(INT_MIN) &&
big < static_cast<int64_t>(INT_MAX)) {
if (result != nullptr) *result = static_cast<int>(big);
return true;
} else {
@@ -182,12 +182,12 @@ class SpectrogramCalculator : public CalculatorBase {
int frame_duration_samples_;
int frame_overlap_samples_;
// How many samples we've been passed, used for checking input time stamps.
int64 cumulative_input_samples_;
int64_t cumulative_input_samples_;
// How many frames we've emitted, used for calculating output time stamps.
int64 cumulative_completed_frames_;
int64_t cumulative_completed_frames_;
// How many frames were emitted last, used for estimating the timestamp on
// Close when use_local_timestamp_ is true;
int64 last_completed_frames_;
int64_t last_completed_frames_;
Timestamp initial_input_timestamp_;
int num_input_channels_;
// How many frequency bins we emit (=N_FFT/2 + 1).
@@ -433,9 +433,9 @@ absl::Status SpectrogramCalculator::ProcessVectorToOutput(
absl::Status SpectrogramCalculator::ProcessVector(const Matrix& input_stream,
CalculatorContext* cc) {
switch (output_type_) {
// These blocks deliberately ignore clang-format to preserve the
// "silhouette" of the different cases.
// clang-format off
// These blocks deliberately ignore clang-format to preserve the
// "silhouette" of the different cases.
// clang-format off
case SpectrogramCalculatorOptions::COMPLEX: {
return ProcessVectorToOutput(
input_stream,
@@ -92,8 +92,8 @@ class SpectrogramCalculatorTest
.cos()
.transpose();
}
int64 input_timestamp = round(packet_start_time_seconds *
Timestamp::kTimestampUnitsPerSecond);
int64_t input_timestamp = round(packet_start_time_seconds *
Timestamp::kTimestampUnitsPerSecond);
AppendInputPacket(packet_data, input_timestamp);
total_num_input_samples += packet_size_samples;
}
@@ -116,8 +116,8 @@ class SpectrogramCalculatorTest
double packet_start_time_seconds =
kInitialTimestampOffsetMicroseconds * 1e-6 +
total_num_input_samples / input_sample_rate_;
int64 input_timestamp = round(packet_start_time_seconds *
Timestamp::kTimestampUnitsPerSecond);
int64_t input_timestamp = round(packet_start_time_seconds *
Timestamp::kTimestampUnitsPerSecond);
std::unique_ptr<Matrix> impulse(
new Matrix(Matrix::Zero(1, packet_sizes_samples[i])));
(*impulse)(0, impulse_offsets_samples[i]) = 1.0;
@@ -157,8 +157,8 @@ class SpectrogramCalculatorTest
.cos()
.transpose();
}
int64 input_timestamp = round(packet_start_time_seconds *
Timestamp::kTimestampUnitsPerSecond);
int64_t input_timestamp = round(packet_start_time_seconds *
Timestamp::kTimestampUnitsPerSecond);
AppendInputPacket(packet_data, input_timestamp);
total_num_input_samples += packet_size_samples;
}
@@ -218,7 +218,7 @@ class SpectrogramCalculatorTest
const double expected_timestamp_seconds =
packet_timestamp_offset_seconds +
cumulative_output_frames * frame_step_seconds;
const int64 expected_timestamp_ticks =
const int64_t expected_timestamp_ticks =
expected_timestamp_seconds * Timestamp::kTimestampUnitsPerSecond;
EXPECT_EQ(expected_timestamp_ticks, packet.Timestamp().Value());
// Accept the timestamp of the first packet as the baseline for checking
@@ -54,7 +54,8 @@ TEST_F(StabilizedLogCalculatorTest, BasicOperation) {
std::vector<Matrix> input_data_matrices;
for (int input_packet = 0; input_packet < kNumPackets; ++input_packet) {
const int64 timestamp = input_packet * Timestamp::kTimestampUnitsPerSecond;
const int64_t timestamp =
input_packet * Timestamp::kTimestampUnitsPerSecond;
Matrix input_data_matrix =
Matrix::Random(kNumChannels, kNumSamples).array().abs();
input_data_matrices.push_back(input_data_matrix);
@@ -80,7 +81,8 @@ TEST_F(StabilizedLogCalculatorTest, OutputScaleWorks) {
std::vector<Matrix> input_data_matrices;
for (int input_packet = 0; input_packet < kNumPackets; ++input_packet) {
const int64 timestamp = input_packet * Timestamp::kTimestampUnitsPerSecond;
const int64_t timestamp =
input_packet * Timestamp::kTimestampUnitsPerSecond;
Matrix input_data_matrix =
Matrix::Random(kNumChannels, kNumSamples).array().abs();
input_data_matrices.push_back(input_data_matrix);
@@ -109,7 +109,7 @@ class TimeSeriesFramerCalculator : public CalculatorBase {
// Returns the timestamp of a sample on a base, which is usually the time
// stamp of a packet.
Timestamp CurrentSampleTimestamp(const Timestamp& timestamp_base,
int64 number_of_samples) {
int64_t number_of_samples) {
return timestamp_base + round(number_of_samples / sample_rate_ *
Timestamp::kTimestampUnitsPerSecond);
}
@@ -118,10 +118,10 @@ class TimeSeriesFramerCalculator : public CalculatorBase {
// emitted.
int next_frame_step_samples() const {
// All numbers are in input samples.
const int64 current_output_frame_start = static_cast<int64>(
const int64_t current_output_frame_start = static_cast<int64_t>(
round(cumulative_output_frames_ * average_frame_step_samples_));
CHECK_EQ(current_output_frame_start, cumulative_completed_samples_);
const int64 next_output_frame_start = static_cast<int64>(
const int64_t next_output_frame_start = static_cast<int64_t>(
round((cumulative_output_frames_ + 1) * average_frame_step_samples_));
return next_output_frame_start - current_output_frame_start;
}
@@ -134,11 +134,11 @@ class TimeSeriesFramerCalculator : public CalculatorBase {
// emulate_fractional_frame_overlap is true.
double average_frame_step_samples_;
int samples_still_to_drop_;
int64 cumulative_output_frames_;
int64_t cumulative_output_frames_;
// "Completed" samples are samples that are no longer needed because
// the framer has completely stepped past them (taking into account
// any overlap).
int64 cumulative_completed_samples_;
int64_t cumulative_completed_samples_;
Timestamp initial_input_timestamp_;
// The current timestamp is updated along with the incoming packets.
Timestamp current_timestamp_;
@@ -49,7 +49,7 @@ class TimeSeriesFramerCalculatorTest
// Returns a float value with the channel and timestamp separated by
// an order of magnitude, for easy parsing by humans.
float TestValue(int64 timestamp_in_microseconds, int channel) {
float TestValue(int64_t timestamp_in_microseconds, int channel) {
return timestamp_in_microseconds + channel / 10.0;
}
@@ -59,7 +59,7 @@ class TimeSeriesFramerCalculatorTest
auto matrix = new Matrix(num_channels, num_samples);
for (int c = 0; c < num_channels; ++c) {
for (int i = 0; i < num_samples; ++i) {
int64 timestamp = time_series_util::SecondsToSamples(
int64_t timestamp = time_series_util::SecondsToSamples(
starting_timestamp_seconds + i / input_sample_rate_,
Timestamp::kTimestampUnitsPerSecond);
(*matrix)(c, i) = TestValue(timestamp, c);
@@ -429,7 +429,7 @@ class TimeSeriesFramerCalculatorTimestampingTest
num_full_packets -= 1;
}
int64 num_samples = 0;
int64_t num_samples = 0;
for (int packet_num = 0; packet_num < num_full_packets; ++packet_num) {
const Packet& packet = output().packets[packet_num];
num_samples += FrameDurationSamples();
+16 -12
View File
@@ -192,17 +192,19 @@ cc_library(
"//mediapipe/framework:calculator_context",
"//mediapipe/framework:calculator_contract",
"//mediapipe/framework:calculator_framework",
"//mediapipe/framework:collection_item_id",
"//mediapipe/framework:packet",
"//mediapipe/framework/formats:detection_cc_proto",
"//mediapipe/framework/formats:image",
"//mediapipe/framework/formats:image_frame",
"//mediapipe/framework/formats:landmark_cc_proto",
"//mediapipe/framework/formats:matrix",
"//mediapipe/framework/formats:rect_cc_proto",
"//mediapipe/framework/formats:tensor",
"//mediapipe/framework/port:integral_types",
"//mediapipe/framework/port:ret_check",
"//mediapipe/framework/port:status",
"//mediapipe/gpu:gpu_buffer",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/status",
],
alwayslink = 1,
)
@@ -215,17 +217,18 @@ cc_library(
"//mediapipe/framework:calculator_context",
"//mediapipe/framework:calculator_contract",
"//mediapipe/framework:calculator_framework",
"//mediapipe/framework:collection_item_id",
"//mediapipe/framework/formats:classification_cc_proto",
"//mediapipe/framework/formats:detection_cc_proto",
"//mediapipe/framework/formats:image",
"//mediapipe/framework/formats:image_frame",
"//mediapipe/framework/formats:landmark_cc_proto",
"//mediapipe/framework/formats:matrix",
"//mediapipe/framework/formats:rect_cc_proto",
"//mediapipe/framework/formats:tensor",
"//mediapipe/framework/port:integral_types",
"//mediapipe/framework/port:ret_check",
"//mediapipe/framework/port:status",
"//mediapipe/gpu:gpu_buffer",
"//mediapipe/util:render_data_cc_proto",
"@com_google_absl//absl/status",
"@org_tensorflow//tensorflow/lite:framework",
],
alwayslink = 1,
@@ -282,6 +285,7 @@ cc_library(
}),
deps = [
":concatenate_vector_calculator_cc_proto",
"//mediapipe/framework:calculator_framework",
"//mediapipe/framework/api2:node",
"//mediapipe/framework/api2:port",
"//mediapipe/framework/formats:classification_cc_proto",
@@ -290,12 +294,10 @@ cc_library(
"//mediapipe/framework/port:integral_types",
"//mediapipe/framework/port:ret_check",
"//mediapipe/framework/port:status",
"//mediapipe/framework:calculator_framework",
"//mediapipe/util:render_data_cc_proto",
"@org_tensorflow//tensorflow/lite:framework",
] + select({
"//mediapipe/gpu:disable_gpu": [],
"//mediapipe:ios": [],
":ios_or_disable_gpu": [],
"//conditions:default": [
"@org_tensorflow//tensorflow/lite/delegates/gpu/gl:gl_buffer",
],
@@ -900,12 +902,13 @@ cc_library(
}),
deps = [
":split_vector_calculator_cc_proto",
"//mediapipe/framework/formats:detection_cc_proto",
"//mediapipe/framework/formats:classification_cc_proto",
"//mediapipe/framework/formats:landmark_cc_proto",
"//mediapipe/framework/formats:rect_cc_proto",
"//mediapipe/framework:calculator_framework",
"//mediapipe/framework/formats:classification_cc_proto",
"//mediapipe/framework/formats:detection_cc_proto",
"//mediapipe/framework/formats:image",
"//mediapipe/framework/formats:landmark_cc_proto",
"//mediapipe/framework/formats:matrix",
"//mediapipe/framework/formats:rect_cc_proto",
"//mediapipe/framework/formats:tensor",
"//mediapipe/framework/port:ret_check",
"//mediapipe/framework/port:status",
@@ -1237,6 +1240,7 @@ cc_library(
"//mediapipe/framework/formats:classification_cc_proto",
"//mediapipe/framework/formats:detection_cc_proto",
"//mediapipe/framework/formats:landmark_cc_proto",
"//mediapipe/framework/formats:rect_cc_proto",
"//mediapipe/framework/port:ret_check",
"//mediapipe/framework/port:status",
],
@@ -17,10 +17,13 @@
#include <vector>
#include "mediapipe/framework/formats/detection.pb.h"
#include "mediapipe/framework/formats/image.h"
#include "mediapipe/framework/formats/image_frame.h"
#include "mediapipe/framework/formats/landmark.pb.h"
#include "mediapipe/framework/formats/matrix.h"
#include "mediapipe/framework/formats/rect.pb.h"
#include "mediapipe/framework/formats/tensor.h"
#include "mediapipe/gpu/gpu_buffer.h"
namespace mediapipe {
@@ -60,4 +63,17 @@ REGISTER_CALCULATOR(BeginLoopUint64tCalculator);
typedef BeginLoopCalculator<std::vector<Tensor>> BeginLoopTensorCalculator;
REGISTER_CALCULATOR(BeginLoopTensorCalculator);
// A calculator to process std::vector<mediapipe::ImageFrame>.
typedef BeginLoopCalculator<std::vector<ImageFrame>>
BeginLoopImageFrameCalculator;
REGISTER_CALCULATOR(BeginLoopImageFrameCalculator);
// A calculator to process std::vector<mediapipe::GpuBuffer>.
typedef BeginLoopCalculator<std::vector<GpuBuffer>>
BeginLoopGpuBufferCalculator;
REGISTER_CALCULATOR(BeginLoopGpuBufferCalculator);
// A calculator to process std::vector<mediapipe::Image>.
typedef BeginLoopCalculator<std::vector<Image>> BeginLoopImageCalculator;
REGISTER_CALCULATOR(BeginLoopImageCalculator);
} // namespace mediapipe
@@ -15,47 +15,57 @@
#ifndef MEDIAPIPE_CALCULATORS_CORE_BEGIN_LOOP_CALCULATOR_H_
#define MEDIAPIPE_CALCULATORS_CORE_BEGIN_LOOP_CALCULATOR_H_
#include "absl/status/status.h"
#include "mediapipe/framework/calculator_context.h"
#include "mediapipe/framework/calculator_contract.h"
#include "mediapipe/framework/calculator_framework.h"
#include "mediapipe/framework/collection_item_id.h"
#include "mediapipe/framework/packet.h"
#include "mediapipe/framework/port/integral_types.h"
#include "mediapipe/framework/port/ret_check.h"
#include "mediapipe/framework/port/status.h"
#include "mediapipe/framework/port/status_macros.h"
namespace mediapipe {
// Calculator for implementing loops on iterable collections inside a MediaPipe
// graph.
// graph. Assume InputIterT is an iterable for type InputT, and OutputIterT is
// an iterable for type OutputT, e.g. vector<InputT> and vector<OutputT>.
// First, instantiate specializations in the loop calculators' implementations
// if missing:
// BeginLoopInputTCalculator = BeginLoopCalculator<InputIterT>
// EndLoopOutputTCalculator = EndLoopCalculator<OutputIterT>
// Then, the following graph transforms an item of type InputIterT to an
// OutputIterT by applying InputToOutputConverter to every element:
//
// It is designed to be used like:
//
// node {
// calculator: "BeginLoopWithIterableCalculator"
// input_stream: "ITERABLE:input_iterable" # IterableT @ext_ts
// output_stream: "ITEM:input_element" # ItemT @loop_internal_ts
// output_stream: "BATCH_END:ext_ts" # Timestamp @loop_internal_ts
// node { # Type @timestamp
// calculator: "BeginLoopInputTCalculator"
// input_stream: "ITERABLE:input_iterable" # InputIterT @iterable_ts
// input_stream: "CLONE:extra_input" # ExtraT @extra_ts
// output_stream: "ITEM:input_iterator" # InputT @loop_internal_ts
// output_stream: "CLONE:cloned_extra_input" # ExtraT @loop_internal_ts
// output_stream: "BATCH_END:iterable_ts" # Timestamp @loop_internal_ts
// }
//
// node {
// calculator: "ElementToBlaConverterSubgraph"
// input_stream: "ITEM:input_to_loop_body" # ItemT @loop_internal_ts
// output_stream: "BLA:output_of_loop_body" # ItemU @loop_internal_ts
// calculator: "InputToOutputConverter"
// input_stream: "INPUT:input_iterator" # InputT @loop_internal_ts
// input_stream: "EXTRA:cloned_extra_input" # ExtraT @loop_internal_ts
// output_stream: "OUTPUT:output_iterator" # OutputT @loop_internal_ts
// }
//
// node {
// calculator: "EndLoopWithOutputCalculator"
// input_stream: "ITEM:output_of_loop_body" # ItemU @loop_internal_ts
// input_stream: "BATCH_END:ext_ts" # Timestamp @loop_internal_ts
// output_stream: "ITERABLE:aggregated_result" # IterableU @ext_ts
// calculator: "EndLoopOutputTCalculator"
// input_stream: "ITEM:output_iterator" # OutputT @loop_internal_ts
// input_stream: "BATCH_END:iterable_ts" # Timestamp @loop_internal_ts
// output_stream: "ITERABLE:output_iterable" # OutputIterT @iterable_ts
// }
//
// The resulting 'output_iterable' has the same timestamp as 'input_iterable'.
// The output packets of this calculator are part of the loop body and have
// loop-internal timestamps that are unrelated to the input iterator timestamp.
//
// Input streams tagged with "CLONE" are cloned to the corresponding output
// streams at loop timestamps. This ensures that a MediaPipe graph or sub-graph
// can run multiple times, once per element in the "ITERABLE" for each pakcet
// clone of the packets in the "CLONE" input streams.
// streams at loop-internal timestamps. This ensures that a MediaPipe graph or
// sub-graph can run multiple times, once per element in the "ITERABLE" for each
// packet clone of the packets in the "CLONE" input streams. Think of CLONEd
// inputs as loop-wide constants.
template <typename IterableT>
class BeginLoopCalculator : public CalculatorBase {
using ItemT = typename IterableT::value_type;
@@ -30,7 +30,7 @@ namespace mediapipe {
typedef ClipVectorSizeCalculator<int> TestClipIntVectorSizeCalculator;
REGISTER_CALCULATOR(TestClipIntVectorSizeCalculator);
void AddInputVector(const std::vector<int>& input, int64 timestamp,
void AddInputVector(const std::vector<int>& input, int64_t timestamp,
CalculatorRunner* runner) {
runner->MutableInputs()->Index(0).packets.push_back(
MakePacket<std::vector<int>>(input).At(Timestamp(timestamp)));
@@ -63,7 +63,7 @@ void ValidateCombinedLandmarks(
void AddInputLandmarkLists(
const std::vector<NormalizedLandmarkList>& input_landmarks_vec,
int64 timestamp, CalculatorRunner* runner) {
int64_t timestamp, CalculatorRunner* runner) {
for (int i = 0; i < input_landmarks_vec.size(); ++i) {
runner->MutableInputs()->Index(i).packets.push_back(
MakePacket<NormalizedLandmarkList>(input_landmarks_vec[i])
@@ -73,7 +73,7 @@ void AddInputLandmarkLists(
void AddInputClassificationLists(
const std::vector<ClassificationList>& input_classifications_vec,
int64 timestamp, CalculatorRunner* runner) {
int64_t timestamp, CalculatorRunner* runner) {
for (int i = 0; i < input_classifications_vec.size(); ++i) {
runner->MutableInputs()->Index(i).packets.push_back(
MakePacket<ClassificationList>(input_classifications_vec[i])
@@ -46,15 +46,19 @@ MEDIAPIPE_REGISTER_NODE(ConcatenateFloatVectorCalculator);
// input_stream: "int32_vector_2"
// output_stream: "concatenated_int32_vector"
// }
typedef ConcatenateVectorCalculator<int32> ConcatenateInt32VectorCalculator;
typedef ConcatenateVectorCalculator<int32_t> ConcatenateInt32VectorCalculator;
MEDIAPIPE_REGISTER_NODE(ConcatenateInt32VectorCalculator);
typedef ConcatenateVectorCalculator<uint64> ConcatenateUInt64VectorCalculator;
typedef ConcatenateVectorCalculator<uint64_t> ConcatenateUInt64VectorCalculator;
MEDIAPIPE_REGISTER_NODE(ConcatenateUInt64VectorCalculator);
typedef ConcatenateVectorCalculator<bool> ConcatenateBoolVectorCalculator;
MEDIAPIPE_REGISTER_NODE(ConcatenateBoolVectorCalculator);
typedef ConcatenateVectorCalculator<std::string>
ConcatenateStringVectorCalculator;
MEDIAPIPE_REGISTER_NODE(ConcatenateStringVectorCalculator);
// Example config:
// node {
// calculator: "ConcatenateTfLiteTensorVectorCalculator"
@@ -30,26 +30,28 @@ namespace mediapipe {
typedef ConcatenateVectorCalculator<int> TestConcatenateIntVectorCalculator;
MEDIAPIPE_REGISTER_NODE(TestConcatenateIntVectorCalculator);
void AddInputVector(int index, const std::vector<int>& input, int64 timestamp,
template <typename T>
void AddInputVector(int index, const std::vector<T>& input, int64_t timestamp,
CalculatorRunner* runner) {
runner->MutableInputs()->Index(index).packets.push_back(
MakePacket<std::vector<int>>(input).At(Timestamp(timestamp)));
MakePacket<std::vector<T>>(input).At(Timestamp(timestamp)));
}
void AddInputVectors(const std::vector<std::vector<int>>& inputs,
int64 timestamp, CalculatorRunner* runner) {
template <typename T>
void AddInputVectors(const std::vector<std::vector<T>>& inputs,
int64_t timestamp, CalculatorRunner* runner) {
for (int i = 0; i < inputs.size(); ++i) {
AddInputVector(i, inputs[i], timestamp, runner);
}
}
void AddInputItem(int index, int input, int64 timestamp,
void AddInputItem(int index, int input, int64_t timestamp,
CalculatorRunner* runner) {
runner->MutableInputs()->Index(index).packets.push_back(
MakePacket<int>(input).At(Timestamp(timestamp)));
}
void AddInputItems(const std::vector<int>& inputs, int64 timestamp,
void AddInputItems(const std::vector<int>& inputs, int64_t timestamp,
CalculatorRunner* runner) {
for (int i = 0; i < inputs.size(); ++i) {
AddInputItem(i, inputs[i], timestamp, runner);
@@ -279,7 +281,7 @@ TEST(TestConcatenateIntVectorCalculatorTest, MixedVectorsAndItemsAnother) {
}
void AddInputVectors(const std::vector<std::vector<float>>& inputs,
int64 timestamp, CalculatorRunner* runner) {
int64_t timestamp, CalculatorRunner* runner) {
for (int i = 0; i < inputs.size(); ++i) {
runner->MutableInputs()->Index(i).packets.push_back(
MakePacket<std::vector<float>>(inputs[i]).At(Timestamp(timestamp)));
@@ -382,6 +384,23 @@ TEST(ConcatenateFloatVectorCalculatorTest, OneEmptyStreamNoOutput) {
EXPECT_EQ(0, outputs.size());
}
TEST(ConcatenateStringVectorCalculatorTest, OneTimestamp) {
CalculatorRunner runner("ConcatenateStringVectorCalculator",
/*options_string=*/"", /*num_inputs=*/3,
/*num_outputs=*/1, /*num_side_packets=*/0);
std::vector<std::vector<std::string>> inputs = {
{"a", "b"}, {"c"}, {"d", "e", "f"}};
AddInputVectors(inputs, /*timestamp=*/1, &runner);
MP_ASSERT_OK(runner.Run());
const std::vector<Packet>& outputs = runner.Outputs().Index(0).packets;
EXPECT_EQ(1, outputs.size());
EXPECT_EQ(Timestamp(1), outputs[0].Timestamp());
std::vector<std::string> expected_vector = {"a", "b", "c", "d", "e", "f"};
EXPECT_EQ(expected_vector, outputs[0].Get<std::vector<std::string>>());
}
typedef ConcatenateVectorCalculator<std::unique_ptr<int>>
TestConcatenateUniqueIntPtrCalculator;
MEDIAPIPE_REGISTER_NODE(TestConcatenateUniqueIntPtrCalculator);
@@ -78,7 +78,7 @@ class ConstantSidePacketCalculator : public CalculatorBase {
} else if (packet_options.has_string_value()) {
packet.Set<std::string>();
} else if (packet_options.has_uint64_value()) {
packet.Set<uint64>();
packet.Set<uint64_t>();
} else if (packet_options.has_classification_list_value()) {
packet.Set<ClassificationList>();
} else if (packet_options.has_landmark_list_value()) {
@@ -112,7 +112,7 @@ class ConstantSidePacketCalculator : public CalculatorBase {
} else if (packet_options.has_string_value()) {
packet.Set(MakePacket<std::string>(packet_options.string_value()));
} else if (packet_options.has_uint64_value()) {
packet.Set(MakePacket<uint64>(packet_options.uint64_value()));
packet.Set(MakePacket<uint64_t>(packet_options.uint64_value()));
} else if (packet_options.has_classification_list_value()) {
packet.Set(MakePacket<ClassificationList>(
packet_options.classification_list_value()));
@@ -18,10 +18,13 @@
#include "mediapipe/framework/formats/classification.pb.h"
#include "mediapipe/framework/formats/detection.pb.h"
#include "mediapipe/framework/formats/image.h"
#include "mediapipe/framework/formats/image_frame.h"
#include "mediapipe/framework/formats/landmark.pb.h"
#include "mediapipe/framework/formats/matrix.h"
#include "mediapipe/framework/formats/rect.pb.h"
#include "mediapipe/framework/formats/tensor.h"
#include "mediapipe/gpu/gpu_buffer.h"
#include "mediapipe/util/render_data.pb.h"
#include "tensorflow/lite/interpreter.h"
@@ -67,4 +70,18 @@ REGISTER_CALCULATOR(EndLoopMatrixCalculator);
typedef EndLoopCalculator<std::vector<Tensor>> EndLoopTensorCalculator;
REGISTER_CALCULATOR(EndLoopTensorCalculator);
typedef EndLoopCalculator<std::vector<ImageFrame>> EndLoopImageFrameCalculator;
REGISTER_CALCULATOR(EndLoopImageFrameCalculator);
typedef EndLoopCalculator<std::vector<GpuBuffer>> EndLoopGpuBufferCalculator;
REGISTER_CALCULATOR(EndLoopGpuBufferCalculator);
typedef EndLoopCalculator<std::vector<::mediapipe::Image>>
EndLoopImageCalculator;
REGISTER_CALCULATOR(EndLoopImageCalculator);
typedef EndLoopCalculator<std::vector<std::array<float, 16>>>
EndLoopAffineMatrixCalculator;
REGISTER_CALCULATOR(EndLoopAffineMatrixCalculator);
} // namespace mediapipe
@@ -17,13 +17,11 @@
#include <type_traits>
#include "absl/status/status.h"
#include "mediapipe/framework/calculator_context.h"
#include "mediapipe/framework/calculator_contract.h"
#include "mediapipe/framework/calculator_framework.h"
#include "mediapipe/framework/collection_item_id.h"
#include "mediapipe/framework/port/integral_types.h"
#include "mediapipe/framework/port/ret_check.h"
#include "mediapipe/framework/port/status.h"
namespace mediapipe {
@@ -33,27 +31,7 @@ namespace mediapipe {
// from the "BATCH_END" tagged input stream, it emits the aggregated results
// at the original timestamp contained in the "BATCH_END" input stream.
//
// It is designed to be used like:
//
// node {
// calculator: "BeginLoopWithIterableCalculator"
// input_stream: "ITERABLE:input_iterable" # IterableT @ext_ts
// output_stream: "ITEM:input_element" # ItemT @loop_internal_ts
// output_stream: "BATCH_END:ext_ts" # Timestamp @loop_internal_ts
// }
//
// node {
// calculator: "ElementToBlaConverterSubgraph"
// input_stream: "ITEM:input_to_loop_body" # ItemT @loop_internal_ts
// output_stream: "BLA:output_of_loop_body" # ItemU @loop_internal_ts
// }
//
// node {
// calculator: "EndLoopWithOutputCalculator"
// input_stream: "ITEM:output_of_loop_body" # ItemU @loop_internal_ts
// input_stream: "BATCH_END:ext_ts" # Timestamp @loop_internal_ts
// output_stream: "ITERABLE:aggregated_result" # IterableU @ext_ts
// }
// See BeginLoopCalculator for a usage example.
template <typename IterableT>
class EndLoopCalculator : public CalculatorBase {
using ItemT = typename IterableT::value_type;
@@ -79,7 +57,7 @@ class EndLoopCalculator : public CalculatorBase {
}
// Try to consume the item and move it into the collection. If the items
// are not consumable, then try to copy them instead. If the items are
// not copiable, then an error will be returned.
// not copyable, then an error will be returned.
auto item_ptr_or = cc->Inputs().Tag("ITEM").Value().Consume<ItemT>();
if (item_ptr_or.ok()) {
input_stream_collection_->push_back(std::move(*item_ptr_or.value()));
@@ -42,7 +42,7 @@ constexpr char kOptionsTag[] = "OPTIONS";
//
// Increasing `max_in_flight` to 2 or more can yield the better throughput
// when the graph exhibits a high degree of pipeline parallelism. Decreasing
// `max_in_flight` to 0 can yield a better average latency, but at the cost of
// `max_in_queue` to 0 can yield a better average latency, but at the cost of
// lower throughput (lower framerate) due to the time during which the graph
// is idle awaiting the next input frame.
//
@@ -61,8 +61,8 @@ class AtomicSemaphore {
};
// Returns the timestamp values for a vector of Packets.
std::vector<int64> TimestampValues(const std::vector<Packet>& packets) {
std::vector<int64> result;
std::vector<int64_t> TimestampValues(const std::vector<Packet>& packets) {
std::vector<int64_t> result;
for (const Packet& packet : packets) {
result.push_back(packet.Timestamp().Value());
}
@@ -180,9 +180,9 @@ TEST_F(FlowLimiterCalculatorSemaphoreTest, FramesDropped) {
InitializeGraph(1);
MP_ASSERT_OK(graph_.StartRun({}));
auto send_packet = [this](const std::string& input_name, int64 n) {
auto send_packet = [this](const std::string& input_name, int64_t n) {
MP_EXPECT_OK(graph_.AddPacketToInputStream(
input_name, MakePacket<int64>(n).At(Timestamp(n))));
input_name, MakePacket<int64_t>(n).At(Timestamp(n))));
};
Packet allow_packet;
@@ -207,12 +207,12 @@ TEST_F(FlowLimiterCalculatorSemaphoreTest, FramesDropped) {
EXPECT_EQ(10, out_1_packets_.size());
// Timestamps have not been altered.
EXPECT_EQ(PacketValues<int64>(out_1_packets_),
EXPECT_EQ(PacketValues<int64_t>(out_1_packets_),
TimestampValues(out_1_packets_));
// Extra inputs on in_1 have been dropped.
EXPECT_EQ(TimestampValues(out_1_packets_),
(std::vector<int64>{0, 10, 20, 30, 40, 50, 60, 70, 80, 90}));
(std::vector<int64_t>{0, 10, 20, 30, 40, 50, 60, 70, 80, 90}));
}
// A calculator that sleeps during Process.
@@ -221,8 +221,8 @@ class SleepCalculator : public CalculatorBase {
static absl::Status GetContract(CalculatorContract* cc) {
cc->Inputs().Tag(kPacketTag).SetAny();
cc->Outputs().Tag(kPacketTag).SetSameAs(&cc->Inputs().Tag(kPacketTag));
cc->InputSidePackets().Tag(kSleepTimeTag).Set<int64>();
cc->InputSidePackets().Tag(kWarmupTimeTag).Set<int64>();
cc->InputSidePackets().Tag(kSleepTimeTag).Set<int64_t>();
cc->InputSidePackets().Tag(kWarmupTimeTag).Set<int64_t>();
cc->InputSidePackets().Tag(kClockTag).Set<mediapipe::Clock*>();
cc->SetTimestampOffset(0);
return absl::OkStatus();
@@ -237,8 +237,8 @@ class SleepCalculator : public CalculatorBase {
++packet_count;
absl::Duration sleep_time = absl::Microseconds(
packet_count == 1
? cc->InputSidePackets().Tag(kWarmupTimeTag).Get<int64>()
: cc->InputSidePackets().Tag(kSleepTimeTag).Get<int64>());
? cc->InputSidePackets().Tag(kWarmupTimeTag).Get<int64_t>()
: cc->InputSidePackets().Tag(kSleepTimeTag).Get<int64_t>());
clock_->Sleep(sleep_time);
cc->Outputs()
.Tag(kPacketTag)
@@ -375,8 +375,8 @@ TEST_F(FlowLimiterCalculatorTest, FinishedTimestamps) {
std::map<std::string, Packet> side_packets = {
{"limiter_options",
MakePacket<FlowLimiterCalculatorOptions>(limiter_options)},
{"warmup_time", MakePacket<int64>(22000)},
{"sleep_time", MakePacket<int64>(22000)},
{"warmup_time", MakePacket<int64_t>(22000)},
{"sleep_time", MakePacket<int64_t>(22000)},
{"drop_timesamps", MakePacket<bool>(false)},
{"clock", MakePacket<mediapipe::Clock*>(clock_)},
};
@@ -447,8 +447,8 @@ TEST_F(FlowLimiterCalculatorTest, FinishedLost) {
std::map<std::string, Packet> side_packets = {
{"limiter_options",
MakePacket<FlowLimiterCalculatorOptions>(limiter_options)},
{"warmup_time", MakePacket<int64>(22000)},
{"sleep_time", MakePacket<int64>(22000)},
{"warmup_time", MakePacket<int64_t>(22000)},
{"sleep_time", MakePacket<int64_t>(22000)},
{"drop_timesamps", MakePacket<bool>(true)},
{"clock", MakePacket<mediapipe::Clock*>(clock_)},
};
@@ -511,8 +511,8 @@ TEST_F(FlowLimiterCalculatorTest, FinishedDelayed) {
std::map<std::string, Packet> side_packets = {
{"limiter_options",
MakePacket<FlowLimiterCalculatorOptions>(limiter_options)},
{"warmup_time", MakePacket<int64>(500000)},
{"sleep_time", MakePacket<int64>(22000)},
{"warmup_time", MakePacket<int64_t>(500000)},
{"sleep_time", MakePacket<int64_t>(22000)},
{"drop_timesamps", MakePacket<bool>(false)},
{"clock", MakePacket<mediapipe::Clock*>(clock_)},
};
@@ -606,8 +606,8 @@ TEST_F(FlowLimiterCalculatorTest, TwoInputStreams) {
std::map<std::string, Packet> side_packets = {
{"limiter_options",
MakePacket<FlowLimiterCalculatorOptions>(limiter_options)},
{"warmup_time", MakePacket<int64>(22000)},
{"sleep_time", MakePacket<int64>(22000)},
{"warmup_time", MakePacket<int64_t>(22000)},
{"sleep_time", MakePacket<int64_t>(22000)},
{"drop_timesamps", MakePacket<bool>(true)},
{"clock", MakePacket<mediapipe::Clock*>(clock_)},
};
@@ -715,8 +715,8 @@ TEST_F(FlowLimiterCalculatorTest, ZeroQueue) {
std::map<std::string, Packet> side_packets = {
{"limiter_options",
MakePacket<FlowLimiterCalculatorOptions>(limiter_options)},
{"warmup_time", MakePacket<int64>(12000)},
{"sleep_time", MakePacket<int64>(12000)},
{"warmup_time", MakePacket<int64_t>(12000)},
{"sleep_time", MakePacket<int64_t>(12000)},
{"drop_timesamps", MakePacket<bool>(true)},
{"clock", MakePacket<mediapipe::Clock*>(clock_)},
};
@@ -862,9 +862,9 @@ TEST_F(FlowLimiterCalculatorTest, AuxiliaryInputs) {
std::map<std::string, Packet> side_packets = {
// Fake processing lazy initialization time in microseconds.
{"warmup_time", MakePacket<int64>(22000)},
{"warmup_time", MakePacket<int64_t>(22000)},
// Fake processing duration in microseconds.
{"sleep_time", MakePacket<int64>(22000)},
{"sleep_time", MakePacket<int64_t>(22000)},
// The SimulationClock to count virtual elapsed time.
{"clock", MakePacket<mediapipe::Clock*>(clock_)},
};
+16 -16
View File
@@ -26,19 +26,15 @@ constexpr char kStateChangeTag[] = "STATE_CHANGE";
constexpr char kDisallowTag[] = "DISALLOW";
constexpr char kAllowTag[] = "ALLOW";
enum GateState {
GATE_UNINITIALIZED,
GATE_ALLOW,
GATE_DISALLOW,
};
std::string ToString(GateState state) {
std::string ToString(GateCalculatorOptions::GateState state) {
switch (state) {
case GATE_UNINITIALIZED:
case GateCalculatorOptions::UNSPECIFIED:
return "UNSPECIFIED";
case GateCalculatorOptions::GATE_UNINITIALIZED:
return "UNINITIALIZED";
case GATE_ALLOW:
case GateCalculatorOptions::GATE_ALLOW:
return "ALLOW";
case GATE_DISALLOW:
case GateCalculatorOptions::GATE_DISALLOW:
return "DISALLOW";
}
DLOG(FATAL) << "Unknown GateState";
@@ -125,7 +121,6 @@ class GateCalculator : public CalculatorBase {
RET_CHECK_OK(CheckAndInitAllowDisallowInputs(cc));
const int num_data_streams = cc->Inputs().NumEntries("");
RET_CHECK_GE(num_data_streams, 1);
RET_CHECK_EQ(cc->Outputs().NumEntries(""), num_data_streams)
<< "Number of data output streams must match with data input streams.";
@@ -154,10 +149,12 @@ class GateCalculator : public CalculatorBase {
cc->SetOffset(TimestampDiff(0));
num_data_streams_ = cc->Inputs().NumEntries("");
last_gate_state_ = GATE_UNINITIALIZED;
RET_CHECK_OK(CopyInputHeadersToOutputs(cc->Inputs(), &cc->Outputs()));
const auto& options = cc->Options<::mediapipe::GateCalculatorOptions>();
last_gate_state_ = options.initial_gate_state();
RET_CHECK_OK(CopyInputHeadersToOutputs(cc->Inputs(), &cc->Outputs()));
empty_packets_as_allow_ = options.empty_packets_as_allow();
if (!use_side_packet_for_allow_disallow_ &&
@@ -185,10 +182,12 @@ class GateCalculator : public CalculatorBase {
allow = !cc->Inputs().Tag(kDisallowTag).Get<bool>();
}
}
const GateState new_gate_state = allow ? GATE_ALLOW : GATE_DISALLOW;
const GateCalculatorOptions::GateState new_gate_state =
allow ? GateCalculatorOptions::GATE_ALLOW
: GateCalculatorOptions::GATE_DISALLOW;
if (cc->Outputs().HasTag(kStateChangeTag)) {
if (last_gate_state_ != GATE_UNINITIALIZED &&
if (last_gate_state_ != GateCalculatorOptions::GATE_UNINITIALIZED &&
last_gate_state_ != new_gate_state) {
VLOG(2) << "State transition in " << cc->NodeName() << " @ "
<< cc->InputTimestamp().Value() << " from "
@@ -224,7 +223,8 @@ class GateCalculator : public CalculatorBase {
}
private:
GateState last_gate_state_ = GATE_UNINITIALIZED;
GateCalculatorOptions::GateState last_gate_state_ =
GateCalculatorOptions::GATE_UNINITIALIZED;
int num_data_streams_;
bool empty_packets_as_allow_;
bool use_side_packet_for_allow_disallow_ = false;
@@ -31,4 +31,13 @@ message GateCalculatorOptions {
// Whether to allow or disallow the input streams to pass when no
// ALLOW/DISALLOW input or side input is specified.
optional bool allow = 2 [default = false];
enum GateState {
UNSPECIFIED = 0;
GATE_UNINITIALIZED = 1;
GATE_ALLOW = 2;
GATE_DISALLOW = 3;
}
optional GateState initial_gate_state = 3 [default = GATE_UNINITIALIZED];
}
@@ -35,14 +35,14 @@ class GateCalculatorTest : public ::testing::Test {
}
// Use this when ALLOW/DISALLOW input is provided as a side packet.
void RunTimeStep(int64 timestamp, bool stream_payload) {
void RunTimeStep(int64_t timestamp, bool stream_payload) {
runner_->MutableInputs()->Get("", 0).packets.push_back(
MakePacket<bool>(stream_payload).At(Timestamp(timestamp)));
MP_ASSERT_OK(runner_->Run()) << "Calculator execution failed.";
}
// Use this when ALLOW/DISALLOW input is provided as an input stream.
void RunTimeStep(int64 timestamp, const std::string& control_tag,
void RunTimeStep(int64_t timestamp, const std::string& control_tag,
bool control) {
runner_->MutableInputs()->Get("", 0).packets.push_back(
MakePacket<bool>(true).At(Timestamp(timestamp)));
@@ -52,6 +52,15 @@ class GateCalculatorTest : public ::testing::Test {
MP_ASSERT_OK(runner_->Run()) << "Calculator execution failed.";
}
void RunTimeStepWithoutDataStream(int64_t timestamp,
const std::string& control_tag,
bool control) {
runner_->MutableInputs()
->Tag(control_tag)
.packets.push_back(MakePacket<bool>(control).At(Timestamp(timestamp)));
MP_ASSERT_OK(runner_->Run()) << "Calculator execution failed.";
}
void SetRunner(const std::string& proto) {
runner_ = absl::make_unique<CalculatorRunner>(
ParseTextProtoOrDie<CalculatorGraphConfig::Node>(proto));
@@ -125,9 +134,9 @@ TEST_F(GateCalculatorTest, AllowByALLOWOptionToTrue) {
}
)");
constexpr int64 kTimestampValue0 = 42;
constexpr int64_t kTimestampValue0 = 42;
RunTimeStep(kTimestampValue0, true);
constexpr int64 kTimestampValue1 = 43;
constexpr int64_t kTimestampValue1 = 43;
RunTimeStep(kTimestampValue1, false);
const std::vector<Packet>& output = runner()->Outputs().Get("", 0).packets;
@@ -150,9 +159,9 @@ TEST_F(GateCalculatorTest, DisallowByALLOWOptionSetToFalse) {
}
)");
constexpr int64 kTimestampValue0 = 42;
constexpr int64_t kTimestampValue0 = 42;
RunTimeStep(kTimestampValue0, true);
constexpr int64 kTimestampValue1 = 43;
constexpr int64_t kTimestampValue1 = 43;
RunTimeStep(kTimestampValue1, false);
const std::vector<Packet>& output = runner()->Outputs().Get("", 0).packets;
@@ -166,9 +175,9 @@ TEST_F(GateCalculatorTest, DisallowByALLOWOptionNotSet) {
output_stream: "test_output"
)");
constexpr int64 kTimestampValue0 = 42;
constexpr int64_t kTimestampValue0 = 42;
RunTimeStep(kTimestampValue0, true);
constexpr int64 kTimestampValue1 = 43;
constexpr int64_t kTimestampValue1 = 43;
RunTimeStep(kTimestampValue1, false);
const std::vector<Packet>& output = runner()->Outputs().Get("", 0).packets;
@@ -184,9 +193,9 @@ TEST_F(GateCalculatorTest, AllowByALLOWSidePacketSetToTrue) {
)");
runner()->MutableSidePackets()->Tag(kAllowTag) = Adopt(new bool(true));
constexpr int64 kTimestampValue0 = 42;
constexpr int64_t kTimestampValue0 = 42;
RunTimeStep(kTimestampValue0, true);
constexpr int64 kTimestampValue1 = 43;
constexpr int64_t kTimestampValue1 = 43;
RunTimeStep(kTimestampValue1, false);
const std::vector<Packet>& output = runner()->Outputs().Get("", 0).packets;
@@ -206,9 +215,9 @@ TEST_F(GateCalculatorTest, AllowByDisallowSidePacketSetToFalse) {
)");
runner()->MutableSidePackets()->Tag(kDisallowTag) = Adopt(new bool(false));
constexpr int64 kTimestampValue0 = 42;
constexpr int64_t kTimestampValue0 = 42;
RunTimeStep(kTimestampValue0, true);
constexpr int64 kTimestampValue1 = 43;
constexpr int64_t kTimestampValue1 = 43;
RunTimeStep(kTimestampValue1, false);
const std::vector<Packet>& output = runner()->Outputs().Get("", 0).packets;
@@ -228,9 +237,9 @@ TEST_F(GateCalculatorTest, DisallowByALLOWSidePacketSetToFalse) {
)");
runner()->MutableSidePackets()->Tag(kAllowTag) = Adopt(new bool(false));
constexpr int64 kTimestampValue0 = 42;
constexpr int64_t kTimestampValue0 = 42;
RunTimeStep(kTimestampValue0, true);
constexpr int64 kTimestampValue1 = 43;
constexpr int64_t kTimestampValue1 = 43;
RunTimeStep(kTimestampValue1, false);
const std::vector<Packet>& output = runner()->Outputs().Get("", 0).packets;
@@ -246,9 +255,9 @@ TEST_F(GateCalculatorTest, DisallowByDISALLOWSidePacketSetToTrue) {
)");
runner()->MutableSidePackets()->Tag(kDisallowTag) = Adopt(new bool(true));
constexpr int64 kTimestampValue0 = 42;
constexpr int64_t kTimestampValue0 = 42;
RunTimeStep(kTimestampValue0, true);
constexpr int64 kTimestampValue1 = 43;
constexpr int64_t kTimestampValue1 = 43;
RunTimeStep(kTimestampValue1, false);
const std::vector<Packet>& output = runner()->Outputs().Get("", 0).packets;
@@ -263,13 +272,13 @@ TEST_F(GateCalculatorTest, Allow) {
output_stream: "test_output"
)");
constexpr int64 kTimestampValue0 = 42;
constexpr int64_t kTimestampValue0 = 42;
RunTimeStep(kTimestampValue0, "ALLOW", true);
constexpr int64 kTimestampValue1 = 43;
constexpr int64_t kTimestampValue1 = 43;
RunTimeStep(kTimestampValue1, "ALLOW", false);
constexpr int64 kTimestampValue2 = 44;
constexpr int64_t kTimestampValue2 = 44;
RunTimeStep(kTimestampValue2, "ALLOW", true);
constexpr int64 kTimestampValue3 = 45;
constexpr int64_t kTimestampValue3 = 45;
RunTimeStep(kTimestampValue3, "ALLOW", false);
const std::vector<Packet>& output = runner()->Outputs().Get("", 0).packets;
@@ -288,13 +297,13 @@ TEST_F(GateCalculatorTest, Disallow) {
output_stream: "test_output"
)");
constexpr int64 kTimestampValue0 = 42;
constexpr int64_t kTimestampValue0 = 42;
RunTimeStep(kTimestampValue0, "DISALLOW", true);
constexpr int64 kTimestampValue1 = 43;
constexpr int64_t kTimestampValue1 = 43;
RunTimeStep(kTimestampValue1, "DISALLOW", false);
constexpr int64 kTimestampValue2 = 44;
constexpr int64_t kTimestampValue2 = 44;
RunTimeStep(kTimestampValue2, "DISALLOW", true);
constexpr int64 kTimestampValue3 = 45;
constexpr int64_t kTimestampValue3 = 45;
RunTimeStep(kTimestampValue3, "DISALLOW", false);
const std::vector<Packet>& output = runner()->Outputs().Get("", 0).packets;
@@ -314,13 +323,13 @@ TEST_F(GateCalculatorTest, AllowWithStateChange) {
output_stream: "STATE_CHANGE:state_changed"
)");
constexpr int64 kTimestampValue0 = 42;
constexpr int64_t kTimestampValue0 = 42;
RunTimeStep(kTimestampValue0, "ALLOW", false);
constexpr int64 kTimestampValue1 = 43;
constexpr int64_t kTimestampValue1 = 43;
RunTimeStep(kTimestampValue1, "ALLOW", true);
constexpr int64 kTimestampValue2 = 44;
constexpr int64_t kTimestampValue2 = 44;
RunTimeStep(kTimestampValue2, "ALLOW", true);
constexpr int64 kTimestampValue3 = 45;
constexpr int64_t kTimestampValue3 = 45;
RunTimeStep(kTimestampValue3, "ALLOW", false);
const std::vector<Packet>& output =
@@ -332,6 +341,35 @@ TEST_F(GateCalculatorTest, AllowWithStateChange) {
EXPECT_EQ(false, output[1].Get<bool>()); // Disallow.
}
TEST_F(GateCalculatorTest, AllowWithStateChangeNoDataStreams) {
SetRunner(R"(
calculator: "GateCalculator"
input_stream: "ALLOW:gating_stream"
output_stream: "STATE_CHANGE:state_changed"
)");
constexpr int64_t kTimestampValue0 = 42;
RunTimeStepWithoutDataStream(kTimestampValue0, "ALLOW", false);
constexpr int64_t kTimestampValue1 = 43;
RunTimeStepWithoutDataStream(kTimestampValue1, "ALLOW", true);
constexpr int64_t kTimestampValue2 = 44;
RunTimeStepWithoutDataStream(kTimestampValue2, "ALLOW", true);
constexpr int64_t kTimestampValue3 = 45;
RunTimeStepWithoutDataStream(kTimestampValue3, "ALLOW", false);
LOG(INFO) << "a";
const std::vector<Packet>& output =
runner()->Outputs().Get("STATE_CHANGE", 0).packets;
LOG(INFO) << "s";
ASSERT_EQ(2, output.size());
LOG(INFO) << "d";
EXPECT_EQ(kTimestampValue1, output[0].Timestamp().Value());
EXPECT_EQ(kTimestampValue3, output[1].Timestamp().Value());
LOG(INFO) << "f";
EXPECT_EQ(true, output[0].Get<bool>()); // Allow.
EXPECT_EQ(false, output[1].Get<bool>()); // Disallow.
LOG(INFO) << "g";
}
TEST_F(GateCalculatorTest, DisallowWithStateChange) {
SetRunner(R"(
calculator: "GateCalculator"
@@ -341,13 +379,13 @@ TEST_F(GateCalculatorTest, DisallowWithStateChange) {
output_stream: "STATE_CHANGE:state_changed"
)");
constexpr int64 kTimestampValue0 = 42;
constexpr int64_t kTimestampValue0 = 42;
RunTimeStep(kTimestampValue0, "DISALLOW", true);
constexpr int64 kTimestampValue1 = 43;
constexpr int64_t kTimestampValue1 = 43;
RunTimeStep(kTimestampValue1, "DISALLOW", false);
constexpr int64 kTimestampValue2 = 44;
constexpr int64_t kTimestampValue2 = 44;
RunTimeStep(kTimestampValue2, "DISALLOW", false);
constexpr int64 kTimestampValue3 = 45;
constexpr int64_t kTimestampValue3 = 45;
RunTimeStep(kTimestampValue3, "DISALLOW", true);
const std::vector<Packet>& output =
@@ -359,6 +397,31 @@ TEST_F(GateCalculatorTest, DisallowWithStateChange) {
EXPECT_EQ(false, output[1].Get<bool>()); // Disallow.
}
TEST_F(GateCalculatorTest, DisallowWithStateChangeNoDataStreams) {
SetRunner(R"(
calculator: "GateCalculator"
input_stream: "DISALLOW:gating_stream"
output_stream: "STATE_CHANGE:state_changed"
)");
constexpr int64_t kTimestampValue0 = 42;
RunTimeStepWithoutDataStream(kTimestampValue0, "DISALLOW", true);
constexpr int64_t kTimestampValue1 = 43;
RunTimeStepWithoutDataStream(kTimestampValue1, "DISALLOW", false);
constexpr int64_t kTimestampValue2 = 44;
RunTimeStepWithoutDataStream(kTimestampValue2, "DISALLOW", false);
constexpr int64_t kTimestampValue3 = 45;
RunTimeStepWithoutDataStream(kTimestampValue3, "DISALLOW", true);
const std::vector<Packet>& output =
runner()->Outputs().Get("STATE_CHANGE", 0).packets;
ASSERT_EQ(2, output.size());
EXPECT_EQ(kTimestampValue1, output[0].Timestamp().Value());
EXPECT_EQ(kTimestampValue3, output[1].Timestamp().Value());
EXPECT_EQ(true, output[0].Get<bool>()); // Allow.
EXPECT_EQ(false, output[1].Get<bool>()); // Disallow.
}
// Must not detect disallow value for first timestamp as a state change.
TEST_F(GateCalculatorTest, DisallowInitialNoStateTransition) {
SetRunner(R"(
@@ -369,7 +432,7 @@ TEST_F(GateCalculatorTest, DisallowInitialNoStateTransition) {
output_stream: "STATE_CHANGE:state_changed"
)");
constexpr int64 kTimestampValue0 = 42;
constexpr int64_t kTimestampValue0 = 42;
RunTimeStep(kTimestampValue0, "DISALLOW", false);
const std::vector<Packet>& output =
@@ -387,7 +450,7 @@ TEST_F(GateCalculatorTest, AllowInitialNoStateTransition) {
output_stream: "STATE_CHANGE:state_changed"
)");
constexpr int64 kTimestampValue0 = 42;
constexpr int64_t kTimestampValue0 = 42;
RunTimeStep(kTimestampValue0, "ALLOW", true);
const std::vector<Packet>& output =
@@ -395,5 +458,29 @@ TEST_F(GateCalculatorTest, AllowInitialNoStateTransition) {
ASSERT_EQ(0, output.size());
}
// Must detect allow value for first timestamp as a state change when the
// initial state is set to GATE_DISALLOW.
TEST_F(GateCalculatorTest, StateChangeTriggeredWithInitialGateStateOption) {
SetRunner(R"(
calculator: "GateCalculator"
input_stream: "test_input"
input_stream: "ALLOW:allow"
output_stream: "test_output"
output_stream: "STATE_CHANGE:state_change"
options: {
[mediapipe.GateCalculatorOptions.ext] {
initial_gate_state: GATE_DISALLOW
}
}
)");
constexpr int64_t kTimestampValue0 = 42;
RunTimeStep(kTimestampValue0, "ALLOW", true);
const std::vector<Packet>& output =
runner()->Outputs().Get("STATE_CHANGE", 0).packets;
ASSERT_EQ(1, output.size());
}
} // namespace
} // namespace mediapipe
@@ -17,6 +17,7 @@
#include "mediapipe/framework/formats/classification.pb.h"
#include "mediapipe/framework/formats/detection.pb.h"
#include "mediapipe/framework/formats/landmark.pb.h"
#include "mediapipe/framework/formats/rect.pb.h"
namespace mediapipe {
namespace api2 {
@@ -37,5 +38,12 @@ using GetDetectionVectorItemCalculator =
GetVectorItemCalculator<mediapipe::Detection>;
REGISTER_CALCULATOR(GetDetectionVectorItemCalculator);
using GetNormalizedRectVectorItemCalculator =
GetVectorItemCalculator<NormalizedRect>;
REGISTER_CALCULATOR(GetNormalizedRectVectorItemCalculator);
using GetRectVectorItemCalculator = GetVectorItemCalculator<Rect>;
REGISTER_CALCULATOR(GetRectVectorItemCalculator);
} // namespace api2
} // namespace mediapipe
@@ -94,17 +94,17 @@ class GraphProfileCalculatorTest : public ::testing::Test {
&graph_config_));
}
static Packet PacketAt(int64 ts) {
return Adopt(new int64(999)).At(Timestamp(ts));
static Packet PacketAt(int64_t ts) {
return Adopt(new int64_t(999)).At(Timestamp(ts));
}
static Packet None() { return Packet().At(Timestamp::OneOverPostStream()); }
static bool IsNone(const Packet& packet) {
return packet.Timestamp() == Timestamp::OneOverPostStream();
}
// Return the values of the timestamps of a vector of Packets.
static std::vector<int64> TimestampValues(
static std::vector<int64_t> TimestampValues(
const std::vector<Packet>& packets) {
std::vector<int64> result;
std::vector<int64_t> result;
for (const Packet& p : packets) {
result.push_back(p.Timestamp().Value());
}
@@ -191,17 +191,17 @@ class ImmediateMuxCalculatorTest : public ::testing::Test {
&graph_config_));
}
static Packet PacketAt(int64 ts) {
return Adopt(new int64(999)).At(Timestamp(ts));
static Packet PacketAt(int64_t ts) {
return Adopt(new int64_t(999)).At(Timestamp(ts));
}
static Packet None() { return Packet().At(Timestamp::OneOverPostStream()); }
static bool IsNone(const Packet& packet) {
return packet.Timestamp() == Timestamp::OneOverPostStream();
}
// Return the values of the timestamps of a vector of Packets.
static std::vector<int64> TimestampValues(
static std::vector<int64_t> TimestampValues(
const std::vector<Packet>& packets) {
std::vector<int64> result;
std::vector<int64_t> result;
for (const Packet& p : packets) {
result.push_back(p.Timestamp().Value());
}
@@ -35,7 +35,7 @@ class MatrixToVectorCalculatorTest
void SetUp() override { calculator_name_ = "MatrixToVectorCalculator"; }
void AppendInput(const std::vector<float>& column_major_data,
int64 timestamp) {
int64_t timestamp) {
ASSERT_EQ(num_input_samples_ * num_input_channels_,
column_major_data.size());
Eigen::Map<const Matrix> data_map(&column_major_data[0],
@@ -1,4 +1,4 @@
/* Copyright 2022 The MediaPipe Authors. All Rights Reserved.
/* Copyright 2022 The MediaPipe Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

Some files were not shown because too many files have changed in this diff Show More