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
15b35d95
You need to sign in or sign up before continuing.
Commit
15b35d95
authored
Nov 15, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FasterRCNN] disable cropsize bug and disable fork
parent
d0cb0ede
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
examples/FasterRCNN/data.py
examples/FasterRCNN/data.py
+1
-1
examples/FasterRCNN/model.py
examples/FasterRCNN/model.py
+1
-0
examples/FasterRCNN/train.py
examples/FasterRCNN/train.py
+2
-2
No files found.
examples/FasterRCNN/data.py
View file @
15b35d95
...
@@ -267,7 +267,7 @@ def get_eval_dataflow():
...
@@ -267,7 +267,7 @@ def get_eval_dataflow():
assert
im
is
not
None
,
fname
assert
im
is
not
None
,
fname
return
im
return
im
ds
=
MapDataComponent
(
ds
,
f
,
0
)
ds
=
MapDataComponent
(
ds
,
f
,
0
)
ds
=
PrefetchDataZMQ
(
ds
,
1
)
#
ds = PrefetchDataZMQ(ds, 1)
return
ds
return
ds
...
...
examples/FasterRCNN/model.py
View file @
15b35d95
...
@@ -306,6 +306,7 @@ def crop_and_resize(image, boxes, box_ind, crop_size):
...
@@ -306,6 +306,7 @@ def crop_and_resize(image, boxes, box_ind, crop_size):
Returns:
Returns:
n,C,size,size
n,C,size,size
"""
"""
assert
isinstance
(
crop_size
,
int
),
crop_size
@
under_name_scope
()
@
under_name_scope
()
def
transform_fpcoor_for_tf
(
boxes
,
image_shape
,
crop_shape
):
def
transform_fpcoor_for_tf
(
boxes
,
image_shape
,
crop_shape
):
"""
"""
...
...
examples/FasterRCNN/train.py
View file @
15b35d95
...
@@ -119,7 +119,7 @@ class Model(ModelDesc):
...
@@ -119,7 +119,7 @@ class Model(ModelDesc):
with
tf
.
name_scope
(
'fg_sample_patch_viz'
):
with
tf
.
name_scope
(
'fg_sample_patch_viz'
):
fg_sampled_patches
=
crop_and_resize
(
fg_sampled_patches
=
crop_and_resize
(
image
,
fg_sampled_boxes
,
image
,
fg_sampled_boxes
,
tf
.
zeros_like
(
fg_inds_wrt_sample
,
dtype
=
tf
.
int32
),
[
300
,
300
]
)
tf
.
zeros_like
(
fg_inds_wrt_sample
,
dtype
=
tf
.
int32
),
300
)
fg_sampled_patches
=
tf
.
transpose
(
fg_sampled_patches
,
[
0
,
2
,
3
,
1
])
fg_sampled_patches
=
tf
.
transpose
(
fg_sampled_patches
,
[
0
,
2
,
3
,
1
])
tf
.
summary
.
image
(
'viz'
,
fg_sampled_patches
,
max_outputs
=
30
)
tf
.
summary
.
image
(
'viz'
,
fg_sampled_patches
,
max_outputs
=
30
)
...
@@ -308,7 +308,7 @@ if __name__ == '__main__':
...
@@ -308,7 +308,7 @@ if __name__ == '__main__':
cfg
=
TrainConfig
(
cfg
=
TrainConfig
(
model
=
Model
(),
model
=
Model
(),
data
flow
=
get_train_dataflow
(
),
data
=
QueueInput
(
get_train_dataflow
()
),
callbacks
=
[
callbacks
=
[
PeriodicTrigger
(
ModelSaver
(),
every_k_epochs
=
5
),
PeriodicTrigger
(
ModelSaver
(),
every_k_epochs
=
5
),
# linear warmup
# linear warmup
...
...
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