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
dd32d0f6
"composable_kernel/include/utility/sequence.hpp" did not exist on "19f17df47a2d814cab40b75027cbcac0c544932f"
Unverified
Commit
dd32d0f6
authored
Jul 25, 2020
by
shaohua.zhang
Committed by
GitHub
Jul 25, 2020
Browse files
Update dataset_traversal.py
parent
65042ff6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
ppocr/data/det/dataset_traversal.py
ppocr/data/det/dataset_traversal.py
+8
-8
No files found.
ppocr/data/det/dataset_traversal.py
View file @
dd32d0f6
...
...
@@ -38,14 +38,14 @@ class TrainReader(object):
def
__call__
(
self
,
process_id
):
with
open
(
self
.
label_file_path
,
"rb"
)
as
fin
:
label_infor_list
=
fin
.
readlines
()
img_num
=
len
(
label_infor_list
)
img_id_list
=
list
(
range
(
img_num
))
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
label_infor_list
=
fin
.
readlines
()
img_num
=
len
(
label_infor_list
)
img_id_list
=
list
(
range
(
img_num
))
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
def
sample_iter_reader
():
for
img_id
in
range
(
process_id
,
img_num
,
self
.
num_workers
):
...
...
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