Aggregated Channel Feature object detection in C++ and OpenGL ES 2.0
This module is very well suited to running real time object detection on mobile processors, where recent high performing but GPU needy DNN approaches aren't as suitable. The ACF pyramids can be computed with the OpenGL ES 2.0 shaders and retrieved more or less for free (< 1 frame time with 1 frame of latency). For selfie video, the pretrained face detectors (see FACE80 and FACE64) run in a few milliseconds on an iPhone 7. TODO: The Locally Decorrelated Channel Feature addition has not yet been added (see LDCF), but the 5x5 kernels should map well to OpenGL shaders. That should make performance very competitive (see Piotr's references for comparisons).
Sample 10 Channel ACF from GPU: LUV + magnitude (locally normalized) + gradient orientation (6 bins):
ACF is a CMake based projectthat uses the Hunter packagemanager to download and build project dependencies from source asneeded. Hunter contains detaileddocumentation, but a few highlevel notes and documentation links are provided here to help orientfirst time users. In practice, some working knowledge of CMake may alsobe required. Hunter itself is written in CMake, and is installed as partof the build process from a single HunterGate()
macro at the top ofthe root CMakeLists.txt
file (typicallycmake/Hunter/HunterGate.cmake
) (you don't have to build or installit). Each CMake dependency's find_package(FOO)
call that is pairedwith a hunter_add_package(FOO CONFIG REQUIRED)
will be managed byHunter. In most cases, the only system requirement for building a Hunterproject is a recent CMake withCURLsupport and a working compiler correpsonding to the operative toolchain.Hunter will maintain all dependencies in aversionedlocalcache bydefault (typically ${HOME}/.hunter
) where they can be reused insubsequent builds and shared between different projects. They can alsobe stored in a server side binarycache --select toolchains will be backed by a server sidebinary cache (https://github.com/elucideye/hunter-cache) and willproduce faster first time builds (use them if you can!).
TheTravis(Linux/OSX/iOS/Android) andAppveyor(Windows) CI scripts in the project's root directory can serve as areference for basic setup when building from source. To support crossplatform builds and testing, the CI scripts make use ofPolly: a set of common CMaketoolchains paired with a simple polly.py
CMake build script. Pollyis used here for convenience to generate CMake
command lineinvocations -- it is not required for building Hunter projects.
To reproduce the CI builds on a local host, the following setup isrecommended:
PATH
)<polly>/bin
to PATH
Note: Polly is not a build requirement, CMake can always be useddirectly, but it is used here for convenience.
The bin/hunter_env.{sh,cmd}
scripts (used in the CI builds) can beused as a fast shortcut to install these tools for you. You may want toadd the PATH
variables permanently to your .bashrc
file (orequivalent) for future sessions.
Linux/OSX/Android/iOS | Windows |
---|---|
source bin/hunter_env.sh |
bin\hunter_env.cmd |
After the environment is configured, you can build for any supportedPolly
toolchain (see polly.py --help
) with a command like this:
polly.py --toolchain ${TOOLCHAIN} --config-all ${CONFIG} --install --verbose
To train your own model, you can use Piotr's Toolbox. This currently requires Matlab until the training code gets ported. There are a few existing samples for pedestrian detection applications that are well documented and can be modified for your application. See acfDemoCal.m for a sample training script.
If you would like to integrate the library in another project, the easiest thing will be to use Hunter to manage and build your application or SDK. The acf library and all dependencies will then be managed automatically. Please see the documentation in the above link for more details. If this isn't an option, it will be easiest to build ACF as a single shared library (without dependencies) that can then be integrated in your project. In the later case, you can pass ACF_BUILD_SHARED_SDK=ON on the command line while generating the project in order to build the ACF library as a shared library such that all dependencies will be compiled as static libraries and "absorbed" by the acf library.
polly.py --toolchain ${TOOLCHAIN} --config-all ${CONFIG} --fwd ACF_BUILD_SHARED_SDK=ON --install --verbose
For iOS, you can use polly to create a dynamic framework from the generated libacf.dylib (see command line options) as a post build step, note the additional --framework and --framework-lib options in the build command below:
polly.py --toolchain ${TOOLCHAIN} --config-all ${CONFIG} --fwd ACF_BUILD_SHARED_SDK=ON --install --verbose --framework --framework-lib libacf.dylib
The resulting framework will be generated in the _framework directory as shown below:
tree _framework/ _framework/ └── ios-11-3-dep-9-0-arm64 └── acf.framework ├── Headers │ ├── ACF.h │ ├── ACFField.h │ ├── GPUACF.h │ ├── MatP.h │ ├── ObjectDetector.h │ ├── acf_common.h │ └── acf_export.h ├── Info.plist ├── _CodeSignature │ └── CodeResources └── acf
_install/ └── libcxx ├── bin │ ├── acf-detect │ └── acf-mat2cpb ├── include │ └── acf │ ├── ACF.h │ ├── ACFField.h │ ├── GPUACF.h │ ├── MatP.h │ ├── ObjectDetector.h │ ├── acf_common.h │ └── acf_export.h └── lib ├── cmake │ └── acf │ ├── acfConfig.cmake │ ├── acfConfigVersion.cmake │ ├── acfTargets-release.cmake │ └── acfTargets.cmake └── libacf.a
$ cd _install/${TOOLCHAIN}/bin
$ wget https://github.com/elucideye/drishti-assets/raw/master/drishti_face_gray_80x80.cpb
$ wget https://github.com/elucideye/drishti-faces/raw/master/lena512color.png
$ ./acf-detect --input=lena512color.png --output=/tmp/ --model=drishti_face_gray_80x80.cpb --nms --annotate --calibration=0.00001
[16:56:34.092 | thread:8703967691101883897 | acf-detect | info]: 1/1 /Users/dhirvonen/devel/elucideye//drishti-faces/lena512color.png = 1; score = 26.0038
This C++/OpenGL adaptation of the original ACF/toolbox project has benefited from contributions by:
学习目标(ILOS): 您应该: 进一步熟悉相关性和自相关序列。 能够使用自相关序列来估计信号的基本自由度 /音高频率 能够产生震撼力 了解Python库的基本用途 # Let's do the ususal necessary and nice-to-have imports %matplotlib notebook import matplotlib.pyplot as plt # p
“我的店铺”中的每个产品都有一个ACF图像字段,该字段显示与产品(活动)关联的t恤图像。 现在我需要客户在结账时看到这个图像。我决定创建一个短代码,并在结账页面的某个地方添加它。 我不知道如何从购物车中的项目获得ACF图像字段? 到目前为止,我试图使用这段代码进入。任何想法? 注意:我们运行一个设置,即购物车中只能有一个产品。
我想添加一个addtionall自定义"添加到购物车按钮"上的单个产品页面有条件地使用此代码: 此变量是来自ACF的字段
我想在WooCommerce购物车和结帐页面中同时显示使用高级自定义字段插件创建的自定义字段的值。 我正在我的主题页面,仅在产品的单个页面中显示: 非常感谢大家对我的帮助,请原谅我的英语。
我在自定义字段中创建新字段,并给它一个位置,如下所示: 之后,我激活Show In GraphQL按钮并设置acf名称: 现在,我试图在wp-graphql中查询acf globalOptions,它给了我一个错误。此外,我在建议或模式中都找不到globalOptions。 文件: 我该如何解决这个问题? 提前感谢。
我知道这个问题已经问过很多次了,但都没有解决我的问题。我有一个滑块(与ACF pro)和我只是希望所有我的图像是相同的高度(这意味着:所有的肖像img有相同的高度(并改变他们的宽度),作为一个景观img)。 这里是我当前的代码:HTML CSS JS Slick网站给出的例子是: 在此输入图像说明
我在这里找到了这个功能。我正在使用ACF pro。 更新:我根据下面的注释添加了变量,这消除了错误,但是函数仍然不工作。 功能。php: 保存帖子时出现错误消息(按“更新”-按钮): 注意:未定义的变量:在第600行 /Applications/MAMP/htdocs/pf-blank/wp/wp-content/themes/PF-Blank-theme/functions.php 注意:试图在
本文向大家介绍python实现时间序列自相关图(acf)、偏自相关图(pacf)教程,包括了python实现时间序列自相关图(acf)、偏自相关图(pacf)教程的使用技巧和注意事项,需要的朋友参考一下 自相关图是一个平面二维坐标悬垂线图。横坐标表示延迟阶数,纵坐标表示自相关系数 偏自相关图跟自相关图类似, 横坐标表示延迟阶数,纵坐标表示偏自相关系数 自相关图与偏自相关图的python代码实现:
我为woocommerce产品“coffee_type”创建了自定义分类法。我为此分类法创建了一个ACF图像字段“coffee\u type\u image”。 我想在产品页面上显示带有链接的图像,而不是分类法的名称。我在这里读了大多数关于在分类法上显示acf图像的文章,但每一篇都是关于使用归档分类法页面而不是产品页面。我正在编辑single-product.php(确切地content-sing