c# - 如何在 C#.net 中使用 YOLO 提高物体检测速度

标签 c# image-processing yolo automatic-license-plate-recognition

我想通过YOLO V3检测车牌区域。为此,我使用暗网创建权重。 训练后创建了一个权重文件。该文件的大小为 234 MB,我使用 darknet53.conv.74 文件和 650 个图像进行训练。

配置文件(yolov3.cfg)是

# Testing
# batch=64
# subdivisions=8
# Training
batch=64
subdivisions=64
width=608
height=608
channels=3
momentum=0.9
decay=0.0005
angle=0
saturation = 1.5
exposure = 1.5
hue=.1

learning_rate=0.001
burn_in=1000
max_batches = 4000
policy=steps
steps=3200,3600
scales=.1,.1
....

之后我在 C#.NET 中使用了 Alturos.Yolo 2.6.2 NuGet

YoloWrapper yoloWrapper;
private void Form_Load(object sender, EventArgs e)
{
   yoloWrapper = new YoloWrapper("yolov3.cfg", "yolov3.weights", "voc.names");
}

private void btnDetect_Click(object sender, EventArgs e)
{
   var items = yoloWrapper.Detect(path);
   ...
}

问题是速度。检测车牌区域大约需要3秒。

你们有什么提高检测速度的解决方案吗?

CPU Usage Image

最佳答案

由于您自己训练过,我想您已经知道神经网络需要 GPU 才能运行得更快。无论如何,为了更快地检测,您应该降低网络分辨率或使用 YOLO 的微小变体。今天,最强最快的变体在这里呈现:yolo_v3_tiny_pan3.cfg 。其他最新的暗网模型可用 here 。其他一些网络(例如 mobilenet)经过更优化,可以在 CPU 上运行得更快。

无论如何,这些替代网络需要 AlexeyAB darknet 实现才能工作,因此您需要重新编译 c# 包装器的 darknet。

关于c# - 如何在 C#.net 中使用 YOLO 提高物体检测速度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59626074/

相关文章:

c# - WebSetup 可以包含多个 Web 应用程序吗?

c++ - 实现图像稳定 opencv,c++

android - 在android中将dng文件读取为二维像素数组

Python没有名为“darkflow.cython_utils.cy_yolo_findboxes”的模块

object-detection - 根据测试数据集计算 YOLO mAP

javascript - 网络表单 : determines which control within updatepanel triggers the refresh

c# - ISO 8583 Rev.93 - 连接到 channel

c# - 为什么 System.Decimal 会忽略已检查/未检查的上下文

python - 在python中的蒙版外的图像上添加模糊/渐变

c++ - 如何用OpenCV C++加载Yolo目标检测网络