Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
deepdraw
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
medai
software
deepdraw
Commits
4364dd69
Commit
4364dd69
authored
4 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[data.stare] Make loader pickle-able
parent
a57676d0
No related branches found
No related tags found
No related merge requests found
Pipeline
#41192
passed
4 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/ip/binseg/data/stare/__init__.py
+9
-8
9 additions, 8 deletions
bob/ip/binseg/data/stare/__init__.py
with
9 additions
and
8 deletions
bob/ip/binseg/data/stare/__init__.py
+
9
−
8
View file @
4364dd69
...
@@ -44,21 +44,22 @@ _root_path = bob.extension.rc.get(
...
@@ -44,21 +44,22 @@ _root_path = bob.extension.rc.get(
)
)
def
_make_loader
(
root_path
)
:
class
_make_loader
:
#hack to get testing on the CI working fine for this dataset
#hack to get testing on the CI working fine for this dataset
def
_raw_data_loader
(
sample
):
def
__init__
(
self
,
root_path
):
self
.
root_path
=
root_path
def
__raw_data_loader__
(
self
,
sample
):
return
dict
(
return
dict
(
data
=
load_pil_rgb
(
os
.
path
.
join
(
root_path
,
sample
[
"
data
"
])),
data
=
load_pil_rgb
(
os
.
path
.
join
(
self
.
root_path
,
sample
[
"
data
"
])),
label
=
load_pil_1
(
os
.
path
.
join
(
root_path
,
sample
[
"
label
"
])),
label
=
load_pil_1
(
os
.
path
.
join
(
self
.
root_path
,
sample
[
"
label
"
])),
)
)
def
_
loader
(
context
,
sample
):
def
_
_call__
(
self
,
context
,
sample
):
# "context" is ignored in this case - database is homogeneous
# "context" is ignored in this case - database is homogeneous
# we returned delayed samples to avoid loading all images at once
# we returned delayed samples to avoid loading all images at once
return
make_delayed
(
sample
,
_raw_data_loader
)
return
make_delayed
(
sample
,
self
.
__raw_data_loader__
)
return
_loader
def
_make_dataset
(
root_path
):
def
_make_dataset
(
root_path
):
...
...
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