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
8c752d54
Commit
8c752d54
authored
Aug 01, 2016
by
Richard Torenvliet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactoring some namings
parent
be4ae8da
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
17 deletions
+5
-17
src/aam.py
src/aam.py
+5
-5
src/main.py
src/main.py
+0
-12
No files found.
src/aam.py
View file @
8c752d54
...
@@ -183,13 +183,13 @@ def sample_from_triangles(src, points2d_src, points2d_dst, triangles, dst):
...
@@ -183,13 +183,13 @@ def sample_from_triangles(src, points2d_src, points2d_dst, triangles, dst):
)
)
def
build_texture_feature_vectors
(
files
,
get_image_with_points
,
MeanP
oints
,
triangles
):
def
build_texture_feature_vectors
(
files
,
get_image_with_points
,
mean_p
oints
,
triangles
):
"""
"""
Args:
Args:
files (list): list files
files (list): list files
flattened (bool): Flatten the inner feature vectors, see
flattened (bool): Flatten the inner feature vectors, see
flatten_feature_vectors.
flatten_feature_vectors.
MeanP
oints(AAMPoints): AAMPoints object
mean_p
oints(AAMPoints): AAMPoints object
Returns:
Returns:
list: list of feature vectors
list: list of feature vectors
...
@@ -197,9 +197,9 @@ def build_texture_feature_vectors(files, get_image_with_points, MeanPoints, tria
...
@@ -197,9 +197,9 @@ def build_texture_feature_vectors(files, get_image_with_points, MeanPoints, tria
mean_texture
=
[]
mean_texture
=
[]
image
,
points
=
get_image_with_points
(
files
[
0
])
image
,
points
=
get_image_with_points
(
files
[
0
])
MeanP
oints
.
get_scaled_points
(
image
.
shape
)
mean_p
oints
.
get_scaled_points
(
image
.
shape
)
x
,
y
,
w_slice
,
h_slice
=
MeanP
oints
.
get_bounding_box
()
x
,
y
,
w_slice
,
h_slice
=
mean_p
oints
.
get_bounding_box
()
for
i
,
f
in
enumerate
(
files
):
for
i
,
f
in
enumerate
(
files
):
image
,
points
=
get_image_with_points
(
f
)
image
,
points
=
get_image_with_points
(
f
)
...
@@ -215,7 +215,7 @@ def build_texture_feature_vectors(files, get_image_with_points, MeanPoints, tria
...
@@ -215,7 +215,7 @@ def build_texture_feature_vectors(files, get_image_with_points, MeanPoints, tria
sample_from_triangles
(
sample_from_triangles
(
image
,
image
,
Points
.
get_scaled_points
(
image
.
shape
),
Points
.
get_scaled_points
(
image
.
shape
),
MeanP
oints
.
get_scaled_points
(
image
.
shape
),
mean_p
oints
.
get_scaled_points
(
image
.
shape
),
triangles
,
triangles
,
dst
dst
)
)
...
...
src/main.py
View file @
8c752d54
...
@@ -97,20 +97,8 @@ def save_pca_model_texture(args):
...
@@ -97,20 +97,8 @@ def save_pca_model_texture(args):
assert
args
.
model_texture_file
,
'--model_texture_file needs to be provided to save the pca model'
assert
args
.
model_texture_file
,
'--model_texture_file needs to be provided to save the pca model'
shape_model
=
pca
.
PcaModel
(
args
.
model_shape_file
)
shape_model
=
pca
.
PcaModel
(
args
.
model_shape_file
)
mean_points
=
imm
.
IMMPoints
(
points_list
=
shape_model
.
mean_values
)
mean_points
=
imm
.
IMMPoints
(
points_list
=
shape_model
.
mean_values
)
#reconstruction.reconstruct_texture(
# input_image, # src image
# input_image, # dst image
# texture_model,
# input_points, # shape points input
# mean_points, # shape points mean
#)
# old
#Vt, s, n_components, mean_shape, triangles = pca.load(args.model_shape_file)
textures
=
aam
.
build_texture_feature_vectors
(
textures
=
aam
.
build_texture_feature_vectors
(
args
.
files
,
args
.
files
,
imm
.
get_imm_image_with_landmarks
,
imm
.
get_imm_image_with_landmarks
,
...
...
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