ITBees.VehicleClassification 8.0.13

There is a newer version of this package available.
See the version list below for details.
dotnet add package ITBees.VehicleClassification --version 8.0.13
                    
NuGet\Install-Package ITBees.VehicleClassification -Version 8.0.13
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ITBees.VehicleClassification" Version="8.0.13" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ITBees.VehicleClassification" Version="8.0.13" />
                    
Directory.Packages.props
<PackageReference Include="ITBees.VehicleClassification" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ITBees.VehicleClassification --version 8.0.13
                    
#r "nuget: ITBees.VehicleClassification, 8.0.13"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ITBees.VehicleClassification@8.0.13
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ITBees.VehicleClassification&version=8.0.13
                    
Install as a Cake Addin
#tool nuget:?package=ITBees.VehicleClassification&version=8.0.13
                    
Install as a Cake Tool

ITBees.VehicleClassification

Klasyfikacja pojazdu na zdjęciu z kamery, lokalnie na CPU (ONNX Runtime + SkiaSharp, x64/arm64, Linux/Windows). Pierwszy model: karetka / inny pojazd dla wjazdu SOS w Octoparku (OC-1078).

  • Mały klasyfikator (MobileNetV3, wejście 224×224, 2–6 MB) na wycinku przodu pojazdu.
  • Wycinek: wokół ramki tablicy (PixelBox z ITBees.PlateRecognition albo z kamery) albo, bez tablicy, stały obszar pasa (RelativeRegion, domyślnie z opisu modelu).
  • Tablica jest zamalowana przed klasyfikacją (gdy jest ramka tablicy) – model rozpoznaje karetkę, nie numer.
  • Model jest w paczce (zasoby Models/emergency-vehicle.onnx + .json) – nic się nie pobiera, działa offline od pierwszego startu. Paczka bez modelu działa dalej: IsAvailable = false, UnavailableReason mówi dlaczego.
  • Te same wersje ONNX Runtime (1.20.1) i SkiaSharp co ITBees.PlateRecognition – obie biblioteki w jednym procesie.
services.AddVehicleClassification(o => o.IntraOpThreads = Environment.ProcessorCount);

var result = await classifier.ClassifyAsync(jpeg, plateBox);   // plateBox opcjonalny
if (result.Ambulance >= 0.97f) { ... }                          // decyzja (np. 2 kolejne klatki) po stronie aplikacji

VehicleClassifierOptions.ModelPath pozwala sprawdzić nowo wyuczony model na urządzeniu bez wydawania paczki (obok .onnx musi leżeć .json o tej samej nazwie).

Uczenie modelu

Poza urządzeniem, w Pythonie: tools/training/README.md. Skrypt eksportu zapisuje emergency-vehicle.onnx i emergency-vehicle.json do ITBees.VehicleClassification/Models/, skąd trafiają do paczki. Preprocessing w C# (Imaging/VehicleImage.cs) i w Pythonie (tools/training/vehicle_crops.py) musi być ten sam: wycinek, zmniejszenie uśrednianiem obszaru (cv2.INTER_AREA), normalizacja ImageNet, NCHW.

Publikacja

Jak inne biblioteki ITBees: PR do master na GitHubie → TeamCity publikuje paczkę. Wersję podnosimy w csproj.

Model ambulance-2026.11.26

MobileNetV3-Large (ImageNet, zamrożony) + warstwa liniowa, 16,8 MB. Dane: 7 karetek Sandomierza (żółte Sprintery, białe Sprinter i VW), ~2840 innych pojazdów z 8 parkingów (w tym busy Fresenius, ADR, śmieciarki). Walidacja „bez jednej karetki” na wycinkach od tablicy, przy progu 0,97 (zero fałszywych otwarć w każdym przebiegu): TK5357Y 87%, TK5949X 88%, TK917CJ 84%, TK966EK 86%, TK3234T 51%, TK916ET 41%, TK982FA 50% przejazdów; średnio 70%. Wycinek pasa (bez tablicy) – nieużyteczny. C# vs Python: różnica ≤ 0,034, 23 ms/wycinek na i7-10610U. Ograniczenie: karetki tylko z jednego parkingu – przed „Wpuszczaj” dołożyć obce karetki i sprawdzić w trybie obserwacji.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.0.15 98 11/30/2026
8.0.14 95 11/30/2026
8.0.13 108 11/26/2026