模型和测试文件:https://wwu.lanzoub.com/i1BJx01rr38h
c++的demo网上到处都有,抄一个C#的demo
因为没有视频,换了张图片把代码改成识别图片了,自己根据需要切换注释
using OpenCvSharp;
using OpenCvSharp.Dnn;
using System;
public class dnn_ssd_video_mobilenet
{
const int width = 300;
const int height = 300;
const float meanVal = 127.5f;
const float scaleFactor = 0.007843f;
string[] classNames = new string[] { "background",
"aeroplane", "bicycle", "bird", "boat",
"bottle", "bus", "car", "cat", "chair",
"cow", "diningtable", "dog", "horse",
"motorbike", "person", "pottedplant",
"sheep", "sofa", "train", "tvmonit