Skip to content

Commit

Permalink
发布release
Browse files Browse the repository at this point in the history
  • Loading branch information
Hemerocalle committed May 31, 2024
1 parent aba48e0 commit 2700ad4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
__pycache__
.gitignore
.history
.vscode
temp
ui/ui_auto.py
models/test
test.py
release
2 changes: 1 addition & 1 deletion data.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
MODEL_EMOTION = 'models/model_emotion/fer2013_mini_XCEPTION.95-0.70.hdf5'

# 载入模型数据
CLAHE_FACE = createCLAHE(clipLimit=2.0, tileGridSize=(8, 8))
CLAHE_FACE = createCLAHE(clipLimit=4.0, tileGridSize=(8, 8))
CLASSIFIER_FACE = CascadeClassifier(MODEL_FACE)
CLASSIFIER_EMOTION = load_model(MODEL_EMOTION, compile=False)
CLASSIFIER_EMOTION_SIZE = CLASSIFIER_EMOTION.input_shape[1:3] # type: ignore
Expand Down
6 changes: 2 additions & 4 deletions visualmodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@
# 最后更新时间 2024/05/16

from math import floor
from turtle import width
from typing import Sequence
from PIL import Image as PILImage, ImageDraw
import cv2
from cv2.typing import MatLike as CVImage, Rect
from cv2.typing import MatLike as CVImage
from cv2 import COLOR_BGR2RGB, COLOR_RGB2BGR
import numpy as np
from numpy._typing import NDArray as NPImage
Expand All @@ -53,7 +51,7 @@ def __init__(self, rec: 'Recognizer') -> None:

# 从灰度图像中检测人脸
@classmethod
def getFace(cls, image: CVImage) -> Sequence[Rect]:
def getFace(cls, image: CVImage) -> list[tuple]:
# image = cv2.GaussianBlur(image, (5, 5), 0) # 高斯模糊
# image = cv2.equalizeHist(image) # 直方图均衡化
image = CLAHE_FACE.apply(image) # 局部对比度增强
Expand Down

0 comments on commit 2700ad4

Please sign in to comment.