Skip to content

Commit bd1b1ce

Browse files
committed
upgrade to openvino 2025.0.0
1 parent 8ba9ad2 commit bd1b1ce

File tree

11 files changed

+97
-66
lines changed

11 files changed

+97
-66
lines changed

build/00-common.linq

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ static void DotNetRun(string args) => Run("dotnet", args.Dump(), Encoding.GetEnc
2121
static void Run(string exe, string args, Encoding encoding) => Util.Cmd(exe, args, encoding);
2222
static ProjectVersion[] Projects = new[]
2323
{
24-
new ProjectVersion("Sdcb.OpenVINO", "0.6.9"),
24+
new ProjectVersion("Sdcb.OpenVINO", "0.6.10"),
2525
new ProjectVersion("Sdcb.OpenVINO.Extensions.OpenCvSharp4", "0.6.8"),
2626
new ProjectVersion("Sdcb.OpenVINO.PaddleOCR", "0.6.8"),
2727
new ProjectVersion("Sdcb.OpenVINO.PaddleOCR.Models.Online", "0.6.2"),

generator/Sdcb.OpenVINO.AutoGen/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
IServiceProvider services = ConfigureServices();
1616
//ExtractedInfo info = (await services.GetRequiredService<HeadersDownloader>().DownloadAsync());
1717
AppSettings appSettings = services.GetRequiredService<AppSettings>();
18-
string url = "https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.5/windows/w_openvino_toolkit_windows_2024.5.0.17288.7975fa5da0c_x86_64.zip";
18+
string url = "https://storage.openvinotoolkit.org/repositories/openvino/packages/2025.0/windows/openvino_toolkit_windows_2025.0.0.17942.1f68be9f594_x86_64.zip";
1919
ExtractedInfo info = await HeadersDownloader.DirectDownloadAsync(url, services.GetRequiredService<ArtifactDownloader>(), appSettings.DownloadFolder);
2020
ParsedInfo parsed = HeadersParser.Parse(info);
2121
GeneratedAll all = GeneratedAll.Generate(parsed);

generator/Sdcb.OpenVINO.NuGetBuilder/ArtifactSources/ArtifactInfo.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,28 @@ public static ArtifactInfo FromPath(StorageNode sha256Node, SemanticVersion prov
1717
throw new FormatException($"{fileNode.Name} failed to detected as {nameof(ArtifactInfo)}.");
1818
}
1919

20-
KnownOS os = ParseKnownOSChar(match.Groups["os"].Value);
20+
KnownOS os = ParseKnownOSChar(match.Groups["dist"].Value);
2121

2222
return new ArtifactInfo(os, match.Groups["dist"].Value, match.Groups["arch"].Value, providedVersion, sha256Node.LastModified, match.Groups["ext"].Value,
2323
fileNode.FullPath, sha256Node.FullPath);
2424
}
2525

26-
private static KnownOS ParseKnownOSChar(string osChar)
26+
private static KnownOS ParseKnownOSChar(string dist)
2727
{
28-
return osChar switch
28+
return dist switch
2929
{
30-
"l" => KnownOS.Linux,
31-
"m" => KnownOS.MacOS,
32-
"w" => KnownOS.Windows,
33-
_ => throw new FormatException($"Failed to parse {osChar} as {nameof(KnownOS)}.")
30+
"debian10" or "rhel8" or "ubuntu22" or "centos7" or "ubuntu20" or "ubuntu24" => KnownOS.Linux,
31+
"macos_12_6" => KnownOS.MacOS,
32+
"windows" => KnownOS.Windows,
33+
_ => throw new FormatException($"Failed to parse {dist} as {nameof(KnownOS)}.")
3434
};
3535
}
3636

3737
internal static bool NameIdentifier(string name) => name.EndsWith(HashSuffix);
3838
internal static string ArtifactFileExtractor(string name) => name[..(^HashSuffix.Length)];
3939
private const string HashSuffix = ".sha256";
4040

41-
[GeneratedRegex(@"^(?<os>[m|w|l])_openvino_toolkit_(?<dist>\w+)_(?<version>\d{4}\.\d\.\d\.[\w\.]+)_(?<arch>armhf|x86_64|arm64)\.(?<ext>\w+)$")]
41+
[GeneratedRegex(@"^openvino_toolkit_(?<dist>\w+)_(?<version>\d{4}\.\d\.\d\.[\w\.]+)_(?<arch>armhf|x86_64|arm64)\.(?<ext>\w+)$")]
4242
private static partial Regex OpenVINOArtifactNameRegex();
4343

4444
internal static IEnumerable<ArtifactInfo> FromFolder(VersionFolder vf)

generator/Sdcb.OpenVINO.NuGetBuilder/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ static async Task Main(string[] args)
1616
IServiceProvider sp = ConfigureServices();
1717
ArtifactDownloader w = sp.GetRequiredService<ArtifactDownloader>();
1818
StorageNodeRoot root = sp.GetRequiredService<StorageNodeRoot>();
19-
string purpose = args.Length > 0 ? args[0] : "win64";
20-
string? versionSuffix = null; // null or "preview.1", can't be ""
19+
string purpose = args.Length > 0 ? args[0] : "linux";
20+
string? versionSuffix = "preview.1"; // null or "preview.1", can't be ""
2121
string dir = Path.Combine(DirectoryUtils.SearchFileInCurrentAndParentDirectories(new DirectoryInfo("."), "OpenVINO.NET.sln").DirectoryName!,
2222
"build", "nupkgs");
2323
VersionFolder vf = root.LatestStableVersion;

generator/tests/Sdcb.OpenVINO.AutoGen.Tests/Sdcb.OpenVINO.AutoGen.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
<ItemGroup>
1212
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
13-
<PackageReference Include="xunit" Version="2.9.1" />
14-
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
13+
<PackageReference Include="xunit" Version="2.9.3" />
14+
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.2">
1515
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1616
<PrivateAssets>all</PrivateAssets>
1717
</PackageReference>
18-
<PackageReference Include="coverlet.collector" Version="6.0.2">
18+
<PackageReference Include="coverlet.collector" Version="6.0.4">
1919
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2020
<PrivateAssets>all</PrivateAssets>
2121
</PackageReference>

generator/tests/Sdcb.OpenVINO.NuGetBuilder.Tests/Sdcb.OpenVINO.NuGetBuilder.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
<ItemGroup>
2727
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
2828
<PackageReference Include="Moq" Version="4.20.72" />
29-
<PackageReference Include="xunit" Version="2.9.1" />
30-
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
29+
<PackageReference Include="xunit" Version="2.9.3" />
30+
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.2">
3131
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3232
<PrivateAssets>all</PrivateAssets>
3333
</PackageReference>
34-
<PackageReference Include="coverlet.collector" Version="6.0.2">
34+
<PackageReference Include="coverlet.collector" Version="6.0.4">
3535
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3636
<PrivateAssets>all</PrivateAssets>
3737
</PackageReference>

projects/PaddleOCR/Sdcb.OpenVINO.PaddleOCR.Tests/Sdcb.OpenVINO.PaddleOCR.Tests.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
<ItemGroup>
1818
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
1919
<PackageReference Include="OpenCvSharp4.runtime.win" Version="4.10.0.20240616" />
20-
<PackageReference Include="Sdcb.OpenVINO.runtime.ubuntu.22.04-x64" Version="2024.2.0" />
21-
<PackageReference Include="Sdcb.OpenVINO.runtime.win-x64" Version="2024.2.0" />
22-
<PackageReference Include="xunit" Version="2.9.1" />
23-
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
20+
<PackageReference Include="Sdcb.OpenVINO.runtime.ubuntu.22.04-x64" Version="2025.0.0" />
21+
<PackageReference Include="Sdcb.OpenVINO.runtime.win-x64" Version="2025.0.0" />
22+
<PackageReference Include="xunit" Version="2.9.3" />
23+
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.2">
2424
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2525
<PrivateAssets>all</PrivateAssets>
2626
</PackageReference>
27-
<PackageReference Include="coverlet.collector" Version="6.0.2">
27+
<PackageReference Include="coverlet.collector" Version="6.0.4">
2828
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2929
<PrivateAssets>all</PrivateAssets>
3030
</PackageReference>

src/Sdcb.OpenVINO/Natives/Enums.g.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,3 +217,21 @@ public enum ov_preprocess_resize_algorithm_e
217217
/// <summary>nearest algorithm</summary>
218218
RESIZE_NEAREST = 2,
219219
}
220+
221+
222+
/// <summary>This enum contains enumeration for padding mode.</summary>
223+
[CSourceInfo("ov_prepostprocess.h", 101, 106, "ov_prepostprocess_c_api")]
224+
public enum ov_padding_mode_e
225+
{
226+
/// <summary>Pads with given constant value.</summary>
227+
CONSTANT = 0,
228+
229+
/// <summary>Pads with tensor edge values.</summary>
230+
EDGE = 1,
231+
232+
/// <summary>Pads with reflection of tensor data along axis. Values on the edges are not duplicated.</summary>
233+
REFLECT = 2,
234+
235+
/// <summary> Pads similar like `REFLECT` but values on the edges are duplicated.</summary>
236+
SYMMETRIC = 3,
237+
}

0 commit comments

Comments
 (0)