8000 更新正常 · TsMask/face-api-demo-vue@aa2a09d · GitHub
[go: up one dir, main page]

Skip to content

Commit aa2a09d

Browse files
committed
更新正常
1 parent 88de525 commit aa2a09d

20 files changed

+11705
-3948
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
# Face-api Vue简单使用案例 face-api-demo-vue
1+
# Face-api Vue简单使用
2+
face-api-demo-vue
23

34
## 通过vue构建使用
5+
>案例含:人脸框跟踪 人脸对比(一对一) 人脸组比对(一对多)
6+
更多一些示例请浏览
7+
[作者Github](https://github.com/justadudewhohacks/face-api.js)
8+
[在线示例](https://justadudewhohacks.github.io/face-api.js)
9+
410
## Project setup 项目安装依赖
511
```
612
npm install

package-lock.json

Lines changed: 11611 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,20 @@
88
"lint": "vue-cli-service lint"
99
},
1010
"dependencies": {
11-
"face-api.js": "^0.16.1",
12-
"vue": "^2.5.17",
13-
"vue-router": "^3.0.1",
14-
"vuex": "^3.0.1",
15-
"webrtc-adapter": "^6.4.8"
11+
"face-api.js": "^0.20.0",
12+
"vue": "^2.6.10",
13+
"vue-router": "^3.0.6",
14+
"webrtc-adapter": "^7.2.3"
1615
},
1716
"devDependencies": {
18-
"@vue/cli-plugin-babel": "^3.0.4",
19-
"@vue/cli-plugin-eslint": "^3.0.4",
20-
"@vue/cli-service": "^3.0.4",
21-
"@vue/eslint-config-prettier": "^4.0.0",
17+
"@vue/cli-plugin-babel": "^3.7.0",
18+
"@vue/cli-plugin-eslint": "^3.7.0",
19+
"@vue/cli-service": "^3.7.0",
20+
"@vue/eslint-config-prettier": "^4.0.1",
2221
"babel-eslint": "^10.0.1",
23-
"eslint": "^5.8.0",
24-
"eslint-plugin-vue": "^5.0.0-0",
25-
"less": "^3.0.4",
26-
"less-loader": "^4.1.0",
27-
"vue-template-compiler": "^2.5.17"
22+
"eslint": "^5.16.0",
23+
"eslint-plugin-vue": "^5.0.0",
24+
"vue-template-compiler": "^2.5.21"
2825
},
2926
"eslintConfig": {
3027
"root": true,
0 Bytes
Binary file not shown.

public/models/face_recognition_model-shard2

Lines changed: 5 additions & 3741 deletions
Large diffs are not rendered by default.

public/models/face_recognition_model-weights_manifest.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/App.vue

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<template>
22
<div id="app">
33
<div id="nav">
4-
<router-link to="/">About</router-link>|
5-
<router-link to="/rtc">WebRTC</router-link>|
4+
<router-link to="/">关于</router-link>|
65
<router-link to="/face_comparison">两张图对比</router-link>|
76
<router-link to="/face_comparison_many">多张图对比</router-link>|
8-
<router-link to="/rtc_face_trackimg">WebRTC媒体人脸检测</router-link>
7+
<router-link to="/video_media_stream">WebRTC媒体视频流</router-link>|
8+
<router-link to="/video_media_canvas_stream">WebRTC媒体人脸框绘制检测</router-link>
99
</div>
1010
<router-view/>
1111
</div>
1212
</template>
1313

14-
<style lang="less">
14+
<style>
1515
#app {
1616
font-family: "Avenir", Helvetica, Arial, sans-serif;
1717
-webkit-font-smoothing: antialiased;
@@ -21,12 +21,12 @@
2121
}
2222
#nav {
2323
padding: 30px;
24-
a {
25-
font-weight: bold;
26-
color: #2c3e50;
27-
&.router-link-exact-active {
28-
color: #42b983;
29-
}
30-
}
24+
}
25+
a {
26+
font-weight: bold;
27+
color: #2c3e50;
28+
}
29+
a.router-link-exact-active {
30+
color: #42b983;
3131
}
3232
</style>

src/components/HelloWorld.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
<div class="hello">
33
<h1>{{ msg }}</h1>
44
<div>
5-
通过浏览作者
6-
<a href="https://github.com/justadudewhohacks/face-api.js">GitHub</a>
7-
使用说明
8-
<h5>npm i --save face-api.js </h5>
9-
<h5>npm i --save webrtc-adapter </h5>
5+
通过浏览作者示例源码,可以实现。模型文件放在public目录下,npm主要安装以下
6+
<h5>npm i --save face-api.js</h5>
7+
<h5>npm i --save webrtc-adapter</h5>
8+
<h5>如果localhost点击打不开,换127.0.0.1</h5>
109
</div>
1110
<h3>其余方法使用查阅作者doc,方法说明文件也在作者的GitHub里</h3>
1211
<h3>
13-
<a href="https://github.com/Slimmer/face-api-demo">我下载的代码实例</a> |
14-
<a href="https://github.com/justadudewhohacks/face-api.js">作者最新代码实例</a>
12+
<a href="https://github.com/Slimmer/face-api-demo">我下载的代码示例</a> |
13+
<a href="https://github.com/justadudewhohacks/face-api.js">作者最新代码示例</a>|
14+
<a href="https://justadudewhohacks.github.io/face-api.js">在线示例</a>
1515
</h3>
1616
</div>
1717
</template>
@@ -26,7 +26,7 @@ export default {
2626
</script>
2727

2828
<!-- Add "scoped" attribute to limit CSS to this component only -->
29-
<style scoped lang="less">
29+
<style scoped>
3030
h3 {
3131
margin: 40px 0 0;
3232
}

src/components/video-media-stream/index.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/main.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import Vue from "vue";
22
import App from "./App";
33
import router from "./router";
4-
import store from "./store";
54

65
Vue.config.productionTip = false;
76

87
new Vue(< 4787 /span>{
98
router,
10-
store,
119
render: h => h(App)
1210
}).$mount("#app");

0 commit comments

Comments
 (0)
0