渭南自建站网站建设,跨境电商最好卖的产品,西安好的网站建设公司排名,西安网站建设seo最近遇到一个人脸搜索的需求#xff0c;驿站的快递被人误领#xff0c;拿走几天还没有送回来#xff0c;所以想从出库仪中找历史出库记录的想法。实现思路#xff1a;1.从雷现出库仪上拷贝文件下来。(拷贝几十万张人脸数据花了不少时间)2.开发人脸搜索工具3.搜索比对#…最近遇到一个人脸搜索的需求驿站的快递被人误领拿走几天还没有送回来所以想从出库仪中找历史出库记录的想法。实现思路1.从雷现出库仪上拷贝文件下来。(拷贝几十万张人脸数据花了不少时间)2.开发人脸搜索工具3.搜索比对如果能找到历史数据就能找到人这里主要是开发人脸搜索工具需要实现识别图片里面是否包含人脸、人脸匹配检测等功能网速找了一款工具但是需要改造3点1.支持并发搜索充分利用多核CPU从几十万张图片中快速检索到想要找的人。2.支持参数配置支持指定图片和查找目录、搜索第一张还是全部、找到后是否打开等参数。3.开发UI配置界面由于工具是控制台应用使用起来不方便所以需要一个UI界面。屏幕录制 2025-10-30 102642使用IoTBrowser做为UI前端使用少量的代码既可实现。屏幕录制 2025-10-30 103845核心代码123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158div idvue_root classfun_bd stylepadding:10px;form classam-formfieldsetdiv classam-form-grouplabel fordoc-ipt-email-1 classam-u-sm-1原始文件/labeldiv classam-u-sm-3input typetext v-modelconfig.ImagePath stylewidth: 75%;display: inline; /input typebutton clickselectFile() value选择 //divlabel fordoc-ipt-email-1 classam-u-sm-1查找目录/labeldiv classam-u-sm-3input typetext v-modelconfig.FindDir stylewidth: 75%;display: inline; /input typebutton value选择 clickselectSaveDir() //divlabel fordoc-ipt-email-1 classam-u-sm-1历史文件/labeldiv classam-u-sm-3input typetext v-modelconfig.HistoryFileName stylewidth: 75%;display: inline; //div/divdiv classam-form-groupdiv classam-u-sm-3input idClearHistory typecheckbox v-modelconfig.ClearHistory /label forClearHistory class清理历史数据/label/divdiv classam-u-sm-3input idFindFirstStop typecheckbox v-modelconfig.FindFirstStop /label forFindFirstStop class找到第一张停止/label/divdiv classam-u-sm-3input idFindOpen typecheckbox v-modelconfig.FindOpen /label forFindOpen class找到后立即打开/label/divdiv classam-u-sm-3!--button onclickstartFace() classam-btn-primary typebutton打开连接/button--button clickfind() v-if!isFind classam-btn-primary typebutton开始查询/buttonbutton clickstop() v-ifisFind classam-btn-primary typebutton停止服务/button/div/divdiv classam-form-grouptextarea idtxtInfo rows40{{msg}}/textarea/div/fieldset/form/divscriptvar hostid;// 主机idfunction startFace() {dds.iot.com.open({type: FaceCom,//人脸识别插件port: 1,baudRate: 1,onReceive: function (res) {if ($vue.isFind) {if (res.data.indexOf(已找到) 0) {alert(res.data)}addMsg(res.data)}//console.log(host, res.data)},onOpen: function (ar) {if (ar.Success) {hostid ar.Data;addMsg(连接成功)} else {alert(ar.Message)}}})}var $msg;function addMsg(msg) {var m $vue.msg \n msg;if ($vue.msg.length 10000) {$vue.msg (msg);} else {$vue.msg (m);}}// 窗口初始化事件操作窗口大小、标题$(document).bind(dds.window.init, function (e, win) {$msg $(#txtInfo)startFace();initVue();})var $vue;function initVue() {$vue new Vue({el: #vue_root,data: {advanceSetting: false,msg: ,isFind:false,config: {ImagePath: ,FindDir: D:\\image,HistoryFileName: ,ClearHistory: true,FindOpen: true,FindFirstStop: true,},},mounted() {if (localStorage._faceConfig) {this.configJSON.parse(localStorage._faceConfig);}},methods: {selectFile() {this.config.ImagePath _host.selectFile();},find() {var config this.configif (!config.ImagePath) {alert(请选择原始文件)return;}this.msg if (!config.FindDir) {alert(请选择查找目录)return;}this.isFind true;dds.iot.com.exeCommand({ id: hostid, name: Find, data: { timeout1: 30000, config } }, function (ar) {if (ar.Success) {} else {addMsg(操作失败 ar.Message)}})localStorage._faceConfig JSON.stringify(config);},stop() {this.isFind false;dds.iot.com.exeCommand({ id: hostid, name: Stop, data: { } }, function (ar) {if (ar.Success) {} else {addMsg(操作失败 ar.Message)}})},clearLog() {this.msg},selectSaveDir() {var dir dds.file.openFolderDialog();this.config.FindDir(dir)}}})}/script系统支持1.人脸数量检测、人脸匹配、人脸定位2.多文件夹快速搜索搜索一张还是全部