如何使用OpenCV在COD中搜索播放器型号 [英] How to go about searching for a player models in COD with OpenCV

查看:85
本文介绍了如何使用OpenCV在COD中搜索播放器型号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个程序,该程序可以在使命召唤的视频中找到人物.我从该视频中整理了约2200张单独的图像列表,这些图像要么包含人物形象,要么不包含人物形象.然后,我尝试着训练神经网络来分辨两组图像之间的区别.

I am attempting to create a program that can find human figures in video of game play of call of duty. I have compiled a list of ~2200 separate images from this video that either contain a human figure or do not. I have then attempted to train a neural network to tell the difference between the two sets of images.

然后,我将每个视频帧划分为数百个网格矩形,并使用ANN进行检查.矩形重叠以尝试捕获网格矩形之间的图形,但这似乎效果不佳.所以我有几个问题:

Then, I divide each video frame up into a couple hundred gridded rectangles and I check each with my ANN. The rectangles are overlapping to attempt to capture figures that are between grid rects, but this doesn't seem to work well. So I have a few questions:

  1. 神经网络是路要走吗?我已经读过它们与其他机器学习算法相比非常快,最终我计划将其与实时视频一起使用,并且速度非常重要.

  1. Are neural networks the way to go? I have read that they are very fast compared to other machine learning algorithms, and eventually I plan to use this with real time video and speed is very important.

在图像帧中搜索图形以在ANN上进行测试的最佳方法是什么?我觉得我做的方式不是很好.绝对不是非常快速或准确.每张图像960 x 540大约需要一秒钟的时间,并且准确性较差.

What is the best way to search for the figures in the image frame to test on the ANN? I feel like the way I do it isn't very good. It's definitely not very fast or accurate. It takes about a second per frame of an image 960 x 540 and has poor accuracy.

我遇到的另一个问题是构建特征向量以用作ANN输入的最佳方法.目前,我只是将所有输入图像缩小到25 x 50像素,并创建包含每个像素强度的特征向量.这是一个非常大的向量(浮点数为1250).构建特征向量的更好方法是什么?

Another problem I have had is the best way to build the feature vector to use as the input to the ANN. Currently, I just scale all input images down to25 x 50 pixels and create a feature vector containing the intensity of every pixel. This is a very large vector (1250 floats). What are better ways to build a feature vectors?

有关我在此处所做的操作的详细说明: CodAI:计算机视觉

For a more detailed explanation of what I do here: CodAI: Computer Vision

我想要更多细节.什么是计算特征的最佳方法.我需要能够识别许多不同位置的人物.我是否需要创建单独的分类器以识别直立,蹲伏和俯卧之间的区别?

I would like a little more detail. What is the best way to calculates features. I need to be able to recognize a human figure in many different positions. Do I need to create separate classifiers for recognizing the difference between upright, crouched, and prone?

推荐答案

  • 将原始强度用作特征向量将不起作用 1 .灯光等引起的变化太多.
  • 第一步要考虑的一个好功能就是HOG. opencv 2.2具有快速检测器的GPU(CUDA)版本.
  • 神经网络可能并不是最好的选择.通常,您将使用SVM或boosting作为分类器 2 .这并不是说神经网络不够强大,而是很难正确设置训练/参数.很多时候,您会陷入局部最小值等问题.
  • 对于俯卧/蹲伏/站立的身材,您绝对希望使用不同的分类器,并在混合模型中使用它们.
  • 您要求的是最佳方法"-到目前为止,人工检测还不是一个解决的问题,因此没人知道最佳方法.上面提到的这些东西都可以很好地工作.
  • 如果您想要一个好的结果,那么您就绝对要利用您的目标是特定的-因此,利用您试图检测值班人员的方法.您需要检查的位置范围不是整个图像,数字将接近地面.这使您可以加快搜索速度并减少错误检测.如果可以的话,请减少渲染的细节-细节越少意味着变化越少,这意味着学习问题就更容易.
    • Using the raw intensities as the feature vector is not going to work1. There is too much variation induced by lighting etc.
    • A good feature to look at as a first step would be HOG. opencv 2.2 has a GPU (cuda) version of a detector it that is fast.
    • Neural networks are maybe not the best way to go. Usually you'd use a SVM or boosting as a classifier2. It's not that neural networks are not powerful enough, it's that it's hard to get the training/parameters right. Too often you get stuck in local minima etc.
    • For prone/crouched/standing figures, you definitely want different classifiers and employ them in a mixture model.
    • You asked for a "best way" - human detection is, by far, not a solved problem, so noone knows the best way. The things mentioned above are known to work pretty good.
    • If you want a good result, you definitely want to exploit that your target is specific - so, exploit that you are trying to detect humans in call of duty. The range of positions that you need to check is not the whole image, the figures will be near the ground. This allows you to speed up the search and reduce false detections. If you can, reduce the detail on the rendering - less detail means less variation, which means an easier learning problem.
    • 脚注:
      1 对于nitpickers:没有高度复杂的分类器.
      2 您还可以使用级联的增强分类器来提高速度,而不会牺牲太多的检测率.

      Footnotes:
      1 For the nitpickers: Without a highly complex classifier.
      2 You can also employ a cascade of boosted classifiers to gain speed without giving away too much in detection rate.

      这篇关于如何使用OpenCV在COD中搜索播放器型号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆