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
cea9fbc1
Commit
cea9fbc1
authored
8 years ago
by
Richard Torenvliet
Browse files
Options
Downloads
Patches
Plain Diff
Short term solution for getting files from disk, sort them
parent
25baa363
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/server.py
+7
-1
7 additions, 1 deletion
src/server.py
with
7 additions
and
1 deletion
src/server.py
+
7
−
1
View file @
cea9fbc1
...
...
@@ -32,6 +32,9 @@ class ImageWebSocketHandler(websocket.WebSocketHandler):
self
.
images
=
glob
(
'
{}/*.jpg
'
.
format
(
FACE_DB
))
self
.
asf
=
glob
(
'
{}/*.asf
'
.
format
(
FACE_DB
))
self
.
images
.
sort
()
self
.
asf
.
sort
()
# todo get from settings
model_texture_file
=
'
{}/pca_{}_texture_model.npy
'
.
format
(
FILES_DIR
,
DATASET
)
...
...
@@ -55,7 +58,7 @@ class ImageWebSocketHandler(websocket.WebSocketHandler):
return
True
def
open
(
self
):
print
(
"
Web
S
ocket opened
"
)
logger
.
info
(
"
Web
s
ocket opened
"
)
def
__return_error
(
self
,
message
):
self
.
write_message
(
json
.
dumps
(
...
...
@@ -125,6 +128,9 @@ class ApiHandler(web.RequestHandler):
def
__init__
(
self
,
*
args
,
**
kwargs
):
self
.
images
=
glob
(
'
{}/*.jpg
'
.
format
(
FACE_DB
))
self
.
asf_files
=
glob
(
'
{}/*.asf
'
.
format
(
FACE_DB
))
self
.
images
.
sort
()
self
.
asf_files
.
sort
()
web
.
RequestHandler
.
__init__
(
self
,
*
args
,
**
kwargs
)
def
set_default_headers
(
self
):
...
...
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