Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
detectron
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
人工智能
detectron
Commits
c04029aa
Commit
c04029aa
authored
May 20, 2019
by
吴升宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix input
parent
7bbd00b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
infer_simple.py
tools/infer_simple.py
+11
-0
No files found.
tools/infer_simple.py
View file @
c04029aa
...
...
@@ -111,7 +111,18 @@ def main(args):
args
.
output_dir
,
'{}'
.
format
(
os
.
path
.
basename
(
im_name
)
+
'.pdf'
)
)
logger
.
info
(
'Processing {} -> {}'
.
format
(
im_name
,
out_name
))
im
=
cv2
.
imread
(
im_name
)
import
numpy
as
np
import
urllib.request
img_file
=
urllib
.
request
.
urlopen
(
im_name
)
image
=
np
.
asarray
(
bytearray
(
img_file
.
read
()),
dtype
=
"uint8"
)
image
=
cv2
.
imdecode
(
image
,
cv2
.
IMREAD_COLOR
)
im
=
image
timers
=
defaultdict
(
Timer
)
t
=
time
.
time
()
with
c2_utils
.
NamedCudaScope
(
0
):
...
...
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