Commit c04029aa authored by 吴升宇's avatar 吴升宇

fix input

parent 7bbd00b5
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment