{"id":13642143,"url":"https://github.com/techwingslab/yolov5-net","last_synced_at":"2025-05-16T11:05:11.315Z","repository":{"id":37778155,"uuid":"349686744","full_name":"techwingslab/yolov5-net","owner":"techwingslab","description":"YOLOv5 object detection with C#, ML.NET, ONNX","archived":false,"fork":false,"pushed_at":"2023-08-10T18:23:12.000Z","size":156755,"stargazers_count":366,"open_issues_count":34,"forks_count":106,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-16T11:05:00.523Z","etag":null,"topics":["c-sharp","dotnet","dotnet-core","machine-learning","ml-net","object-detection","onnx","yolo","yolov5"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/techwingslab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-03-20T09:56:12.000Z","updated_at":"2025-05-08T11:27:13.000Z","dependencies_parsed_at":"2024-02-28T06:51:28.955Z","dependency_job_id":null,"html_url":"https://github.com/techwingslab/yolov5-net","commit_stats":null,"previous_names":["mentalstack/yolov5-net"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techwingslab%2Fyolov5-net","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techwingslab%2Fyolov5-net/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techwingslab%2Fyolov5-net/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techwingslab%2Fyolov5-net/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techwingslab","download_url":"https://codeload.github.com/techwingslab/yolov5-net/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254518384,"owners_count":22084374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-sharp","dotnet","dotnet-core","machine-learning","ml-net","object-detection","onnx","yolo","yolov5"],"created_at":"2024-08-02T01:01:27.983Z","updated_at":"2025-05-16T11:05:06.307Z","avatar_url":"https://github.com/techwingslab.png","language":"C#","readme":"# Yolov5Net\nYOLOv5 object detection with ML.NET, ONNX\n\n![example](https://raw.githubusercontent.com/techwingslab/yolov5-net/master/img/result.jpg)\n\n## Installation\n\nRun this line from Package Manager Console:\n\n```\nInstall-Package Yolov5Net -Version 1.1.0\n```\n\nFor CPU usage run this line from Package Manager Console:\n\n```\nInstall-Package Microsoft.ML.OnnxRuntime -Version 1.14.1\n```\n\nFor GPU usage run this line from Package Manager Console:\n\n```\nInstall-Package Microsoft.ML.OnnxRuntime.Gpu -Version 1.14.1\n```\n\nCPU and GPU packages can't be installed together.\n\n## Usage\n\nYolov5Net contains two COCO pre-defined models: YoloCocoP5Model, YoloCocoP6Model.\n\nIf you have custom trained model, then inherit from YoloModel and override all the required properties and methods. See YoloCocoP5Model or YoloCocoP6Model implementation to get know how to wrap your own model. \n\n```cs\nusing var image = await Image.LoadAsync\u003cRgba32\u003e(\"Assets/test.jpg\");\n{\n    using var scorer = new YoloScorer\u003cYoloCocoP5Model\u003e(\"Assets/Weights/yolov5n.onnx\");\n    {\n        var predictions = scorer.Predict(image);\n\n        var font = new Font(new FontCollection().Add(\"C:/Windows/Fonts/consola.ttf\"), 16);\n\n        foreach (var prediction in predictions) // draw predictions\n        {\n            var score = Math.Round(prediction.Score, 2);\n\n            var (x, y) = (prediction.Rectangle.Left - 3, prediction.Rectangle.Top - 23);\n\n            image.Mutate(a =\u003e a.DrawPolygon(new Pen(prediction.Label.Color, 1),\n                new PointF(prediction.Rectangle.Left, prediction.Rectangle.Top),\n                new PointF(prediction.Rectangle.Right, prediction.Rectangle.Top),\n                new PointF(prediction.Rectangle.Right, prediction.Rectangle.Bottom),\n                new PointF(prediction.Rectangle.Left, prediction.Rectangle.Bottom)\n            ));\n\n            image.Mutate(a =\u003e a.DrawText($\"{prediction.Label.Name} ({score})\",\n                font, prediction.Label.Color, new PointF(x, y)));\n        }\n\n        await image.SaveAsync(\"Assets/result.jpg\");\n    }\n}\n```\n","funding_links":[],"categories":["Other Versions of YOLO"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechwingslab%2Fyolov5-net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechwingslab%2Fyolov5-net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechwingslab%2Fyolov5-net/lists"}