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
8c752d54
Commit
8c752d54
authored
8 years ago
by
Richard Torenvliet
Browse files
Options
Downloads
Patches
Plain Diff
refactoring some namings
parent
be4ae8da
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/aam.py
+5
-5
5 additions, 5 deletions
src/aam.py
src/main.py
+0
-12
0 additions, 12 deletions
src/main.py
with
5 additions
and
17 deletions
src/aam.py
+
5
−
5
View file @
8c752d54
...
...
@@ -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
,
M
ean
P
oints
,
triangles
):
def
build_texture_feature_vectors
(
files
,
get_image_with_points
,
m
ean
_p
oints
,
triangles
):
"""
Args:
files (list): list files
flattened (bool): Flatten the inner feature vectors, see
flatten_feature_vectors.
M
ean
P
oints(AAMPoints): AAMPoints object
m
ean
_p
oints(AAMPoints): AAMPoints object
Returns:
list: list of feature vectors
...
...
@@ -197,9 +197,9 @@ def build_texture_feature_vectors(files, get_image_with_points, MeanPoints, tria
mean_texture
=
[]
image
,
points
=
get_image_with_points
(
files
[
0
])
M
ean
P
oints
.
get_scaled_points
(
image
.
shape
)
m
ean
_p
oints
.
get_scaled_points
(
image
.
shape
)
x
,
y
,
w_slice
,
h_slice
=
M
ean
P
oints
.
get_bounding_box
()
x
,
y
,
w_slice
,
h_slice
=
m
ean
_p
oints
.
get_bounding_box
()
for
i
,
f
in
enumerate
(
files
):
image
,
points
=
get_image_with_points
(
f
)
...
...
@@ -215,7 +215,7 @@ def build_texture_feature_vectors(files, get_image_with_points, MeanPoints, tria
sample_from_triangles
(
image
,
Points
.
get_scaled_points
(
image
.
shape
),
M
ean
P
oints
.
get_scaled_points
(
image
.
shape
),
m
ean
_p
oints
.
get_scaled_points
(
image
.
shape
),
triangles
,
dst
)
...
...
This diff is collapsed.
Click to expand it.
src/main.py
+
0
−
12
View file @
8c752d54
...
...
@@ -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
'
shape_model
=
pca
.
PcaModel
(
args
.
model_shape_file
)
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
(
args
.
files
,
imm
.
get_imm_image_with_landmarks
,
...
...
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