Skip to content

Commit

Permalink
Update umapx and refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
asiryan committed Oct 18, 2023
1 parent 9847369 commit 206d030
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 215 deletions.
8 changes: 4 additions & 4 deletions netstandard/ClothONNX.Gpu/ClothONNX.Gpu.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>ClothONNX.Gpu</AssemblyName>
<LangVersion>8.0</LangVersion>
<Version>1.0.0.1</Version>
<FileVersion>1.0.0.1</FileVersion>
<Version>1.0.1.1</Version>
<FileVersion>1.0.1.1</FileVersion>
<Authors>Valery Asiryan</Authors>
<Company>Valery Asiryan</Company>
<Description>Cloth segmentation library based on deep neural networks and ONNX runtime.</Description>
<Copyright>Valery Asiryan, © 2023</Copyright>
<RepositoryType>Open-source</RepositoryType>
<PackageId>ClothONNX.Gpu</PackageId>
<Product>ClothONNX.Gpu</Product>
<AssemblyVersion>1.0.0.1</AssemblyVersion>
<AssemblyVersion>1.0.1.1</AssemblyVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageTags>cloth detection segmentation recognition onnx neural-networks unet</PackageTags>
<RepositoryUrl>https://github.com/FaceONNX/ClothONNX</RepositoryUrl>
Expand All @@ -31,7 +31,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.ML.OnnxRuntime.Gpu" Version="1.9.0" />
<PackageReference Include="UMapx" Version="5.2.7.1" />
<PackageReference Include="UMapx" Version="5.2.8.1" />
</ItemGroup>

<ItemGroup>
Expand Down
7 changes: 5 additions & 2 deletions netstandard/ClothONNX.Gpu/ClothSegmentator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public ClothSegmentator(SessionOptions options)

for (int i = 0; i < image.Length; i++)
{
resized[i] = image[i].ResizeBilinear(size.Height, size.Width);
resized[i] = image[i].Resize(size.Height, size.Width, InterpolationMode.Bilinear);
}

var dimentions = new int[] { 1, 3, size.Width, size.Height };
Expand Down Expand Up @@ -113,7 +113,7 @@ public ClothSegmentator(SessionOptions options)
}
}

return mask.ResizeBilinear(height, width);
return mask.Resize(height, width, InterpolationMode.Bilinear);
}

#endregion
Expand Down Expand Up @@ -142,6 +142,9 @@ private void Dispose(bool disposing)
}
}

/// <summary>
/// Destructor.
/// </summary>
~ClothSegmentator()
{
Dispose(false);
Expand Down
67 changes: 0 additions & 67 deletions netstandard/ClothONNX.Gpu/internal/Transformations.cs

This file was deleted.

8 changes: 4 additions & 4 deletions netstandard/ClothONNX/ClothONNX.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>ClothONNX</AssemblyName>
<LangVersion>8.0</LangVersion>
<Version>1.0.0.1</Version>
<FileVersion>1.0.0.1</FileVersion>
<Version>1.0.1.1</Version>
<FileVersion>1.0.1.1</FileVersion>
<Authors>Valery Asiryan</Authors>
<Company>Valery Asiryan</Company>
<Description>Cloth segmentation library based on deep neural networks and ONNX runtime.</Description>
<Copyright>Valery Asiryan, © 2023</Copyright>
<RepositoryType>Open-source</RepositoryType>
<PackageId>ClothONNX</PackageId>
<Product>ClothONNX</Product>
<AssemblyVersion>1.0.0.1</AssemblyVersion>
<AssemblyVersion>1.0.1.1</AssemblyVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageTags>cloth detection segmentation recognition onnx neural-networks unet</PackageTags>
<RepositoryUrl>https://github.com/FaceONNX/ClothONNX</RepositoryUrl>
Expand All @@ -31,7 +31,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.9.0" />
<PackageReference Include="UMapx" Version="5.2.7.1" />
<PackageReference Include="UMapx" Version="5.2.8.1" />
</ItemGroup>

<ItemGroup>
Expand Down
7 changes: 5 additions & 2 deletions netstandard/ClothONNX/ClothSegmentator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public ClothSegmentator(SessionOptions options)

for (int i = 0; i < image.Length; i++)
{
resized[i] = image[i].ResizeBilinear(size.Height, size.Width);
resized[i] = image[i].Resize(size.Height, size.Width, InterpolationMode.Bilinear);
}

var dimentions = new int[] { 1, 3, size.Width, size.Height };
Expand Down Expand Up @@ -113,7 +113,7 @@ public ClothSegmentator(SessionOptions options)
}
}

return mask.ResizeBilinear(height, width);
return mask.Resize(height, width, InterpolationMode.Bilinear);
}

#endregion
Expand Down Expand Up @@ -142,6 +142,9 @@ private void Dispose(bool disposing)
}
}

/// <summary>
/// Destructor.
/// </summary>
~ClothSegmentator()
{
Dispose(false);
Expand Down
67 changes: 0 additions & 67 deletions netstandard/ClothONNX/internal/Transformations.cs

This file was deleted.

69 changes: 0 additions & 69 deletions netstandard/Examples/ClothSegmentation/MaskColorFilter.cs

This file was deleted.

0 comments on commit 206d030

Please sign in to comment.