优化批量涂抹测试
This commit is contained in:
@@ -6,12 +6,23 @@ from photo_mask_error_check import check_error
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
session = MysqlSession()
|
session = MysqlSession()
|
||||||
|
# 对涂抹错误的进行测试比较
|
||||||
ocr_errors = (session.query(ZxIeOcrerror.pk_phrec, ZxIeOcrerror.cXm, ZxIeOcrerror.cSfzh, ZxIeOcrerror.cfjaddress)
|
ocr_errors = (session.query(ZxIeOcrerror.pk_phrec, ZxIeOcrerror.cXm, ZxIeOcrerror.cSfzh, ZxIeOcrerror.cfjaddress)
|
||||||
.filter(ZxIeOcrerror.checktime.is_(None)).order_by(ZxIeOcrerror.pk_phrec.desc()).limit(50).all())
|
.filter(ZxIeOcrerror.checktime.is_(None)).order_by(ZxIeOcrerror.pk_phrec.desc()).limit(50).all())
|
||||||
|
|
||||||
|
# 对已涂抹的进行测试比较
|
||||||
|
# ocr_errors = (session.query(ZxPhrec.pk_phrec, ZxPhhd.cXm, ZxPhhd.cSfzh, ZxPhrec.cfjaddress)
|
||||||
|
# .join(ZxPhrec, ZxPhhd.pk_phhd == ZxPhrec.pk_phhd, isouter=True)
|
||||||
|
# .filter(ZxPhhd.paint_flag >= '8')
|
||||||
|
# .order_by(ZxPhrec.pk_phrec.desc())
|
||||||
|
# .limit(50).all())
|
||||||
session.close()
|
session.close()
|
||||||
|
|
||||||
for ocr_error in ocr_errors:
|
for ocr_error in ocr_errors:
|
||||||
image = check_error(ocr_error)
|
try:
|
||||||
if image is None:
|
image = check_error(ocr_error)
|
||||||
continue
|
if image is None:
|
||||||
cv2.imwrite(f"./mask_optimization_result/{ocr_error.cfjaddress}.jpg", image)
|
continue
|
||||||
|
cv2.imwrite(f"./mask_optimization_result/{ocr_error.cfjaddress}.jpg", image)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
|||||||
Reference in New Issue
Block a user