mirror of
https://github.com/unclshura/splitter.git
synced 2026-06-21 16:12:01 +00:00
Publishing-ready splitter. Models committed. Slnx now is in use. Splitter CLI is in a separate folder.
This commit is contained in:
parent
52856d9dd9
commit
a1371ef6ae
41
.github/workflows/publish.yml
vendored
Normal file
41
.github/workflows/publish.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
name: Build and Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 10.0.x
|
||||
|
||||
- name: Restore
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build Release
|
||||
env:
|
||||
GITHUB_RUN_NUMBER: ${{ github.run_number }}
|
||||
GITHUB_SHA: ${{ github.sha }}
|
||||
run: dotnet build -c Release --no-restore
|
||||
|
||||
- name: Publish Release
|
||||
env:
|
||||
GITHUB_RUN_NUMBER: ${{ github.run_number }}
|
||||
GITHUB_SHA: ${{ github.sha }}
|
||||
run: dotnet publish -c Release -r win-x64 --self-contained true --no-build
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: splitter-win-x64
|
||||
path: bin/Release/net10.0/win-x64/publish/
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -363,4 +363,5 @@ MigrationBackup/
|
||||
FodyWeavers.xsd
|
||||
|
||||
# OpenCV models
|
||||
models/*.*
|
||||
splitter-cli/models/*.*
|
||||
*.g.cs
|
||||
|
||||
8
splitter-cli/BuildInfo.cs
Normal file
8
splitter-cli/BuildInfo.cs
Normal file
@ -0,0 +1,8 @@
|
||||
namespace splitter;
|
||||
|
||||
public static class BuildInfo
|
||||
{
|
||||
public static string Version { get; } = ThisAssembly.Version;
|
||||
public static string BuildNumber { get; } = ThisAssembly.BuildNumber;
|
||||
public static string Commit { get; } = ThisAssembly.Commit;
|
||||
}
|
||||
9
splitter-cli/BuildInfo.template
Normal file
9
splitter-cli/BuildInfo.template
Normal file
@ -0,0 +1,9 @@
|
||||
// Auto-generated. Do not edit.
|
||||
namespace splitter;
|
||||
|
||||
internal static class ThisAssembly
|
||||
{
|
||||
public const string Version = "@VERSION@";
|
||||
public const string BuildNumber = "@BUILDNUMBER@";
|
||||
public const string Commit = "@COMMIT@";
|
||||
}
|
||||
@ -323,9 +323,17 @@ public sealed class CommandLine
|
||||
|
||||
throw new FormatException($"Invalid duration format: {text}");
|
||||
}
|
||||
|
||||
public static void PrintVersion()
|
||||
{
|
||||
Console.WriteLine($"...---=== splitter version {BuildInfo.Version} (commit {BuildInfo.Commit}, build {BuildInfo.BuildNumber}) ===---...");
|
||||
}
|
||||
|
||||
public static void PrintHelp()
|
||||
{
|
||||
PrintVersion();
|
||||
Console.WriteLine(@"
|
||||
|
||||
Usage:
|
||||
splitter [<input.mp4> ...] [options] [--] <ffmpeg passthrough>
|
||||
|
||||
@ -371,7 +379,7 @@ Options:
|
||||
--detect=<name> Object detector to use for tracking.
|
||||
Values: face (UltraFace), body (YoloOnnx, default), none (no tracking, just a center)
|
||||
|
||||
--gravitate=<x:y> Gravitate towards a specific point (x, y) in the video frame.
|
||||
--gravitate=<x:y> Gravitate towards a specific point (x, y) in the video frame when tracking.
|
||||
Coordinates are normalized (0.0 to 1.0).
|
||||
Example: --gravitate=0.2:0.5 (gravitate towards left-center)
|
||||
|
||||
BIN
splitter-cli/models/slim_320.bin
Normal file
BIN
splitter-cli/models/slim_320.bin
Normal file
Binary file not shown.
102
splitter-cli/models/slim_320.param
Normal file
102
splitter-cli/models/slim_320.param
Normal file
@ -0,0 +1,102 @@
|
||||
7767517
|
||||
100 107
|
||||
Input input 0 1 input
|
||||
Convolution 185 1 1 input 185 0=16 1=3 11=3 2=1 12=1 3=2 13=2 4=1 14=1 5=1 6=432
|
||||
ReLU 187 1 1 185 187
|
||||
ConvolutionDepthWise 188 1 1 187 188 0=16 1=3 11=3 2=1 12=1 3=1 13=1 4=1 14=1 5=1 6=144 7=16
|
||||
ReLU 190 1 1 188 190
|
||||
Convolution 191 1 1 190 191 0=32 1=1 11=1 2=1 12=1 3=1 13=1 4=0 14=0 5=1 6=512
|
||||
ReLU 193 1 1 191 193
|
||||
ConvolutionDepthWise 194 1 1 193 194 0=32 1=3 11=3 2=1 12=1 3=2 13=2 4=1 14=1 5=1 6=288 7=32
|
||||
ReLU 196 1 1 194 196
|
||||
Convolution 197 1 1 196 197 0=32 1=1 11=1 2=1 12=1 3=1 13=1 4=0 14=0 5=1 6=1024
|
||||
ReLU 199 1 1 197 199
|
||||
ConvolutionDepthWise 200 1 1 199 200 0=32 1=3 11=3 2=1 12=1 3=1 13=1 4=1 14=1 5=1 6=288 7=32
|
||||
ReLU 202 1 1 200 202
|
||||
Convolution 203 1 1 202 203 0=32 1=1 11=1 2=1 12=1 3=1 13=1 4=0 14=0 5=1 6=1024
|
||||
ReLU 205 1 1 203 205
|
||||
ConvolutionDepthWise 206 1 1 205 206 0=32 1=3 11=3 2=1 12=1 3=2 13=2 4=1 14=1 5=1 6=288 7=32
|
||||
ReLU 208 1 1 206 208
|
||||
Convolution 209 1 1 208 209 0=64 1=1 11=1 2=1 12=1 3=1 13=1 4=0 14=0 5=1 6=2048
|
||||
ReLU 211 1 1 209 211
|
||||
ConvolutionDepthWise 212 1 1 211 212 0=64 1=3 11=3 2=1 12=1 3=1 13=1 4=1 14=1 5=1 6=576 7=64
|
||||
ReLU 214 1 1 212 214
|
||||
Convolution 215 1 1 214 215 0=64 1=1 11=1 2=1 12=1 3=1 13=1 4=0 14=0 5=1 6=4096
|
||||
ReLU 217 1 1 215 217
|
||||
ConvolutionDepthWise 218 1 1 217 218 0=64 1=3 11=3 2=1 12=1 3=1 13=1 4=1 14=1 5=1 6=576 7=64
|
||||
ReLU 220 1 1 218 220
|
||||
Convolution 221 1 1 220 221 0=64 1=1 11=1 2=1 12=1 3=1 13=1 4=0 14=0 5=1 6=4096
|
||||
ReLU 223 1 1 221 223
|
||||
ConvolutionDepthWise 224 1 1 223 224 0=64 1=3 11=3 2=1 12=1 3=1 13=1 4=1 14=1 5=1 6=576 7=64
|
||||
ReLU 226 1 1 224 226
|
||||
Convolution 227 1 1 226 227 0=64 1=1 11=1 2=1 12=1 3=1 13=1 4=0 14=0 5=1 6=4096
|
||||
ReLU 229 1 1 227 229
|
||||
Split splitncnn_0 1 3 229 229_splitncnn_0 229_splitncnn_1 229_splitncnn_2
|
||||
ConvolutionDepthWise 230 1 1 229_splitncnn_2 230 0=64 1=3 11=3 2=1 12=1 3=1 13=1 4=1 14=1 5=1 6=576 7=64
|
||||
ReLU 231 1 1 230 231
|
||||
Convolution 232 1 1 231 232 0=6 1=1 11=1 2=1 12=1 3=1 13=1 4=0 14=0 5=1 6=384
|
||||
Permute 233 1 1 232 233 0=3
|
||||
Reshape 243 1 1 233 243 0=2 1=-1
|
||||
ConvolutionDepthWise 244 1 1 229_splitncnn_1 244 0=64 1=3 11=3 2=1 12=1 3=1 13=1 4=1 14=1 5=1 6=576 7=64
|
||||
ReLU 245 1 1 244 245
|
||||
Convolution 246 1 1 245 246 0=12 1=1 11=1 2=1 12=1 3=1 13=1 4=0 14=0 5=1 6=768
|
||||
Permute 247 1 1 246 247 0=3
|
||||
Reshape 257 1 1 247 257 0=4 1=-1
|
||||
ConvolutionDepthWise 258 1 1 229_splitncnn_0 258 0=64 1=3 11=3 2=1 12=1 3=2 13=2 4=1 14=1 5=1 6=576 7=64
|
||||
ReLU 260 1 1 258 260
|
||||
Convolution 261 1 1 260 261 0=128 1=1 11=1 2=1 12=1 3=1 13=1 4=0 14=0 5=1 6=8192
|
||||
ReLU 263 1 1 261 263
|
||||
ConvolutionDepthWise 264 1 1 263 264 0=128 1=3 11=3 2=1 12=1 3=1 13=1 4=1 14=1 5=1 6=1152 7=128
|
||||
ReLU 266 1 1 264 266
|
||||
Convolution 267 1 1 266 267 0=128 1=1 11=1 2=1 12=1 3=1 13=1 4=0 14=0 5=1 6=16384
|
||||
ReLU 269 1 1 267 269
|
||||
ConvolutionDepthWise 270 1 1 269 270 0=128 1=3 11=3 2=1 12=1 3=1 13=1 4=1 14=1 5=1 6=1152 7=128
|
||||
ReLU 272 1 1 270 272
|
||||
Convolution 273 1 1 272 273 0=128 1=1 11=1 2=1 12=1 3=1 13=1 4=0 14=0 5=1 6=16384
|
||||
ReLU 275 1 1 273 275
|
||||
Split splitncnn_1 1 3 275 275_splitncnn_0 275_splitncnn_1 275_splitncnn_2
|
||||
ConvolutionDepthWise 276 1 1 275_splitncnn_2 276 0=128 1=3 11=3 2=1 12=1 3=1 13=1 4=1 14=1 5=1 6=1152 7=128
|
||||
ReLU 277 1 1 276 277
|
||||
Convolution 278 1 1 277 278 0=4 1=1 11=1 2=1 12=1 3=1 13=1 4=0 14=0 5=1 6=512
|
||||
Permute 279 1 1 278 279 0=3
|
||||
Reshape 289 1 1 279 289 0=2 1=-1
|
||||
ConvolutionDepthWise 290 1 1 275_splitncnn_1 290 0=128 1=3 11=3 2=1 12=1 3=1 13=1 4=1 14=1 5=1 6=1152 7=128
|
||||
ReLU 291 1 1 290 291
|
||||
Convolution 292 1 1 291 292 0=8 1=1 11=1 2=1 12=1 3=1 13=1 4=0 14=0 5=1 6=1024
|
||||
Permute 293 1 1 292 293 0=3
|
||||
Reshape 303 1 1 293 303 0=4 1=-1
|
||||
ConvolutionDepthWise 304 1 1 275_splitncnn_0 304 0=128 1=3 11=3 2=1 12=1 3=2 13=2 4=1 14=1 5=1 6=1152 7=128
|
||||
ReLU 306 1 1 304 306
|
||||
Convolution 307 1 1 306 307 0=256 1=1 11=1 2=1 12=1 3=1 13=1 4=0 14=0 5=1 6=32768
|
||||
ReLU 309 1 1 307 309
|
||||
ConvolutionDepthWise 310 1 1 309 310 0=256 1=3 11=3 2=1 12=1 3=1 13=1 4=1 14=1 5=1 6=2304 7=256
|
||||
ReLU 312 1 1 310 312
|
||||
Convolution 313 1 1 312 313 0=256 1=1 11=1 2=1 12=1 3=1 13=1 4=0 14=0 5=1 6=65536
|
||||
ReLU 315 1 1 313 315
|
||||
Split splitncnn_2 1 3 315 315_splitncnn_0 315_splitncnn_1 315_splitncnn_2
|
||||
ConvolutionDepthWise 316 1 1 315_splitncnn_2 316 0=256 1=3 11=3 2=1 12=1 3=1 13=1 4=1 14=1 5=1 6=2304 7=256
|
||||
ReLU 317 1 1 316 317
|
||||
Convolution 318 1 1 317 318 0=4 1=1 11=1 2=1 12=1 3=1 13=1 4=0 14=0 5=1 6=1024
|
||||
Permute 319 1 1 318 319 0=3
|
||||
Reshape 329 1 1 319 329 0=2 1=-1
|
||||
ConvolutionDepthWise 330 1 1 315_splitncnn_1 330 0=256 1=3 11=3 2=1 12=1 3=1 13=1 4=1 14=1 5=1 6=2304 7=256
|
||||
ReLU 331 1 1 330 331
|
||||
Convolution 332 1 1 331 332 0=8 1=1 11=1 2=1 12=1 3=1 13=1 4=0 14=0 5=1 6=2048
|
||||
Permute 333 1 1 332 333 0=3
|
||||
Reshape 343 1 1 333 343 0=4 1=-1
|
||||
Convolution 344 1 1 315_splitncnn_0 344 0=64 1=1 11=1 2=1 12=1 3=1 13=1 4=0 14=0 5=1 6=16384
|
||||
ReLU 345 1 1 344 345
|
||||
ConvolutionDepthWise 346 1 1 345 346 0=64 1=3 11=3 2=1 12=1 3=2 13=2 4=1 14=1 5=1 6=576 7=64
|
||||
ReLU 347 1 1 346 347
|
||||
Convolution 348 1 1 347 348 0=256 1=1 11=1 2=1 12=1 3=1 13=1 4=0 14=0 5=1 6=16384
|
||||
ReLU 349 1 1 348 349
|
||||
Split splitncnn_3 1 2 349 349_splitncnn_0 349_splitncnn_1
|
||||
Convolution 350 1 1 349_splitncnn_1 350 0=6 1=3 11=3 2=1 12=1 3=1 13=1 4=1 14=1 5=1 6=13824
|
||||
Permute 351 1 1 350 351 0=3
|
||||
Reshape 361 1 1 351 361 0=2 1=-1
|
||||
Convolution 362 1 1 349_splitncnn_0 362 0=12 1=3 11=3 2=1 12=1 3=1 13=1 4=1 14=1 5=1 6=27648
|
||||
Permute 363 1 1 362 363 0=3
|
||||
Reshape 373 1 1 363 373 0=4 1=-1
|
||||
Concat 374 4 1 243 289 329 361 374 0=0
|
||||
Concat boxes 4 1 257 303 343 373 boxes 0=0
|
||||
Softmax scores 1 1 374 scores 0=1 1=1
|
||||
BIN
splitter-cli/models/yolov8s.onnx
Normal file
BIN
splitter-cli/models/yolov8s.onnx
Normal file
Binary file not shown.
@ -24,24 +24,60 @@
|
||||
<!-- RELEASE CONFIGURATION -->
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
||||
<Optimize>true</Optimize>
|
||||
<EnableAVX2>true</EnableAVX2>
|
||||
<DebugType>none</DebugType>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<SelfContained>true</SelfContained>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<PublishTrimmed>false</PublishTrimmed>
|
||||
<!-- OpenCvSharp cannot be trimmed -->
|
||||
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
|
||||
<PublishReadyToRun>true</PublishReadyToRun>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<PublishReadyToRun>false</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>1.0.0</Version>
|
||||
<SourceRevisionId>$(GITHUB_SHA)</SourceRevisionId>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<BuildNumber>$(GITHUB_RUN_NUMBER)</BuildNumber>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="GenerateBuildInfo" BeforeTargets="BeforeCompile">
|
||||
<ReadLinesFromFile File="BuildInfo.template">
|
||||
<Output TaskParameter="Lines" ItemName="BuildInfoLines" />
|
||||
</ReadLinesFromFile>
|
||||
|
||||
<ItemGroup>
|
||||
<ProcessedBuildInfoLines Include="@(BuildInfoLines->Replace('@VERSION@', '$(Version)')->Replace('@BUILDNUMBER@', '$(BuildNumber)')->Replace('@COMMIT@', '$(SourceRevisionId)'))" />
|
||||
</ItemGroup>
|
||||
|
||||
<WriteLinesToFile
|
||||
File="BuildInfo.g.cs"
|
||||
Overwrite="true"
|
||||
Lines="@(ProcessedBuildInfoLines)" />
|
||||
</Target>
|
||||
|
||||
|
||||
|
||||
<Target Name="RemoveUnwantedFiles" AfterTargets="Publish" Condition="'$(Configuration)' == 'Release'">
|
||||
<ItemGroup>
|
||||
<FilesToDelete Include="$(PublishDir)**\*.pdb" />
|
||||
<FilesToDelete Include="$(PublishDir)**\*.lib" />
|
||||
</ItemGroup>
|
||||
|
||||
<Delete Files="@(FilesToDelete)" />
|
||||
</Target>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="models/*.*">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FFmpeg.AutoGen" Version="8.1.0" />
|
||||
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.24.4" />
|
||||
<PackageReference Include="Microsoft.ML.OnnxRuntime.DirectML" Version="1.24.4" />
|
||||
<PackageReference Include="OpenCvSharp4" Version="4.13.0.20260427" />
|
||||
<PackageReference Include="OpenCvSharp4.runtime.win" Version="4.13.0.20260302" />
|
||||
25
splitter.sln
25
splitter.sln
@ -1,25 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 18
|
||||
VisualStudioVersion = 18.5.11716.220 stable
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "splitter", "splitter.csproj", "{D628372F-EA0D-4E59-EB15-96FD85D90AC4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{D628372F-EA0D-4E59-EB15-96FD85D90AC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D628372F-EA0D-4E59-EB15-96FD85D90AC4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D628372F-EA0D-4E59-EB15-96FD85D90AC4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D628372F-EA0D-4E59-EB15-96FD85D90AC4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {A289E39A-C107-4125-9F2D-ADEE83CEE0B2}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
3
splitter.slnx
Normal file
3
splitter.slnx
Normal file
@ -0,0 +1,3 @@
|
||||
<Solution>
|
||||
<Project Path="splitter-cli/splitter.csproj" />
|
||||
</Solution>
|
||||
Loading…
x
Reference in New Issue
Block a user