Skip to content
Snippets Groups Projects
Commit c2f51902 authored by Hyunseok_Sang's avatar Hyunseok_Sang
Browse files

안면인식 관련 컨트롤러 추가

parent 759636d0
Branches
No related tags found
No related merge requests found
from flask import Blueprint, request, jsonify
from services.face_detection_service import FaceDetectionService
face_controller = Blueprint('face', __name__)
@face_controller.route('/detectFaceLocation', methods=['POST'])
def detect_face_location():
if 'image_data' not in request.files:
return jsonify({'error': 'no image'}), 400
image_bytes = request.files['image_data'].read()
face_data_list = FaceDetectionService().detect_faces(image_bytes)
return jsonify(face_data_list)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment