Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
a8d1f2db
Commit
a8d1f2db
authored
Dec 16, 2020
by
WenmuZhou
Browse files
update
parent
41c2af49
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
configs/det/det_mv3_db.yml
configs/det/det_mv3_db.yml
+2
-2
configs/det/det_r50_vd_db.yml
configs/det/det_r50_vd_db.yml
+2
-2
ppocr/losses/det_db_loss.py
ppocr/losses/det_db_loss.py
+4
-4
No files found.
configs/det/det_mv3_db.yml
View file @
a8d1f2db
...
...
@@ -5,8 +5,8 @@ Global:
print_batch_step
:
10
save_model_dir
:
./output/db_mv3/
save_epoch_step
:
1200
# evaluation is run every
5
000 iterations
after the 4000th iteration
eval_batch_step
:
[
400
0
,
5
000
]
# evaluation is run every
2
000 iterations
eval_batch_step
:
[
0
,
2
000
]
# if pretrained_model is saved in static mode, load_static_weights must set to True
load_static_weights
:
True
cal_metric_during_train
:
False
...
...
configs/det/det_r50_vd_db.yml
View file @
a8d1f2db
...
...
@@ -5,8 +5,8 @@ Global:
print_batch_step
:
10
save_model_dir
:
./output/det_r50_vd/
save_epoch_step
:
1200
# evaluation is run every
5
000 iterations
after the 4000th iteration
eval_batch_step
:
[
400
0
,
5
000
]
# evaluation is run every
2
000 iterations
eval_batch_step
:
[
0
,
2
000
]
# if pretrained_model is saved in static mode, load_static_weights must set to True
load_static_weights
:
True
cal_metric_during_train
:
False
...
...
ppocr/losses/det_db_loss.py
View file @
a8d1f2db
...
...
@@ -47,12 +47,12 @@ class DBLoss(nn.Layer):
negative_ratio
=
ohem_ratio
)
def
forward
(
self
,
predicts
,
labels
):
predicts
=
predicts
[
'maps'
]
predict
_map
s
=
predicts
[
'maps'
]
label_threshold_map
,
label_threshold_mask
,
label_shrink_map
,
label_shrink_mask
=
labels
[
1
:]
shrink_maps
=
predicts
[:,
0
,
:,
:]
threshold_maps
=
predicts
[:,
1
,
:,
:]
binary_maps
=
predicts
[:,
2
,
:,
:]
shrink_maps
=
predict
_map
s
[:,
0
,
:,
:]
threshold_maps
=
predict
_map
s
[:,
1
,
:,
:]
binary_maps
=
predict
_map
s
[:,
2
,
:,
:]
loss_shrink_maps
=
self
.
bce_loss
(
shrink_maps
,
label_shrink_map
,
label_shrink_mask
)
...
...
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