Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
e9a4df1b
Commit
e9a4df1b
authored
Mar 08, 2018
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delay the use of protobuf (fix #690)
parent
6b6947fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
tensorpack/dataflow/dataset/ilsvrc.py
tensorpack/dataflow/dataset/ilsvrc.py
+3
-1
No files found.
tensorpack/dataflow/dataset/ilsvrc.py
View file @
e9a4df1b
...
...
@@ -28,10 +28,10 @@ class ILSVRCMeta(object):
dir
=
get_dataset_path
(
'ilsvrc_metadata'
)
self
.
dir
=
dir
mkdir_p
(
self
.
dir
)
self
.
caffepb
=
get_caffe_pb
()
f
=
os
.
path
.
join
(
self
.
dir
,
'synsets.txt'
)
if
not
os
.
path
.
isfile
(
f
):
self
.
_download_caffe_meta
()
self
.
caffepb
=
None
def
get_synset_words_1000
(
self
):
"""
...
...
@@ -93,6 +93,8 @@ class ILSVRCMeta(object):
Returns:
np.ndarray: per-pixel mean of shape (h, w, 3 (BGR)) in range [0, 255].
"""
if
self
.
caffepb
is
None
:
self
.
caffepb
=
get_caffe_pb
()
obj
=
self
.
caffepb
.
BlobProto
()
mean_file
=
os
.
path
.
join
(
self
.
dir
,
'imagenet_mean.binaryproto'
)
...
...
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