Skip to content

Commit

Permalink
modify demo
Browse files Browse the repository at this point in the history
  • Loading branch information
detectRecog committed Sep 20, 2018
1 parent fcc0979 commit 010b84e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions rpnet/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
help="path to the input folder")
ap.add_argument("-m", "--model", required=True,
help="path to the model file")
ap.add_argument("-s", "--store", required=True,
help="path to the store folder")
args = vars(ap.parse_args())

use_gpu = torch.cuda.is_available()
Expand All @@ -27,10 +25,6 @@
imgSize = (480, 480)
batchSize = 8 if use_gpu else 8
resume_file = str(args["model"])
sFolder = str(args["store"])
sFolder = sFolder if sFolder[-1] == '/' else sFolder + '/'
if not path.isdir(sFolder):
mkdir(sFolder)

provNum, alphaNum, adNum = 38, 25, 35
provinces = ["皖", "沪", "津", "渝", "冀", "晋", "蒙", "辽", "吉", "黑", "苏", "浙", "京", "闽", "赣", "鲁", "豫", "鄂", "湘", "粤", "桂",
Expand Down Expand Up @@ -291,3 +285,4 @@ def isEqual(labelGT, labelP):
lpn = alphabets[labelPred[1]] + ads[labelPred[2]] + ads[labelPred[3]] + ads[labelPred[4]] + ads[labelPred[5]] + ads[labelPred[6]]
cv2.putText(img, lpn, (int(left_up[0]), int(left_up[1])-20), cv2.FONT_ITALIC, 2, (0, 0, 255))
cv2.imwrite(ims[0], img)

0 comments on commit 010b84e

Please sign in to comment.