Commit Graph

629 Commits

Author SHA1 Message Date
Camillo Lugaresi
4bda012bba Factor out gl_texture_util
PiperOrigin-RevId: 488797985
2022-11-15 17:13:22 -08:00
Camillo Lugaresi
77b3edbb67 Internal change
PiperOrigin-RevId: 488797407
2022-11-15 17:09:43 -08:00
Mark McDonald
6702ef3d57 Internal change
PiperOrigin-RevId: 488796090
2022-11-15 17:04:31 -08:00
Camillo Lugaresi
7e19bbe35c Internal change
PiperOrigin-RevId: 488795920
2022-11-15 17:01:33 -08:00
Camillo Lugaresi
1beca61650 Register GlTextureBuffer pool with GpuBuffer
First crack at hooking up pools with the GpuBufferStorage system. Will most likely be superseded later, but for now this works with minimal code impact: just overwrite the factory for a storage type with one that uses the pool.

PiperOrigin-RevId: 488783854
2022-11-15 16:19:48 -08:00
Camillo Lugaresi
583d27636b Factor out ReusablePool
PiperOrigin-RevId: 488783477
2022-11-15 16:18:20 -08:00
Camillo Lugaresi
ab074a579a Internal change
PiperOrigin-RevId: 488783325
2022-11-15 16:17:04 -08:00
Camillo Lugaresi
53d015af08 Generic MultiPool template
PiperOrigin-RevId: 488783176
2022-11-15 16:15:42 -08:00
Camillo Lugaresi
b9fa2e3496 Make it possible to override the SimplePool factory used by MultiPool
This means MultiPool no longer needs a SetFlushPlatformCaches method, which was too specific to the CVPixelBufferPool.

PiperOrigin-RevId: 488783003
2022-11-15 16:14:27 -08:00
Camillo Lugaresi
267476657d MultiPool options header refactoring
Passing MultiPool options to the base pool factories means that we don't have to specialize which options we pass to them.

PiperOrigin-RevId: 488782861
2022-11-15 16:13:05 -08:00
Camillo Lugaresi
7ef3185ecb Allow customizing MultiPool options
These don't need to be constants.

PiperOrigin-RevId: 488782713
2022-11-15 16:11:54 -08:00
Camillo Lugaresi
f13903b7c5 Call SimplePool methods directly
This removes redundant helper functions in GpuBufferMultiPool.

PiperOrigin-RevId: 488782516
2022-11-15 16:10:34 -08:00
Camillo Lugaresi
0c4522cb9f Move flush hook to CvPixelBufferPoolWrapper constructor
This unifies the implementation of GpuBufferMultiPool::GetBufferFromSimplePool.

PiperOrigin-RevId: 488782173
2022-11-15 16:07:17 -08:00
Camillo Lugaresi
a4fe3eb094 Add CreateBufferWithoutPool method to base pools
This may not fit exactly in a pool class, but it makes it easy for the multi-pool to find the appropriate method by depending only on the type of the base pool. For the CVPixelBuffer case, the buffer type is CFHolder<CVPixelBufferRef>, and it seems even less appropriate to specialize that template to add such a method there. An alternative would be to allow defining a creation function separately.

PiperOrigin-RevId: 488782054
2022-11-15 16:05:53 -08:00
Camillo Lugaresi
0d273dd11a Factor out CvPixelBufferPoolWrapper
This is platform-specific and does not need to live in the main multi_pool sources.

PiperOrigin-RevId: 488781934
2022-11-15 16:04:27 -08:00
Camillo Lugaresi
ab2dd779e7 Factor out CvTextureCacheManager
This is a platform-specific component that is only used with CVPixelBufferPool.

PiperOrigin-RevId: 488781757
2022-11-15 16:02:53 -08:00
MediaPipe Team
fae55910f4 Enable absl::string_view kCalculatorName
PiperOrigin-RevId: 488781493
2022-11-15 15:59:09 -08:00
Camillo Lugaresi
a520d6cc38 Remove FORCE_CONTIGUOUS_PIXEL_BUFFER_ON_IPHONE_SIMULATOR
This workaround code is no longer necessary, as per the comment.

PiperOrigin-RevId: 488777606
2022-11-15 15:41:53 -08:00
Camillo Lugaresi
3c71c64be1 Remove shared_ptr from SimplePool definition
This makes the types more explicit and will help with factoring out platform-specific code.

PiperOrigin-RevId: 488775470
2022-11-15 15:32:57 -08:00
Camillo Lugaresi
a67069156e Use flat_hash_map in ResourceCache
This is the recommended hashmap in most cases.

PiperOrigin-RevId: 488772031
2022-11-15 15:23:31 -08:00
MediaPipe Team
38b636f7ee Internal change
PiperOrigin-RevId: 488770794
2022-11-15 15:19:48 -08:00
Camillo Lugaresi
7a87546c30 Internal change
PiperOrigin-RevId: 488761646
2022-11-15 14:39:58 -08:00
MediaPipe Team
e65f21e2d8 Update the docstring to make it consistent with the model option update.
PiperOrigin-RevId: 488761331
2022-11-15 14:36:48 -08:00
Sebastian Schmidt
496720308c Migrate remaining MP Tasks Libraries to ts_declarations
PiperOrigin-RevId: 488752799
2022-11-15 14:08:15 -08:00
MediaPipe Team
1689112b23 Improve model_util_test code.
PiperOrigin-RevId: 488752497
2022-11-15 14:04:39 -08:00
Jiuqiang Tang
a94564540b Bump up the dependency library pybind11's version to 2.10.1.
PiperOrigin-RevId: 488718815
2022-11-15 11:51:20 -08:00
MediaPipe Team
f14645cb06 Model maker gesture recognizer test changes
PiperOrigin-RevId: 488702055
2022-11-15 10:50:32 -08:00
MediaPipe Team
ebba119f15 Add Java ImageEmbedder API.
PiperOrigin-RevId: 488588010
2022-11-15 01:26:00 -08:00
Camillo Lugaresi
6f54308c25 Internal change
PiperOrigin-RevId: 488552135
2022-11-14 21:42:41 -08:00
Jiuqiang Tang
87dff8142c Fix a typo.
PiperOrigin-RevId: 488519113
2022-11-14 18:13:50 -08:00
Sebastian Schmidt
9bd8b432c3 Add typings support to d.ts package
PiperOrigin-RevId: 488519074
2022-11-14 18:10:25 -08:00
Jiuqiang Tang
f16e63694e Build embedding tasks into tasks AARs.
PiperOrigin-RevId: 488509942
2022-11-14 17:18:12 -08:00
Sebastian Schmidt
a12bc3fd0e Add IIFE bundles for NPM packages
PiperOrigin-RevId: 488504360
2022-11-14 16:51:58 -08:00
Jiuqiang Tang
794f64db55 Fix the wrong path of "text_embedder_graph_options_java_proto_lite".
PiperOrigin-RevId: 488490050
2022-11-14 15:51:05 -08:00
Jiuqiang Tang
cce1751dbf Expose tasks components API in PyPI packages.
PiperOrigin-RevId: 488487666
2022-11-14 15:41:11 -08:00
Jiuqiang Tang
e714e656fe Update python documentation.
PiperOrigin-RevId: 488482142
2022-11-14 15:18:47 -08:00
Sebastian Schmidt
c027373688 Internal change
PiperOrigin-RevId: 488481286
2022-11-14 15:15:22 -08:00
Sebastian Schmidt
11270d0c93 Image Embedder for Web
PiperOrigin-RevId: 488468214
2022-11-14 14:26:15 -08:00
Jiuqiang Tang
b4fba6fe61 MediaPipe Tasks AudioEmbedder Java API
PiperOrigin-RevId: 488456442
2022-11-14 13:42:55 -08:00
Sebastian Schmidt
ca7b5e9d8b Fix Script loading
PiperOrigin-RevId: 488440736
2022-11-14 12:40:41 -08:00
Copybara-Service
9a2af2f2a1 Merge pull request #3853 from kinaryml:audio-embedder-python
PiperOrigin-RevId: 488434586
2022-11-14 12:16:45 -08:00
Sebastian Schmidt
b00236e86e Hand Landmarker Web API
PiperOrigin-RevId: 488434079
2022-11-14 12:13:27 -08:00
MediaPipe Team
34daba4747 Add Java TextEmbedder API.
PiperOrigin-RevId: 488427327
2022-11-14 11:49:56 -08:00
Jiuqiang Tang
b40b2ade14 Fix typos.
PiperOrigin-RevId: 488416345
2022-11-14 11:07:59 -08:00
Jiuqiang Tang
4b5c3521af Dividing the timestamp by 1000 when returning a "none" result object from GestureRecognizer and HandLandmarker APIs.
PiperOrigin-RevId: 488409077
2022-11-14 10:44:20 -08:00
MediaPipe Team
c7d531ebb2 AddTarget -> ConnectTo and documentation
PiperOrigin-RevId: 488407930
2022-11-14 10:40:06 -08:00
MediaPipe Team
05cb40ff79 MediaPipe TextEmbedder task for web
PiperOrigin-RevId: 488373613
2022-11-14 08:34:09 -08:00
MediaPipe Team
badaccfb04 Internal change
PiperOrigin-RevId: 488333493
2022-11-14 05:05:03 -08:00
Nikolay Chirkov
bc6240e989 Zero-initialize id<MTLDevice> etc. members in Tensor
PiperOrigin-RevId: 488308585
2022-11-14 02:31:15 -08:00
Sebastian Schmidt
6610ca72ba Add ts_declaration rule for OSS
PiperOrigin-RevId: 488307893
2022-11-14 02:27:21 -08:00