This commit is contained in:
huangtao
2022-07-04 09:47:05 +08:00
parent f3091369af
commit 1ce3f563d2
2 changed files with 13 additions and 12 deletions

View File

@ -78,6 +78,16 @@ def get_isempty():
image_path = '../module/ieemoo-ai-zhanting/imgs/1.jpg'
file = open(image_path, 'wb')
file.write(imgdata)
# #mask
# img = cv2.imread(image_path)
# site = np.array([[[0, 1024], [0, 571], [313, 365], [949, 367], [1277, 596], [1280, 1024]]], dtype=np.int32)
# im = np.zeros(img.shape[:2], dtype="uint8")
# cv2.polylines(im, site, 1, 255)
# cv2.fillPoly(im, site, 255)
# mask = im
# masked = cv2.bitwise_or(img, img, mask=mask)
# img0 = masked
# cv2.imwrite("../module/ieemoo-ai-zhanting/imgs/1.jpg",img0)
pred = detect.detect(opt)
logger.info(pred)
#print('pred', pred)