I added a Yolov5s model with Detect() layer to test with.
I modified the model path to use a relative path instead of an absolute one.
To use a retrained model you just have to adjust dimensions and class names.
When creating the pipeline is important to set interleavePixelColors: false
When creating the pipeline is important to set resizing: <kind of resizing> to the correct kind of resizing depending of how the model is trained. The YoloV5s model included in the project works fine with ResizingKind.Fill
It was also important to adjust image size in YoloV4BitmapData.cs
I did not change any filename to avoid problems, although could be confusing as we are implementing YoloV5.
Detect()
layer to test with.interleavePixelColors: false
resizing: <kind of resizing>
to the correct kind of resizing depending of how the model is trained. The YoloV5s model included in the project works fine withResizingKind.Fill