12345678910111213141516171819202122 |
- from hitCaptcha.detect.yolo import YOLO
- import PIL
- if __name__=="__main__":
- YL = YOLO()
- list_anno = []
- with open("detectVal.txt","r") as f:
- while True:
- _line = f.readline()
- if not _line:
- break
- _line = _line.split(" ")
- list_anno.append([_line[0],_line[1]])
- img_path = "F:\Workspace2016\BIDI_CAPTCHA\hitCaptcha\detect/data/ab6ee72e4bb142678f2e3fd66e294209.jpg"
- img_path1 = "F:\Workspace2016\BIDI_CAPTCHA\hitCaptcha\detect/data/f722335f224c4b698b8470d0582b649e.jpg"
- for img_path,img_path1 in list_anno:
- image = PIL.Image.open(img_path)
- image1 = PIL.Image.open(img_path1)
- YL.detect_image(img_path,(352,352),img_path1,(40,20))
- # image.show()
- # break
|