Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
e8ff5cac
Commit
e8ff5cac
authored
Jun 24, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14876 from dkurt:fix_js_face_recognition_v2
parents
5620306c
d17d3b66
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
js_face_recognition.html
samples/dnn/js_face_recognition.html
+4
-3
No files found.
samples/dnn/js_face_recognition.html
View file @
e8ff5cac
...
...
@@ -3,12 +3,12 @@
<html>
<head>
<script
src=
"utils.js"
type=
"text/javascript"
></script>
<script
async
src=
"../../opencv.js"
type=
"text/javascript"
></script>
<script
src=
"../../utils.js"
type=
"text/javascript"
></script>
<script
type=
'text/javascript'
>
var
netDet
=
undefined
,
netRecogn
=
undefined
;
var
persons
=
{};
var
utils
=
new
Utils
(
''
);
//! [Run face detection model]
function
detectFaces
(
img
)
{
...
...
@@ -68,6 +68,7 @@ function recognize(face) {
//! [Recognize]
function
loadModels
(
callback
)
{
var
utils
=
new
Utils
(
''
);
var
proto
=
'https://raw.githubusercontent.com/opencv/opencv/3.4/samples/dnn/face_detector/deploy.prototxt'
;
var
weights
=
'https://raw.githubusercontent.com/opencv/opencv_3rdparty/dnn_samples_face_detector_20180205_fp16/res10_300x300_ssd_iter_140000_fp16.caffemodel'
;
var
recognModel
=
'https://raw.githubusercontent.com/pyannote/pyannote-data/master/openface.nn4.small2.v1.t7'
;
...
...
@@ -187,7 +188,7 @@ function main() {
};
// Load opencv.js
utils
.
loadOpenCv
(()
=>
{
cv
[
'onRuntimeInitialized'
]
=
()
=>
{
main
();
});
</script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment