问题标签 [cascade-classifier]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
365 浏览

c++ - 使用 OpenCV 进行人脸检测

我想在 VisualStudio 中使用这些代码 http://docs.opencv.org/3.2.0/db/d28/tutorial_cascade_classifier.html 来检测人脸,并在当前目录中复制 2 个 XML 文件。但我有一些错误。我的相机想打开但很快关闭(退出代码 0 )。如何解决这个问题?

错误:

'OpencvFaceDetection.exe' (Win32): 加载'C:\dev\workspace\c++\OpencvFaceDetection\x64\Debug\OpencvFaceDetection.exe'。已加载符号。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\ntdll.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\kernel32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\KernelBase.dll”。无法找到或打开 PDB 文件。'OpencvFaceDetection.exe' (Win32): 加载'C:\dev\workspace\c++\OpencvFaceDetection\OpencvFaceDetection\opencv_world320d.dll'。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\msvcp140d.dll”。无法找到或打开 PDB 文件。' OpencvFaceDetection.exe' (Win32): 加载'C:\Windows\System32\user32.dll'。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\gdi32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\ole32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\combase.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\vcruntime140d.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\advapi32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\msvcrt.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\ucrtbased.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\rpcrt4.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\sechost.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\oleaut32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\comdlg32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\cryptbase.dll”。无法找到或打开 PDB 文件。'OpencvFaceDetection.exe' (Win32): 加载'C: \Windows\System32\SHCore.dll'。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\shlwapi.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\bcryptprimitives.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\shell32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\windows.storage.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.10240.16384_none_0212ec7eba871e86\comctl32.dll”。无法找到或打开 PDB 文件。'OpencvFaceDetection.exe' (Win32): 已加载“C:\Windows\System32\kernel.appcore.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\powrprof.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\profapi.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\avifil32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\avicap32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\concrt140d.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\msvfw32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\msacm32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\winmm.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\winmmbase.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\winmmbase.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\winmmbase.dll”。无法找到或打开 PDB 文件。'OpencvFaceDetection.exe' (Win32): 卸载'C:\Windows\System32\winmmbase.dll' 'OpencvFaceDetection.exe' (Win32): 卸载'C:\Windows\System32\winmmbase.dll' 'OpencvFaceDetection. exe' (Win32): 加载'C:\Windows\System32\cfgmgr32.dll'。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\devobj.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\imm32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\msctf.dll”。无法找到或打开 PDB 文件。exe' (Win32): 加载'C:\Windows\System32\msctf.dll'。无法找到或打开 PDB 文件。exe' (Win32): 加载'C:\Windows\System32\msctf.dll'。无法找到或打开 PDB 文件。

***** 视频输入库 - 0.1995 - TFW07 *****

“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\OpenCL.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\amdocl64.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\setupapi.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\opengl32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\version.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\dbghelp.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\ddraw.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\glu32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\dciman32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\atiadlxx.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\psapi.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\ws2_32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\propsys.dll”。无法找到或打开 PDB 文件。'OpencvFaceDetection.exe' (Win32): 加载'C: \Windows\System32\userenv.dll'。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\nsi.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\wtsapi32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\IPHLPAPI.DLL”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\winnsi.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\wintrust.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\msasn1.dll”。无法找到或打开 PDB 文件。'OpencvFaceDetection。exe' (Win32): 加载'C:\Windows\System32\crypt32.dll'。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\amdocl12cl64.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\dwmapi.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\atig6txx.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已卸载“C:\Windows\System32\atig6txx.dll”“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\atig6txx.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\atiumd6a.dll”。无法找到或打开 PDB 文件。' OpencvFaceDetection.exe' (Win32): 加载'C:\Windows\System32\IntelOpenCL64.dll'。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Program Files (x86)\Common Files\Intel\OpenCL\bin\x64\intelocl64.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Program Files (x86)\Common Files\Intel\OpenCL\bin\x64\task_executor64.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Program Files (x86)\Common Files\Intel\OpenCL\bin\x64\cpu_device64.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\igdrcl64.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\dxgi.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\rmclient.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已卸载“C:\Windows\System32\rmclient.dll”“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\amdhdl64.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已卸载“C:\Windows\System32\amdhdl64.dll”“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\igdfcl64.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\igdmcl64.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\igdbcl64.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\igdusc64.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\uxtheme.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\clbcatq.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\devenum.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\ntmarta.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\msdmo.dll”。无法找到或打开 PDB 文件。'OpencvFaceDetection.exe' (Win32): 卸载'C: \Windows\System32\devenum.dll''OpencvFaceDetection.exe' (Win32): 加载'C:\Windows\System32\MMDevAPI.dll'。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\wdmaud.drv”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\avrt.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\ksuser.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\AudioSes.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\WinTypes.dll”。无法找到或打开 PDB 文件。'OpencvFaceDetection.exe' (Win32): 加载'C: \Windows\System32\msacm32.drv'。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\midimap.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\vfwwdm32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\devenum.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\ksproxy.ax”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\d3d9.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\policymanager.dll”。无法找到或打开 PDB 文件。'OpencvFaceDetection。exe' (Win32): 加载'C:\Windows\System32\xmllite.dll'。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\msvcp110_win.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\vidcap.ax”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\Kswdmcap.ax”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\mfc42.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\odbc32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\dpapi.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\qcap.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\quartz.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):加载“C:\Windows\System32\iyuv_32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已卸载“C:\Windows\System32\iyuv_32.dll”“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\iyuv_32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已卸载“C:\Windows\System32\iyuv_32.dll”“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\msrle32.dll”。无法找到或打开 PDB 文件。' OpencvFaceDetection.exe' (Win32): 卸载'C:\Windows\System32\msrle32.dll''OpencvFaceDetection.exe' (Win32): 加载'C:\Windows\System32\msvidc32.dll'。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已卸载“C:\Windows\System32\msvidc32.dll”“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\msyuv.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已卸载“C:\Windows\System32\msyuv.dll”“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\msyuv.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已卸载“C:\Windows\System32\msyuv.dll”“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\tsbyuv.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已卸载“C:\Windows\System32\tsbyuv.dll”“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\msyuv.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已卸载“C:\Windows\System32\msyuv.dll”“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\SysWOW64\tsccvid64.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已卸载“C:\Windows\SysWOW64\tsccvid64.dll”“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\SysWOW64\tsc2_codec64.dll”。无法找到或打开 PDB 文件。'OpencvFaceDetection.exe' (Win32): 卸载'C:\Windows\SysWOW64\tsc2_codec64.dll' 'OpencvFaceDetection.exe' (Win32): 加载'C: \Windows\System32\iyuv_32.dll'。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已卸载“C:\Windows\System32\iyuv_32.dll”“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\iyuv_32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已卸载“C:\Windows\System32\iyuv_32.dll”“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\msrle32.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已卸载“C:\Windows\System32\msrle32.dll”“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\msvidc32.dll”。无法找到或打开 PDB 文件。'OpencvFaceDetection.exe' (Win32): 卸载 'C:\Windows\System32\msvidc32.dll' 'OpencvFaceDetection. exe' (Win32): 加载'C:\Windows\System32\msyuv.dll'。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已卸载“C:\Windows\System32\msyuv.dll”“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\msyuv.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已卸载“C:\Windows\System32\msyuv.dll”“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\tsbyuv.dll”。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已卸载“C:\Windows\System32\tsbyuv.dll”“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\System32\msyuv.dll”。无法找到或打开 PDB 文件。'OpencvFaceDetection.exe' (Win32): 卸载 'C:\Windows\System32\msyuv.dll' ' OpencvFaceDetection.exe' (Win32): 加载'C:\Windows\SysWOW64\tsccvid64.dll'。无法找到或打开 PDB 文件。“OpencvFaceDetection.exe”(Win32):已卸载“C:\Windows\SysWOW64\tsccvid64.dll”“OpencvFaceDetection.exe”(Win32):已加载“C:\Windows\SysWOW64\tsc2_codec64.dll”。无法找到或打开 PDB 文件。'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\tsc2_codec64.dll' 线程 0x1d64 已退出,代码为 -2147024637 (0x80070103)。'OpencvFaceDetection.exe' (Win32): Unloaded 'C:\Windows\System32\vfwwdm32.dll' 线程 0x127c 已退出,代码为 0 (0x0)。线程 0xd6c 以代码 0 (0x0) 退出。线程 0x1278 以代码 0 (0x0) 退出。线程 0x73c 以代码 0 (0x0) 退出。线程 0x408 以代码 0 (0x0) 退出。线程 0x1270 已退出,代码为 0 (0x0)。程序“[2756] OpencvFaceDetection.exe”已退出,代码为 0 (0x0)。

0 投票
1 回答
84 浏览

matlab - 级联分类器和图像金字塔有什么区别吗?

我目前正在从事一个对象检测项目,并且在选择我的分类器时遇到了一些问题。

0 投票
2 回答
5333 浏览

android - 使用 openCV 检测面部并在其上应用蒙版

更新:是 opencv c++ 示例,并准确显示了我想要做的事情。唯一的事情是我需要它与java。

我一直在开发一个实时 Android 应用程序,该应用程序使用前置摄像头检测面部并在检测到的面部上添加蒙版。到目前为止,人脸检测与级联分类器配合得很好。

我在脸周围画矩形,在眼睛周围画圆圈:

我的问题是,如何在检测到的面部上应用图像并实时显示。(例如太阳镜、帽子、小胡子和有趣的动物脸)

如果有人能给我小费或告诉我一些关键点,我将不胜感激。

是我对我的应用程序的期望的一个很好的例子。我已经检查了代码,但无法理解。

谢谢!

0 投票
1 回答
473 浏览

opencv - OpenCV 级联分类器训练

我参考这个教程这个文件来训练我自己的分类器。但我遇到了一些问题。

  1. 我使用 objectmarker.exe 生成 info.txt。在 info.txt 中,每条记录都有不同的宽度和高度,但它们都保持矩形的比例。那么,我应该在 02 haarTraining.bat 中设置宽度和高度参数的值吗?

  2. 负样本的宽度和高度也应该跟随正样本?

2017 年 6 月 20 日更新

例如,我使用 objectmarker.exe 标记了以下 2 个图像(标记区域表示为绿色矩形)。但是,这两个矩形的宽度和高度并不相同。

在 info.txt 中:

因此,我不知道如何在 02 haarTraining.bat 中配置宽度和高度参数。

在此处输入图像描述在此处输入图像描述

0 投票
1 回答
916 浏览

opencv - OpenCV Haar Cascade 训练参数和时间

我一直在摆弄 OpenCV 的级联训练器,试图训练我自己的分类器。问题是它现在已经训练了 25 多个小时,甚至还没有通过第 1 阶段。

最初,我使用以下命令运行它

nohup opencv_traincascade -data data -vec board.vec -bg bg.txt -numPos 580 -numNeg 1160 -numStages 2 -w 115 -h 153 -featureType LBP &

大约 24 小时后,它甚至无法通过第 1 阶段。查看nohup.out文件,我意识到默认precalcValBufSize设置为 1024Mb。我想也许将其增加到 4096Mb 将有助于处理,所以我继续使用以下命令重新开始训练

nohup opencv_traincascade -data data -vec board.vec -bg bg.txt -numPos 580 -numNeg 1160 -numStages 2 -w 115 -h 153 -featureType LBP -precalcIdxBufSize 4096 -precalcValBufSize 4096 &

培训已经进行了将近 25 个小时,甚至还没有生成阶段 0 的 XML 文件。

查看进程本身表明它使用了 8284M 的虚拟内存,但使用了 930M 的物理内存,这显示了该进程当前正在使用的所有文件。它在燃烧我的核心方面做得很好,但没有产生任何结果,甚至没有让我知道它走了多远。

我的问题是/是,有没有办法让它使用更多我的实际物理内存来加速它?如果没有,我需要对我的训练数据集进行任何调整吗?

旁注: 我知道数据集大小的一般标准是 24x24,但我已经尝试过了,即使经过 10 个阶段,它也非常可怕。在那个尺寸下,我的对象的轮廓不再正确地获得它的特征。在 24x24 甚至 48x48 的分辨率下,它看起来像是一个巨大的水平扭曲的黑色像素斑点,甚至看不到它的一些独特特征。

0 投票
0 回答
26 浏览

opencv - 如何从一个阶段恢复级联分类器训练?

我在 20k 正负样本中训练级联分类器,但在 1 天后因为停电,关闭我的电脑。现在我想知道有办法从第 3 阶段恢复我的训练还是必须从第 1 阶段开始?

当我看到(-data D:/Data/)Data 文件夹存在几个文件时,例如:params, stage0 , ...有办法从这些文件中恢复训练吗?

0 投票
1 回答
1439 浏览

opencv - 戴太阳镜的人脸检测

我正在尝试为我从事的项目检测戴太阳镜的面孔。我用的太阳镜像镜子。

我用 438 张我戴着太阳镜的正面照片和 1145 张负面照片训练了我自己的级联分类器。

分类器在没有眼镜的情况下工作得很好,但它无法检测到我戴眼镜的脸或者很难做到,即使我重现了正面图片(相同的地方,相同的头发,相同的衣服,相同的脸,相同的灯光,相同的位置, ...)。

有人可以帮我戴上太阳镜吗?

这是我尝试检测我的脸的线。我知道 detectMultiScale 的参数是什么意思,我尝试使用它们,但没有奏效。

谢谢!

0 投票
1 回答
647 浏览

python - python 错误的opencv

执行下面提到的 python 代码时收到错误消息:

回溯(最近一次通话最后):

文件“C:\Users\smart-26\Desktop\예제\face.py”,第 28 行,在

faces = face_cascade.detectMultiScale(grayframe, 1.1, 3, 0, (30, 30))

cv2.error: D:\Build\OpenCV\opencv->

3.2.0\modules\objdetect\src\cascadedetect.cpp:1681: 错误: (-215) !empty() in

函数 cv::CascadeClassifier::detectMultiScale

我不明白这个消息:

错误:(-215) 函数 cv::CascadeClassifier::detectMultiScale 中的 !empty()

到目前为止,这是我的代码:

0 投票
0 回答
65 浏览

opencv - MIT CBCL 数据集上的 OpenCV 级联分类器精度

我想找到在MIT CBCL Face database上运行 OpenCV 的Cascade Classifier的准确性。具体来说,我想找到这个这个 XML的准确性。

当我运行以下代码时,在 MIT 数据集上未检测到人脸:

我什至尝试使用img = cv2.resize(img, (20, 20))XML 中的窗口大小为 20*20 来重新缩放图像,但无济于事。

请建议做什么。谢谢!

0 投票
2 回答
4618 浏览

python-2.7 - 在 Haar Cascade 中从多个图像创建训练集

我目前正在检测给定图像中的多个水果。例如,给定的图像可以有香蕉(如黄色、红色和绿色)、芒果、橙子等水果。我能够使用.一次只创建一张图像的训练集opencv_createsamples

示例代码:

C:\opencv\build\x64\vc14\bin\opencv_createsamples.exe -img redbanana.jpg -bg bg.txt -info info/info.lst -pngoutput info -maxxangle 0.5 -maxyangle 0.5 -maxzangle 0.5 -num 100

同样,我已经完成了大约 5 个水果,它为每个水果创建了单独的 vec 文件。很难为每种水果创造。是否有可能使用单个 vec 文件作为输出从多个图像创建训练集?

是否有任何其他方法可以检测给定图像中的多个水果?