Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
face
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Кубота
face
Commits
ced10eae
Commit
ced10eae
authored
Feb 21, 2020
by
naah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add the way that can upload image to predict
parent
0b75923e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
0 deletions
+22
-0
imageSelectionControls.js
...ples/examples-browser/public/js/imageSelectionControls.js
+7
-0
styles.css
examples/examples-browser/public/styles.css
+9
-0
ageAndGenderRecognition.html
examples/examples-browser/views/ageAndGenderRecognition.html
+1
-0
bbtFaceRecognition.html
examples/examples-browser/views/bbtFaceRecognition.html
+1
-0
faceDetection.html
examples/examples-browser/views/faceDetection.html
+1
-0
faceExpressionRecognition.html
...les/examples-browser/views/faceExpressionRecognition.html
+1
-0
faceExtraction.html
examples/examples-browser/views/faceExtraction.html
+1
-0
faceLandmarkDetection.html
examples/examples-browser/views/faceLandmarkDetection.html
+1
-0
No files found.
examples/examples-browser/public/js/imageSelectionControls.js
View file @
ced10eae
...
@@ -10,6 +10,13 @@ async function loadImageFromUrl(url) {
...
@@ -10,6 +10,13 @@ async function loadImageFromUrl(url) {
updateResults
()
updateResults
()
}
}
async
function
loadImageFromUpload
()
{
const
imgFile
=
$
(
'#queryImgUploadInput'
).
get
(
0
).
files
[
0
]
const
img
=
await
faceapi
.
bufferToImage
(
imgFile
)
$
(
'#inputImg'
).
get
(
0
).
src
=
img
.
src
updateResults
()
}
function
renderImageSelectList
(
selectListId
,
onChange
,
initialValue
,
withFaceExpressionImages
)
{
function
renderImageSelectList
(
selectListId
,
onChange
,
initialValue
,
withFaceExpressionImages
)
{
let
images
=
[
1
,
2
,
3
,
4
,
5
].
map
(
idx
=>
`bbt
${
idx
}
.jpg`
)
let
images
=
[
1
,
2
,
3
,
4
,
5
].
map
(
idx
=>
`bbt
${
idx
}
.jpg`
)
...
...
examples/examples-browser/public/styles.css
View file @
ced10eae
...
@@ -73,4 +73,12 @@
...
@@ -73,4 +73,12 @@
#facesContainer
canvas
{
#facesContainer
canvas
{
margin
:
10px
;
margin
:
10px
;
}
input
[
type
=
"file"
]
::-webkit-file-upload-button
{
background
:
#26a69a
;
border
:
1px
solid
gray
;
cursor
:
pointer
;
color
:
#fff
;
border-radius
:
.2em
;
}
}
\ No newline at end of file
examples/examples-browser/views/ageAndGenderRecognition.html
View file @
ced10eae
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
>
>
Ok
Ok
</button>
</button>
<input
id=
"queryImgUploadInput"
type=
"file"
class=
"waves-effect btn bold"
onchange=
"loadImageFromUpload()"
accept=
".jpg, .jpeg, .png"
>
<!-- image_selection_control -->
<!-- image_selection_control -->
</div>
</div>
...
...
examples/examples-browser/views/bbtFaceRecognition.html
View file @
ced10eae
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
>
>
Ok
Ok
</button>
</button>
<input
id=
"queryImgUploadInput"
type=
"file"
class=
"waves-effect btn bold"
onchange=
"loadImageFromUpload()"
accept=
".jpg, .jpeg, .png"
>
<div
id=
"image_selection_control"
></div>
<div
id=
"image_selection_control"
></div>
<!-- image_selection_control -->
<!-- image_selection_control -->
...
...
examples/examples-browser/views/faceDetection.html
View file @
ced10eae
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
>
>
Ok
Ok
</button>
</button>
<input
id=
"queryImgUploadInput"
type=
"file"
class=
"waves-effect btn bold"
onchange=
"loadImageFromUpload()"
accept=
".jpg, .jpeg, .png"
>
<!-- image_selection_control -->
<!-- image_selection_control -->
</div>
</div>
...
...
examples/examples-browser/views/faceExpressionRecognition.html
View file @
ced10eae
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
>
>
Ok
Ok
</button>
</button>
<input
id=
"queryImgUploadInput"
type=
"file"
class=
"waves-effect btn bold"
onchange=
"loadImageFromUpload()"
accept=
".jpg, .jpeg, .png"
>
<!-- image_selection_control -->
<!-- image_selection_control -->
</div>
</div>
...
...
examples/examples-browser/views/faceExtraction.html
View file @
ced10eae
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
>
>
Ok
Ok
</button>
</button>
<input
id=
"queryImgUploadInput"
type=
"file"
class=
"waves-effect btn bold"
onchange=
"loadImageFromUpload()"
accept=
".jpg, .jpeg, .png"
>
<!-- image_selection_control -->
<!-- image_selection_control -->
</div>
</div>
...
...
examples/examples-browser/views/faceLandmarkDetection.html
View file @
ced10eae
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
>
>
Ok
Ok
</button>
</button>
<input
id=
"queryImgUploadInput"
type=
"file"
class=
"waves-effect btn bold"
onchange=
"loadImageFromUpload()"
accept=
".jpg, .jpeg, .png"
>
<!-- image_selection_control -->
<!-- image_selection_control -->
</div>
</div>
...
...
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