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
4ad831ac
Commit
4ad831ac
authored
Nov 28, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FasterRCNN] fix rgb/bgr in visualization (fix #519)
parent
b2dfc734
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/FasterRCNN/train.py
examples/FasterRCNN/train.py
+1
-1
No files found.
examples/FasterRCNN/train.py
View file @
4ad831ac
...
@@ -142,12 +142,12 @@ class Model(ModelDesc):
...
@@ -142,12 +142,12 @@ class Model(ModelDesc):
fg_inds_wrt_sample
=
tf
.
reshape
(
tf
.
where
(
rcnn_labels
>
0
),
[
-
1
])
# fg inds w.r.t all samples
fg_inds_wrt_sample
=
tf
.
reshape
(
tf
.
where
(
rcnn_labels
>
0
),
[
-
1
])
# fg inds w.r.t all samples
fg_sampled_boxes
=
tf
.
gather
(
rcnn_sampled_boxes
,
fg_inds_wrt_sample
)
fg_sampled_boxes
=
tf
.
gather
(
rcnn_sampled_boxes
,
fg_inds_wrt_sample
)
# TODO move to models
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
)
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
])
fg_sampled_patches
=
tf
.
reverse
(
fg_sampled_patches
,
axis
=-
1
)
# BGR->RGB
tf
.
summary
.
image
(
'viz'
,
fg_sampled_patches
,
max_outputs
=
30
)
tf
.
summary
.
image
(
'viz'
,
fg_sampled_patches
,
max_outputs
=
30
)
matched_gt_boxes
=
tf
.
gather
(
gt_boxes
,
fg_inds_wrt_gt
)
matched_gt_boxes
=
tf
.
gather
(
gt_boxes
,
fg_inds_wrt_gt
)
...
...
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