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
a9864bf0
You need to sign in or sign up before continuing.
Commit
a9864bf0
authored
Nov 17, 2018
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small changes; fix travis
parent
c4897600
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
9 deletions
+11
-9
.travis.yml
.travis.yml
+3
-3
examples/FasterRCNN/model_frcnn.py
examples/FasterRCNN/model_frcnn.py
+2
-2
tensorpack/dataflow/imgaug/__init__.py
tensorpack/dataflow/imgaug/__init__.py
+1
-0
tensorpack/dataflow/imgaug/external.py
tensorpack/dataflow/imgaug/external.py
+4
-4
tensorpack/libinfo.py
tensorpack/libinfo.py
+1
-0
No files found.
.travis.yml
View file @
a9864bf0
...
@@ -26,10 +26,10 @@ matrix:
...
@@ -26,10 +26,10 @@ matrix:
env
:
TF_VERSION=1.3.0 TF_TYPE=release
env
:
TF_VERSION=1.3.0 TF_TYPE=release
-
os
:
linux
-
os
:
linux
python
:
2.7
python
:
2.7
env
:
TF_VERSION=1.1
0
.0 TF_TYPE=release
env
:
TF_VERSION=1.1
2
.0 TF_TYPE=release
-
os
:
linux
-
os
:
linux
python
:
3.6
python
:
3.6
env
:
TF_VERSION=1.1
0
.0 TF_TYPE=release PYPI=true
env
:
TF_VERSION=1.1
2
.0 TF_TYPE=release PYPI=true
-
os
:
linux
-
os
:
linux
python
:
2.7
python
:
2.7
env
:
TF_TYPE=nightly
env
:
TF_TYPE=nightly
...
@@ -43,7 +43,7 @@ install:
...
@@ -43,7 +43,7 @@ install:
-
pip install -U pip
# the pip version on travis is too old
-
pip install -U pip
# the pip version on travis is too old
-
pip install .
-
pip install .
-
pip install flake8 scikit-image opencv-python lmdb h5py msgpack
-
pip install flake8 scikit-image opencv-python lmdb h5py msgpack
# check that dataflow can be imported alone
# check that dataflow can be imported alone
without tensorflow
-
python -c "import tensorpack.dataflow"
-
python -c "import tensorpack.dataflow"
-
./tests/install-tensorflow.sh
-
./tests/install-tensorflow.sh
...
...
examples/FasterRCNN/model_frcnn.py
View file @
a9864bf0
...
@@ -222,9 +222,9 @@ def fastrcnn_predictions(boxes, scores):
...
@@ -222,9 +222,9 @@ def fastrcnn_predictions(boxes, scores):
return
mask
return
mask
# TF bug in version 1.11, 1.12: https://github.com/tensorflow/tensorflow/issues/22750
# TF bug in version 1.11, 1.12: https://github.com/tensorflow/tensorflow/issues/22750
parallel
=
1
if
(
get_tf_version_tuple
()
in
[(
1
,
11
),
(
1
,
12
)])
else
10
buggy_tf
=
get_tf_version_tuple
()
in
[(
1
,
11
),
(
1
,
12
)]
masks
=
tf
.
map_fn
(
f
,
(
scores
,
boxes
),
dtype
=
tf
.
bool
,
masks
=
tf
.
map_fn
(
f
,
(
scores
,
boxes
),
dtype
=
tf
.
bool
,
parallel_iterations
=
parallel
)
# #cat x N
parallel_iterations
=
1
if
buggy_tf
else
10
)
# #cat x N
selected_indices
=
tf
.
where
(
masks
)
# #selection x 2, each is (cat_id, box_id)
selected_indices
=
tf
.
where
(
masks
)
# #selection x 2, each is (cat_id, box_id)
scores
=
tf
.
boolean_mask
(
scores
,
masks
)
scores
=
tf
.
boolean_mask
(
scores
,
masks
)
...
...
tensorpack/dataflow/imgaug/__init__.py
View file @
a9864bf0
...
@@ -16,6 +16,7 @@ if STATICA_HACK:
...
@@ -16,6 +16,7 @@ if STATICA_HACK:
from
.noise
import
*
from
.noise
import
*
from
.paste
import
*
from
.paste
import
*
from
.transform
import
*
from
.transform
import
*
from
.external
import
*
import
os
import
os
...
...
tensorpack/dataflow/imgaug/external.py
View file @
a9864bf0
...
@@ -33,12 +33,12 @@ class IAAugmentor(ImageAugmentor):
...
@@ -33,12 +33,12 @@ class IAAugmentor(ImageAugmentor):
def
_get_augment_params
(
self
,
img
):
def
_get_augment_params
(
self
,
img
):
return
(
self
.
_aug
.
to_deterministic
(),
img
.
shape
)
return
(
self
.
_aug
.
to_deterministic
(),
img
.
shape
)
def
_augment
(
self
,
img
,
p
):
def
_augment
(
self
,
img
,
p
aram
):
aug
,
_
=
p
aug
,
_
=
p
aram
return
aug
.
augment_image
(
img
)
return
aug
.
augment_image
(
img
)
def
_augment_coords
(
self
,
coords
,
p
):
def
_augment_coords
(
self
,
coords
,
p
aram
):
aug
,
shape
=
p
aug
,
shape
=
p
aram
points
=
[
IA
.
Keypoint
(
x
=
x
,
y
=
y
)
for
x
,
y
in
coords
]
points
=
[
IA
.
Keypoint
(
x
=
x
,
y
=
y
)
for
x
,
y
in
coords
]
points
=
IA
.
KeypointsOnImage
(
points
,
shape
=
shape
)
points
=
IA
.
KeypointsOnImage
(
points
,
shape
=
shape
)
augmented
=
aug
.
augment_keypoints
([
points
])[
0
]
.
keypoints
augmented
=
aug
.
augment_keypoints
([
points
])[
0
]
.
keypoints
...
...
tensorpack/libinfo.py
View file @
a9864bf0
...
@@ -6,6 +6,7 @@ os.environ['OPENCV_OPENCL_RUNTIME'] = 'disabled' # https://github.com/opencv
...
@@ -6,6 +6,7 @@ os.environ['OPENCV_OPENCL_RUNTIME'] = 'disabled' # https://github.com/opencv
try
:
try
:
# issue#1924 may happen on old systems
# issue#1924 may happen on old systems
import
cv2
# noqa
import
cv2
# noqa
# cv2.setNumThreads(0)
if
int
(
cv2
.
__version__
.
split
(
'.'
)[
0
])
==
3
:
if
int
(
cv2
.
__version__
.
split
(
'.'
)[
0
])
==
3
:
cv2
.
ocl
.
setUseOpenCL
(
False
)
cv2
.
ocl
.
setUseOpenCL
(
False
)
# check if cv is built with cuda or openmp
# check if cv is built with cuda or openmp
...
...
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