Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
py-3d-face-reconstruction
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Richard Torenvliet
py-3d-face-reconstruction
Commits
5a5697bd
Commit
5a5697bd
authored
8 years ago
by
Richard Torenvliet
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
ssh://git.kompiler.org:10022/icyrizard/face-reconstruction
parents
ccc250b5
bf8fac8c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/reconstruction/reconstruction.py
+3
-2
3 additions, 2 deletions
src/reconstruction/reconstruction.py
src/reconstruction/texture.pyx
+0
-16
0 additions, 16 deletions
src/reconstruction/texture.pyx
src/server.py
+0
-2
0 additions, 2 deletions
src/server.py
with
3 additions
and
20 deletions
src/reconstruction/reconstruction.py
+
3
−
2
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
)
...
...
This diff is collapsed.
Click to expand it.
src/reconstruction/texture.pyx
+
0
−
16
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
],
:]
...
...
This diff is collapsed.
Click to expand it.
src/server.py
+
0
−
2
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment