Commit 4f063055 by xmh

修改包名

1 parent 22551b25
Showing 24 changed files with 58 additions and 47 deletions
......@@ -89,6 +89,7 @@
</dependencies>
<build>
<finalName>es-match</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
......
package com.xmh.es.match;
package com.viontech.match;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication
@ComponentScan(basePackages = {"com.viontech.keliu", "com.xmh.es"})
@ComponentScan(basePackages = {"com.viontech"})
public class XmhTestApplication {
public static void main(String[] args) {
......
package com.xmh.es.match.config;
package com.viontech.match.config;
import com.viontech.keliu.websocket.AlgApiClient;
import org.springframework.beans.factory.annotation.Value;
......
package com.xmh.es.match.controller;
package com.viontech.match.controller;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.viontech.keliu.storage.Storage;
import com.viontech.keliu.util.DateUtil;
import com.xmh.es.match.PoolEnum;
import com.xmh.es.match.entity.*;
import com.xmh.es.match.entity.vo.RequestData;
import com.xmh.es.match.repository.FaceRecognitionRepository;
import com.xmh.es.match.service.AlgService;
import com.xmh.es.match.service.MatchService;
import com.viontech.match.PoolEnum;
import com.viontech.match.entity.*;
import com.viontech.match.entity.vo.RequestData;
import com.viontech.match.repository.FaceRecognitionRepository;
import com.viontech.match.service.AlgService;
import com.viontech.match.service.MatchService;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
......@@ -113,10 +113,9 @@ public class MainController {
pool = PoolEnum.POOL_200W;
break;
default:
return "请输入[2000,5000,20000,100000,500000,1000000,2000000]";
throw new RuntimeException("请输入[2000,5000,20000,100000,500000,1000000,2000000]");
}
algService.deletePool(pool.name);
algService.createPool(pool.name);
......@@ -151,9 +150,9 @@ public class MainController {
if (integer.get() > pool.num) {
return "success";
}
while (poolExecutor.getQueue().size() > 1000) {
while (poolExecutor.getQueue().size() > 10000) {
System.out.println(poolExecutor.getQueue().size());
TimeUnit.SECONDS.sleep(10);
TimeUnit.SECONDS.sleep(4);
}
if (integer.get() > pool.num) {
return "success";
......
package com.xmh.es.match.entity;
package com.viontech.match.entity;
import lombok.Getter;
......
package com.xmh.es.match.entity;
package com.viontech.match.entity;
import com.viontech.keliu.base.BaseModel;
import com.viontech.keliu.util.DateUtil;
......
package com.xmh.es.match.entity;
package com.viontech.match.entity;
import lombok.Getter;
import lombok.Setter;
......
package com.xmh.es.match.entity;
package com.viontech.match.entity;
import lombok.Getter;
import lombok.Setter;
......
package com.xmh.es.match.entity;
package com.viontech.match.entity;
import lombok.Getter;
import lombok.Setter;
......
package com.xmh.es.match.entity.vo;
package com.viontech.match.entity.vo;
import lombok.Getter;
import lombok.Setter;
......
package com.xmh.es.match.repository;
package com.viontech.match.repository;
import com.xmh.es.match.entity.FaceRecognition;
import com.viontech.match.entity.FaceRecognition;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
......
package com.xmh.es.match.service;
package com.viontech.match.service;
import com.xmh.es.match.entity.MatchResult;
import com.xmh.es.match.entity.Person;
import com.viontech.match.entity.Person;
import com.viontech.match.entity.MatchResult;
import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
import org.elasticsearch.action.bulk.BulkRequest;
import org.elasticsearch.action.delete.DeleteRequest;
......@@ -109,7 +109,7 @@ public class AlgService {
* 查询特征库列表
*/
public String[] queryPoolList() throws IOException {
GetIndexResponse response = client.indices().get(new GetIndexRequest("*pool*"), RequestOptions.DEFAULT);
GetIndexResponse response = client.indices().get(new GetIndexRequest("*"), RequestOptions.DEFAULT);
return response.getIndices();
}
......@@ -132,7 +132,7 @@ public class AlgService {
params.put("data", feature);
Script script = new Script(
ScriptType.INLINE, Script.DEFAULT_SCRIPT_LANG,
"cosineSimilarity(params.data, 'data') + 1", params);
"(cosineSimilarity(params.data, 'data') + 1) / 2 * 100", params);
ScriptScoreQueryBuilder queryBuilder = QueryBuilders.scriptScoreQuery(QueryBuilders.matchAllQuery(), script);
builder.query(queryBuilder);
......
package com.xmh.es.match.service;
package com.viontech.match.service;
import com.viontech.keliu.i18n.util.LocalMessageUtil;
import com.viontech.keliu.websocket.AlgApiClient;
import com.xmh.es.match.entity.MatchResult;
import com.xmh.es.match.entity.Person;
import com.xmh.es.match.entity.vo.RequestData;
import com.xmh.es.match.util.Utils;
import com.viontech.match.entity.MatchResult;
import com.viontech.match.entity.Person;
import com.viontech.match.entity.vo.RequestData;
import com.viontech.match.util.Utils;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.stereotype.Service;
......
package com.xmh.es.match.test;
package com.viontech.match.test;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.viontech.keliu.model.Person;
......
package com.xmh.es.match.test;
package com.viontech.match.test;
import java.util.Collections;
import java.util.List;
......
package com.xmh.es.match.util;
package com.viontech.match.util;
import java.awt.*;
import java.awt.image.BufferedImage;
......
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>hello</title><link href=/static/css/app.e7c2112962ef9f4a39d379467a4bcf3c.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script><script type=text/javascript src=/static/js/vendor.8d9ad72abf44221abb05.js></script><script type=text/javascript src=/static/js/app.975f2cc40df4e4cd82a5.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>hello</title><link href=/static/css/app.e7c2112962ef9f4a39d379467a4bcf3c.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script><script type=text/javascript src=/static/js/vendor.8d9ad72abf44221abb05.js></script><script type=text/javascript src=/static/js/app.c0f11caa495df4c4d340.js></script></body></html>
\ No newline at end of file
webpackJsonp([1],{NHnr:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a("7+uW"),l={name:"HelloWorld",data:function(){return{formData:new FormData,imageUrl:null,form:{poolId:null,file:null},poolIds:[],poolIdSelected:null,input:null,faceList:null,matchTime:null}},methods:{getSrc:function(t){return"https://vion-retail.oss-cn-beijing.aliyuncs.com/picture/"+t.facePath+t.facePic},beforeupload:function(t){return this.form.file=t,!1},onChange:function(t){this.imageUrl=URL.createObjectURL(t.raw)},onSubmit:function(){var t=this;this.$refs.upload.submit(),this.formData.set("poolId",this.form.poolId),this.formData.set("file",this.form.file),console.log(this.formData),this.axios.post("http://127.0.0.1:12000/alg/match",this.formData,{headers:{"Content-Type":"multipart/form-data"}}).then(function(e){var a=e.data.result;if(null!=a){t.faceList=[];for(var o=a.length/5,l=0;l<o;l++){var n=a.slice(5*l,5*l+5);t.faceList.push(n)}}t.matchTime=e.data.time}).catch(function(t){console.error(t)}),this.formData=new FormData},getPoolIds:function(){var t=this;this.axios({method:"get",url:"http://127.0.0.1:12000/alg/poolIds"}).then(function(e){t.poolIds=e.data,t.poolIds.length>0&&(t.form.poolId=t.poolIds[0])}).catch(function(t){console.log(t)})}},mounted:function(){this.getPoolIds()}},n={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello",staticStyle:{margin:"auto auto"}},[a("el-form",{ref:"form",staticStyle:{width:"400px",margin:"auto auto"},attrs:{model:t.form}},[a("el-form-item",{attrs:{label:"特征库"}},[a("el-select",{attrs:{placeholder:"请选择特征库"},model:{value:t.form.poolId,callback:function(e){t.$set(t.form,"poolId",e)},expression:"form.poolId"}},t._l(t.poolIds,function(t){return a("el-option",{key:t,attrs:{label:t,value:t}})}),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"人脸图片"}},[a("el-upload",{ref:"upload",staticClass:"avatar-uploader",attrs:{action:"http://127.0.0.1:12000/","show-file-list":!1,"auto-upload":!1,"on-change":t.onChange,"before-upload":t.beforeupload}},[t.imageUrl?a("img",{staticClass:"avatar",attrs:{src:t.imageUrl}}):a("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1),t._v(" "),a("el-form-item",[a("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v("比对")])],1)],1),t._v(" "),null!=t.matchTime?a("p",[t._v("匹配耗时:"+t._s(t.matchTime))]):t._e(),t._v(" "),t._l(t.faceList,function(e,o){return a("el-row",{key:o,staticClass:"row-bg",staticStyle:{width:"80%",margin:"auto"},attrs:{type:"flex",justify:"space-around"}},t._l(t.faceList[o],function(e){return a("el-col",{key:e.unid,attrs:{span:4}},[a("el-card",{staticStyle:{margin:"20px",width:"200px"},attrs:{"body-style":{padding:"0px"}}},[a("img",{staticClass:"image",attrs:{src:t.getSrc(e)}}),t._v(" "),a("div",{staticStyle:{padding:"15px"}},[a("p",{staticStyle:{"font-size":"12px"}},[t._v("匹配分数:"+t._s(e.matchScore))]),t._v(" "),a("p",{staticStyle:{"font-size":"12px"}},[t._v("性别:"+t._s(0==e.gender?"女":1==e.gender?"男":"未知"))]),t._v(" "),a("p",{staticStyle:{"font-size":"12px"}},[t._v("年龄:"+t._s(e.age))]),t._v(" "),a("p",{staticStyle:{"font-size":"12px"}},[t._v("时间:"+t._s(e.counttime))])])])],1)}),1)})],2)},staticRenderFns:[]};var i={name:"App",components:{HelloWorld:a("VU/8")(l,n,!1,function(t){a("fKca")},null,null).exports}},s={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"app"}},[e("HelloWorld")],1)},staticRenderFns:[]};var r=a("VU/8")(i,s,!1,function(t){a("m71c")},null,null).exports,c=a("mtWM"),u=a.n(c),f=a("zL8q"),p=a.n(f);a("tvR6");o.default.use(p.a),o.default.config.productionTip=!1,o.default.prototype.axios=u.a,new o.default({el:"#app",components:{App:r},template:"<App/>"})},fKca:function(t,e){},m71c:function(t,e){},tvR6:function(t,e){}},["NHnr"]);
//# sourceMappingURL=app.975f2cc40df4e4cd82a5.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///src/components/HelloWorld.vue","webpack:///./src/components/HelloWorld.vue?b626","webpack:///./src/components/HelloWorld.vue","webpack:///src/App.vue","webpack:///./src/App.vue?3acb","webpack:///./src/App.vue","webpack:///./src/main.js"],"names":["HelloWorld","name","data","formData","FormData","imageUrl","form","poolId","file","poolIds","poolIdSelected","input","faceList","matchTime","methods","getSrc","item","facePath","facePic","beforeupload","this","onChange","URL","createObjectURL","raw","onSubmit","_this","$refs","submit","set","console","log","axios","post","headers","Content-Type","then","res","result","line","length","i","temp","slice","push","time","catch","err","error","getPoolIds","_this2","method","url","mounted","components_HelloWorld","render","_vm","_h","$createElement","_c","_self","staticClass","staticStyle","margin","ref","width","attrs","model","label","placeholder","value","callback","$$v","$set","expression","_l","key","_v","action","show-file-list","auto-upload","on-change","before-upload","src","type","on","click","_s","_e","index","justify","unid","span","body-style","padding","font-size","matchScore","gender","age","counttime","staticRenderFns","App","components","__webpack_require__","normalizeComponent","ssrContext","selectortype_template_index_0_src_App","id","src_App","App_normalizeComponent","Vue","use","ElementUI","config","productionTip","prototype","Axios","el","template"],"mappings":"qHAoDAA,GACAC,KAAA,aACAC,KAFA,WAGA,OACAC,SAAA,IAAAC,SACAC,SAAA,KACAC,MACAC,OAAA,KACAC,KAAA,MAEAC,WACAC,eAAA,KACAC,MAAA,KACAC,SAAA,KACAC,UAAA,OAGAC,SACAC,OADA,SACAC,GAKA,MAHA,2DACAA,EAAAC,SACAD,EAAAE,SAIAC,aATA,SASAX,GAEA,OADAY,KAAAd,KAAAE,QACA,GAEAa,SAbA,SAaAb,GACAY,KAAAf,SAAAiB,IAAAC,gBAAAf,EAAAgB,MAGAC,SAjBA,WAiBA,IAAAC,EAAAN,KACAA,KAAAO,MAAA,OAAAC,SACAR,KAAAjB,SAAA0B,IAAA,SAAAT,KAAAd,KAAAC,QACAa,KAAAjB,SAAA0B,IAAA,OAAAT,KAAAd,KAAAE,MACAsB,QAAAC,IAAAX,KAAAjB,UAEAiB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vC,EAAAqB,GAAA,QAAArB,EAAA+B,GAAAvE,EAAAgF,eAAAxC,EAAAqB,GAAA,KAAAlB,EAAA,KAAgEG,aAAaiC,YAAA,UAAoBvC,EAAAqB,GAAA,MAAArB,EAAA+B,GAAA,GAAAvE,EAAAiF,OAAA,OAAAjF,EAAAiF,OAAA,aAAAzC,EAAAqB,GAAA,KAAAlB,EAAA,KAAyFG,aAAaiC,YAAA,UAAoBvC,EAAAqB,GAAA,MAAArB,EAAA+B,GAAAvE,EAAAkF,QAAA1C,EAAAqB,GAAA,KAAAlB,EAAA,KAAuDG,aAAaiC,YAAA,UAAoBvC,EAAAqB,GAAA,MAAArB,EAAA+B,GAAAvE,EAAAmF,mBAAA,KAAiD,MAAK,IAEplEC,oBCCjB,ICMAC,GACApG,KAAA,MACAqG,YACAtG,WDTyBuG,EAAQ,OAcjCC,CACExG,EACAsD,GATF,EAVA,SAAAmD,GACEF,EAAQ,SAaV,KAEA,MAUgC,UEvBjBG,GADEnD,OAFP,WAAgB,IAAaE,EAAbrC,KAAasC,eAA0BC,EAAvCvC,KAAuCwC,MAAAD,IAAAF,EAAwB,OAAAE,EAAA,OAAiBO,OAAOyC,GAAA,SAAYhD,EAAA,mBAE7FyC,oBCChC,IAuBeQ,EAvBUL,EAAQ,OAcjBM,CACdR,EACAK,GAT6B,EAV/B,SAAoBD,GAClBF,EAAQ,SAaS,KAEU,MAUG,4DClBhCO,UAAIC,IAAIC,KACRF,UAAIG,OAAOC,eAAgB,EAC3BJ,UAAIK,UAAUnF,MAAQoF,IAEtB,IAAIN,WACFO,GAAI,OACJf,YAAcD,OACdiB,SAAU","file":"static/js/app.975f2cc40df4e4cd82a5.js","sourcesContent":["<template>\n <div class=\"hello\" style=\"margin: auto auto\">\n <el-form ref=\"form\" :model=\"form\" style=\"width:400px;margin: auto auto\">\n <el-form-item label=\"特征库\">\n <el-select v-model=\"form.poolId\" placeholder=\"请选择特征库\">\n <el-option v-for=\"item in poolIds\" :key=\"item\" :label=\"item\" :value=\"item\"></el-option>\n </el-select>\n </el-form-item>\n\n <el-form-item label=\"人脸图片\">\n <el-upload\n ref=\"upload\"\n action=\"http://127.0.0.1:12000/\"\n class=\"avatar-uploader\"\n :show-file-list=\"false\"\n :auto-upload=\"false\"\n :on-change=\"onChange\"\n :before-upload=\"beforeupload\"\n >\n <img v-if=\"imageUrl\" :src=\"imageUrl\" class=\"avatar\" />\n <i v-else class=\"el-icon-plus avatar-uploader-icon\"></i>\n </el-upload>\n </el-form-item>\n <el-form-item>\n <el-button style=\"width:100%\" type=\"primary\" @click=\"onSubmit\">比对</el-button>\n </el-form-item>\n </el-form>\n <p v-if=\"matchTime != null\">匹配耗时:{{matchTime}}</p>\n <el-row\n type=\"flex\"\n class=\"row-bg\"\n justify=\"space-around\"\n style=\"width:80%;margin:auto\"\n v-for=\"(value,index) in faceList\"\n :key=\"index\"\n >\n <el-col :span=\"4\" v-for=\"item in faceList[index]\" :key=\"item.unid\">\n <el-card style=\"margin: 20px; width:200px\" :body-style=\"{ padding: '0px'}\">\n <img :src=\"getSrc(item)\" class=\"image\" />\n <div style=\"padding: 15px;\">\n <p style=\"font-size:12px\">匹配分数:{{item.matchScore}}</p>\n <p style=\"font-size:12px\">性别:{{item.gender==0?\"女\":item.gender==1?\"男\":\"未知\"}}</p>\n <p style=\"font-size:12px\">年龄:{{item.age}}</p>\n <p style=\"font-size:12px\">时间:{{item.counttime}}</p>\n </div>\n </el-card>\n </el-col>\n </el-row>\n </div>\n</template>\n\n<script>\nexport default {\n name: \"HelloWorld\",\n data() {\n return {\n formData: new FormData(),\n imageUrl: null,\n form: {\n poolId: null,\n file: null\n },\n poolIds: [],\n poolIdSelected: null,\n input: null,\n faceList: null,\n matchTime:null\n };\n },\n methods: {\n getSrc(item) {\n var src =\n \"https://vion-retail.oss-cn-beijing.aliyuncs.com/picture/\" +\n item.facePath +\n item.facePic;\n return src;\n },\n\n beforeupload(file) {\n this.form.file = file;\n return false;\n },\n onChange(file) {\n this.imageUrl = URL.createObjectURL(file.raw);\n },\n /** ======================axios================================== */\n onSubmit() {\n this.$refs[\"upload\"].submit();\n this.formData.set(\"poolId\", this.form.poolId);\n this.formData.set(\"file\", this.form.file);\n console.log(this.formData);\n\n this.axios\n .post(\n // \"/alg/match\"\n \"http://127.0.0.1:12000/alg/match\"\n , this.formData, {\n headers: {\n \"Content-Type\": \"multipart/form-data\"\n }\n })\n .then(res => {\n var result = res.data.result;\n if (result != null) {\n this.faceList = [];\n\n var line = result.length / 5;\n for (let i = 0; i < line; i++) {\n let temp = result.slice(i * 5, i * 5 + 5);\n this.faceList.push(temp);\n }\n }\n this.matchTime = res.data.time\n })\n .catch(err => {\n console.error(err);\n });\n this.formData = new FormData();\n },\n\n getPoolIds() {\n this.axios({\n method: \"get\",\n url: \"http://127.0.0.1:12000/alg/poolIds\"\n // url: \"/alg/poolIds\"\n })\n .then(res => {\n this.poolIds = res.data;\n if (this.poolIds.length > 0) {\n this.form.poolId = this.poolIds[0];\n }\n })\n .catch(err => {\n console.log(err);\n });\n }\n },\n mounted() {\n this.getPoolIds();\n }\n};\n</script>\n\n<style>\n.hello {\n text-align: center;\n}\n.hello > .el-table .cell {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\na {\n text-decoration: underline;\n /* color: salmon; */\n}\n\na:hover {\n cursor: pointer;\n}\n.avatar-uploader .el-upload {\n border: 1px dashed #d9d9d9;\n border-radius: 6px;\n cursor: pointer;\n position: relative;\n overflow: hidden;\n}\n.avatar-uploader .el-upload:hover {\n border-color: #409eff;\n}\n.avatar-uploader-icon {\n font-size: 28px;\n color: #8c939d;\n width: 178px;\n height: 178px;\n line-height: 178px;\n text-align: center;\n}\n.avatar {\n width: 178px;\n height: 178px;\n display: block;\n}\n.image {\n width: 100%;\n display: block;\n}\n</style>\n\n\n\n// WEBPACK FOOTER //\n// src/components/HelloWorld.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"hello\",staticStyle:{\"margin\":\"auto auto\"}},[_c('el-form',{ref:\"form\",staticStyle:{\"width\":\"400px\",\"margin\":\"auto auto\"},attrs:{\"model\":_vm.form}},[_c('el-form-item',{attrs:{\"label\":\"特征库\"}},[_c('el-select',{attrs:{\"placeholder\":\"请选择特征库\"},model:{value:(_vm.form.poolId),callback:function ($$v) {_vm.$set(_vm.form, \"poolId\", $$v)},expression:\"form.poolId\"}},_vm._l((_vm.poolIds),function(item){return _c('el-option',{key:item,attrs:{\"label\":item,\"value\":item}})}),1)],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":\"人脸图片\"}},[_c('el-upload',{ref:\"upload\",staticClass:\"avatar-uploader\",attrs:{\"action\":\"http://127.0.0.1:12000/\",\"show-file-list\":false,\"auto-upload\":false,\"on-change\":_vm.onChange,\"before-upload\":_vm.beforeupload}},[(_vm.imageUrl)?_c('img',{staticClass:\"avatar\",attrs:{\"src\":_vm.imageUrl}}):_c('i',{staticClass:\"el-icon-plus avatar-uploader-icon\"})])],1),_vm._v(\" \"),_c('el-form-item',[_c('el-button',{staticStyle:{\"width\":\"100%\"},attrs:{\"type\":\"primary\"},on:{\"click\":_vm.onSubmit}},[_vm._v(\"比对\")])],1)],1),_vm._v(\" \"),(_vm.matchTime != null)?_c('p',[_vm._v(\"匹配耗时:\"+_vm._s(_vm.matchTime))]):_vm._e(),_vm._v(\" \"),_vm._l((_vm.faceList),function(value,index){return _c('el-row',{key:index,staticClass:\"row-bg\",staticStyle:{\"width\":\"80%\",\"margin\":\"auto\"},attrs:{\"type\":\"flex\",\"justify\":\"space-around\"}},_vm._l((_vm.faceList[index]),function(item){return _c('el-col',{key:item.unid,attrs:{\"span\":4}},[_c('el-card',{staticStyle:{\"margin\":\"20px\",\"width\":\"200px\"},attrs:{\"body-style\":{ padding: '0px'}}},[_c('img',{staticClass:\"image\",attrs:{\"src\":_vm.getSrc(item)}}),_vm._v(\" \"),_c('div',{staticStyle:{\"padding\":\"15px\"}},[_c('p',{staticStyle:{\"font-size\":\"12px\"}},[_vm._v(\"匹配分数:\"+_vm._s(item.matchScore))]),_vm._v(\" \"),_c('p',{staticStyle:{\"font-size\":\"12px\"}},[_vm._v(\"性别:\"+_vm._s(item.gender==0?\"女\":item.gender==1?\"男\":\"未知\"))]),_vm._v(\" \"),_c('p',{staticStyle:{\"font-size\":\"12px\"}},[_vm._v(\"年龄:\"+_vm._s(item.age))]),_vm._v(\" \"),_c('p',{staticStyle:{\"font-size\":\"12px\"}},[_vm._v(\"时间:\"+_vm._s(item.counttime))])])])],1)}),1)})],2)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-4b4196e0\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/HelloWorld.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-4b4196e0\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./HelloWorld.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./HelloWorld.vue\"\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./HelloWorld.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-4b4196e0\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./HelloWorld.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/HelloWorld.vue\n// module id = null\n// module chunks = ","<template>\n <div id=\"app\">\n <HelloWorld/>\n </div>\n</template>\n\n<script>\n import HelloWorld from \"./components/HelloWorld\";\n\n export default {\n name: \"App\",\n components: {\n HelloWorld\n }\n };\n</script>\n\n<style>\n</style>\n\n\n\n// WEBPACK FOOTER //\n// src/App.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"app\"}},[_c('HelloWorld')],1)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-5a0fcd8c\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/App.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-5a0fcd8c\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../node_modules/vue-loader/lib/selector?type=styles&index=0!./App.vue\")\n}\nvar normalizeComponent = require(\"!../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../node_modules/vue-loader/lib/selector?type=script&index=0!./App.vue\"\nimport __vue_script__ from \"!!babel-loader!../node_modules/vue-loader/lib/selector?type=script&index=0!./App.vue\"\n/* template */\nimport __vue_template__ from \"!!../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-5a0fcd8c\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../node_modules/vue-loader/lib/selector?type=template&index=0!./App.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/App.vue\n// module id = null\n// module chunks = ","// The Vue build version to load with the `import` command\n// (runtime-only or standalone) has been set in webpack.base.conf with an alias.\nimport Vue from 'vue'\nimport App from './App'\nimport Axios from 'axios'\nimport ElementUI from 'element-ui';\nimport 'element-ui/lib/theme-chalk/index.css';\n\nVue.use(ElementUI)\nVue.config.productionTip = false\nVue.prototype.axios = Axios\n/* eslint-disable no-new */\nnew Vue({\n el: '#app',\n components: { App },\n template: '<App/>'\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/main.js"],"sourceRoot":""}
\ No newline at end of file
webpackJsonp([1],{IHzv:function(t,e){},NHnr:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a("7+uW"),l={name:"HelloWorld",data:function(){return{formData:new FormData,imageUrl:null,form:{poolId:null,file:null},poolIds:[],poolIdSelected:null,input:null,faceList:null,matchTime:null}},methods:{getSrc:function(t){return"https://vion-retail.oss-cn-beijing.aliyuncs.com/picture/"+t.facePath+t.facePic},beforeupload:function(t){return this.form.file=t,!1},onChange:function(t){this.imageUrl=URL.createObjectURL(t.raw)},onSubmit:function(){var t=this;this.$refs.upload.submit(),this.formData.set("poolId",this.form.poolId),this.formData.set("file",this.form.file),console.log(this.formData),this.axios.post("/alg/match",this.formData,{headers:{"Content-Type":"multipart/form-data"}}).then(function(e){var a=e.data.result;if(null!=a){t.faceList=[];for(var o=a.length/5,l=0;l<o;l++){var n=a.slice(5*l,5*l+5);t.faceList.push(n)}}t.matchTime=e.data.time}).catch(function(t){console.error(t)}),this.formData=new FormData},getPoolIds:function(){var t=this;this.axios({method:"get",url:"/alg/poolIds"}).then(function(e){t.poolIds=e.data,t.poolIds.length>0&&(t.form.poolId=t.poolIds[0])}).catch(function(t){console.log(t)})}},mounted:function(){this.getPoolIds()}},n={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"hello",staticStyle:{margin:"auto auto"}},[a("el-form",{ref:"form",staticStyle:{width:"400px",margin:"auto auto"},attrs:{model:t.form}},[a("el-form-item",{attrs:{label:"特征库"}},[a("el-select",{attrs:{placeholder:"请选择特征库"},model:{value:t.form.poolId,callback:function(e){t.$set(t.form,"poolId",e)},expression:"form.poolId"}},t._l(t.poolIds,function(t){return a("el-option",{key:t,attrs:{label:t,value:t}})}),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"人脸图片"}},[a("el-upload",{ref:"upload",staticClass:"avatar-uploader",attrs:{action:"http://127.0.0.1:12000/","show-file-list":!1,"auto-upload":!1,"on-change":t.onChange,"before-upload":t.beforeupload}},[t.imageUrl?a("img",{staticClass:"avatar",attrs:{src:t.imageUrl}}):a("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1),t._v(" "),a("el-form-item",[a("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v("比对")])],1)],1),t._v(" "),null!=t.matchTime?a("p",[t._v("匹配耗时:"+t._s(t.matchTime))]):t._e(),t._v(" "),t._l(t.faceList,function(e,o){return a("el-row",{key:o,staticClass:"row-bg",staticStyle:{width:"80%",margin:"auto"},attrs:{type:"flex",justify:"space-around"}},t._l(t.faceList[o],function(e){return a("el-col",{key:e.unid,attrs:{span:4}},[a("el-card",{staticStyle:{margin:"20px",width:"200px"},attrs:{"body-style":{padding:"0px"}}},[a("img",{staticClass:"image",attrs:{src:t.getSrc(e)}}),t._v(" "),a("div",{staticStyle:{padding:"15px"}},[a("p",{staticStyle:{"font-size":"12px"}},[t._v("匹配分数:"+t._s(e.matchScore))]),t._v(" "),a("p",{staticStyle:{"font-size":"12px"}},[t._v("性别:"+t._s(0==e.gender?"女":1==e.gender?"男":"未知"))]),t._v(" "),a("p",{staticStyle:{"font-size":"12px"}},[t._v("年龄:"+t._s(e.age))]),t._v(" "),a("p",{staticStyle:{"font-size":"12px"}},[t._v("时间:"+t._s(e.counttime))])])])],1)}),1)})],2)},staticRenderFns:[]};var i={name:"App",components:{HelloWorld:a("VU/8")(l,n,!1,function(t){a("IHzv")},null,null).exports}},s={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"app"}},[e("HelloWorld")],1)},staticRenderFns:[]};var r=a("VU/8")(i,s,!1,function(t){a("m71c")},null,null).exports,c=a("mtWM"),u=a.n(c),f=a("zL8q"),p=a.n(f);a("tvR6");o.default.use(p.a),o.default.config.productionTip=!1,o.default.prototype.axios=u.a,new o.default({el:"#app",components:{App:r},template:"<App/>"})},m71c:function(t,e){},tvR6:function(t,e){}},["NHnr"]);
//# sourceMappingURL=app.c0f11caa495df4c4d340.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///src/components/HelloWorld.vue","webpack:///./src/components/HelloWorld.vue?285c","webpack:///./src/components/HelloWorld.vue","webpack:///src/App.vue","webpack:///./src/App.vue?3acb","webpack:///./src/App.vue","webpack:///./src/main.js"],"names":["HelloWorld","name","data","formData","FormData","imageUrl","form","poolId","file","poolIds","poolIdSelected","input","faceList","matchTime","methods","getSrc","item","facePath","facePic","beforeupload","this","onChange","URL","createObjectURL","raw","onSubmit","_this","$refs","submit","set","console","log","axios","post","headers","Content-Type","then","res","result","line","length","i","temp","slice","push","time","catch","err","error","getPoolIds","_this2","method","url","mounted","components_HelloWorld","render","_vm","_h","$createElement","_c","_self","staticClass","staticStyle","margin","ref","width","attrs","model","label","placeholder","value","callback","$$v","$set","expression","_l","key","_v","action","show-file-list","auto-upload","on-change","before-upload","src","type","on","click","_s","_e","index","justify","unid","span","body-style","padding","font-size","matchScore","gender","age","counttime","staticRenderFns","App","components","__webpack_require__","normalizeComponent","ssrContext","selectortype_template_index_0_src_App","id","src_App","App_normalizeComponent","Vue","use","ElementUI","config","productionTip","prototype","Axios","el","template"],"mappings":"0IAoDAA,GACAC,KAAA,aACAC,KAFA,WAGA,OACAC,SAAA,IAAAC,SACAC,SAAA,KACAC,MACAC,OAAA,KACAC,KAAA,MAEAC,WACAC,eAAA,KACAC,MAAA,KACAC,SAAA,KACAC,UAAA,OAGAC,SACAC,OADA,SACAC,GAKA,MAHA,2DACAA,EAAAC,SACAD,EAAAE,SAIAC,aATA,SASAX,GAEA,OADAY,KAAAd,KAAAE,QACA,GAEAa,SAbA,SAaAb,GACAY,KAAAf,SAAAiB,IAAAC,gBAAAf,EAAAgB,MAGAC,SAjBA,WAiBA,IAAAC,EAAAN,KACAA,KAAAO,MAAA,OAAAC,SACAR,KAAAjB,SAAA0B,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AzC,OAAAC,MAAwBwC,EAAAqB,GAAA,KAAAlB,EAAA,OAAwBG,aAAagC,QAAA,UAAkBnC,EAAA,KAAUG,aAAaiC,YAAA,UAAoBvC,EAAAqB,GAAA,QAAArB,EAAA+B,GAAAvE,EAAAgF,eAAAxC,EAAAqB,GAAA,KAAAlB,EAAA,KAAgEG,aAAaiC,YAAA,UAAoBvC,EAAAqB,GAAA,MAAArB,EAAA+B,GAAA,GAAAvE,EAAAiF,OAAA,OAAAjF,EAAAiF,OAAA,aAAAzC,EAAAqB,GAAA,KAAAlB,EAAA,KAAyFG,aAAaiC,YAAA,UAAoBvC,EAAAqB,GAAA,MAAArB,EAAA+B,GAAAvE,EAAAkF,QAAA1C,EAAAqB,GAAA,KAAAlB,EAAA,KAAuDG,aAAaiC,YAAA,UAAoBvC,EAAAqB,GAAA,MAAArB,EAAA+B,GAAAvE,EAAAmF,mBAAA,KAAiD,MAAK,IAEplEC,oBCCjB,ICMAC,GACApG,KAAA,MACAqG,YACAtG,WDTyBuG,EAAQ,OAcjCC,CACExG,EACAsD,GATF,EAVA,SAAAmD,GACEF,EAAQ,SAaV,KAEA,MAUgC,UEvBjBG,GADEnD,OAFP,WAAgB,IAAaE,EAAbrC,KAAasC,eAA0BC,EAAvCvC,KAAuCwC,MAAAD,IAAAF,EAAwB,OAAAE,EAAA,OAAiBO,OAAOyC,GAAA,SAAYhD,EAAA,mBAE7FyC,oBCChC,IAuBeQ,EAvBUL,EAAQ,OAcjBM,CACdR,EACAK,GAT6B,EAV/B,SAAoBD,GAClBF,EAAQ,SAaS,KAEU,MAUG,4DClBhCO,UAAIC,IAAIC,KACRF,UAAIG,OAAOC,eAAgB,EAC3BJ,UAAIK,UAAUnF,MAAQoF,IAEtB,IAAIN,WACFO,GAAI,OACJf,YAAcD,OACdiB,SAAU","file":"static/js/app.c0f11caa495df4c4d340.js","sourcesContent":["<template>\n <div class=\"hello\" style=\"margin: auto auto\">\n <el-form ref=\"form\" :model=\"form\" style=\"width:400px;margin: auto auto\">\n <el-form-item label=\"特征库\">\n <el-select v-model=\"form.poolId\" placeholder=\"请选择特征库\">\n <el-option v-for=\"item in poolIds\" :key=\"item\" :label=\"item\" :value=\"item\"></el-option>\n </el-select>\n </el-form-item>\n\n <el-form-item label=\"人脸图片\">\n <el-upload\n ref=\"upload\"\n action=\"http://127.0.0.1:12000/\"\n class=\"avatar-uploader\"\n :show-file-list=\"false\"\n :auto-upload=\"false\"\n :on-change=\"onChange\"\n :before-upload=\"beforeupload\"\n >\n <img v-if=\"imageUrl\" :src=\"imageUrl\" class=\"avatar\" />\n <i v-else class=\"el-icon-plus avatar-uploader-icon\"></i>\n </el-upload>\n </el-form-item>\n <el-form-item>\n <el-button style=\"width:100%\" type=\"primary\" @click=\"onSubmit\">比对</el-button>\n </el-form-item>\n </el-form>\n <p v-if=\"matchTime != null\">匹配耗时:{{matchTime}}</p>\n <el-row\n type=\"flex\"\n class=\"row-bg\"\n justify=\"space-around\"\n style=\"width:80%;margin:auto\"\n v-for=\"(value,index) in faceList\"\n :key=\"index\"\n >\n <el-col :span=\"4\" v-for=\"item in faceList[index]\" :key=\"item.unid\">\n <el-card style=\"margin: 20px; width:200px\" :body-style=\"{ padding: '0px'}\">\n <img :src=\"getSrc(item)\" class=\"image\" />\n <div style=\"padding: 15px;\">\n <p style=\"font-size:12px\">匹配分数:{{item.matchScore}}</p>\n <p style=\"font-size:12px\">性别:{{item.gender==0?\"女\":item.gender==1?\"男\":\"未知\"}}</p>\n <p style=\"font-size:12px\">年龄:{{item.age}}</p>\n <p style=\"font-size:12px\">时间:{{item.counttime}}</p>\n </div>\n </el-card>\n </el-col>\n </el-row>\n </div>\n</template>\n\n<script>\nexport default {\n name: \"HelloWorld\",\n data() {\n return {\n formData: new FormData(),\n imageUrl: null,\n form: {\n poolId: null,\n file: null\n },\n poolIds: [],\n poolIdSelected: null,\n input: null,\n faceList: null,\n matchTime:null\n };\n },\n methods: {\n getSrc(item) {\n var src =\n \"https://vion-retail.oss-cn-beijing.aliyuncs.com/picture/\" +\n item.facePath +\n item.facePic;\n return src;\n },\n\n beforeupload(file) {\n this.form.file = file;\n return false;\n },\n onChange(file) {\n this.imageUrl = URL.createObjectURL(file.raw);\n },\n /** ======================axios================================== */\n onSubmit() {\n this.$refs[\"upload\"].submit();\n this.formData.set(\"poolId\", this.form.poolId);\n this.formData.set(\"file\", this.form.file);\n console.log(this.formData);\n\n this.axios\n .post(\n \"/alg/match\"\n // \"http://127.0.0.1:12000/alg/match\"\n , this.formData, {\n headers: {\n \"Content-Type\": \"multipart/form-data\"\n }\n })\n .then(res => {\n var result = res.data.result;\n if (result != null) {\n this.faceList = [];\n\n var line = result.length / 5;\n for (let i = 0; i < line; i++) {\n let temp = result.slice(i * 5, i * 5 + 5);\n this.faceList.push(temp);\n }\n }\n this.matchTime = res.data.time\n })\n .catch(err => {\n console.error(err);\n });\n this.formData = new FormData();\n },\n\n getPoolIds() {\n this.axios({\n method: \"get\",\n // url: \"http://127.0.0.1:12000/alg/poolIds\"\n url: \"/alg/poolIds\"\n })\n .then(res => {\n this.poolIds = res.data;\n if (this.poolIds.length > 0) {\n this.form.poolId = this.poolIds[0];\n }\n })\n .catch(err => {\n console.log(err);\n });\n }\n },\n mounted() {\n this.getPoolIds();\n }\n};\n</script>\n\n<style>\n.hello {\n text-align: center;\n}\n.hello > .el-table .cell {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\na {\n text-decoration: underline;\n /* color: salmon; */\n}\n\na:hover {\n cursor: pointer;\n}\n.avatar-uploader .el-upload {\n border: 1px dashed #d9d9d9;\n border-radius: 6px;\n cursor: pointer;\n position: relative;\n overflow: hidden;\n}\n.avatar-uploader .el-upload:hover {\n border-color: #409eff;\n}\n.avatar-uploader-icon {\n font-size: 28px;\n color: #8c939d;\n width: 178px;\n height: 178px;\n line-height: 178px;\n text-align: center;\n}\n.avatar {\n width: 178px;\n height: 178px;\n display: block;\n}\n.image {\n width: 100%;\n display: block;\n}\n</style>\n\n\n\n// WEBPACK FOOTER //\n// src/components/HelloWorld.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"hello\",staticStyle:{\"margin\":\"auto auto\"}},[_c('el-form',{ref:\"form\",staticStyle:{\"width\":\"400px\",\"margin\":\"auto auto\"},attrs:{\"model\":_vm.form}},[_c('el-form-item',{attrs:{\"label\":\"特征库\"}},[_c('el-select',{attrs:{\"placeholder\":\"请选择特征库\"},model:{value:(_vm.form.poolId),callback:function ($$v) {_vm.$set(_vm.form, \"poolId\", $$v)},expression:\"form.poolId\"}},_vm._l((_vm.poolIds),function(item){return _c('el-option',{key:item,attrs:{\"label\":item,\"value\":item}})}),1)],1),_vm._v(\" \"),_c('el-form-item',{attrs:{\"label\":\"人脸图片\"}},[_c('el-upload',{ref:\"upload\",staticClass:\"avatar-uploader\",attrs:{\"action\":\"http://127.0.0.1:12000/\",\"show-file-list\":false,\"auto-upload\":false,\"on-change\":_vm.onChange,\"before-upload\":_vm.beforeupload}},[(_vm.imageUrl)?_c('img',{staticClass:\"avatar\",attrs:{\"src\":_vm.imageUrl}}):_c('i',{staticClass:\"el-icon-plus avatar-uploader-icon\"})])],1),_vm._v(\" \"),_c('el-form-item',[_c('el-button',{staticStyle:{\"width\":\"100%\"},attrs:{\"type\":\"primary\"},on:{\"click\":_vm.onSubmit}},[_vm._v(\"比对\")])],1)],1),_vm._v(\" \"),(_vm.matchTime != null)?_c('p',[_vm._v(\"匹配耗时:\"+_vm._s(_vm.matchTime))]):_vm._e(),_vm._v(\" \"),_vm._l((_vm.faceList),function(value,index){return _c('el-row',{key:index,staticClass:\"row-bg\",staticStyle:{\"width\":\"80%\",\"margin\":\"auto\"},attrs:{\"type\":\"flex\",\"justify\":\"space-around\"}},_vm._l((_vm.faceList[index]),function(item){return _c('el-col',{key:item.unid,attrs:{\"span\":4}},[_c('el-card',{staticStyle:{\"margin\":\"20px\",\"width\":\"200px\"},attrs:{\"body-style\":{ padding: '0px'}}},[_c('img',{staticClass:\"image\",attrs:{\"src\":_vm.getSrc(item)}}),_vm._v(\" \"),_c('div',{staticStyle:{\"padding\":\"15px\"}},[_c('p',{staticStyle:{\"font-size\":\"12px\"}},[_vm._v(\"匹配分数:\"+_vm._s(item.matchScore))]),_vm._v(\" \"),_c('p',{staticStyle:{\"font-size\":\"12px\"}},[_vm._v(\"性别:\"+_vm._s(item.gender==0?\"女\":item.gender==1?\"男\":\"未知\"))]),_vm._v(\" \"),_c('p',{staticStyle:{\"font-size\":\"12px\"}},[_vm._v(\"年龄:\"+_vm._s(item.age))]),_vm._v(\" \"),_c('p',{staticStyle:{\"font-size\":\"12px\"}},[_vm._v(\"时间:\"+_vm._s(item.counttime))])])])],1)}),1)})],2)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-1ea0c148\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/HelloWorld.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-1ea0c148\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./HelloWorld.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./HelloWorld.vue\"\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./HelloWorld.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-1ea0c148\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./HelloWorld.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/HelloWorld.vue\n// module id = null\n// module chunks = ","<template>\n <div id=\"app\">\n <HelloWorld/>\n </div>\n</template>\n\n<script>\n import HelloWorld from \"./components/HelloWorld\";\n\n export default {\n name: \"App\",\n components: {\n HelloWorld\n }\n };\n</script>\n\n<style>\n</style>\n\n\n\n// WEBPACK FOOTER //\n// src/App.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"app\"}},[_c('HelloWorld')],1)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-5a0fcd8c\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/App.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-5a0fcd8c\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../node_modules/vue-loader/lib/selector?type=styles&index=0!./App.vue\")\n}\nvar normalizeComponent = require(\"!../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../node_modules/vue-loader/lib/selector?type=script&index=0!./App.vue\"\nimport __vue_script__ from \"!!babel-loader!../node_modules/vue-loader/lib/selector?type=script&index=0!./App.vue\"\n/* template */\nimport __vue_template__ from \"!!../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-5a0fcd8c\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../node_modules/vue-loader/lib/selector?type=template&index=0!./App.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/App.vue\n// module id = null\n// module chunks = ","// The Vue build version to load with the `import` command\n// (runtime-only or standalone) has been set in webpack.base.conf with an alias.\nimport Vue from 'vue'\nimport App from './App'\nimport Axios from 'axios'\nimport ElementUI from 'element-ui';\nimport 'element-ui/lib/theme-chalk/index.css';\n\nVue.use(ElementUI)\nVue.config.productionTip = false\nVue.prototype.axios = Axios\n/* eslint-disable no-new */\nnew Vue({\n el: '#app',\n components: { App },\n template: '<App/>'\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/main.js"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap d2d68e467296ba9c478b"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,IAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.2ae2e69a05c33dfc65f8.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap d2d68e467296ba9c478b"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap 9660bad579d1459e2fa1"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,IAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.2ae2e69a05c33dfc65f8.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 9660bad579d1459e2fa1"],"sourceRoot":""}
\ No newline at end of file
package com.xmh.es.match;
package com.viontech.match;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.viontech.keliu.storage.Storage;
import com.viontech.keliu.util.DateUtil;
import com.xmh.es.match.entity.*;
import com.xmh.es.match.repository.FaceRecognitionRepository;
import com.xmh.es.match.service.AlgService;
import com.viontech.match.entity.*;
import com.viontech.match.repository.FaceRecognitionRepository;
import com.viontech.match.service.AlgService;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.client.core.CountRequest;
import org.elasticsearch.client.core.CountResponse;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
......@@ -19,6 +23,7 @@ import java.nio.file.Path;
import java.nio.file.Paths;
import java.text.ParseException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.LinkedBlockingQueue;
......@@ -48,6 +53,8 @@ public class Test0 {
private FaceRecognitionRepository faceRecognitionRepository;
@Resource
private Storage featureStorage;
@Resource
private RestHighLevelClient client;
@Test
public void createPoolTest() throws IOException {
......@@ -64,9 +71,13 @@ public class Test0 {
@Test
public void queryIndex() throws IOException {
String[] strings = algService.queryPoolList();
for (String string : strings) {
System.out.println(string);
HashMap<String, Object> result = new HashMap<>();
for (String item : strings) {
CountResponse count = client.count(new CountRequest(item), RequestOptions.DEFAULT);
long count1 = count.getCount();
result.put(item, count1);
}
System.out.println(result.toString());
}
@Test
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!