Commit Graph

2919 Commits

Author SHA1 Message Date
definability
4c21321775 Android. Process ARGB and Grayscale input packets
Issue https://github.com/google/mediapipe/issues/5017
points to the issue of incorrect bitmap conversion in
Android when RGBA or Grayscale images are used.
As far as the library allows the creation of ALPHA8 bitmaps,
it is not enough to use only `getBitmapFromRgb` and `getBitmapFromRgba`,
so the new `getBitmapFromAlpha` method is needed.
Otherwise, existing users relying on the 8-bit input but not using the
input packet would catch errors despite their code operating as
intended.

Add correct processing of images with 1, 3, and 4 channels
to `FaceDetector`, `FaceLandmarker`, `FaceStylizer`,
`GestureRecognizer`, `HandLandmarker`, `HolisticLandmarker`,
`ImageClassifier`, `ImageEmbedder`, `ImageSegmenter`,
`InteractiveSegmenter`, `ObjectDetector`, and `PoseLandmarker`.
If the number of channels is not 1, 3, or 4,
throw MediaPipeException with `INVALID_ARGUMENT` status code.

Implement methods and functions needed to convert single-channel images
to RGBA bitmaps.
The native function `AlphaToRGBA` uses `memset`
to set all bytes of the resulting buffer to zeros
and then copies the alpha values of the input image to the alpha values
of the corresponding output pixels.

Perform a slight refactoring:
use `operator[i]` instead of `*(array + i)` for clarity.
2023-12-10 16:30:04 +00:00
MediaPipe Team
61efcf5a11 internal-only change
PiperOrigin-RevId: 589284167
2023-12-08 17:23:55 -08:00
Dmitri Gribenko
4e78e645d0 No public description
PiperOrigin-RevId: 589279414
2023-12-08 17:01:53 -08:00
Copybara-Service
faae68e81d Merge pull request #5010 from kinaryml:c-hand-landmarker-api
PiperOrigin-RevId: 588900627
2023-12-07 13:58:10 -08:00
Sebastian Schmidt
20743b8110 Update MediaPipe development version to 0.10.9
PiperOrigin-RevId: 588890763
2023-12-07 13:27:41 -08:00
Jiuqiang Tang
0a77b8c57b No public description
PiperOrigin-RevId: 588827865
2023-12-07 10:04:46 -08:00
MediaPipe Team
66655a15b2 API 2: Do not redirect from MEDIAPIPE_REGISTER_NODE to REGISTER_CALCULATOR
The problem with redirecting is that the calling code has to include API 1 code (often third_party/mediapipe/framework/calculator_framework.h), even though they are only using API 2 functionality (albeit deprecated). This can lead to weird issues, e.g. MakePacket<T> confusingly does not return a Packet<T>, but a Packet, because it's using the API 1 version.

PiperOrigin-RevId: 588798455
2023-12-07 08:20:28 -08:00
Kinar
6909504ca9 Fix naming in different files 2023-12-07 00:25:54 -08:00
MediaPipe Team
fad3785721 Export java package for hand_roi_refinement_graph_options.
PiperOrigin-RevId: 588537174
2023-12-06 14:08:46 -08:00
MediaPipe Team
78af80027a No user facing changes
PiperOrigin-RevId: 588501289
2023-12-06 12:05:21 -08:00
Sebastian Schmidt
0a3f27d1ce Move hand_roi_refinement_graph_options_java_proto_lite to vision lib
PiperOrigin-RevId: 588444225
2023-12-06 09:04:08 -08:00
MediaPipe Team
e4a6ea3079 No public description
PiperOrigin-RevId: 588376739
2023-12-06 04:31:59 -08:00
Kinar
b5c1c11f6a Added Hand Landmarker C Tasks API and tests 2023-12-06 02:59:39 -08:00
Sebastian Schmidt
0f90ba17dc Use Java Proto Lite Target for Hand ROI Refinement proto
PiperOrigin-RevId: 588170664
2023-12-05 13:26:23 -08:00
Sebastian Schmidt
dad2626f91 No public description
PiperOrigin-RevId: 587850211
2023-12-04 14:58:44 -08:00
MediaPipe Team
b91ec031a2 Adding version.bzl for tracking version
PiperOrigin-RevId: 587767961
2023-12-04 10:31:42 -08:00
Dmitri Gribenko
3d8b715dd6 No public description
PiperOrigin-RevId: 587559637
2023-12-03 17:53:22 -08:00
MediaPipe Team
507d677d44 Internal change
PiperOrigin-RevId: 587325154
2023-12-02 09:47:33 -08:00
Sebastian Schmidt
f35ecb6c8b Add dependency on hand_roi_refinement_graph_options_proto
PiperOrigin-RevId: 587082550
2023-12-01 12:21:07 -08:00
Youchuan Hu
a0eda45baf Add TensorsToSegmentationCalculator test utilities.
PiperOrigin-RevId: 586817713
2023-11-30 16:17:17 -08:00
Sebastian Schmidt
7013b23785 No public description
PiperOrigin-RevId: 586813896
2023-11-30 16:06:16 -08:00
Sebastian Schmidt
3433ba083a Move LanguageDetectorResult converter to LanguageDetector task
PiperOrigin-RevId: 586812754
2023-11-30 16:01:14 -08:00
Copybara-Service
80e4e1599a Merge pull request #4972 from priankakariatyml:ios-pose-landmarker-implementation
PiperOrigin-RevId: 586811420
2023-11-30 15:53:32 -08:00
Sebastian Schmidt
2b53891a7c Add lib targets for all C vision tasks
PiperOrigin-RevId: 586805240
2023-11-30 15:37:35 -08:00
Copybara-Service
7d73a3e1fd Merge pull request #4993 from kinaryml:c-landmarker-apis
PiperOrigin-RevId: 586804764
2023-11-30 15:32:12 -08:00
Sebastian Schmidt
e5c7ebec12 Add libtext and libvision build rules
PiperOrigin-RevId: 586804071
2023-11-30 15:27:19 -08:00
Copybara-Service
53cd40cdd0 Merge pull request #4995 from priankakariatyml:ios-interactive-segmenter-containers
PiperOrigin-RevId: 586779717
2023-11-30 14:05:42 -08:00
Kinar
9a5aa1b360 Refactor GestureRecognizerResult conversion for default initialization 2023-11-30 09:13:10 -08:00
Prianka Liz Kariat
90622475a2 Added iOS interactive segmenter header 2023-11-30 02:32:08 +05:30
Prianka Liz Kariat
f5ac0637a2 Updated iOS vision/core to add methods for processing region of interest 2023-11-30 02:31:48 +05:30
Prianka Liz Kariat
4c02980b3f Added iOS region of interest helpers 2023-11-30 02:31:11 +05:30
Prianka Liz Kariat
4137dbcbf5 Added iOS region of interest 2023-11-30 02:30:42 +05:30
Prianka Liz Kariat
3532503354 Added iOS interactive segmenter options 2023-11-30 02:05:23 +05:30
Copybara-Service
bb4906bcd3 Merge pull request #4966 from kinaryml:python-vision-benchmark-scripts
PiperOrigin-RevId: 586349225
2023-11-29 08:27:59 -08:00
Kinar
d19d5a50be Added FreeMemory test for GestureRecognizerResult 2023-11-29 03:17:35 -08:00
Kinar R
6ed5e3d0df
Merge branch 'master' into c-landmarker-apis 2023-11-29 16:41:12 +05:30
Kinar
3c655e2334 Revised Gesture Recognizer API implementation and associated tests 2023-11-29 03:08:09 -08:00
MediaPipe Team
91589b10d3 internal change.
PiperOrigin-RevId: 586156439
2023-11-28 18:07:30 -08:00
Sebastian Schmidt
62bafd39bb HolisticLandmarker Java API
PiperOrigin-RevId: 586113048
2023-11-28 15:00:54 -08:00
Sebastian Schmidt
a898215c52 Holistic Landmarker C++ Graph
PiperOrigin-RevId: 586105983
2023-11-28 14:36:19 -08:00
MediaPipe Team
95601ff98b Remove internal logs.
PiperOrigin-RevId: 585782033
2023-11-27 15:51:21 -08:00
Copybara-Service
6fa9848a15 Merge pull request #4978 from amacsmith:master
PiperOrigin-RevId: 585775506
2023-11-27 15:25:00 -08:00
Copybara-Service
090e74a0aa Merge pull request #4964 from kinaryml:c-object-detector-api
PiperOrigin-RevId: 585765946
2023-11-27 14:51:35 -08:00
MediaPipe Team
1ff7e95295 No public description
PiperOrigin-RevId: 585719403
2023-11-27 12:01:38 -08:00
Sebastian Schmidt
8d57a9e2e8 Add missing export declarations to DrawingUtils
Fixes https://github.com/google/mediapipe/issues/4980

PiperOrigin-RevId: 585705106
2023-11-27 11:16:23 -08:00
Kinar
17c0c960be Added Gesture Recognizer C API and tests 2023-11-27 04:51:32 -08:00
Alex Macdonald-Smith
5ca859f90b
Updated mediapipe/mediapipe/tasks/web /vision/README.md
There was a typo in the url referencing Gesture Recognizer

```
const gestureRecognizer = await GestureRecognizer.createFromModelPath(vision,
    "hhttps://storage.googleapis.com/mediapipe-models/gesture_recognizer/gesture_recognizer/float16/1/gesture_recognizer.task"
);
```

changed to 
```
const gestureRecognizer = await GestureRecognizer.createFromModelPath(vision,
    "https://storage.googleapis.com/mediapipe-models/gesture_recognizer/gesture_recognizer/float16/1/gesture_recognizer.task"
);
```

The extra 'h' was dropped.

Let me know if there are anymore updates needed for this.
2023-11-21 16:03:57 -05:00
Tony Allevato
e7edd97eff Internal change.
PiperOrigin-RevId: 584399894
2023-11-21 12:33:58 -08:00
MediaPipe Team
0d298d7a67 No public description
PiperOrigin-RevId: 584349220
2023-11-21 09:39:09 -08:00
Prianka Liz Kariat
447f9cc452 Fixed formatting of MPPPoseLandmarkerTests.mm 2023-11-20 22:37:43 +05:30