修改创建实例方式
This commit is contained in:
@@ -16,6 +16,7 @@ from src.database.connection import db_manager
|
||||
from src.models.face_feature import SurFaceFeature, FeatureStatus
|
||||
from src.repositories.face_feature_repository import FaceFeatureRepository
|
||||
from src.face_recognition_algorithm import FaceRecognitionAlgorithm
|
||||
from src.base_face_biz import BaseFaceBiz
|
||||
|
||||
# 创建路由器
|
||||
router = APIRouter(prefix="/algorithm", tags=["algorithm"])
|
||||
@@ -95,7 +96,9 @@ def process_feature_calculation(feature_id: int) -> bool:
|
||||
|
||||
# 提取人脸特征
|
||||
try:
|
||||
feature_vector = face_algorithm.create_business().extract_face_feature(str(image_path))
|
||||
# 直接创建BaseFaceBiz实例
|
||||
face_biz = BaseFaceBiz(face_algorithm.get_app())
|
||||
feature_vector = face_biz.extract_face_feature(str(image_path))
|
||||
|
||||
if feature_vector is not None:
|
||||
# 转换为二进制数据
|
||||
|
||||
Reference in New Issue
Block a user