Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
py-3d-face-reconstruction
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
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
Richard Torenvliet
py-3d-face-reconstruction
Commits
5a5697bd
Commit
5a5697bd
authored
Nov 14, 2016
by
Richard Torenvliet
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://git.kompiler.org:10022/icyrizard/face-reconstruction
parents
ccc250b5
bf8fac8c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
20 deletions
+3
-20
src/reconstruction/reconstruction.py
src/reconstruction/reconstruction.py
+3
-2
src/reconstruction/texture.pyx
src/reconstruction/texture.pyx
+0
-16
src/server.py
src/server.py
+0
-2
No files found.
src/reconstruction/reconstruction.py
View file @
5a5697bd
...
...
@@ -160,7 +160,7 @@ def reconstruct_shape_texture(dataset_name, shape_model, texture_model,
else
:
dst_image
=
input_image
# get the location of the landmarks in a list of [x,
y, ...
x_n, y_n]
# get the location of the landmarks in a list of [x,
y, ...,
x_n, y_n]
output_points
=
dataset_module
.
factory
(
points_list
=
input_points
.
get_points
()
)
...
...
@@ -168,7 +168,7 @@ def reconstruct_shape_texture(dataset_name, shape_model, texture_model,
# get the pca components (ie., V^T)
shape_Vt
=
shape_model
.
Vt
# if a eigen value multiplier array is given, scale the Vt with this.
# if a
n
eigen value multiplier array is given, scale the Vt with this.
# the chosen PCA components will have more impact then others.
if
len
(
shape_eigenvalues_multiplier
):
shape_Vt
=
scale_eigenvalues
(
shape_Vt
,
shape_eigenvalues_multiplier
)
...
...
@@ -177,6 +177,7 @@ def reconstruct_shape_texture(dataset_name, shape_model, texture_model,
reconstruct_shape
(
output_points
,
shape_model
,
n_components
=
shape_components
,
shape_Vt
=
shape_Vt
# overwrite by scaled Vt
)
...
...
src/reconstruction/texture.pyx
View file @
5a5697bd
...
...
@@ -169,22 +169,6 @@ def fill_triangle_src_dst(np.ndarray[unsigned char, ndim=3] src,
dst_loc
,
src_loc
)
#max_dim_y: 188 104.592903137 316 True
#max_dim_x: 201 188.147247314 357 True
#IndexError: index 188 is out of bounds for axis 1 with size 188
#print 'max_dim_y: ', max_dim_y, src_loc[1], y, src_loc[1] < max_dim_y
#print 'max_dim_x: ', max_dim_x, src_loc[0], x, src_loc[0] < max_dim_x
#print 'together:', src_loc[1] < max_dim_y and src_loc[0] < max_dim_x
#if src_loc[1] < src_max_dim_y and src_loc[0] < src_max_dim_x:
# print 'yo'
# print src_loc[1], src_loc[0]
# print y, x
# print dst_max_dim_y
# print dst_max_dim_x
# print src_max_dim_y
# print src_max_dim_x
if
src_loc
[
1
]
<
src_max_dim_y
and
src_loc
[
0
]
<
src_max_dim_x
\
and
y
<
dst_max_dim_y
and
x
<
dst_max_dim_x
:
dst
[
y
,
x
,
:]
=
src
[
src_loc
[
1
],
src_loc
[
0
],
:]
...
...
src/server.py
View file @
5a5697bd
...
...
@@ -70,8 +70,6 @@ class ImageWebSocketHandler(websocket.WebSocketHandler):
image_as_background
=
message
.
get
(
'background_image'
,
True
)
shape_components
=
message
.
get
(
'shape_components'
,
58
)
shape_eigenvalues_multiplier
=
message
.
get
(
'shape_eigenvalues'
)
#image = message.get('image')
#input_image = base64.b64decode(image)
logger
.
info
(
'using %s shape_components'
,
shape_components
)
...
...
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