Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
bob.ip.tensorflow_extractor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
bob.ip.tensorflow_extractor
Commits
ebc1aa4a
Commit
ebc1aa4a
authored
May 14, 2019
by
Amir MOHAMMADI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the same keypoint names as bob.ip.mtcnn (cafe implementation)
parent
e7aa5899
Pipeline
#30177
passed with stage
in 14 minutes and 31 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
19 deletions
+20
-19
bob/ip/tensorflow_extractor/MTCNN.py
bob/ip/tensorflow_extractor/MTCNN.py
+5
-5
bob/ip/tensorflow_extractor/data/mtcnn/mtcnn.json
bob/ip/tensorflow_extractor/data/mtcnn/mtcnn.json
+12
-12
bob/ip/tensorflow_extractor/test.py
bob/ip/tensorflow_extractor/test.py
+1
-0
doc/plot/detect_faces_mtcnn.py
doc/plot/detect_faces_mtcnn.py
+2
-2
No files found.
bob/ip/tensorflow_extractor/MTCNN.py
View file @
ebc1aa4a
...
...
@@ -93,7 +93,7 @@ class MTCNN:
list
A list of annotations. Annotations are dictionaries that contain the
following keys: ``topleft``, ``bottomright``, ``reye``, ``leye``, ``nose``,
``
right_of_mouth``, ``left_of_mouth
``, and ``quality``.
``
mouthright``, ``mouthleft
``, and ``quality``.
"""
boxes
,
scores
,
landmarks
=
self
.
detect
(
img
)
annots
=
[]
...
...
@@ -103,8 +103,8 @@ class MTCNN:
right_eye
=
lm
[
0
],
lm
[
5
]
left_eye
=
lm
[
1
],
lm
[
6
]
nose
=
lm
[
2
],
lm
[
7
]
right_of_mouth
=
lm
[
3
],
lm
[
8
]
left_of_mouth
=
lm
[
4
],
lm
[
9
]
mouthright
=
lm
[
3
],
lm
[
8
]
mouthleft
=
lm
[
4
],
lm
[
9
]
annots
.
append
(
{
"topleft"
:
topleft
,
...
...
@@ -112,8 +112,8 @@ class MTCNN:
"reye"
:
right_eye
,
"leye"
:
left_eye
,
"nose"
:
nose
,
"
right_of_mouth"
:
right_of_mouth
,
"
left_of_mouth"
:
left_of_mouth
,
"
mouthright"
:
mouthright
,
"
mouthleft"
:
mouthleft
,
"quality"
:
prob
,
}
)
...
...
bob/ip/tensorflow_extractor/data/mtcnn/mtcnn.json
View file @
ebc1aa4a
...
...
@@ -20,11 +20,11 @@
81.764984
,
136.25734
],
"
right_of_mouth
"
:
[
"
mouthright
"
:
[
88.05158
,
128.52052
],
"
left_of_mouth
"
:
[
"
mouthleft
"
:
[
84.64868
,
150.7494
],
...
...
@@ -51,11 +51,11 @@
71.690926
,
454.36282
],
"
right_of_mouth
"
:
[
"
mouthright
"
:
[
75.266556
,
438.5781
],
"
left_of_mouth
"
:
[
"
mouthleft
"
:
[
82.32741
,
454.99423
],
...
...
@@ -82,11 +82,11 @@
104.02164
,
56.380474
],
"
right_of_mouth
"
:
[
"
mouthright
"
:
[
111.99057
,
49.277725
],
"
left_of_mouth
"
:
[
"
mouthleft
"
:
[
104.45787
,
69.476105
],
...
...
@@ -113,11 +113,11 @@
138.73158
,
257.6499
],
"
right_of_mouth
"
:
[
"
mouthright
"
:
[
142.67319
,
246.85234
],
"
left_of_mouth
"
:
[
"
mouthleft
"
:
[
143.5627
,
267.6805
],
...
...
@@ -144,11 +144,11 @@
86.6857
,
344.3223
],
"
right_of_mouth
"
:
[
"
mouthright
"
:
[
94.80564
,
331.12646
],
"
left_of_mouth
"
:
[
"
mouthleft
"
:
[
96.63391
,
351.96518
],
...
...
@@ -175,11 +175,11 @@
151.32994
,
182.92662
],
"
right_of_mouth
"
:
[
"
mouthright
"
:
[
159.72272
,
175.2344
],
"
left_of_mouth
"
:
[
"
mouthleft
"
:
[
156.25536
,
193.2938
],
...
...
bob/ip/tensorflow_extractor/test.py
View file @
ebc1aa4a
...
...
@@ -90,6 +90,7 @@ def test_mtcnn():
annots
=
mtcnn
.
annotations
(
img
)
ref_annots
=
json
.
load
(
open
(
ref_annots
))
assert
len
(
annots
)
==
len
(
ref_annots
),
(
len
(
annots
),
len
(
ref_annots
))
for
a
,
aref
in
zip
(
annots
,
ref_annots
):
for
k
,
v
in
a
.
items
():
vref
=
aref
[
k
]
...
...
doc/plot/detect_faces_mtcnn.py
View file @
ebc1aa4a
...
...
@@ -35,8 +35,8 @@ for annotations in detections:
(
"reye"
,
"r"
),
(
"leye"
,
"g"
),
(
"nose"
,
"b"
),
(
"
right_of_mouth
"
,
"k"
),
(
"
left_of_mouth
"
,
"w"
),
(
"
mouthright
"
,
"k"
),
(
"
mouthleft
"
,
"w"
),
):
plt
.
gca
().
add_patch
(
Circle
(
...
...
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