Skip to content

Commit 571df19

Browse files
author
Chris Maunder
committed
Merge branch 'v2.9.0'
2 parents 7d8f097 + 5d463a8 commit 571df19

File tree

19 files changed

+233
-164
lines changed

19 files changed

+233
-164
lines changed

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"deserialising",
4242
"deskew",
4343
"Dgram",
44+
"distutils",
4445
"downloadables",
4546
"downsampling",
4647
"dtype",

CodeProject.AI.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "TextSummary", "..\CodeProje
316316
EndProject
317317
Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "TrainingObjectDetectionYOLOv5", "..\CodeProject.AI-Modules\CodeProject.AI-TrainingObjectDetectionYOLOv5\TrainingObjectDetectionYOLOv5.pyproj", "{2DFDA382-189B-45D1-94D5-3004D1AEB73C}"
318318
EndProject
319-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonApi", "src\demos\clients\Net\JsonApi\JsonApi.csproj", "{7BFCEBCA-0677-4122-B474-B08D958F7FC7}"
319+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonAPI", "src\demos\clients\Net\JsonAPI\JsonAPI.csproj", "{7BFCEBCA-0677-4122-B474-B08D958F7FC7}"
320320
EndProject
321321
Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "PythonLongProcess", "src\demos\modules\PythonLongProcess\PythonLongProcess.pyproj", "{D56CA115-830A-4007-BB9B-BF0FC72DA9B1}"
322322
EndProject

devops/install/dotnet-install-arm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ fi
135135
echo -e "${bold}Creating Main Directory${reset}"
136136

137137
if [[ -d /opt/dotnet ]]; then
138-
echo "/opt/dotnet already exists on your filesystem."
138+
echo "/opt/dotnet already exists on your filesystem."
139139
else
140140
echo "Creating Main Directory"
141141
mkdir /opt/dotnet

devops/install/dotnet-install.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,11 @@ get_user_install_path() {
939939
echo "$DOTNET_INSTALL_DIR"
940940
else
941941
if [ "$normalized_os" == "osx" ]; then
942-
echo "/usr/local/share/dotnet"
942+
# if [ "$(get_machine_architecture)" = "arm64" ]; then
943+
# echo "/opt/dotnet"
944+
# else
945+
echo "/usr/local/share/dotnet"
946+
# fi
943947
else
944948
echo "$HOME/.dotnet"
945949
fi
@@ -984,9 +988,12 @@ get_cp_options() {
984988

985989
if [ "$override" = false ]; then
986990
# cp: warning: behavior of -n is non-portable and may change in future; use --update=none instead
987-
# override_switch="-n"
988-
override_switch="--update=none"
989-
991+
if [ "$normalized_os" == "osx" ]; then
992+
override_switch="-n"
993+
else
994+
override_switch="--update=none"
995+
fi;
996+
990997
# create temporary files to check if 'cp -u' is supported
991998
tmp_dir="$(mktemp -d)"
992999
tmp_file="$tmp_dir/testfile"

modules/ObjectDetectionYOLOv5Net/ObjectDetectionYOLOv5Net.csproj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,19 @@
8181

8282
<ItemGroup>
8383
<PackageReference Include="CodeProject.AI.Module.SDK" Version="1.0.1" />
84-
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.16.3" Condition="'$(GpuType)'=='CPU'" />
85-
<PackageReference Include="Microsoft.ML.OnnxRuntime.Gpu" Version="1.16.3" Condition="'$(GpuType)'=='CUDA'" />
84+
85+
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.16.3" Condition="'$(GpuType)'=='CPU'" />
86+
<PackageReference Include="Microsoft.ML.OnnxRuntime.Gpu" Version="1.19.2" Condition="'$(GpuType)'=='CUDA'" />
8687
<PackageReference Include="Microsoft.ML.OnnxRuntime.OpenVino" Version="1.13.1-dev-20221026-1209-861125ccb" Condition="'$(GpuType)'=='OpenVINO'" />
8788
<PackageReference Include="Microsoft.ML.OnnxRuntime.DirectML" Version="1.19.2" Condition="'$(GpuType)'=='DirectML'" />
88-
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.16.3" Condition="'$(GpuType)'=='MPS'" />
89+
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.16.3" Condition="'$(GpuType)'=='MPS'" />
8990

9091
<!-- https://github.com/microsoft/onnxruntime/issues/12677#issuecomment-1443802719 -->
9192
<PackageReference Include="Microsoft.AI.DirectML" Version="1.15.2" Condition="'$(GpuType)'=='DirectML'" />
9293

9394
<PackageReference Include="SkiaSharp" Version="2.88.8" />
94-
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
95+
<PackageReference Condition="'$(IsOsx)'=='true' And '$(IsArm64)'=='true'" Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
96+
<PackageReference Condition="'$(IsOsx)'!='true' Or '$(IsArm64)'!='true'" Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
9597
</ItemGroup>
9698

9799
<!-- Output the settings based on what we've determined above -->

modules/ObjectDetectionYOLOv5Net/install.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ if [ "$1" != "install" ]; then
1919
exit 1
2020
fi
2121

22+
installBinaries=false
23+
if [ "$executionEnvironment" = "Production" ]; then installBinaries=true; fi
24+
if [ "$launchedBy" = "server" ]; then installBinaries=true; fi
25+
2226
# Pull down the correct .NET image of ObjectDetectionYOLOv5Net based on this OS / GPU combo
23-
if [ "${executionEnvironment}" = "Production" ] || [ "${launchedBy}" = "server" ]; then
27+
if [ "${installBinaries}" = true ]; then
2428
imageName="ObjectDetectionYOLOv5Net-CPU-${moduleVersion}.zip"
2529
if [ "${installGPU}" = "true" ] && [ "${os}" != "macos" ]; then
2630
# Having issues with the OpenVINO version on linux

src/SDK/NET/NET.csproj

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,33 @@
3333
<DebugSymbols>true</DebugSymbols>
3434
</PropertyGroup>
3535

36-
<ItemGroup>
37-
<PackageReference Include="Hardware.Info" Version="101.0.0" />
36+
<ItemGroup Condition="'$(IsOsx)'=='true' And '$(IsArm64)'=='true'"> <!-- Mac Apple Silicon -->
37+
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="8.0.0" />
38+
<PackageReference Include="System.Text.Json" Version="8.0.0" />
39+
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0" />
40+
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
41+
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
42+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
43+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
44+
</ItemGroup>
45+
46+
<ItemGroup Condition="'$(IsOsx)'!='true' Or '$(IsArm64)'!='true'"> <!-- Everything else -->
47+
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="8.0.1" />
48+
<PackageReference Include="System.Text.Json" Version="8.0.5" />
3849
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
3950
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.1" />
40-
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.1" />
51+
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.1" />
4152
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
42-
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
53+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
54+
</ItemGroup>
55+
56+
<ItemGroup>
57+
<PackageReference Include="Hardware.Info" Version="101.0.0" />
4358
<PackageReference Include="Microsoft.VisualBasic" Version="10.3.0" />
4459
<PackageReference Include="SkiaSharp" Version="2.88.8" />
4560
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.88.8" />
4661
<PackageReference Include="SkiaSharp.Views.Desktop.Common" Version="2.88.8" />
4762
<PackageReference Include="System.Management" Version="8.0.0" />
48-
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="8.0.1" />
49-
50-
<PackageReference Include="System.Text.Json" Version="8.0.0" Condition="'$(IsOsx)'=='true' And '$(IsArm64)'=='true'" /> <!-- Mac Apple Silicon -->
51-
<PackageReference Include="System.Text.Json" Version="8.0.5" Condition="'$(IsOsx)'!='true' Or '$(IsArm64)'!='true'" /> <!-- Everything else -->
5263
</ItemGroup>
5364

5465
<ItemGroup>

src/SDK/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ else
7575
write "Installing System.Drawing support "
7676
fi
7777

78-
if [ $"$architecture" = 'arm64' ]; then
78+
if [ "$architecture" = 'arm64' ]; then
7979
arch -x86_64 /usr/local/bin/brew list fontconfig >/dev/null 2>/dev/null || \
8080
arch -x86_64 /usr/local/bin/brew install fontconfig >/dev/null 2>/dev/null &
8181
spin $!
@@ -95,7 +95,7 @@ else
9595
else
9696
writeLine "Installing System.Drawing support "
9797

98-
if [ $"$architecture" = 'arm64' ]; then
98+
if [ "$architecture" = 'arm64' ]; then
9999
arch -x86_64 /usr/local/bin/brew list fontconfig || arch -x86_64 /usr/local/bin/brew install fontconfig
100100
arch -x86_64 /usr/local/bin/brew list libomp || arch -x86_64 /usr/local/bin/brew install libomp
101101
else

src/demos/modules/DotNetSimple/DotNetSimple.csproj

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,23 @@
4949
<ItemGroup>
5050
<!-- Common packages required on all GPU types -->
5151
<PackageReference Include="CodeProject.AI.Module.SDK" Version="1.0.1" />
52+
5253
<PackageReference Include="Yolov8.Net" Version="2.0.0" />
5354
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.5" />
5455
<PackageReference Include="SkiaSharp" Version="2.88.8" />
55-
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
56+
57+
<PackageReference Condition="'$(IsOsx)'=='true' And '$(IsArm64)'=='true'" Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
58+
<PackageReference Condition="'$(IsOsx)'!='true' Or '$(IsArm64)'!='true'" Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
5659

5760
<!-- Hardware Specific packages. Note that for CUDA, even if there may not be any actual
5861
CUDA hardware available, the package will still run fine. It's big, but if it does
5962
find CUDA on the machine then it's worth it. -->
60-
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.16.3" Condition="'$(GpuType)'=='CPU'" />
61-
<PackageReference Include="Microsoft.ML.OnnxRuntime.Gpu" Version="1.16.3" Condition="'$(GpuType)'=='CUDA'" />
62-
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.16.3" Condition="'$(GpuType)'=='MPS'" />
63+
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.16.3" Condition="'$(GpuType)'=='CPU'" />
64+
<PackageReference Include="Microsoft.ML.OnnxRuntime.Gpu" Version="1.19.2" Condition="'$(GpuType)'=='CUDA'" />
65+
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.16.3" Condition="'$(GpuType)'=='MPS'" />
6366
<PackageReference Include="Microsoft.ML.OnnxRuntime.DirectML" Version="1.19.2" Condition="'$(GpuType)'=='DirectML'" />
6467
<!-- https://github.com/microsoft/onnxruntime/issues/12677#issuecomment-1443802719 -->
65-
<PackageReference Include="Microsoft.AI.DirectML" Version="1.15.2" Condition="'$(GpuType)'=='DirectML'" />
68+
<PackageReference Include="Microsoft.AI.DirectML" Version="1.15.2" Condition="'$(GpuType)'=='DirectML'" />
6669

6770
</ItemGroup>
6871

src/demos/modules/DotNetSimple/install.bat

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:: Installation script :::::::::::::::::::::::::::::::::::::::::::::::::::::::::
22
::
3-
:: .NET YOLO Object Detection
3+
:: .NET Simple Demo
44
::
55
:: This script is only called from ..\..\..\setup.bat
66
::
@@ -12,20 +12,20 @@
1212
@pause
1313
@goto:eof
1414
)
15-
16-
set installBinaries=false
17-
if /i "!executionEnvironment!" == "Production" set installBinaries=true
18-
if /i "!launchedBy!" == "server" set installBinaries=true
19-
20-
:: Pull down the .NET executable of this module
21-
if /i "!installBinaries!" == "true" (
22-
set imageName=!moduleId!-!moduleVersion!.zip
23-
call "%utilsScript%" GetFromServer "binaries/" "!imageName!" "bin" "Downloading !imageName!..."
15+
if /i "!executionEnvironment!" == "Production" (
16+
REM Often we just pull down the pre-compiled binaries from the CDN when in
17+
REM production. This saves having to install the .NET SDK. This is a demo so
18+
REM do nothing here.
19+
call "!utilsScript!" WriteLine "Production install not supported" "!color_info!"
2420
) else (
2521
:: If we're in dev-setup mode we'll build the module now so the self-test will work
2622
pushd "!moduleDirPath!"
2723
call "!utilsScript!" WriteLine "Building project..." "!color_info!"
28-
dotnet build -c Debug -o "!moduleDirPath!/bin/Debug/!dotNetTarget!" >NUL
24+
if /i "%verbosity%" neq "quiet" (
25+
dotnet build -c Debug -o "!moduleDirPath!/bin/Debug/!dotNetTarget!"
26+
) else (
27+
dotnet build -c Debug -o "!moduleDirPath!/bin/Debug/!dotNetTarget!" >NUL
28+
)
2929
popd
3030
)
3131

0 commit comments

Comments
 (0)