diff --git a/.bazelrc b/.bazelrc index 03617762e..456a13f24 100644 --- a/.bazelrc +++ b/.bazelrc @@ -13,6 +13,7 @@ test --test_env="GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1" build:linux --cxxopt=-std=c++17 build:linux --host_cxxopt=-std=c++17 build:linux --copt=-w +# build:linux --define=xnn_enable_avx512amx=false # windows build:windows --cxxopt=/std:c++17 @@ -26,6 +27,7 @@ build:windows --host_copt=/D_USE_MATH_DEFINES build:macos --cxxopt=-std=c++17 build:macos --host_cxxopt=-std=c++17 build:macos --copt=-w +build:macos --define=xnn_enable_avx512amx=false # Sets the default Apple platform to macOS. build --apple_platform_type=macos diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 0cdf4caad..f1e220031 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -88,8 +88,8 @@ body: label: "[Android Only] Android Build Tools and NDK Version" description: Required if the Target Platform is Android placeholder: | - Build Tools: 30.0.2 - NDK: 21.4.7075529 + Build Tools: 35.0.0 + NDK: 28.2.13676358 - type: input id: ios_build_env diff --git a/.github/ISSUE_TEMPLATE/build-install-issue.yml b/.github/ISSUE_TEMPLATE/build-install-issue.yml index 116f2fb67..bb217da4a 100644 --- a/.github/ISSUE_TEMPLATE/build-install-issue.yml +++ b/.github/ISSUE_TEMPLATE/build-install-issue.yml @@ -81,8 +81,8 @@ body: label: "[Android Only] Android Build Tools and NDK Version" description: Required if the Target Platform is Android placeholder: | - Build Tools: 30.0.2 - NDK: 21.4.7075529 + Build Tools: 35.0.0 + NDK: 28.2.13676358 - type: input id: ios_build_env diff --git a/Packages/com.github.homuler.mediapipe/Runtime/Scripts/Protobuf/Calculators/Audio/SpectrogramCalculator.cs b/Packages/com.github.homuler.mediapipe/Runtime/Scripts/Protobuf/Calculators/Audio/SpectrogramCalculator.cs index 7d0c54fd4..72074e5fc 100644 --- a/Packages/com.github.homuler.mediapipe/Runtime/Scripts/Protobuf/Calculators/Audio/SpectrogramCalculator.cs +++ b/Packages/com.github.homuler.mediapipe/Runtime/Scripts/Protobuf/Calculators/Audio/SpectrogramCalculator.cs @@ -26,7 +26,7 @@ static SpectrogramCalculatorReflection() { string.Concat( "CjhtZWRpYXBpcGUvY2FsY3VsYXRvcnMvYXVkaW8vc3BlY3Ryb2dyYW1fY2Fs", "Y3VsYXRvci5wcm90bxIJbWVkaWFwaXBlGiRtZWRpYXBpcGUvZnJhbWV3b3Jr", - "L2NhbGN1bGF0b3IucHJvdG8isAYKHFNwZWN0cm9ncmFtQ2FsY3VsYXRvck9w", + "L2NhbGN1bGF0b3IucHJvdG8ikAgKHFNwZWN0cm9ncmFtQ2FsY3VsYXRvck9w", "dGlvbnMSHgoWZnJhbWVfZHVyYXRpb25fc2Vjb25kcxgBIAEoARIgChVmcmFt", "ZV9vdmVybGFwX3NlY29uZHMYAiABKAE6ATASHgoQcGFkX2ZpbmFsX3BhY2tl", "dBgDIAEoCDoEdHJ1ZRJaCgtvdXRwdXRfdHlwZRgEIAEoDjIyLm1lZGlhcGlw", @@ -38,17 +38,22 @@ static SpectrogramCalculatorReflection() { "YW1wGAggASgIOgVmYWxzZRITCghmZnRfc2l6ZRgJIAEoBToBMBIWCgtpbnB1", "dF9zY2FsZRgKIAEoAjoBMRJaChJzYW1wbGVfYnVmZmVyX21vZGUYCyABKA4y", "OC5tZWRpYXBpcGUuU3BlY3Ryb2dyYW1DYWxjdWxhdG9yT3B0aW9ucy5TYW1w", - "bGVCdWZmZXJNb2RlOgROT05FIlQKCk91dHB1dFR5cGUSFQoRU1FVQVJFRF9N", - "QUdOSVRVREUQABIUChBMSU5FQVJfTUFHTklUVURFEAESDAoIREVDSUJFTFMQ", - "AhILCgdDT01QTEVYEAMiPgoKV2luZG93VHlwZRIICgRIQU5OEAASCwoHSEFN", - "TUlORxABEgoKBkNPU0lORRACEg0KCVNRUlRfSEFOThAEIicKEFNhbXBsZUJ1", - "ZmZlck1vZGUSCAoETk9ORRAAEgkKBVJFU0VUEAEyVQoDZXh0EhwubWVkaWFw", - "aXBlLkNhbGN1bGF0b3JPcHRpb25zGMCIqiQgASgLMicubWVkaWFwaXBlLlNw", - "ZWN0cm9ncmFtQ2FsY3VsYXRvck9wdGlvbnM=")); + "bGVCdWZmZXJNb2RlOgROT05FEmoKDW91dHB1dF9sYXlvdXQYDSABKA4yNC5t", + "ZWRpYXBpcGUuU3BlY3Ryb2dyYW1DYWxjdWxhdG9yT3B0aW9ucy5PdXRwdXRM", + "YXlvdXQ6HVNQRUNUUk9HUkFNX0ZSQU1FU19JTl9DT0xVTU5TIlQKCk91dHB1", + "dFR5cGUSFQoRU1FVQVJFRF9NQUdOSVRVREUQABIUChBMSU5FQVJfTUFHTklU", + "VURFEAESDAoIREVDSUJFTFMQAhILCgdDT01QTEVYEAMiPgoKV2luZG93VHlw", + "ZRIICgRIQU5OEAASCwoHSEFNTUlORxABEgoKBkNPU0lORRACEg0KCVNRUlRf", + "SEFOThAEIicKEFNhbXBsZUJ1ZmZlck1vZGUSCAoETk9ORRAAEgkKBVJFU0VU", + "EAEicgoMT3V0cHV0TGF5b3V0Eh0KGU9VVFBVVF9MQVlPVVRfVU5TUEVDSUZJ", + "RUQQABIhCh1TUEVDVFJPR1JBTV9GUkFNRVNfSU5fQ09MVU1OUxABEiAKHFNQ", + "RUNUUk9HUkFNX0NIQU5ORUxTX0lOX1JPV1MQAjJVCgNleHQSHC5tZWRpYXBp", + "cGUuQ2FsY3VsYXRvck9wdGlvbnMYwIiqJCABKAsyJy5tZWRpYXBpcGUuU3Bl", + "Y3Ryb2dyYW1DYWxjdWxhdG9yT3B0aW9ucw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Mediapipe.CalculatorReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.SpectrogramCalculatorOptions), global::Mediapipe.SpectrogramCalculatorOptions.Parser, new[]{ "FrameDurationSeconds", "FrameOverlapSeconds", "PadFinalPacket", "OutputType", "AllowMultichannelInput", "WindowType", "OutputScale", "UseLocalTimestamp", "FftSize", "InputScale", "SampleBufferMode" }, null, new[]{ typeof(global::Mediapipe.SpectrogramCalculatorOptions.Types.OutputType), typeof(global::Mediapipe.SpectrogramCalculatorOptions.Types.WindowType), typeof(global::Mediapipe.SpectrogramCalculatorOptions.Types.SampleBufferMode) }, new pb::Extension[] { global::Mediapipe.SpectrogramCalculatorOptions.Extensions.Ext }, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.SpectrogramCalculatorOptions), global::Mediapipe.SpectrogramCalculatorOptions.Parser, new[]{ "FrameDurationSeconds", "FrameOverlapSeconds", "PadFinalPacket", "OutputType", "AllowMultichannelInput", "WindowType", "OutputScale", "UseLocalTimestamp", "FftSize", "InputScale", "SampleBufferMode", "OutputLayout" }, null, new[]{ typeof(global::Mediapipe.SpectrogramCalculatorOptions.Types.OutputType), typeof(global::Mediapipe.SpectrogramCalculatorOptions.Types.WindowType), typeof(global::Mediapipe.SpectrogramCalculatorOptions.Types.SampleBufferMode), typeof(global::Mediapipe.SpectrogramCalculatorOptions.Types.OutputLayout) }, new pb::Extension[] { global::Mediapipe.SpectrogramCalculatorOptions.Extensions.Ext }, null) })); } #endregion @@ -102,6 +107,7 @@ public SpectrogramCalculatorOptions(SpectrogramCalculatorOptions other) : this() fftSize_ = other.fftSize_; inputScale_ = other.inputScale_; sampleBufferMode_ = other.sampleBufferMode_; + outputLayout_ = other.outputLayout_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -450,6 +456,33 @@ public void ClearSampleBufferMode() { _hasBits0 &= ~1024; } + /// Field number for the "output_layout" field. + public const int OutputLayoutFieldNumber = 13; + private readonly static global::Mediapipe.SpectrogramCalculatorOptions.Types.OutputLayout OutputLayoutDefaultValue = global::Mediapipe.SpectrogramCalculatorOptions.Types.OutputLayout.SpectrogramFramesInColumns; + + private global::Mediapipe.SpectrogramCalculatorOptions.Types.OutputLayout outputLayout_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Mediapipe.SpectrogramCalculatorOptions.Types.OutputLayout OutputLayout { + get { if ((_hasBits0 & 2048) != 0) { return outputLayout_; } else { return OutputLayoutDefaultValue; } } + set { + _hasBits0 |= 2048; + outputLayout_ = value; + } + } + /// Gets whether the "output_layout" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasOutputLayout { + get { return (_hasBits0 & 2048) != 0; } + } + /// Clears the value of the "output_layout" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearOutputLayout() { + _hasBits0 &= ~2048; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -476,6 +509,7 @@ public bool Equals(SpectrogramCalculatorOptions other) { if (FftSize != other.FftSize) return false; if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(InputScale, other.InputScale)) return false; if (SampleBufferMode != other.SampleBufferMode) return false; + if (OutputLayout != other.OutputLayout) return false; return Equals(_unknownFields, other._unknownFields); } @@ -494,6 +528,7 @@ public override int GetHashCode() { if (HasFftSize) hash ^= FftSize.GetHashCode(); if (HasInputScale) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(InputScale); if (HasSampleBufferMode) hash ^= SampleBufferMode.GetHashCode(); + if (HasOutputLayout) hash ^= OutputLayout.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -556,6 +591,10 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(88); output.WriteEnum((int) SampleBufferMode); } + if (HasOutputLayout) { + output.WriteRawTag(104); + output.WriteEnum((int) OutputLayout); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -610,6 +649,10 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(88); output.WriteEnum((int) SampleBufferMode); } + if (HasOutputLayout) { + output.WriteRawTag(104); + output.WriteEnum((int) OutputLayout); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -653,6 +696,9 @@ public int CalculateSize() { if (HasSampleBufferMode) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SampleBufferMode); } + if (HasOutputLayout) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) OutputLayout); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -698,6 +744,9 @@ public void MergeFrom(SpectrogramCalculatorOptions other) { if (other.HasSampleBufferMode) { SampleBufferMode = other.SampleBufferMode; } + if (other.HasOutputLayout) { + OutputLayout = other.OutputLayout; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -757,6 +806,10 @@ public void MergeFrom(pb::CodedInputStream input) { SampleBufferMode = (global::Mediapipe.SpectrogramCalculatorOptions.Types.SampleBufferMode) input.ReadEnum(); break; } + case 104: { + OutputLayout = (global::Mediapipe.SpectrogramCalculatorOptions.Types.OutputLayout) input.ReadEnum(); + break; + } } } #endif @@ -816,6 +869,10 @@ public void MergeFrom(pb::CodedInputStream input) { SampleBufferMode = (global::Mediapipe.SpectrogramCalculatorOptions.Types.SampleBufferMode) input.ReadEnum(); break; } + case 104: { + OutputLayout = (global::Mediapipe.SpectrogramCalculatorOptions.Types.OutputLayout) input.ReadEnum(); + break; + } } } } @@ -874,6 +931,22 @@ public enum SampleBufferMode { [pbr::OriginalName("RESET")] Reset = 1, } + public enum OutputLayout { + [pbr::OriginalName("OUTPUT_LAYOUT_UNSPECIFIED")] Unspecified = 0, + /// + /// Output is a matrix or a vector of matrices. Within the matrix, each + /// column represents the spectrogram for a frame. If the input has multiple + /// channels, the output will be a vector of matrices, each matrix + /// corresponding to a channel. + /// + [pbr::OriginalName("SPECTROGRAM_FRAMES_IN_COLUMNS")] SpectrogramFramesInColumns = 1, + /// + /// Output is a one matrix per packet. Within the matrix, each row represents + /// a channel. + /// + [pbr::OriginalName("SPECTROGRAM_CHANNELS_IN_ROWS")] SpectrogramChannelsInRows = 2, + } + } #endregion diff --git a/Packages/com.github.homuler.mediapipe/Runtime/Scripts/Protobuf/Calculators/Core/ConstantSidePacketCalculator.cs b/Packages/com.github.homuler.mediapipe/Runtime/Scripts/Protobuf/Calculators/Core/ConstantSidePacketCalculator.cs index 07cf46b14..70e976e5c 100644 --- a/Packages/com.github.homuler.mediapipe/Runtime/Scripts/Protobuf/Calculators/Core/ConstantSidePacketCalculator.cs +++ b/Packages/com.github.homuler.mediapipe/Runtime/Scripts/Protobuf/Calculators/Core/ConstantSidePacketCalculator.cs @@ -30,30 +30,37 @@ static ConstantSidePacketCalculatorReflection() { "ay9mb3JtYXRzL2NsYXNzaWZpY2F0aW9uLnByb3RvGiptZWRpYXBpcGUvZnJh", "bWV3b3JrL2Zvcm1hdHMvbGFuZG1hcmsucHJvdG8aLW1lZGlhcGlwZS9mcmFt", "ZXdvcmsvZm9ybWF0cy9tYXRyaXhfZGF0YS5wcm90bxo0bWVkaWFwaXBlL2Zy", - "YW1ld29yay9mb3JtYXRzL3RpbWVfc2VyaWVzX2hlYWRlci5wcm90byKLBgoj", + "YW1ld29yay9mb3JtYXRzL3RpbWVfc2VyaWVzX2hlYWRlci5wcm90byKHCAoj", "Q29uc3RhbnRTaWRlUGFja2V0Q2FsY3VsYXRvck9wdGlvbnMSUQoGcGFja2V0", "GAEgAygLMkEubWVkaWFwaXBlLkNvbnN0YW50U2lkZVBhY2tldENhbGN1bGF0", "b3JPcHRpb25zLkNvbnN0YW50U2lkZVBhY2tldBokCgxTdHJpbmdWZWN0b3IS", - "FAoMc3RyaW5nX3ZhbHVlGAEgAygJGosEChJDb25zdGFudFNpZGVQYWNrZXQS", - "EwoJaW50X3ZhbHVlGAEgASgFSAASFgoMdWludDY0X3ZhbHVlGAUgASgESAAS", - "FQoLaW50NjRfdmFsdWUYCyABKANIABIVCgtmbG9hdF92YWx1ZRgCIAEoAkgA", - "EhYKDGRvdWJsZV92YWx1ZRgJIAEoAUgAEhQKCmJvb2xfdmFsdWUYAyABKAhI", - "ABIWCgxzdHJpbmdfdmFsdWUYBCABKAlIABJCChljbGFzc2lmaWNhdGlvbl9s", - "aXN0X3ZhbHVlGAYgASgLMh0ubWVkaWFwaXBlLkNsYXNzaWZpY2F0aW9uTGlz", - "dEgAEjYKE2xhbmRtYXJrX2xpc3RfdmFsdWUYByABKAsyFy5tZWRpYXBpcGUu", - "TGFuZG1hcmtMaXN0SAASPwoYdGltZV9zZXJpZXNfaGVhZGVyX3ZhbHVlGAog", - "ASgLMhsubWVkaWFwaXBlLlRpbWVTZXJpZXNIZWFkZXJIABIyChFtYXRyaXhf", - "ZGF0YV92YWx1ZRgMIAEoCzIVLm1lZGlhcGlwZS5NYXRyaXhEYXRhSAASWgoT", - "c3RyaW5nX3ZlY3Rvcl92YWx1ZRgNIAEoCzI7Lm1lZGlhcGlwZS5Db25zdGFu", - "dFNpZGVQYWNrZXRDYWxjdWxhdG9yT3B0aW9ucy5TdHJpbmdWZWN0b3JIAEIH", - "CgV2YWx1ZTJdCgNleHQSHC5tZWRpYXBpcGUuQ2FsY3VsYXRvck9wdGlvbnMY", - "haruigEgASgLMi4ubWVkaWFwaXBlLkNvbnN0YW50U2lkZVBhY2tldENhbGN1", - "bGF0b3JPcHRpb25z")); + "FAoMc3RyaW5nX3ZhbHVlGAEgAygJGiYKC0Zsb2F0VmVjdG9yEhcKC2Zsb2F0", + "X3ZhbHVlGAEgAygCQgIQARoiCglJbnRWZWN0b3ISFQoJaW50X3ZhbHVlGAEg", + "AygFQgIQARq7BQoSQ29uc3RhbnRTaWRlUGFja2V0EhMKCWludF92YWx1ZRgB", + "IAEoBUgAEhYKDHVpbnQ2NF92YWx1ZRgFIAEoBEgAEhUKC2ludDY0X3ZhbHVl", + "GAsgASgDSAASFQoLZmxvYXRfdmFsdWUYAiABKAJIABIWCgxkb3VibGVfdmFs", + "dWUYCSABKAFIABIUCgpib29sX3ZhbHVlGAMgASgISAASFgoMc3RyaW5nX3Zh", + "bHVlGAQgASgJSAASQgoZY2xhc3NpZmljYXRpb25fbGlzdF92YWx1ZRgGIAEo", + "CzIdLm1lZGlhcGlwZS5DbGFzc2lmaWNhdGlvbkxpc3RIABI2ChNsYW5kbWFy", + "a19saXN0X3ZhbHVlGAcgASgLMhcubWVkaWFwaXBlLkxhbmRtYXJrTGlzdEgA", + "Ej8KGHRpbWVfc2VyaWVzX2hlYWRlcl92YWx1ZRgKIAEoCzIbLm1lZGlhcGlw", + "ZS5UaW1lU2VyaWVzSGVhZGVySAASMgoRbWF0cml4X2RhdGFfdmFsdWUYDCAB", + "KAsyFS5tZWRpYXBpcGUuTWF0cml4RGF0YUgAEloKE3N0cmluZ192ZWN0b3Jf", + "dmFsdWUYDSABKAsyOy5tZWRpYXBpcGUuQ29uc3RhbnRTaWRlUGFja2V0Q2Fs", + "Y3VsYXRvck9wdGlvbnMuU3RyaW5nVmVjdG9ySAASWAoSZmxvYXRfdmVjdG9y", + "X3ZhbHVlGA4gASgLMjoubWVkaWFwaXBlLkNvbnN0YW50U2lkZVBhY2tldENh", + "bGN1bGF0b3JPcHRpb25zLkZsb2F0VmVjdG9ySAASVAoQaW50X3ZlY3Rvcl92", + "YWx1ZRgPIAEoCzI4Lm1lZGlhcGlwZS5Db25zdGFudFNpZGVQYWNrZXRDYWxj", + "dWxhdG9yT3B0aW9ucy5JbnRWZWN0b3JIAEIHCgV2YWx1ZTJdCgNleHQSHC5t", + "ZWRpYXBpcGUuQ2FsY3VsYXRvck9wdGlvbnMYharuigEgASgLMi4ubWVkaWFw", + "aXBlLkNvbnN0YW50U2lkZVBhY2tldENhbGN1bGF0b3JPcHRpb25z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Mediapipe.CalculatorReflection.Descriptor, global::Mediapipe.ClassificationReflection.Descriptor, global::Mediapipe.LandmarkReflection.Descriptor, global::Mediapipe.MatrixDataReflection.Descriptor, global::Mediapipe.TimeSeriesHeaderReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.ConstantSidePacketCalculatorOptions), global::Mediapipe.ConstantSidePacketCalculatorOptions.Parser, new[]{ "Packet" }, null, null, new pb::Extension[] { global::Mediapipe.ConstantSidePacketCalculatorOptions.Extensions.Ext }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.StringVector), global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.StringVector.Parser, new[]{ "StringValue" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.ConstantSidePacket), global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.ConstantSidePacket.Parser, new[]{ "IntValue", "Uint64Value", "Int64Value", "FloatValue", "DoubleValue", "BoolValue", "StringValue", "ClassificationListValue", "LandmarkListValue", "TimeSeriesHeaderValue", "MatrixDataValue", "StringVectorValue" }, new[]{ "Value" }, null, null, null)}) + new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.FloatVector), global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.FloatVector.Parser, new[]{ "FloatValue" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.IntVector), global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.IntVector.Parser, new[]{ "IntValue" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.ConstantSidePacket), global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.ConstantSidePacket.Parser, new[]{ "IntValue", "Uint64Value", "Int64Value", "FloatValue", "DoubleValue", "BoolValue", "StringValue", "ClassificationListValue", "LandmarkListValue", "TimeSeriesHeaderValue", "MatrixDataValue", "StringVectorValue", "FloatVectorValue", "IntVectorValue" }, new[]{ "Value" }, null, null, null)}) })); } #endregion @@ -419,6 +426,366 @@ public void MergeFrom(pb::CodedInputStream input) { } + public sealed partial class FloatVector : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FloatVector()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Mediapipe.ConstantSidePacketCalculatorOptions.Descriptor.NestedTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FloatVector() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FloatVector(FloatVector other) : this() { + floatValue_ = other.floatValue_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FloatVector Clone() { + return new FloatVector(this); + } + + /// Field number for the "float_value" field. + public const int FloatValueFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_floatValue_codec + = pb::FieldCodec.ForFloat(10); + private readonly pbc::RepeatedField floatValue_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField FloatValue { + get { return floatValue_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FloatVector); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FloatVector other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!floatValue_.Equals(other.floatValue_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= floatValue_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + floatValue_.WriteTo(output, _repeated_floatValue_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + floatValue_.WriteTo(ref output, _repeated_floatValue_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += floatValue_.CalculateSize(_repeated_floatValue_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FloatVector other) { + if (other == null) { + return; + } + floatValue_.Add(other.floatValue_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: + case 13: { + floatValue_.AddEntriesFrom(input, _repeated_floatValue_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: + case 13: { + floatValue_.AddEntriesFrom(ref input, _repeated_floatValue_codec); + break; + } + } + } + } + #endif + + } + + public sealed partial class IntVector : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new IntVector()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Mediapipe.ConstantSidePacketCalculatorOptions.Descriptor.NestedTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public IntVector() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public IntVector(IntVector other) : this() { + intValue_ = other.intValue_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public IntVector Clone() { + return new IntVector(this); + } + + /// Field number for the "int_value" field. + public const int IntValueFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_intValue_codec + = pb::FieldCodec.ForInt32(10); + private readonly pbc::RepeatedField intValue_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField IntValue { + get { return intValue_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as IntVector); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(IntVector other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!intValue_.Equals(other.intValue_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= intValue_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + intValue_.WriteTo(output, _repeated_intValue_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + intValue_.WriteTo(ref output, _repeated_intValue_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += intValue_.CalculateSize(_repeated_intValue_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(IntVector other) { + if (other == null) { + return; + } + intValue_.Add(other.intValue_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: + case 8: { + intValue_.AddEntriesFrom(input, _repeated_intValue_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: + case 8: { + intValue_.AddEntriesFrom(ref input, _repeated_intValue_codec); + break; + } + } + } + } + #endif + + } + public sealed partial class ConstantSidePacket : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -433,7 +800,7 @@ public sealed partial class ConstantSidePacket : pb::IMessageField number for the "float_vector_value" field. + public const int FloatVectorValueFieldNumber = 14; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.FloatVector FloatVectorValue { + get { return valueCase_ == ValueOneofCase.FloatVectorValue ? (global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.FloatVector) value_ : null; } + set { + value_ = value; + valueCase_ = value == null ? ValueOneofCase.None : ValueOneofCase.FloatVectorValue; + } + } + + /// Field number for the "int_vector_value" field. + public const int IntVectorValueFieldNumber = 15; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.IntVector IntVectorValue { + get { return valueCase_ == ValueOneofCase.IntVectorValue ? (global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.IntVector) value_ : null; } + set { + value_ = value; + valueCase_ = value == null ? ValueOneofCase.None : ValueOneofCase.IntVectorValue; + } + } + private object value_; /// Enum of possible cases for the "value" oneof. public enum ValueOneofCase { @@ -759,6 +1156,8 @@ public enum ValueOneofCase { TimeSeriesHeaderValue = 10, MatrixDataValue = 12, StringVectorValue = 13, + FloatVectorValue = 14, + IntVectorValue = 15, } private ValueOneofCase valueCase_ = ValueOneofCase.None; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -801,6 +1200,8 @@ public bool Equals(ConstantSidePacket other) { if (!object.Equals(TimeSeriesHeaderValue, other.TimeSeriesHeaderValue)) return false; if (!object.Equals(MatrixDataValue, other.MatrixDataValue)) return false; if (!object.Equals(StringVectorValue, other.StringVectorValue)) return false; + if (!object.Equals(FloatVectorValue, other.FloatVectorValue)) return false; + if (!object.Equals(IntVectorValue, other.IntVectorValue)) return false; if (ValueCase != other.ValueCase) return false; return Equals(_unknownFields, other._unknownFields); } @@ -821,6 +1222,8 @@ public override int GetHashCode() { if (valueCase_ == ValueOneofCase.TimeSeriesHeaderValue) hash ^= TimeSeriesHeaderValue.GetHashCode(); if (valueCase_ == ValueOneofCase.MatrixDataValue) hash ^= MatrixDataValue.GetHashCode(); if (valueCase_ == ValueOneofCase.StringVectorValue) hash ^= StringVectorValue.GetHashCode(); + if (valueCase_ == ValueOneofCase.FloatVectorValue) hash ^= FloatVectorValue.GetHashCode(); + if (valueCase_ == ValueOneofCase.IntVectorValue) hash ^= IntVectorValue.GetHashCode(); hash ^= (int) valueCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); @@ -888,6 +1291,14 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(106); output.WriteMessage(StringVectorValue); } + if (valueCase_ == ValueOneofCase.FloatVectorValue) { + output.WriteRawTag(114); + output.WriteMessage(FloatVectorValue); + } + if (valueCase_ == ValueOneofCase.IntVectorValue) { + output.WriteRawTag(122); + output.WriteMessage(IntVectorValue); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -946,6 +1357,14 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(106); output.WriteMessage(StringVectorValue); } + if (valueCase_ == ValueOneofCase.FloatVectorValue) { + output.WriteRawTag(114); + output.WriteMessage(FloatVectorValue); + } + if (valueCase_ == ValueOneofCase.IntVectorValue) { + output.WriteRawTag(122); + output.WriteMessage(IntVectorValue); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -992,6 +1411,12 @@ public int CalculateSize() { if (valueCase_ == ValueOneofCase.StringVectorValue) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(StringVectorValue); } + if (valueCase_ == ValueOneofCase.FloatVectorValue) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(FloatVectorValue); + } + if (valueCase_ == ValueOneofCase.IntVectorValue) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(IntVectorValue); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1056,6 +1481,18 @@ public void MergeFrom(ConstantSidePacket other) { } StringVectorValue.MergeFrom(other.StringVectorValue); break; + case ValueOneofCase.FloatVectorValue: + if (FloatVectorValue == null) { + FloatVectorValue = new global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.FloatVector(); + } + FloatVectorValue.MergeFrom(other.FloatVectorValue); + break; + case ValueOneofCase.IntVectorValue: + if (IntVectorValue == null) { + IntVectorValue = new global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.IntVector(); + } + IntVectorValue.MergeFrom(other.IntVectorValue); + break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); @@ -1146,6 +1583,24 @@ public void MergeFrom(pb::CodedInputStream input) { StringVectorValue = subBuilder; break; } + case 114: { + global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.FloatVector subBuilder = new global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.FloatVector(); + if (valueCase_ == ValueOneofCase.FloatVectorValue) { + subBuilder.MergeFrom(FloatVectorValue); + } + input.ReadMessage(subBuilder); + FloatVectorValue = subBuilder; + break; + } + case 122: { + global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.IntVector subBuilder = new global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.IntVector(); + if (valueCase_ == ValueOneofCase.IntVectorValue) { + subBuilder.MergeFrom(IntVectorValue); + } + input.ReadMessage(subBuilder); + IntVectorValue = subBuilder; + break; + } } } #endif @@ -1234,6 +1689,24 @@ public void MergeFrom(pb::CodedInputStream input) { StringVectorValue = subBuilder; break; } + case 114: { + global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.FloatVector subBuilder = new global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.FloatVector(); + if (valueCase_ == ValueOneofCase.FloatVectorValue) { + subBuilder.MergeFrom(FloatVectorValue); + } + input.ReadMessage(subBuilder); + FloatVectorValue = subBuilder; + break; + } + case 122: { + global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.IntVector subBuilder = new global::Mediapipe.ConstantSidePacketCalculatorOptions.Types.IntVector(); + if (valueCase_ == ValueOneofCase.IntVectorValue) { + subBuilder.MergeFrom(IntVectorValue); + } + input.ReadMessage(subBuilder); + IntVectorValue = subBuilder; + break; + } } } } diff --git a/Packages/com.github.homuler.mediapipe/Runtime/Scripts/Protobuf/Framework/ThreadPoolExecutor.cs b/Packages/com.github.homuler.mediapipe/Runtime/Scripts/Protobuf/Framework/ThreadPoolExecutor.cs index 8f1025bdf..ceaf30a99 100644 --- a/Packages/com.github.homuler.mediapipe/Runtime/Scripts/Protobuf/Framework/ThreadPoolExecutor.cs +++ b/Packages/com.github.homuler.mediapipe/Runtime/Scripts/Protobuf/Framework/ThreadPoolExecutor.cs @@ -34,7 +34,8 @@ static ThreadPoolExecutorReflection() { "bWVfcHJlZml4GAUgASgJIjUKFFByb2Nlc3NvclBlcmZvcm1hbmNlEgoKBk5P", "Uk1BTBAAEgcKA0xPVxABEggKBEhJR0gQAjJRCgNleHQSGy5tZWRpYXBpcGUu", "TWVkaWFQaXBlT3B0aW9ucxiT0/VKIAEoCzIkLm1lZGlhcGlwZS5UaHJlYWRQ", - "b29sRXhlY3V0b3JPcHRpb25z")); + "b29sRXhlY3V0b3JPcHRpb25zQjwKGmNvbS5nb29nbGUubWVkaWFwaXBlLnBy", + "b3RvQh5UaHJlYWRQb29sRXhlY3V0b3JPcHRpb25zUHJvdG8=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Mediapipe.MediapipeOptionsReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { diff --git a/Packages/com.github.homuler.mediapipe/Third Party Notices.md b/Packages/com.github.homuler.mediapipe/Third Party Notices.md index 297b6eee1..e6e5c0d0a 100644 --- a/Packages/com.github.homuler.mediapipe/Third Party Notices.md +++ b/Packages/com.github.homuler.mediapipe/Third Party Notices.md @@ -571,6 +571,310 @@ modification, are permitted provided that the following conditions are met: --- +Component Name: Eigen + +License Type: Mozilla Public License 2.0 + +https://gitlab.com/libeigen/eigen + +``` +Mozilla Public License Version 2.0 +================================== +1. Definitions +-------------- +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. +1.3. "Contribution" + means Covered Software of a particular Contributor. +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. +1.5. "Incompatible With Secondary Licenses" + means + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. +1.6. "Executable Form" + means any form of the work other than Source Code Form. +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. +1.8. "License" + means this document. +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. +1.10. "Modifications" + means any of the following: + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + (b) any new file in Source Code Form that contains any Covered + Software. +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. +1.13. "Source Code Form" + means the form of the work preferred for making modifications. +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. +2. License Grants and Conditions +-------------------------------- +2.1. Grants +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. +2.2. Effective Date +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. +2.3. Limitations on Grant Scope +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: +(a) for any code that a Contributor has removed from Covered Software; + or +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). +2.4. Subsequent Licenses +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). +2.5. Representation +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. +2.6. Fair Use +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. +2.7. Conditions +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. +3. Responsibilities +------------------- +3.1. Distribution of Source Form +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. +3.2. Distribution of Executable Form +If You distribute Covered Software in Executable Form then: +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. +3.3. Distribution of a Larger Work +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). +3.4. Notices +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. +3.5. Application of Additional Terms +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. +5. Termination +-------------- +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ +8. Litigation +------------- +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. +9. Miscellaneous +---------------- +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. +10. Versions of the License +--------------------------- +10.1. New Versions +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. +10.2. Effect of New Versions +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. +10.3. Modified Versions +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. +Exhibit A - Source Code Form License Notice +------------------------------------------- + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at https://mozilla.org/MPL/2.0/. +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. +You may add additional accurate notices of copyright ownership. +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. +``` + +--- + Component Name: Emscripten License Type: MIT @@ -1386,6 +1690,47 @@ https://github.com/google/mediapipe --- +Component Name: pthreadpool + +License Type: BSD 2-Clause "Simplified" License + +Copyright 2019 Google LLC +Copyright (c) 2017 Facebook Inc. +Copyright (c) 2015-2017 Georgia Institute of Technology +All rights reserved. + +https://github.com/Maratyszcza/pthreadpool + +``` +Copyright 2019 Google LLC +Copyright (c) 2017 Facebook Inc. +Copyright (c) 2015-2017 Georgia Institute of Technology +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +``` + +--- + Component Name: Protocol Buffers License Type: 3-Clause BSD diff --git a/README.md b/README.md index 0a5a85140..3f157f84e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MediaPipe Unity Plugin -This is a Unity (>= 2022.3) [Native Plugin](https://docs.unity3d.com/Manual/NativePlugins.html) to use [MediaPipe](https://github.com/google/mediapipe) (0.10.20). +This is a Unity (>= 2022.3) [Native Plugin](https://docs.unity3d.com/Manual/NativePlugins.html) to use [MediaPipe](https://github.com/google/mediapipe) (0.10.26). The goal of this project is to port the MediaPipe API (C++) _one by one_ to C# so that it can be called from Unity.\ This approach may sacrifice performance when you need to call multiple APIs in a loop, but it gives you the flexibility to use MediaPipe instead. diff --git a/WORKSPACE b/WORKSPACE index d649ebc4a..74c5cde73 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -23,7 +23,7 @@ bazel_skylib_workspace() load("@bazel_skylib//lib:versions.bzl", "versions") -versions.check(minimum_bazel_version = "6.1.1") +versions.check(minimum_bazel_version = "6.5.0") # mediapipe http_archive( @@ -38,9 +38,9 @@ http_archive( "@//third_party:mediapipe_extension.diff", "@//third_party:mediapipe_workaround.diff", ], - sha256 = "25af3c4cc44dfe929eea226ab6cd0dd53a54fbb199db877cc96aa63d0e45d745", - strip_prefix = "mediapipe-0.10.22", - urls = ["https://github.com/google/mediapipe/archive/v0.10.22.tar.gz"], + sha256 = "51cbd4d538716e3722b55b8412cab9e3713270a6e9a6f09af6b52d357718e6d7", + strip_prefix = "mediapipe-0.10.26", + urls = ["https://github.com/google-ai-edge/mediapipe/archive/v0.10.26.tar.gz"], ) # ABSL on 2023-10-18 @@ -57,13 +57,18 @@ http_archive( urls = ["https://github.com/abseil/abseil-cpp/archive//9687a8ea750bfcddf790372093245a1d041b21a3.tar.gz"], ) -load("//third_party:android_configure.bzl", "android_configure") +http_archive( + name = "rules_android_ndk", + sha256 = "d230a980e0d3a42b85d5fce2cb17ec3ac52b88d2cff5aaf86bae0f05b48adc55", + strip_prefix = "rules_android_ndk-d5c9d46a471e8fcd80e7ec5521b78bb2df48f4e0", + url = "https://github.com/bazelbuild/rules_android_ndk/archive/d5c9d46a471e8fcd80e7ec5521b78bb2df48f4e0.zip", +) +load("@rules_android_ndk//:rules.bzl", "android_ndk_repository") +load("//third_party:android_configure.bzl", "android_configure") android_configure(name = "local_config_android") - load("@local_config_android//:android_configure.bzl", "android_workspace") - -android_workspace() +android_workspace(android_ndk_repository) http_archive( name = "build_bazel_rules_apple", @@ -115,7 +120,7 @@ http_archive( ], sha256 = "b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30", strip_prefix = "zlib-1.2.13", - url = "http://zlib.net/fossils/zlib-1.2.13.tar.gz", + url = "https://zlib.net/fossils/zlib-1.2.13.tar.gz", ) # gflags needed by glog @@ -182,22 +187,22 @@ http_archive( ], ) -# XNNPACK on 2024-11-18 +# XNNPACK from 2025-04-02 http_archive( name = "XNNPACK", # `curl -L | shasum -a 256` - sha256 = "af30fe2b301330a7e19cd422acf22991de3c1f5d91dda58e9ee67544d608fa51", - strip_prefix = "XNNPACK-dc1549a7141c7a9496ae160bb27b8700f0f6e1f1", - url = "https://github.com/google/XNNPACK/archive/dc1549a7141c7a9496ae160bb27b8700f0f6e1f1.zip", + sha256 = "72549a5af09ee22204904fc93d35d2a19351e32a46f26c4838dda005824e3576", + strip_prefix = "XNNPACK-5ff876e4f88f4bec7a3ec853c366a33c8f797fb5", + url = "https://github.com/google/XNNPACK/archive/5ff876e4f88f4bec7a3ec853c366a33c8f797fb5.zip", ) -# KleidiAI is needed to get the best possible performance out of XNNPack +# KleidiAI is needed to get the best possible performance out of XNNPack, from 2025-04-02 http_archive( name = "KleidiAI", - sha256 = "ad37707084a6d4ff41be10cbe8540c75bea057ba79d0de6c367c1bfac6ba0852", - strip_prefix = "kleidiai-40a926833857fb64786e02f97703e42b1537cb57", + sha256 = "ca8b8ee0c3dd2284c1eae3ac07f7064ce92317ac7c3cfcd1d511662e0594cdb8", + strip_prefix = "kleidiai-fb4caf0937a45002861cc12788b6018bfb89ae58", urls = [ - "https://gitlab.arm.com/kleidi/kleidiai/-/archive/40a926833857fb64786e02f97703e42b1537cb57/kleidiai-40a926833857fb64786e02f97703e42b1537cb57.zip", + "https://github.com/ARM-software/kleidiai/archive/fb4caf0937a45002861cc12788b6018bfb89ae58.zip", ], ) @@ -210,6 +215,21 @@ http_archive( ], ) +# pthreadpool is a dependency of XNNPACK, from 2025-04-02 +http_archive( + name = "pthreadpool", + patch_args = [ + "-p1", + ], + patches = [ + "@//third_party:pthreadpool.patch", + ], + # `curl -L | shasum -a 256` + sha256 = "745e56516d6a58d183eb33d9017732d87cff43ce9f78908906f9faa52633e421", + strip_prefix = "pthreadpool-b92447772365661680f486e39a91dfe6675adafc", + urls = ["https://github.com/google/pthreadpool/archive/b92447772365661680f486e39a91dfe6675adafc.zip"], +) + # TF on 2024-09-24 _TENSORFLOW_GIT_COMMIT = "5329ec8dd396487982ef3e743f98c0195af39a6b" @@ -292,14 +312,6 @@ load("@bazel_features//:deps.bzl", "bazel_features_deps") bazel_features_deps() -# TODO: This is an are indirect dependency. We should factor it out. -http_archive( - name = "pthreadpool", - sha256 = "a4cf06de57bfdf8d7b537c61f1c3071bce74e57524fe053e0bbd2332feca7f95", - strip_prefix = "pthreadpool-4fe0e1e183925bf8cfa6aae24237e724a96479b8", - urls = ["https://github.com/Maratyszcza/pthreadpool/archive/4fe0e1e183925bf8cfa6aae24237e724a96479b8.zip"], -) - load( "@build_bazel_rules_apple//apple:repositories.bzl", "apple_rules_dependencies", @@ -328,9 +340,6 @@ load( 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"])""" - # Google Benchmark library v1.6.1 released on 2022-01-10. http_archive( name = "com_google_benchmark", @@ -514,6 +523,7 @@ new_local_repository( http_archive( name = "android_opencv", build_file = "@mediapipe//third_party:opencv_android.BUILD", + sha256 = "464d55abe64b53af3aeb73197cf4620535abd909916d06e6a8b7c32712013966", strip_prefix = "OpenCV-android-sdk", type = "zip", url = "https://github.com/opencv/opencv/releases/download/4.10.0/opencv-4.10.0-android-sdk.zip", @@ -680,6 +690,19 @@ load("@mediapipe//third_party:wasm_files.bzl", "wasm_files") wasm_files() +# Eigen +EIGEN_COMMIT = "33d0937c6bdf5ec999939fb17f2a553183d14a74" + +EIGEN_SHA256 = "1f4babf536ce8fc2129dbf92ff3be54cd18ffb2171e9eb40edd00f0a045a54fa" + +http_archive( + name = "eigen", + build_file = "@mediapipe//third_party:eigen.BUILD", + sha256 = EIGEN_SHA256, + strip_prefix = "eigen-{commit}".format(commit = EIGEN_COMMIT), + urls = ["https://gitlab.com/libeigen/eigen/-/archive/{commit}/eigen-{commit}.tar.gz".format(commit = EIGEN_COMMIT)], +) + # Halide new_local_repository( @@ -729,14 +752,14 @@ http_archive( http_archive( name = "skia", - sha256 = "038d4a21f9c72d71ab49e3a7d7677b39585329465d093a4260b6c73d2f3984d6", - strip_prefix = "skia-ac75382cb971d2f5465b4608a74561ecb68599c5", - urls = ["https://github.com/google/skia/archive/ac75382cb971d2f5465b4608a74561ecb68599c5.zip"], + sha256 = "2fe28173428f8eebf2aa8a665bad32136086cc065f50c7154678a96250d1cde1", + strip_prefix = "skia-226ae9d866748a2e68b6dbf114b37129c380a298", + urls = ["https://github.com/google/skia/archive/226ae9d866748a2e68b6dbf114b37129c380a298.zip"], ) http_archive( name = "skia_user_config", - sha256 = "038d4a21f9c72d71ab49e3a7d7677b39585329465d093a4260b6c73d2f3984d6", - strip_prefix = "skia-ac75382cb971d2f5465b4608a74561ecb68599c5/include/config", - urls = ["https://github.com/google/skia/archive/ac75382cb971d2f5465b4608a74561ecb68599c5.zip"], + sha256 = "2fe28173428f8eebf2aa8a665bad32136086cc065f50c7154678a96250d1cde1", + strip_prefix = "skia-226ae9d866748a2e68b6dbf114b37129c380a298/include/config", + urls = ["https://github.com/google/skia/archive/226ae9d866748a2e68b6dbf114b37129c380a298.zip"], ) diff --git a/docker/linux/x86_64/Dockerfile b/docker/linux/x86_64/Dockerfile index c6c778b85..aac8161e4 100644 --- a/docker/linux/x86_64/Dockerfile +++ b/docker/linux/x86_64/Dockerfile @@ -1,7 +1,7 @@ ARG UID=1000 -ARG ANDROID_SDK_BUILD_TOOLS_VERSION=30.0.3 -ARG ANDROID_SDK_VERSION=30 -ARG ANDROID_NDK_VERSION=21.4.7075529 +ARG ANDROID_SDK_BUILD_TOOLS_VERSION=35.0.0 +ARG ANDROID_SDK_VERSION=36 +ARG ANDROID_NDK_VERSION=28.2.13676358 FROM ubuntu:20.04 AS base @@ -22,7 +22,7 @@ RUN apt-get update && \ mesa-common-dev \ nasm \ npm \ - openjdk-11-jdk \ + openjdk-17-jdk \ pkg-config \ software-properties-common \ sudo \ @@ -74,10 +74,10 @@ ARG ANDROID_SDK_VERSION ARG ANDROID_NDK_VERSION ENV COMMANDLINETOOLS_ZIP=commandlinetools.zip -ENV COMMANDLINETOOLS_SHA256=124f2d5115eee365df6cf3228ffbca6fc3911d16f8025bebd5b1c6e2fcfa7faf +ENV COMMANDLINETOOLS_SHA256=7ec965280a073311c339e571cd5de778b9975026cfcbe79f2b1cdcb1e15317ee -RUN curl -L https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip -o ${COMMANDLINETOOLS_ZIP} && \ +RUN curl -L https://dl.google.com/android/repository/commandlinetools-linux-13114758_latest.zip -o ${COMMANDLINETOOLS_ZIP} && \ (test "$(sha256sum ${COMMANDLINETOOLS_ZIP})" = "${COMMANDLINETOOLS_SHA256} ${COMMANDLINETOOLS_ZIP}" || { echo 'Checksum Failed'; exit 1; }) && \ unzip ${COMMANDLINETOOLS_ZIP} -d /opt/android diff --git a/docker/windows/x86_64/Dockerfile b/docker/windows/x86_64/Dockerfile index ad1ab526a..b676e0ff4 100644 --- a/docker/windows/x86_64/Dockerfile +++ b/docker/windows/x86_64/Dockerfile @@ -2,8 +2,8 @@ ARG NODE_VERSION=18.17.1 ARG PYTHON_VERSION=3.12.8 -ARG ANDROID_SDK_VERSION=30 -ARG ANDROID_NDK_VERSION=21.4.7075529 +ARG ANDROID_SDK_VERSION=36 +ARG ANDROID_NDK_VERSION=28.2.13676358 FROM mcr.microsoft.com/windows/servercore:ltsc2022 as base @@ -80,21 +80,21 @@ FROM builder as android ARG ANDROID_SDK_VERSION ARG ANDROID_NDK_VERSION -ENV OPENJDK_ZIP OpenJDK11U-jdk_x64.zip -ENV OPENJDK_SHA256 087d096032efe273d7e754a25c85d8e8cf44738a3e597ad86f55e0971acc3b8e -ENV JAVA_HOME C:\Java\jdk-11.0.13+8 +ENV OPENJDK_ZIP OpenJDK17U-jdk_x64.zip +ENV OPENJDK_SHA256 d1b2bb5a074ba33a0cf4e84aa558f7a563b827f999a71c8e47bdb0dd02af6b9c +ENV JAVA_HOME C:\Java\jdk-17.0.9+9 # Install Java -RUN curl -L --retry 4 --connect-timeout 10 https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-jdk_x64_windows_hotspot_11.0.13_8.zip -o C:\TEMP\%OPENJDK_ZIP% && ` +RUN curl -L --retry 4 --connect-timeout 10 https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9.1/OpenJDK17U-jdk_x64_windows_hotspot_17.0.9_9.zip -o C:\TEMP\%OPENJDK_ZIP% && ` for /F %s in ('sha256sum /c/TEMP/%OPENJDK_ZIP%') do ((test "%s" = "%OPENJDK_SHA256%" || (echo %s 'Checksum Failed' && exit 1))) && ` unzip C:\TEMP\%OPENJDK_ZIP% -d C:\Java && ` del C:\TEMP\%OPENJDK_ZIP% ENV COMMANDLINETOOLS_ZIP commandlinetools.zip -ENV COMMANDLINETOOLS_SHA256 f9e6f91743bcb1cc6905648ca751bc33975b0dd11b50d691c2085d025514278c +ENV COMMANDLINETOOLS_SHA256 98b565cb657b012dae6794cefc0f66ae1efb4690c699b78a614b4a6a3505b003 # Install Android SDK and NDK -RUN curl -L --retry 4 --connect-timeout 10 https://dl.google.com/android/repository/commandlinetools-win-7583922_latest.zip -o C:\TEMP\%COMMANDLINETOOLS_ZIP% && ` +RUN curl -L --retry 4 --connect-timeout 10 https://dl.google.com/android/repository/commandlinetools-win-13114758_latest.zip -o C:\TEMP\%COMMANDLINETOOLS_ZIP% && ` for /F %s in ('sha256sum /c/TEMP/%COMMANDLINETOOLS_ZIP%') do ((test "%s" = "%COMMANDLINETOOLS_SHA256%" || (echo 'Checksum Failed' && exit 1))) && ` unzip C:\TEMP\%COMMANDLINETOOLS_ZIP% -d C:\Android && ` del C:\TEMP\%COMMANDLINETOOLS_ZIP% @@ -103,7 +103,7 @@ RUN curl -L --retry 4 --connect-timeout 10 https://dl.google.com/android/reposit RUN powershell -command "for($i=0;$i -lt 30;$i++) { $response += """y`n""" }; $response" | C:\Android\cmdline-tools\bin\sdkmanager --sdk_root=C:\Android --licenses && ` C:\Android\cmdline-tools\bin\sdkmanager --sdk_root=C:\Android --install ` "platforms;android-%ANDROID_SDK_VERSION%" ` - "build-tools;30.0.3" ` + "build-tools;35.0.0" ` "ndk;%ANDROID_NDK_VERSION%" @@ -115,7 +115,7 @@ ENV ANDROID_HOME C:\Android ENV ANDROID_NDK_HOME ${ANDROID_HOME}\ndk\${ANDROID_NDK_VERSION} ENV PYTHON_INSTALL_PATH=C:\Python ENV PYTHON_BIN_PATH=${PYTHON_INSTALL_PATH}\python.exe -ENV HERMETIC_PYTHON_VERSION 3.9 +ENV HERMETIC_PYTHON_VERSION 3.12 # Install Bazel and NuGet RUN setx path "C:\bin;%PYTHON_INSTALL_PATH%;%PYTHON_INSTALL_PATH%\Scripts;%PATH%" && ` diff --git a/docs/Build.md b/docs/Build.md index a7cb8ee82..cf370870e 100644 --- a/docs/Build.md +++ b/docs/Build.md @@ -292,13 +292,6 @@ When building for Android (Linux/macOS), follow these additional steps: 1. Launch Android Studio, open **SDK Manager > SDK Tools**, and install Android SDK Build Tools and Android NDK - > :bell: Please note the following two points: - > - > - While Bazel automatically uses the latest installed Build Tools, versions 31.0.0 and above do not work properly, so you need to uncheck versions 31.0.0 and above. - > - Since NDK versions r22 and above are not supported, please use NDK version 21.4.7075529 or lower. - > - > ![Android Studio (SDK Tools)](https://user-images.githubusercontent.com/4690128/144735652-21339ab0-5a45-4277-b7ee-39d106b5e1e6.png) - 1. Set environment variables ```sh @@ -307,7 +300,7 @@ When building for Android (Linux/macOS), follow these additional steps: export ANDROID_HOME=/path/to/SDK # Set ANDROID_NDK_HOME - # This is typically something like `$ANDROID_HOME/ndk/21.4.7075529` + # This is typically something like `$ANDROID_HOME/ndk/28.2.13676358` export ANDROID_NDK_HOME=/path/to/NDK ``` diff --git a/mediapipe_api/java/com/google/mediapipe/mediapipe_aar.bzl b/mediapipe_api/java/com/google/mediapipe/mediapipe_aar.bzl index dd334644f..fd02aa9cf 100644 --- a/mediapipe_api/java/com/google/mediapipe/mediapipe_aar.bzl +++ b/mediapipe_api/java/com/google/mediapipe/mediapipe_aar.bzl @@ -14,7 +14,7 @@ Macro to generate AAR, including libmediapipe_jni.so load("@build_bazel_rules_android//android:rules.bzl", "android_binary", "android_library") -def mediapipe_aar(name, package = "com.github.homuler.mediapipe", srcs = [], deps = [], jni_deps = [], assets = [], assets_dir = "", target_sdk_version = 34, min_sdk_version = 21): +def mediapipe_aar(name, package = "com.github.homuler.mediapipe", srcs = [], deps = [], jni_deps = [], assets = [], assets_dir = "", target_sdk_version = 34, min_sdk_version = 23): """Generate MediaPipeUnityPlugin AAR. Args: @@ -82,7 +82,7 @@ cat > $(OUTS) < - + EOF """, @@ -94,6 +94,7 @@ EOF name = name + "_dummy_app", manifest = name + "_generated_AndroidManifest.xml", custom_package = "dummy.package.for.so", + multidex = "native", deps = [android_library], ) diff --git a/packages.config b/packages.config index 6a56ac76e..1d08a4510 100644 --- a/packages.config +++ b/packages.config @@ -1,6 +1,6 @@ - + diff --git a/third_party/android/BUILD b/third_party/android/BUILD new file mode 100644 index 000000000..6b54dd0c7 --- /dev/null +++ b/third_party/android/BUILD @@ -0,0 +1,49 @@ +# Copyright 2025 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. + +licenses(["notice"]) + +package(default_visibility = ["//visibility:public"]) + +platform( + name = "x86", + constraint_values = [ + "@platforms//os:android", + "@platforms//cpu:x86_32", + ], +) + +platform( + name = "x86_64", + constraint_values = [ + "@platforms//os:android", + "@platforms//cpu:x86_64", + ], +) + +platform( + name = "armeabi-v7a", + constraint_values = [ + "@platforms//os:android", + "@platforms//cpu:armv7", + ], +) + +platform( + name = "arm64-v8a", + constraint_values = [ + "@platforms//cpu:arm64", + "@platforms//os:android", + ], +) diff --git a/third_party/android_configure.bzl b/third_party/android_configure.bzl index f8e2271f4..328970e70 100644 --- a/third_party/android_configure.bzl +++ b/third_party/android_configure.bzl @@ -54,10 +54,10 @@ def _android_autoconf_impl(repository_ctx): ndk_rule = "" if ndk_home: if not ndk_api_level: - ndk_rule = """native.android_ndk_repository(name="androidndk")""" + ndk_rule = """android_ndk_repository(name="androidndk")""" else: ndk_rule = """ - native.android_ndk_repository( + android_ndk_repository( name="androidndk", api_level={}, ) @@ -68,9 +68,11 @@ def _android_autoconf_impl(repository_ctx): repository_ctx.file("BUILD.bazel", "") repository_ctx.file("android_configure.bzl", """ -def android_workspace(): +def android_workspace(android_ndk_repository): {} {} + # See https://github.com/bazelbuild/rules_android_ndk/issues/31#issuecomment-1396182185 + native.bind(name = "android/crosstool", actual = "@androidndk//:toolchain") """.format(sdk_rule, ndk_rule)) android_configure = repository_rule( diff --git a/third_party/mediapipe_visibility.diff b/third_party/mediapipe_visibility.diff index 2a81517c8..3d049cbe2 100644 --- a/third_party/mediapipe_visibility.diff +++ b/third_party/mediapipe_visibility.diff @@ -1,9 +1,9 @@ diff --git a/mediapipe/calculators/audio/BUILD b/mediapipe/calculators/audio/BUILD -index 3ec914f0..078da7ac 100644 +index 68feca713..4dcc19d4c 100644 --- a/mediapipe/calculators/audio/BUILD +++ b/mediapipe/calculators/audio/BUILD -@@ -441,3 +441,9 @@ cc_test( - "@eigen_archive//:eigen3", +@@ -503,3 +503,9 @@ cc_test( + "@eigen//:eigen3", ], ) + @@ -13,10 +13,10 @@ index 3ec914f0..078da7ac 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/calculators/core/BUILD b/mediapipe/calculators/core/BUILD -index 072d098e..a61fb109 100644 +index 05d5f48df..5ea81d1f8 100644 --- a/mediapipe/calculators/core/BUILD +++ b/mediapipe/calculators/core/BUILD -@@ -1471,3 +1471,9 @@ cc_test( +@@ -1513,3 +1513,9 @@ cc_test( "//mediapipe/framework/port:gtest_main", ], ) @@ -27,10 +27,10 @@ index 072d098e..a61fb109 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/calculators/image/BUILD b/mediapipe/calculators/image/BUILD -index b4324064..14809530 100644 +index 5e790bd75..baa03075f 100644 --- a/mediapipe/calculators/image/BUILD +++ b/mediapipe/calculators/image/BUILD -@@ -892,3 +892,9 @@ cc_library( +@@ -943,3 +943,9 @@ cc_library( ], alwayslink = 1, ) @@ -41,10 +41,10 @@ index b4324064..14809530 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/calculators/tensor/BUILD b/mediapipe/calculators/tensor/BUILD -index 263103e9..1885d0b1 100644 +index 583ef55b6..cceb618a7 100644 --- a/mediapipe/calculators/tensor/BUILD +++ b/mediapipe/calculators/tensor/BUILD -@@ -2290,3 +2290,9 @@ cc_test( +@@ -2291,3 +2291,9 @@ cc_test( "@com_google_absl//absl/strings", ], ) @@ -55,7 +55,7 @@ index 263103e9..1885d0b1 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/calculators/tflite/BUILD b/mediapipe/calculators/tflite/BUILD -index 2526088d..4fa72db4 100644 +index 2526088d1..4fa72db4b 100644 --- a/mediapipe/calculators/tflite/BUILD +++ b/mediapipe/calculators/tflite/BUILD @@ -576,3 +576,9 @@ cc_test( @@ -69,10 +69,10 @@ index 2526088d..4fa72db4 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/calculators/util/BUILD b/mediapipe/calculators/util/BUILD -index f12cdb28..e8ca863d 100644 +index 8bff2e22d..190456449 100644 --- a/mediapipe/calculators/util/BUILD +++ b/mediapipe/calculators/util/BUILD -@@ -1851,3 +1851,9 @@ cc_test( +@@ -1893,3 +1893,9 @@ cc_test( "@com_google_absl//absl/status", ], ) @@ -83,7 +83,7 @@ index f12cdb28..e8ca863d 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/calculators/video/BUILD b/mediapipe/calculators/video/BUILD -index eb833732..d230de23 100644 +index eb833732b..d230de23a 100644 --- a/mediapipe/calculators/video/BUILD +++ b/mediapipe/calculators/video/BUILD @@ -476,3 +476,9 @@ cc_test( @@ -97,10 +97,10 @@ index eb833732..d230de23 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/framework/BUILD b/mediapipe/framework/BUILD -index 9067b6da..6474c12e 100644 +index 9ea70a826..e64f0fecc 100644 --- a/mediapipe/framework/BUILD +++ b/mediapipe/framework/BUILD -@@ -1981,3 +1981,10 @@ cc_library( +@@ -1988,3 +1988,10 @@ cc_library( "@com_google_absl//absl/strings:string_view", ], ) @@ -112,10 +112,10 @@ index 9067b6da..6474c12e 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/framework/formats/BUILD b/mediapipe/framework/formats/BUILD -index 596f72f0..fcfb479d 100644 +index d290e7ebe..61a0c38b0 100644 --- a/mediapipe/framework/formats/BUILD +++ b/mediapipe/framework/formats/BUILD -@@ -415,6 +415,13 @@ mediapipe_register_type( +@@ -448,6 +448,13 @@ mediapipe_register_type( deps = [":landmark_cc_proto"], ) @@ -130,7 +130,7 @@ index 596f72f0..fcfb479d 100644 name = "image", srcs = ["image.cc"], diff --git a/mediapipe/framework/formats/annotation/BUILD b/mediapipe/framework/formats/annotation/BUILD -index cbbb2842..5431f28e 100644 +index cbbb28420..5431f28ec 100644 --- a/mediapipe/framework/formats/annotation/BUILD +++ b/mediapipe/framework/formats/annotation/BUILD @@ -31,4 +31,12 @@ mediapipe_proto_library( @@ -147,7 +147,7 @@ index cbbb2842..5431f28e 100644 + visibility = ["//visibility:public"], ) diff --git a/mediapipe/framework/formats/motion/BUILD b/mediapipe/framework/formats/motion/BUILD -index 8f40202c..f5287c9b 100644 +index 5f39f79b3..8741eba4a 100644 --- a/mediapipe/framework/formats/motion/BUILD +++ b/mediapipe/framework/formats/motion/BUILD @@ -68,3 +68,9 @@ cc_test( @@ -161,7 +161,7 @@ index 8f40202c..f5287c9b 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/framework/formats/object_detection/BUILD b/mediapipe/framework/formats/object_detection/BUILD -index 703d5d77..a73795f1 100644 +index 703d5d774..a73795f16 100644 --- a/mediapipe/framework/formats/object_detection/BUILD +++ b/mediapipe/framework/formats/object_detection/BUILD @@ -25,3 +25,9 @@ mediapipe_proto_library( @@ -175,10 +175,10 @@ index 703d5d77..a73795f1 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/gpu/BUILD b/mediapipe/gpu/BUILD -index d5afb6de..42713a1d 100644 +index 739ac33b0..e81e14053 100644 --- a/mediapipe/gpu/BUILD +++ b/mediapipe/gpu/BUILD -@@ -1427,3 +1427,9 @@ mediapipe_cc_test( +@@ -1500,3 +1500,9 @@ mediapipe_cc_test( "@com_google_absl//absl/log:absl_check", ], ) @@ -189,7 +189,7 @@ index d5afb6de..42713a1d 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/graphs/instant_motion_tracking/calculators/BUILD b/mediapipe/graphs/instant_motion_tracking/calculators/BUILD -index 50128d97..b7ec907a 100644 +index bad583c8f..7fd3021ea 100644 --- a/mediapipe/graphs/instant_motion_tracking/calculators/BUILD +++ b/mediapipe/graphs/instant_motion_tracking/calculators/BUILD @@ -84,3 +84,9 @@ cc_library( @@ -203,7 +203,7 @@ index 50128d97..b7ec907a 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/graphs/iris_tracking/calculators/BUILD b/mediapipe/graphs/iris_tracking/calculators/BUILD -index 9ddce7f3..a9197a9f 100644 +index 9ddce7f36..a9197a9fc 100644 --- a/mediapipe/graphs/iris_tracking/calculators/BUILD +++ b/mediapipe/graphs/iris_tracking/calculators/BUILD @@ -84,3 +84,9 @@ cc_library( @@ -217,7 +217,7 @@ index 9ddce7f3..a9197a9f 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/graphs/object_detection_3d/calculators/BUILD b/mediapipe/graphs/object_detection_3d/calculators/BUILD -index c491baf2..073d2f97 100644 +index d89891a7b..8465f77a6 100644 --- a/mediapipe/graphs/object_detection_3d/calculators/BUILD +++ b/mediapipe/graphs/object_detection_3d/calculators/BUILD @@ -118,3 +118,9 @@ cc_library( @@ -231,10 +231,10 @@ index c491baf2..073d2f97 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/java/com/google/mediapipe/components/BUILD b/mediapipe/java/com/google/mediapipe/components/BUILD -index c09a0ae9..930a7501 100644 +index 150d16fcc..1ff6a6538 100644 --- a/mediapipe/java/com/google/mediapipe/components/BUILD +++ b/mediapipe/java/com/google/mediapipe/components/BUILD -@@ -95,5 +95,5 @@ android_library( +@@ -96,5 +96,5 @@ android_library( filegroup( name = "java_src", srcs = glob(["*.java"]), @@ -242,7 +242,7 @@ index c09a0ae9..930a7501 100644 + visibility = ["//visibility:public"], ) diff --git a/mediapipe/java/com/google/mediapipe/framework/BUILD b/mediapipe/java/com/google/mediapipe/framework/BUILD -index ed18319d..04423237 100644 +index 300aea77f..a860b4416 100644 --- a/mediapipe/java/com/google/mediapipe/framework/BUILD +++ b/mediapipe/java/com/google/mediapipe/framework/BUILD @@ -146,5 +146,5 @@ filegroup( @@ -253,7 +253,7 @@ index ed18319d..04423237 100644 + visibility = ["//visibility:public"], ) diff --git a/mediapipe/java/com/google/mediapipe/glutil/BUILD b/mediapipe/java/com/google/mediapipe/glutil/BUILD -index b1c89240..cd104754 100644 +index b1c89240e..cd104754c 100644 --- a/mediapipe/java/com/google/mediapipe/glutil/BUILD +++ b/mediapipe/java/com/google/mediapipe/glutil/BUILD @@ -35,5 +35,5 @@ android_library( @@ -264,7 +264,7 @@ index b1c89240..cd104754 100644 + visibility = ["//visibility:public"], ) diff --git a/mediapipe/modules/face_detection/BUILD b/mediapipe/modules/face_detection/BUILD -index 05eef34e..14f77622 100644 +index 05eef34ef..14f776228 100644 --- a/mediapipe/modules/face_detection/BUILD +++ b/mediapipe/modules/face_detection/BUILD @@ -177,3 +177,9 @@ mediapipe_files( @@ -278,7 +278,7 @@ index 05eef34e..14f77622 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/modules/face_geometry/BUILD b/mediapipe/modules/face_geometry/BUILD -index 6cb45b28..d7832ce8 100644 +index 6cb45b285..d7832ce8c 100644 --- a/mediapipe/modules/face_geometry/BUILD +++ b/mediapipe/modules/face_geometry/BUILD @@ -141,3 +141,9 @@ cc_library( @@ -292,7 +292,7 @@ index 6cb45b28..d7832ce8 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/modules/face_geometry/protos/BUILD b/mediapipe/modules/face_geometry/protos/BUILD -index 48b7b66c..2d53a28d 100644 +index 48b7b66ce..2d53a28d9 100644 --- a/mediapipe/modules/face_geometry/protos/BUILD +++ b/mediapipe/modules/face_geometry/protos/BUILD @@ -44,3 +44,9 @@ mediapipe_proto_library( @@ -306,7 +306,7 @@ index 48b7b66c..2d53a28d 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/modules/holistic_landmark/calculators/BUILD b/mediapipe/modules/holistic_landmark/calculators/BUILD -index bc00b697..374b437e 100644 +index bc00b697c..374b437e1 100644 --- a/mediapipe/modules/holistic_landmark/calculators/BUILD +++ b/mediapipe/modules/holistic_landmark/calculators/BUILD @@ -58,3 +58,9 @@ cc_library( @@ -320,7 +320,7 @@ index bc00b697..374b437e 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/modules/objectron/calculators/BUILD b/mediapipe/modules/objectron/calculators/BUILD -index e73bd6a2..8d1c9e0a 100644 +index 1d4f559c9..3e425a2e1 100644 --- a/mediapipe/modules/objectron/calculators/BUILD +++ b/mediapipe/modules/objectron/calculators/BUILD @@ -430,3 +430,9 @@ cc_test( @@ -334,7 +334,7 @@ index e73bd6a2..8d1c9e0a 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/tasks/c/components/containers/BUILD b/mediapipe/tasks/c/components/containers/BUILD -index a654adab..a35d7680 100644 +index 646633da6..9f3f061e0 100644 --- a/mediapipe/tasks/c/components/containers/BUILD +++ b/mediapipe/tasks/c/components/containers/BUILD @@ -12,7 +12,7 @@ @@ -347,7 +347,7 @@ index a654adab..a35d7680 100644 licenses(["notice"]) diff --git a/mediapipe/tasks/cc/audio/audio_classifier/proto/BUILD b/mediapipe/tasks/cc/audio/audio_classifier/proto/BUILD -index 1b3783d5..243e1a84 100644 +index 1b3783d51..243e1a842 100644 --- a/mediapipe/tasks/cc/audio/audio_classifier/proto/BUILD +++ b/mediapipe/tasks/cc/audio/audio_classifier/proto/BUILD @@ -28,3 +28,9 @@ mediapipe_proto_library( @@ -361,7 +361,7 @@ index 1b3783d5..243e1a84 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/tasks/cc/components/containers/proto/BUILD b/mediapipe/tasks/cc/components/containers/proto/BUILD -index 66255aed..8dab4bbc 100644 +index 66255aed7..8dab4bbc0 100644 --- a/mediapipe/tasks/cc/components/containers/proto/BUILD +++ b/mediapipe/tasks/cc/components/containers/proto/BUILD @@ -42,3 +42,9 @@ mediapipe_proto_library( @@ -375,7 +375,7 @@ index 66255aed..8dab4bbc 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/tasks/cc/components/processors/proto/BUILD b/mediapipe/tasks/cc/components/processors/proto/BUILD -index 82d4ea21..9b14e8ef 100644 +index 82d4ea21b..9b14e8ef2 100644 --- a/mediapipe/tasks/cc/components/processors/proto/BUILD +++ b/mediapipe/tasks/cc/components/processors/proto/BUILD @@ -93,3 +93,9 @@ mediapipe_proto_library( @@ -389,7 +389,7 @@ index 82d4ea21..9b14e8ef 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/tasks/cc/core/BUILD b/mediapipe/tasks/cc/core/BUILD -index 9c53dcca..98eb9f13 100644 +index 9c53dcca7..98eb9f137 100644 --- a/mediapipe/tasks/cc/core/BUILD +++ b/mediapipe/tasks/cc/core/BUILD @@ -14,7 +14,7 @@ @@ -402,7 +402,7 @@ index 9c53dcca..98eb9f13 100644 licenses(["notice"]) diff --git a/mediapipe/tasks/cc/core/proto/BUILD b/mediapipe/tasks/cc/core/proto/BUILD -index 8392849a..5eaed943 100644 +index 8392849af..5eaed9437 100644 --- a/mediapipe/tasks/cc/core/proto/BUILD +++ b/mediapipe/tasks/cc/core/proto/BUILD @@ -67,3 +67,9 @@ mediapipe_proto_library( @@ -416,7 +416,7 @@ index 8392849a..5eaed943 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/tasks/cc/vision/face_detector/proto/BUILD b/mediapipe/tasks/cc/vision/face_detector/proto/BUILD -index bdfe65ee..c795ee7e 100644 +index bdfe65ee7..c795ee7ef 100644 --- a/mediapipe/tasks/cc/vision/face_detector/proto/BUILD +++ b/mediapipe/tasks/cc/vision/face_detector/proto/BUILD @@ -30,3 +30,9 @@ mediapipe_proto_library( @@ -430,7 +430,7 @@ index bdfe65ee..c795ee7e 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/tasks/cc/vision/face_geometry/calculators/BUILD b/mediapipe/tasks/cc/vision/face_geometry/calculators/BUILD -index 3f2833f3..1ede1db5 100644 +index 3f2833f3b..1ede1db51 100644 --- a/mediapipe/tasks/cc/vision/face_geometry/calculators/BUILD +++ b/mediapipe/tasks/cc/vision/face_geometry/calculators/BUILD @@ -74,3 +74,9 @@ cc_library( @@ -444,7 +444,7 @@ index 3f2833f3..1ede1db5 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/tasks/cc/vision/face_geometry/proto/BUILD b/mediapipe/tasks/cc/vision/face_geometry/proto/BUILD -index 14bdaea8..2f5a32c0 100644 +index 14bdaea80..2f5a32c0a 100644 --- a/mediapipe/tasks/cc/vision/face_geometry/proto/BUILD +++ b/mediapipe/tasks/cc/vision/face_geometry/proto/BUILD @@ -64,3 +64,9 @@ mediapipe_proto_library( @@ -458,7 +458,7 @@ index 14bdaea8..2f5a32c0 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/tasks/cc/vision/face_landmarker/proto/BUILD b/mediapipe/tasks/cc/vision/face_landmarker/proto/BUILD -index aa839d91..8efc28e1 100644 +index aa839d912..8efc28e15 100644 --- a/mediapipe/tasks/cc/vision/face_landmarker/proto/BUILD +++ b/mediapipe/tasks/cc/vision/face_landmarker/proto/BUILD @@ -64,3 +64,9 @@ mediapipe_proto_library( @@ -472,7 +472,7 @@ index aa839d91..8efc28e1 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/tasks/cc/vision/gesture_recognizer/proto/BUILD b/mediapipe/tasks/cc/vision/gesture_recognizer/proto/BUILD -index 8e4f2806..3a67358c 100644 +index 8e4f28060..3a67358c7 100644 --- a/mediapipe/tasks/cc/vision/gesture_recognizer/proto/BUILD +++ b/mediapipe/tasks/cc/vision/gesture_recognizer/proto/BUILD @@ -64,3 +64,9 @@ mediapipe_proto_library( @@ -486,7 +486,7 @@ index 8e4f2806..3a67358c 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/tasks/cc/vision/hand_detector/proto/BUILD b/mediapipe/tasks/cc/vision/hand_detector/proto/BUILD -index c1453f42..2339661a 100644 +index c1453f420..2339661a0 100644 --- a/mediapipe/tasks/cc/vision/hand_detector/proto/BUILD +++ b/mediapipe/tasks/cc/vision/hand_detector/proto/BUILD @@ -38,3 +38,9 @@ mediapipe_proto_library( @@ -500,7 +500,7 @@ index c1453f42..2339661a 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/tasks/cc/vision/hand_landmarker/proto/BUILD b/mediapipe/tasks/cc/vision/hand_landmarker/proto/BUILD -index 6f79b9c4..f65ebb86 100644 +index 6f79b9c4f..f65ebb86f 100644 --- a/mediapipe/tasks/cc/vision/hand_landmarker/proto/BUILD +++ b/mediapipe/tasks/cc/vision/hand_landmarker/proto/BUILD @@ -52,3 +52,9 @@ mediapipe_proto_library( @@ -514,7 +514,7 @@ index 6f79b9c4..f65ebb86 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/tasks/cc/vision/holistic_landmarker/proto/BUILD b/mediapipe/tasks/cc/vision/holistic_landmarker/proto/BUILD -index 147f3cc8..da1d7f57 100644 +index 147f3cc86..da1d7f571 100644 --- a/mediapipe/tasks/cc/vision/holistic_landmarker/proto/BUILD +++ b/mediapipe/tasks/cc/vision/holistic_landmarker/proto/BUILD @@ -42,3 +42,9 @@ mediapipe_proto_library( @@ -528,7 +528,7 @@ index 147f3cc8..da1d7f57 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/tasks/cc/vision/image_segmenter/calculators/BUILD b/mediapipe/tasks/cc/vision/image_segmenter/calculators/BUILD -index a694f9e2..349510eb 100644 +index a694f9e27..349510eb8 100644 --- a/mediapipe/tasks/cc/vision/image_segmenter/calculators/BUILD +++ b/mediapipe/tasks/cc/vision/image_segmenter/calculators/BUILD @@ -125,3 +125,9 @@ cc_test( @@ -542,7 +542,7 @@ index a694f9e2..349510eb 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/tasks/cc/vision/image_segmenter/proto/BUILD b/mediapipe/tasks/cc/vision/image_segmenter/proto/BUILD -index 54dc399d..c1c4db01 100644 +index 54dc399d3..c1c4db012 100644 --- a/mediapipe/tasks/cc/vision/image_segmenter/proto/BUILD +++ b/mediapipe/tasks/cc/vision/image_segmenter/proto/BUILD @@ -33,3 +33,9 @@ mediapipe_proto_library( @@ -556,7 +556,7 @@ index 54dc399d..c1c4db01 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/tasks/cc/vision/object_detector/proto/BUILD b/mediapipe/tasks/cc/vision/object_detector/proto/BUILD -index 863d69df..3abbc14a 100644 +index 863d69df0..3abbc14a7 100644 --- a/mediapipe/tasks/cc/vision/object_detector/proto/BUILD +++ b/mediapipe/tasks/cc/vision/object_detector/proto/BUILD @@ -27,3 +27,9 @@ mediapipe_proto_library( @@ -570,7 +570,7 @@ index 863d69df..3abbc14a 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/tasks/cc/vision/pose_detector/proto/BUILD b/mediapipe/tasks/cc/vision/pose_detector/proto/BUILD -index 53e7d5a5..3882cb6a 100644 +index 53e7d5a55..3882cb6a6 100644 --- a/mediapipe/tasks/cc/vision/pose_detector/proto/BUILD +++ b/mediapipe/tasks/cc/vision/pose_detector/proto/BUILD @@ -29,3 +29,9 @@ mediapipe_proto_library( @@ -584,7 +584,7 @@ index 53e7d5a5..3882cb6a 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/tasks/cc/vision/pose_landmarker/proto/BUILD b/mediapipe/tasks/cc/vision/pose_landmarker/proto/BUILD -index 869a1ea6..3cd6bc5a 100644 +index 869a1ea60..3cd6bc5af 100644 --- a/mediapipe/tasks/cc/vision/pose_landmarker/proto/BUILD +++ b/mediapipe/tasks/cc/vision/pose_landmarker/proto/BUILD @@ -41,3 +41,9 @@ mediapipe_proto_library( @@ -598,7 +598,7 @@ index 869a1ea6..3cd6bc5a 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/util/BUILD b/mediapipe/util/BUILD -index ff5d913e..19fa9265 100644 +index cb801e88d..d2a14193e 100644 --- a/mediapipe/util/BUILD +++ b/mediapipe/util/BUILD @@ -542,3 +542,9 @@ cc_test( @@ -612,7 +612,7 @@ index ff5d913e..19fa9265 100644 + visibility = ["//visibility:public"], +) diff --git a/mediapipe/util/tracking/BUILD b/mediapipe/util/tracking/BUILD -index 6a047cfb..3d2cbb28 100644 +index df3f00446..906ac2600 100644 --- a/mediapipe/util/tracking/BUILD +++ b/mediapipe/util/tracking/BUILD @@ -686,3 +686,9 @@ cc_library( diff --git a/third_party/mediapipe_workaround.diff b/third_party/mediapipe_workaround.diff index b464deaef..ca85515a5 100644 --- a/third_party/mediapipe_workaround.diff +++ b/third_party/mediapipe_workaround.diff @@ -1,5 +1,5 @@ diff --git a/mediapipe/framework/output_stream_handler.cc b/mediapipe/framework/output_stream_handler.cc -index e27d1c68..55f2f3bd 100644 +index e27d1c688..55f2f3bd3 100644 --- a/mediapipe/framework/output_stream_handler.cc +++ b/mediapipe/framework/output_stream_handler.cc @@ -143,9 +143,7 @@ OutputStreamHandler::GetMonitoringInfo() { @@ -14,7 +14,7 @@ index e27d1c68..55f2f3bd 100644 return monitoring_info_vector; } diff --git a/mediapipe/framework/port/opencv_core_inc.h b/mediapipe/framework/port/opencv_core_inc.h -index 12862472..1a409417 100644 +index 128624725..1a4094173 100644 --- a/mediapipe/framework/port/opencv_core_inc.h +++ b/mediapipe/framework/port/opencv_core_inc.h @@ -20,7 +20,7 @@ @@ -27,7 +27,7 @@ index 12862472..1a409417 100644 #endif diff --git a/mediapipe/tasks/cc/core/task_api_factory.h b/mediapipe/tasks/cc/core/task_api_factory.h -index a11a23fc..dbb5fe6c 100644 +index a11a23fcf..dbb5fe6ca 100644 --- a/mediapipe/tasks/cc/core/task_api_factory.h +++ b/mediapipe/tasks/cc/core/task_api_factory.h @@ -76,15 +76,17 @@ class TaskApiFactory { @@ -50,7 +50,7 @@ index a11a23fc..dbb5fe6c 100644 std::move(graph_config), std::move(resolver), std::move(packets_callback), std::move(default_executor), diff --git a/mediapipe/tasks/cc/vision/holistic_landmarker/holistic_landmarker_graph.cc b/mediapipe/tasks/cc/vision/holistic_landmarker/holistic_landmarker_graph.cc -index 2ff140c0..128a4326 100644 +index 2ff140c07..128a43263 100644 --- a/mediapipe/tasks/cc/vision/holistic_landmarker/holistic_landmarker_graph.cc +++ b/mediapipe/tasks/cc/vision/holistic_landmarker/holistic_landmarker_graph.cc @@ -387,6 +387,13 @@ class HolisticLandmarkerGraph : public core::ModelTaskGraph { @@ -67,3 +67,17 @@ index 2ff140c0..128a4326 100644 } } +diff --git a/mediapipe/util/tflite/tflite_model_loader.cc b/mediapipe/util/tflite/tflite_model_loader.cc +index 4809cdc92..acc97a980 100644 +--- a/mediapipe/util/tflite/tflite_model_loader.cc ++++ b/mediapipe/util/tflite/tflite_model_loader.cc +@@ -71,7 +71,7 @@ TfLiteModelLoader::LoadFromPathAndGetResource( + delete model; + res.reset(); + }); +- return TfLiteModelWithResource{.model_packet = std::move(model_packet), +- .resource = std::move(model_resource)}; ++ return TfLiteModelWithResource{/*.model_packet = */ std::move(model_packet), ++ /*.resource = */ std::move(model_resource)}; + } + } // namespace mediapipe diff --git a/third_party/pthreadpool.patch b/third_party/pthreadpool.patch new file mode 100644 index 000000000..139ec1ade --- /dev/null +++ b/third_party/pthreadpool.patch @@ -0,0 +1,19 @@ +diff --git a/BUILD.bazel b/BUILD.bazel +index 396537f..081a0a2 100644 +--- a/BUILD.bazel ++++ b/BUILD.bazel +@@ -67,9 +67,11 @@ cc_library( + hdrs = [ + "include/pthreadpool.h", + ], +- copts = [ +- "-std=c11", +- ] + select({ ++ copts = select({ ++ ":windows_x86_64": ["/std:c11", "/experimental:c11atomics"], ++ ":windows_arm64": ["/std:c11", "/experimental:c11atomics"], ++ "//conditions:default": ["-std=c11"], ++ }) + select({ + ":optimized_build": ["-O2"], + "//conditions:default": [], + }) + select({