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
53952a46
"vscode:/vscode.git/clone" did not exist on "fbed0a021093041ea602d38cd2ce7b25db08afef"
Commit
53952a46
authored
May 25, 2020
by
tink2123
Browse files
modified det reader
parent
e5a2062d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
ppocr/data/det/dataset_traversal.py
ppocr/data/det/dataset_traversal.py
+5
-0
No files found.
ppocr/data/det/dataset_traversal.py
100755 → 100644
View file @
53952a46
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#limitations under the License.
#limitations under the License.
import
os
import
os
import
sys
import
math
import
math
import
random
import
random
import
functools
import
functools
...
@@ -42,6 +43,10 @@ class TrainReader(object):
...
@@ -42,6 +43,10 @@ class TrainReader(object):
img_num
=
len
(
label_infor_list
)
img_num
=
len
(
label_infor_list
)
img_id_list
=
list
(
range
(
img_num
))
img_id_list
=
list
(
range
(
img_num
))
random
.
shuffle
(
img_id_list
)
random
.
shuffle
(
img_id_list
)
if
sys
.
platform
==
"win32"
:
print
(
"multiprocess is not fully compatible with Windows."
"num_workers will be 1."
)
self
.
num_workers
=
1
for
img_id
in
range
(
process_id
,
img_num
,
self
.
num_workers
):
for
img_id
in
range
(
process_id
,
img_num
,
self
.
num_workers
):
label_infor
=
label_infor_list
[
img_id_list
[
img_id
]]
label_infor
=
label_infor_list
[
img_id_list
[
img_id
]]
outs
=
self
.
process
(
label_infor
)
outs
=
self
.
process
(
label_infor
)
...
...
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