From 1089f60ff5b18469ccf8553811e1177412cbb0b3 Mon Sep 17 00:00:00 2001 From: Koki Ibukuro Date: Sun, 14 May 2023 11:03:05 +0200 Subject: [PATCH 1/7] build macOS libs on v2.11.1 --- .../Plugins/macOS/libtensorflowlite_c.dylib | 4 ++-- .../Plugins/macOS/libtensorflowlite_metal_delegate.dylib | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Packages/com.github.asus4.tflite/Plugins/macOS/libtensorflowlite_c.dylib b/Packages/com.github.asus4.tflite/Plugins/macOS/libtensorflowlite_c.dylib index 35e74f4e9..cdc265168 100755 --- a/Packages/com.github.asus4.tflite/Plugins/macOS/libtensorflowlite_c.dylib +++ b/Packages/com.github.asus4.tflite/Plugins/macOS/libtensorflowlite_c.dylib @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:46e3a20ba208cedd852eeed5c0c9b482d8488c629058bf928b131f2e29c40565 -size 9792838 +oid sha256:668a12b5afc571f1bae93ef901a796acd22d6c22b3e41a11145a744af470189c +size 9859830 diff --git a/Packages/com.github.asus4.tflite/Plugins/macOS/libtensorflowlite_metal_delegate.dylib b/Packages/com.github.asus4.tflite/Plugins/macOS/libtensorflowlite_metal_delegate.dylib index ab6c52ffb..7e7904df8 100755 --- a/Packages/com.github.asus4.tflite/Plugins/macOS/libtensorflowlite_metal_delegate.dylib +++ b/Packages/com.github.asus4.tflite/Plugins/macOS/libtensorflowlite_metal_delegate.dylib @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4fedffb36b13aea60fd2ea785ee8b3110d57338a4df390e2462c2ac9211fa4b2 -size 4910576 +oid sha256:db788f6d9e38e44fae075760c2110cb83e0d5e33dbab04c57eab694f55628e5b +size 4912464 From 7772f11248d6600239fc76b0c76af0f7ba1b7ee3 Mon Sep 17 00:00:00 2001 From: Koki Ibukuro Date: Sun, 14 May 2023 16:43:04 +0200 Subject: [PATCH 2/7] Add builtin ops --- .../Plugins/iOS/TensorFlowLiteC.framework/Headers/builtin_ops.h | 2 ++ Packages/com.github.asus4.tflite/Runtime/BuiltinOps.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteC.framework/Headers/builtin_ops.h b/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteC.framework/Headers/builtin_ops.h index fdbe14ccf..337073080 100755 --- a/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteC.framework/Headers/builtin_ops.h +++ b/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteC.framework/Headers/builtin_ops.h @@ -184,6 +184,8 @@ typedef enum { kTfLiteBuiltinUnsortedSegmentMax = 154, kTfLiteBuiltinUnsortedSegmentSum = 155, kTfLiteBuiltinAtan2 = 156, + kTfLiteBuiltinUnsortedSegmentMin = 157, + kTfLiteBuiltinSign = 158, } TfLiteBuiltinOperator; #ifdef __cplusplus diff --git a/Packages/com.github.asus4.tflite/Runtime/BuiltinOps.cs b/Packages/com.github.asus4.tflite/Runtime/BuiltinOps.cs index b3c112a9a..3a836a035 100644 --- a/Packages/com.github.asus4.tflite/Runtime/BuiltinOps.cs +++ b/Packages/com.github.asus4.tflite/Runtime/BuiltinOps.cs @@ -177,5 +177,7 @@ public enum BuiltinOperator UnsortedSegmentMax = 154, UnsortedSegmentSum = 155, Atan2 = 156, + UnsortedSegmentMin = 157, + Sign = 158, } } From 41f54ae17ab7d35efa6bc780b80d7ee8bb34f737 Mon Sep 17 00:00:00 2001 From: Koki Ibukuro Date: Sun, 14 May 2023 16:52:36 +0200 Subject: [PATCH 3/7] Add iOS libs for 2.11.1 --- .../TensorFlowLiteC.framework/Headers/c_api.h | 77 +++++++++++++-- .../Headers/c_api_types.h | 17 ++++ .../Headers/common.h | 94 ++++++++++++++++++- .../TensorFlowLiteC.framework/TensorFlowLiteC | 4 +- .../TensorFlowLiteCMetal | 4 +- 5 files changed, 180 insertions(+), 16 deletions(-) diff --git a/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteC.framework/Headers/c_api.h b/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteC.framework/Headers/c_api.h index a899f0d43..dc346ce67 100755 --- a/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteC.framework/Headers/c_api.h +++ b/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteC.framework/Headers/c_api.h @@ -12,13 +12,18 @@ 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. ==============================================================================*/ -#ifndef TENSORFLOW_LITE_C_C_API_H_ -#define TENSORFLOW_LITE_C_C_API_H_ +/// WARNING: Users of TensorFlow Lite should not include this file directly, +/// but should instead include "third_party/tensorflow/lite/c/c_api.h". +/// Only the TensorFlow Lite implementation itself should include this +/// file directly. +#ifndef TENSORFLOW_LITE_CORE_C_C_API_H_ +#define TENSORFLOW_LITE_CORE_C_C_API_H_ #include #include #include +#include "builtin_ops.h" #include "c_api_types.h" // IWYU pragma: export // -------------------------------------------------------------------------- @@ -112,13 +117,19 @@ TFL_CAPI_EXPORT extern const char* TfLiteVersion(void); // Returns a model from the provided buffer, or null on failure. // -// NOTE: The caller retains ownership of the `model_data` and should ensure that -// the lifetime of the `model_data` must be at least as long as the lifetime -// of the `TfLiteModel`. +// NOTE: The caller retains ownership of the `model_data` buffer and should +// ensure that the lifetime of the `model_data` buffer must be at least as long +// as the lifetime of the `TfLiteModel` and of any `TfLiteInterpreter` objects +// created from that `TfLiteModel`, and furthermore the contents of the +// `model_data` buffer must not be modified during that time." TFL_CAPI_EXPORT extern TfLiteModel* TfLiteModelCreate(const void* model_data, size_t model_size); // Returns a model from the provided file, or null on failure. +// +// NOTE: The file's contents must not be modified during the lifetime of the +// `TfLiteModel` or of any `TfLiteInterpreter` objects created from that +// `TfLiteModel`. TFL_CAPI_EXPORT extern TfLiteModel* TfLiteModelCreateFromFile( const char* model_path); @@ -132,13 +143,42 @@ TFL_CAPI_EXPORT extern void TfLiteModelDelete(TfLiteModel* model); // the lifetime of the `TfLiteInterpreter`. // WARNING: This is an experimental API and subject to change. TFL_CAPI_EXPORT extern TfLiteRegistrationExternal* -TfLiteRegistrationExternalCreate(const char* custom_name, const int version); +TfLiteRegistrationExternalCreate(TfLiteBuiltinOperator builtin_code, + const char* custom_name, int version); + +// Return the builtin op code of the provided external 'registration'. +// +// WARNING: This is an experimental API and subject to change. +TFL_CAPI_EXPORT extern TfLiteBuiltinOperator +TfLiteRegistrationExternalGetBuiltInCode( + const TfLiteRegistrationExternal* registration); // Destroys the TfLiteRegistrationExternal instance. // WARNING: This is an experimental API and subject to change. TFL_CAPI_EXPORT extern void TfLiteRegistrationExternalDelete( TfLiteRegistrationExternal* registration); +// Sets the initialization callback for the registration. +// +// The callback is called to initialize the op from serialized data. +// Please refer `init` of `TfLiteRegistration` for the detail. +// WARNING: This is an experimental API and subject to change. +TFL_CAPI_EXPORT extern void TfLiteRegistrationExternalSetInit( + TfLiteRegistrationExternal* registration, + void* (*init)(TfLiteOpaqueContext* context, const char* buffer, + size_t length)); + +// Sets the deallocation callback for the registration. +// +// This callback is called to deallocate the data returned by the init callback. +// The value passed in the `data` parameter is the value that was returned by +// the `init` callback. +// Please refer `free` of `TfLiteRegistration` for the detail. +// WARNING: This is an experimental API and subject to change. +TFL_CAPI_EXPORT extern void TfLiteRegistrationExternalSetFree( + TfLiteRegistrationExternal* registration, + void (*free)(TfLiteOpaqueContext* context, void* data)); + // Sets the preparation callback for the registration. // // The callback is called when the inputs of operator have been resized. @@ -181,6 +221,17 @@ TFL_CAPI_EXPORT extern void TfLiteInterpreterOptionsSetNumThreads( TFL_CAPI_EXPORT extern void TfLiteInterpreterOptionsAddDelegate( TfLiteInterpreterOptions* options, TfLiteDelegate* delegate); +// Adds an opaque delegate to be applied during `TfLiteInterpreter` creation. +// +// If delegate application fails, interpreter creation will also fail with an +// associated error logged. +// +// NOTE: The caller retains ownership of the delegate and should ensure that it +// remains valid for the duration of any created interpreter's lifetime. +TFL_CAPI_EXPORT extern void TfLiteInterpreterOptionsAddOpaqueDelegate( + TfLiteInterpreterOptions* options, + TfLiteOpaqueDelegateStruct* opaque_delegate); + // Sets a custom error reporter for interpreter execution. // // * `reporter` takes the provided `user_data` object, as well as a C-style @@ -212,9 +263,17 @@ TFL_CAPI_EXPORT extern void TfLiteInterpreterOptionsAddRegistrationExternal( // failure. // // * `model` must be a valid model instance. The caller retains ownership of the -// object, and the model must outlive the interpreter. +// object, and may destroy it (via TfLiteModelDelete) immediately after +// creating the interpreter. However, if the TfLiteModel was allocated with +// TfLiteModelCreate, then the `model_data` buffer that was passed to +// TfLiteModelCreate must outlive the lifetime of the TfLiteInterpreter object +// that this function returns, and must not be modified during that time; +// and if the TfLiteModel was allocated with TfLiteModelCreateFromFile, then +// the contents of the model file must not be modified during the lifetime of +// the TfLiteInterpreter object that this function returns. // * `optional_options` may be null. The caller retains ownership of the object, -// and can safely destroy it immediately after creating the interpreter. +// and can safely destroy it (via TfLiteInterpreterOptionsDelete) immediately +// after creating the interpreter. // // NOTE: The client *must* explicitly allocate tensors before attempting to // access input tensor data or invoke the interpreter. @@ -357,4 +416,4 @@ TFL_CAPI_EXPORT extern TfLiteStatus TfLiteTensorCopyToBuffer( } // extern "C" #endif // __cplusplus -#endif // TENSORFLOW_LITE_C_C_API_H_ +#endif // TENSORFLOW_LITE_CORE_C_C_API_H_ diff --git a/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteC.framework/Headers/c_api_types.h b/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteC.framework/Headers/c_api_types.h index d947213b2..9d7668e13 100644 --- a/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteC.framework/Headers/c_api_types.h +++ b/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteC.framework/Headers/c_api_types.h @@ -77,6 +77,13 @@ typedef enum TfLiteStatus { // resolved at runtime. This could happen when the specific op is not // registered or built with the TF Lite framework. kTfLiteUnresolvedOps = 7, + + // Generally referring to invocation cancelled by the user. + // See `interpreter::Cancel`. + // TODO(b/194915839): Implement `interpreter::Cancel`. + // TODO(b/250636993): Cancellation triggered by `SetCancellationFunction` + // should also return this status code. + kTfLiteCancelled = 8, } TfLiteStatus; // Types supported by tensor @@ -99,6 +106,7 @@ typedef enum { kTfLiteVariant = 15, kTfLiteUInt32 = 16, kTfLiteUInt16 = 17, + kTfLiteInt4 = 18, } TfLiteType; // Legacy. Will be deprecated in favor of TfLiteAffineQuantization. @@ -124,6 +132,15 @@ typedef struct TfLiteOpaqueNode TfLiteOpaqueNode; // TfLiteOpaqueTensor is an opaque version of TfLiteTensor; typedef struct TfLiteOpaqueTensor TfLiteOpaqueTensor; +// TfLiteOpaqueDelegateStruct: opaque version of TfLiteDelegate; allows +// delegation of nodes to alternative backends. +// +// This is an abstract type that is intended to have the same +// role as TfLiteDelegate from common.h, but without exposing the implementation +// details of how delegates are implemented. +// WARNING: This is an experimental type and subject to change. +typedef struct TfLiteOpaqueDelegateStruct TfLiteOpaqueDelegateStruct; + #ifdef __cplusplus } // extern C #endif diff --git a/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteC.framework/Headers/common.h b/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteC.framework/Headers/common.h index 111356bab..5bff3e114 100755 --- a/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteC.framework/Headers/common.h +++ b/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteC.framework/Headers/common.h @@ -63,6 +63,8 @@ typedef enum TfLiteExternalContextType { struct TfLiteContext; struct TfLiteDelegate; struct TfLiteRegistration; +struct TfLiteOpaqueDelegateStruct; +struct TfLiteOpaqueDelegateBuilder; // An external context is a collection of information unrelated to the TF Lite // framework, but useful to a subset of the ops. TF Lite knows very little @@ -639,8 +641,23 @@ void TfLiteTensorReset(TfLiteType type, const char* name, TfLiteIntArray* dims, // quantization, sparsity, ... TfLiteStatus TfLiteTensorCopy(const TfLiteTensor* src, TfLiteTensor* dst); -// Resize the allocated data of a (dynamic) tensor. Tensors with allocation -// types other than kTfLiteDynamic will be ignored. +// Change the size of the memory block owned by `tensor` to `num_bytes`. +// Tensors with allocation types other than kTfLiteDynamic will be ignored. +// `tensor`'s internal data buffer will be assigned a pointer +// which can safely be passed to free or realloc if `num_bytes` is zero. +// Behaviour is undefined if `tensor` is NULL. +// If `preserve_data` is true, tensor data will be unchanged in the range from +// the start of the region up to the minimum of the old and new sizes. +void TfLiteTensorResizeMaybeCopy(size_t num_bytes, TfLiteTensor* tensor, + bool preserve_data); + +// Change the size of the memory block owned by `tensor` to `num_bytes`. +// Tensors with allocation types other than kTfLiteDynamic will be ignored. +// `tensor`'s internal data buffer will be assigned a pointer +// which can safely be passed to free or realloc if `num_bytes` is zero. +// Behaviour is undefined if `tensor` is NULL. +// Tensor data will be unchanged in the range from the start of the region up to +// the minimum of the old and new sizes. void TfLiteTensorRealloc(size_t num_bytes, TfLiteTensor* tensor); #endif // TF_LITE_STATIC_MEMORY @@ -973,7 +990,7 @@ typedef enum TfLiteDelegateFlags { typedef struct TfLiteDelegate { // Data that delegate needs to identify itself. This data is owned by the // delegate. The delegate is owned in the user code, so the delegate is - // responsible for doing this when it is destroyed. + // responsible for deallocating this when it is destroyed. void* data_; // Invoked by ModifyGraphWithDelegate. This prepare is called, giving the @@ -1010,12 +1027,83 @@ typedef struct TfLiteDelegate { // Bitmask flags. See the comments in `TfLiteDelegateFlags`. int64_t flags; + + // The opaque delegate builder associated with this object. If set then the + // TF Lite runtime will give precedence to this field. E.g. instead of + // invoking 'Prepare' via the function pointer inside the 'TfLiteDelegate' + // object, the runtime will first check if the corresponding function + // pointer inside 'opaque_delegate_builder' is set and if so invoke that. + // + // If this field is non-null, then the 'Prepare' field (of the + // 'TfLiteDelegate') should be null. + struct TfLiteOpaqueDelegateBuilder* opaque_delegate_builder; } TfLiteDelegate; // Build a 'null' delegate, with all the fields properly set to their default // values. TfLiteDelegate TfLiteDelegateCreate(void); +// `TfLiteOpaqueDelegateBuilder` is used for constructing +// `TfLiteOpaqueDelegateStruct`, see `TfLiteOpaqueDelegateCreate` below. Note: +// This struct is not ABI stable. +// +// For forward source compatibility `TfLiteOpaqueDelegateBuilder` objects should +// be brace-initialized, so that all fields (including any that might be added +// in the future) get zero-initialized. The purpose of each field is exactly +// the same as with `TfLiteDelegate`. +// +// WARNING: This is an experimental interface that is subject to change. +typedef struct TfLiteOpaqueDelegateBuilder { + // Data that delegate needs to identify itself. This data is owned by the + // delegate. The delegate is owned in the user code, so the delegate is + // responsible for deallocating this when it is destroyed. + void* data; + // Invoked by ModifyGraphWithDelegate. This prepare is called, giving the + // delegate a view of the current graph through TfLiteContext*. It typically + // will look at the nodes and call ReplaceNodeSubsetsWithDelegateKernels() + // to ask the TensorFlow lite runtime to create macro-nodes to represent + // delegated subgraphs of the original graph. + TfLiteStatus (*Prepare)(TfLiteOpaqueContext* context, // NOLINT + struct TfLiteOpaqueDelegateStruct* delegate, + void* data); + // Copies the data from delegate buffer handle into raw memory of the given + // 'tensor'. Note that the delegate is allowed to allocate the raw bytes as + // long as it follows the rules for kTfLiteDynamic tensors, in which case this + // cannot be null. + TfLiteStatus (*CopyFromBufferHandle)( // NOLINT + TfLiteOpaqueContext* context, struct TfLiteOpaqueDelegateStruct* delegate, + void* data, TfLiteBufferHandle buffer_handle, TfLiteOpaqueTensor* tensor); + // Copies the data from raw memory of the given 'tensor' to delegate buffer + // handle. This can be null if the delegate doesn't use its own buffer. + TfLiteStatus (*CopyToBufferHandle)( // NOLINT + TfLiteOpaqueContext* context, struct TfLiteOpaqueDelegateStruct* delegate, + void* data, TfLiteBufferHandle buffer_handle, TfLiteOpaqueTensor* tensor); + // Frees the Delegate Buffer Handle. Note: This only frees the handle, but + // this doesn't release the underlying resource (e.g. textures). The + // resources are either owned by application layer or the delegate. + // This can be null if the delegate doesn't use its own buffer. + void (*FreeBufferHandle)(TfLiteOpaqueContext* context, // NOLINT + struct TfLiteOpaqueDelegateStruct* delegate, + void* data, TfLiteBufferHandle* handle); + // Bitmask flags. See the comments in `TfLiteDelegateFlags`. + int64_t flags; +} TfLiteOpaqueDelegateBuilder; + +// Creates an opaque delegate and returns its address. The opaque delegate will +// behave according to the provided 'opaque_delegate_builder'. The lifetime of +// the fields within the 'opaque_delegate_builder' must outlive any interaction +// between the runtime and the returned 'TfLiteOpaqueDelegateStruct'. The +// returned address should be passed to 'TfLiteOpaqueDelegateDelete' for +// deletion. If 'opaque_delegate_builder' is a null pointer, then a null +// pointer will be returned. +struct TfLiteOpaqueDelegateStruct* TfLiteOpaqueDelegateCreate( + const TfLiteOpaqueDelegateBuilder* opaque_delegate_builder); + +// Deletes the provided opaque 'delegate'. This function has no effect if the +// 'delegate' is a null pointer. +void TfLiteOpaqueDelegateDelete( + const struct TfLiteOpaqueDelegateStruct* delegate); + #ifdef __cplusplus } // extern "C" #endif // __cplusplus diff --git a/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteC.framework/TensorFlowLiteC b/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteC.framework/TensorFlowLiteC index 08ffaa8c6..e96cd3975 100755 --- a/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteC.framework/TensorFlowLiteC +++ b/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteC.framework/TensorFlowLiteC @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3d63a64c70a5eef5c777734f0563c08a9a345705d5b233f8b48b7552d41220d8 -size 43576156 +oid sha256:8d40e5d10759a84633d89bea03faaa4c0347f4509f72a357b4aed4a57dcab14c +size 20457876 diff --git a/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteCMetal.framework/TensorFlowLiteCMetal b/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteCMetal.framework/TensorFlowLiteCMetal index c0ca74459..e058e1cb1 100755 --- a/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteCMetal.framework/TensorFlowLiteCMetal +++ b/Packages/com.github.asus4.tflite/Plugins/iOS/TensorFlowLiteCMetal.framework/TensorFlowLiteCMetal @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a8b88c39f47885c5ca52a84d31f95e655bdbdc38232e8ad65e0ee05e6932278 -size 37582616 +oid sha256:42693c45cead1bea167c6b2069a5700e0c3918f7ba5f82e3372a63af22a11a6e +size 18497296 From a75d0698f145e1be1d50324ab6eb7fe5f44faaa4 Mon Sep 17 00:00:00 2001 From: Koki Ibukuro Date: Sun, 14 May 2023 17:46:13 +0200 Subject: [PATCH 4/7] Add linux libs for 2.11.1 --- .../Plugins/Linux/arm64/libtensorflowlite_c.so | 4 ++-- .../Plugins/Linux/x86_64/libtensorflowlite_c.so | 4 ++-- .../Plugins/Linux/x86_64/libtensorflowlite_gpu_delegate.so | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Packages/com.github.asus4.tflite/Plugins/Linux/arm64/libtensorflowlite_c.so b/Packages/com.github.asus4.tflite/Plugins/Linux/arm64/libtensorflowlite_c.so index d8b10dec0..f4460bf95 100755 --- a/Packages/com.github.asus4.tflite/Plugins/Linux/arm64/libtensorflowlite_c.so +++ b/Packages/com.github.asus4.tflite/Plugins/Linux/arm64/libtensorflowlite_c.so @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3963747f987600829b07089da029e006a8a6a7ebcda47947d2858af4abebb7cf -size 3622976 +oid sha256:16fe33d5f3c37da7f23b597317c7dc541b90af6bdf7274c8364dd8e37bac133b +size 3659976 diff --git a/Packages/com.github.asus4.tflite/Plugins/Linux/x86_64/libtensorflowlite_c.so b/Packages/com.github.asus4.tflite/Plugins/Linux/x86_64/libtensorflowlite_c.so index d05caee8a..2b49f0187 100755 --- a/Packages/com.github.asus4.tflite/Plugins/Linux/x86_64/libtensorflowlite_c.so +++ b/Packages/com.github.asus4.tflite/Plugins/Linux/x86_64/libtensorflowlite_c.so @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c27cdb1dae18362f3119b95fe6b093cf1dce57ac590e2e1113b750dabffcb582 -size 4572280 +oid sha256:8155ba2323b91a8e61a86d3b6ed76afda6282abfbdaa77a3b82967ee1d8649f6 +size 4605240 diff --git a/Packages/com.github.asus4.tflite/Plugins/Linux/x86_64/libtensorflowlite_gpu_delegate.so b/Packages/com.github.asus4.tflite/Plugins/Linux/x86_64/libtensorflowlite_gpu_delegate.so index 4fffbf6d6..8bd84cc7c 100755 --- a/Packages/com.github.asus4.tflite/Plugins/Linux/x86_64/libtensorflowlite_gpu_delegate.so +++ b/Packages/com.github.asus4.tflite/Plugins/Linux/x86_64/libtensorflowlite_gpu_delegate.so @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fa475eb1596cf610b82ff54be06c67fe14ba1ecfc5adcad7c681b4568e89fc0b -size 4234848 +oid sha256:26fa332b5085b4228c961a67b648e26d50d4fd77394dde9a2182cac3ee6fa6fa +size 4251232 From 8f2ad333dd78efefcb7115eb654cd4eb1cdca9f5 Mon Sep 17 00:00:00 2001 From: Koki Ibukuro Date: Sun, 14 May 2023 17:50:54 +0200 Subject: [PATCH 5/7] Build android libs for v2.11.1 --- .../Plugins/Android/arm64-v8a/libtensorflowlite_gpu_gl.so | 4 ++-- .../Plugins/Android/armeabi-v7a/libtensorflowlite_gpu_gl.so | 4 ++-- .../Plugins/Android/tensorflow-lite-gpu.aar | 4 ++-- .../Plugins/Android/tensorflow-lite.aar | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Packages/com.github.asus4.tflite/Plugins/Android/arm64-v8a/libtensorflowlite_gpu_gl.so b/Packages/com.github.asus4.tflite/Plugins/Android/arm64-v8a/libtensorflowlite_gpu_gl.so index 4de900537..a58256baa 100755 --- a/Packages/com.github.asus4.tflite/Plugins/Android/arm64-v8a/libtensorflowlite_gpu_gl.so +++ b/Packages/com.github.asus4.tflite/Plugins/Android/arm64-v8a/libtensorflowlite_gpu_gl.so @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4c49132125ae4eb1ac86970e8ded4f2eb4ea4127b3fef0d66df4b1251043eb42 -size 3232168 +oid sha256:a13c654d76ed39f4a76ccb9efeaf42c3c5f4cc9bbc462297d778acbfa6e8d5be +size 3260000 diff --git a/Packages/com.github.asus4.tflite/Plugins/Android/armeabi-v7a/libtensorflowlite_gpu_gl.so b/Packages/com.github.asus4.tflite/Plugins/Android/armeabi-v7a/libtensorflowlite_gpu_gl.so index 50c2b62c9..f6f435468 100755 --- a/Packages/com.github.asus4.tflite/Plugins/Android/armeabi-v7a/libtensorflowlite_gpu_gl.so +++ b/Packages/com.github.asus4.tflite/Plugins/Android/armeabi-v7a/libtensorflowlite_gpu_gl.so @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7cfae9a77a9bcff4638a736480285299803319cdeb3092d0b2dc610e4449f447 -size 1447868 +oid sha256:3e6fd3aef6dc5940d926c160ebf3181ce883c041f73ebc8eb3ee5b56989efc91 +size 1464252 diff --git a/Packages/com.github.asus4.tflite/Plugins/Android/tensorflow-lite-gpu.aar b/Packages/com.github.asus4.tflite/Plugins/Android/tensorflow-lite-gpu.aar index 29f48e83e..f40d7fc62 100755 --- a/Packages/com.github.asus4.tflite/Plugins/Android/tensorflow-lite-gpu.aar +++ b/Packages/com.github.asus4.tflite/Plugins/Android/tensorflow-lite-gpu.aar @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4c51692aa8340eca1db3a563cc8f9e1cb678263c77a741a427d3dd13bda7aef0 -size 4070389 +oid sha256:af6c8ba01ca5f0b4d0a814476bd06082fbb40e02685eda23b3d35ae8c44b7707 +size 4121677 diff --git a/Packages/com.github.asus4.tflite/Plugins/Android/tensorflow-lite.aar b/Packages/com.github.asus4.tflite/Plugins/Android/tensorflow-lite.aar index 4d5957a54..d3fe54997 100755 --- a/Packages/com.github.asus4.tflite/Plugins/Android/tensorflow-lite.aar +++ b/Packages/com.github.asus4.tflite/Plugins/Android/tensorflow-lite.aar @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f5035b44d9ee08b921102a33eb017857759d66ea7289980f001c7d735e29b7b0 -size 4606577 +oid sha256:7c88e0445b25d0863fd30797de36e42014a4590082bd40c1caf7f80857a79a5a +size 4641846 From 730a1580100382165ed788e4dd74e77785ba92ad Mon Sep 17 00:00:00 2001 From: Koki Ibukuro Date: Sun, 14 May 2023 16:21:04 +0200 Subject: [PATCH 6/7] Build windows libs for v2.11.1 --- .../Plugins/Windows/libtensorflowlite_c.dll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Packages/com.github.asus4.tflite/Plugins/Windows/libtensorflowlite_c.dll b/Packages/com.github.asus4.tflite/Plugins/Windows/libtensorflowlite_c.dll index fff2af409..c45ef0f16 100644 --- a/Packages/com.github.asus4.tflite/Plugins/Windows/libtensorflowlite_c.dll +++ b/Packages/com.github.asus4.tflite/Plugins/Windows/libtensorflowlite_c.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d3d1b44e3b8e93f16e6cae6d31b7f300f5d28b2695e2ffddf683b37592265eb2 -size 3011584 +oid sha256:d59113bbf6421c9dec5d002b63b7edb5cb324919b82cc1d5cebb42a22ebdd117 +size 3020800 From 3c2c4f43264ee6bd549c10752044b02a7ba4d698 Mon Sep 17 00:00:00 2001 From: Koki Ibukuro Date: Sun, 14 May 2023 18:34:05 +0200 Subject: [PATCH 7/7] Update package.json files --- Packages/com.github.asus4.mediapipe/package.json | 6 +++--- Packages/com.github.asus4.tflite.common/package.json | 4 ++-- Packages/com.github.asus4.tflite/package.json | 2 +- Packages/manifest.json | 2 +- Packages/packages-lock.json | 8 ++++---- README.md | 8 ++++---- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Packages/com.github.asus4.mediapipe/package.json b/Packages/com.github.asus4.mediapipe/package.json index 0026ab9c3..79f958ae5 100644 --- a/Packages/com.github.asus4.mediapipe/package.json +++ b/Packages/com.github.asus4.mediapipe/package.json @@ -9,11 +9,11 @@ "license": "SEE LICENSE IN LICENSE", "unity": "2019.3", "unityRelease": "0f1", - "version": "2.10.0-p1", + "version": "2.11.1", "type": "library", "hideInEditor": false, "dependencies": { - "com.github.asus4.tflite": "2.10.0-p1", - "com.github.asus4.tflite.common": "2.10.0-p1" + "com.github.asus4.tflite": "2.11.1", + "com.github.asus4.tflite.common": "2.11.1" } } \ No newline at end of file diff --git a/Packages/com.github.asus4.tflite.common/package.json b/Packages/com.github.asus4.tflite.common/package.json index 0e58ec354..9644b356c 100644 --- a/Packages/com.github.asus4.tflite.common/package.json +++ b/Packages/com.github.asus4.tflite.common/package.json @@ -9,10 +9,10 @@ "license": "SEE LICENSE IN LICENSE", "unity": "2019.3", "unityRelease": "0f1", - "version": "2.10.0-p1", + "version": "2.11.1", "type": "library", "hideInEditor": false, "dependencies": { - "com.github.asus4.tflite": "2.10.0-p1" + "com.github.asus4.tflite": "2.11.1" } } \ No newline at end of file diff --git a/Packages/com.github.asus4.tflite/package.json b/Packages/com.github.asus4.tflite/package.json index 9459770a4..57a5ef61c 100644 --- a/Packages/com.github.asus4.tflite/package.json +++ b/Packages/com.github.asus4.tflite/package.json @@ -9,7 +9,7 @@ "license": "SEE LICENSE IN LICENSE", "unity": "2019.3", "unityRelease": "0f1", - "version": "2.10.0-p1", + "version": "2.11.1", "type": "library", "hideInEditor": false } \ No newline at end of file diff --git a/Packages/manifest.json b/Packages/manifest.json index 084665e67..73fccf159 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -10,7 +10,7 @@ ], "dependencies": { "com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask#2.3.1", - "com.github.asus4.texture-source": "0.1.2", + "com.github.asus4.texture-source": "0.1.3", "com.unity.2d.sprite": "1.0.0", "com.unity.ext.nunit": "1.0.6", "com.unity.ide.vscode": "1.2.5", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index d7401472f..6c6b5b9e8 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -12,12 +12,12 @@ "depth": 0, "source": "embedded", "dependencies": { - "com.github.asus4.tflite": "2.10.0-p1", - "com.github.asus4.tflite.common": "2.10.0-p1" + "com.github.asus4.tflite": "2.11.1", + "com.github.asus4.tflite.common": "2.11.1" } }, "com.github.asus4.texture-source": { - "version": "0.1.2", + "version": "0.1.3", "depth": 0, "source": "registry", "dependencies": {}, @@ -34,7 +34,7 @@ "depth": 0, "source": "embedded", "dependencies": { - "com.github.asus4.tflite": "2.10.0-p1" + "com.github.asus4.tflite": "2.11.1" } }, "com.unity.2d.sprite": { diff --git a/README.md b/README.md index 6305dd7a5..defbfe285 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Tested on - iOS / Android / macOS / Windows / Linux - Unity 2021.3.24f1 -- TensorFlow 2.10.0 +- TensorFlow 2.11.1 Included examples: @@ -64,11 +64,11 @@ Included prebuilt libraries: ], "dependencies": { // Core TensorFlow Lite libraries - "com.github.asus4.tflite": "2.10.0-p1", + "com.github.asus4.tflite": "2.11.1", // Utilities for TFLite - "com.github.asus4.tflite.common": "2.10.0-p1", + "com.github.asus4.tflite.common": "2.11.1", // Utilities for MediaPipe - "com.github.asus4.mediapipe": "2.10.0-p1", + "com.github.asus4.mediapipe": "2.11.1", ...// other dependencies } }