YOLOv5 + VGG16 + FastAPI实现验证码检测识别(汉字点选型和数字运算类)
技术与实现
识别任务实现方法
数字运算类: 直接通过YOLOv5目标打标分类实现识别任务
点选汉字型: 先基于目标检测,将检测物沿检测框切割,将检测物用分类任务实现
汉字分类任务: 使用VGG16提取全连接层第一层特征用做监督分类任务
开发成FastAPI接口
汉字点选型
基于上面任务算法实现开发成fastapi 接口形式调用,检测返回数据格式
{ "code": 200, "result": { "肋": { "name": "肋", "location": [ 211, 38, 243, 69 ], "detect_score": 68.14 }, "扑": { "name": "扑", "location": [ 98, 122, 128, 155 ], "detect_score": 69.9 }, "乳": { "name": "乳", "location": [ 96, 48, 126, 79 ], "detect_score": 70.92 }, "脱": { "name": "脱", "location": [ 179, 121, 212, 154 ], "detect_score": 75.24 } }, "message": "success"}
数字运算型
{ "code": 200, "result": [ { "class": "3", "location": [ 39, 1, 53, 20 ], "score": 82.12 }, { "class": "8", "location": [ 1, 1, 15, 20 ], "score": 91.63 }, { "class": "a", "location": [ 20, 1, 34, 20 ], "score": 91.67 } ], "message": "success"}
有需求可以私聊我