From 062e2245de82d49845b079f3a6bd00a0ef58edb8 Mon Sep 17 00:00:00 2001 From: Brainway Date: Tue, 11 Oct 2022 07:38:14 +0000 Subject: [PATCH] update ieemoo-ai-isempty.py. --- ieemoo-ai-isempty.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ieemoo-ai-isempty.py b/ieemoo-ai-isempty.py index a0a93b2..74d948b 100755 --- a/ieemoo-ai-isempty.py +++ b/ieemoo-ai-isempty.py @@ -54,7 +54,7 @@ def parse_args(model_file="../module/ieemoo-ai-isempty/model/now/emptyjudge5_che class Predictor(object): def __init__(self, args): self.args = args - self.args.device = torch.device("cuda" if torch.cuda.is_available() else "cpu") + self.args.device = torch.device("cpu") #print(self.args.device) self.args.nprocs = torch.cuda.device_count() self.cls_dict = {} @@ -121,7 +121,7 @@ def get_isempty(): #print('get date use time: {0:.2f}s'.format(getdateend - start)) pic = json_data.get("pic") - result = { } + result = {} imgdata = base64.b64decode(pic) imgdata_np = np.frombuffer(imgdata, dtype='uint8')