内核重启(Jupyter笔记本)

2024-09-28 17:26:58 发布

您现在位置:Python中文网/ 问答频道 /正文

系统信息(版本):

  • OpenCV=>;4.5.1
  • 操作系统/平台=>;Ubuntu(版本:20.04)
  • 编译器=>;Jupyter笔记本

详细说明:

我正在尝试使用face_LBPHFaceRecognizer()训练人脸识别模型,但每次尝试使用face_recognizer.train(faces,labels)训练模型时,我的内核都会自动重新启动(内核似乎已死亡。它将自动重新启动)

代码片段:

import cv2 as cv
import numpy as np
import os

#assume that my code has required data in *faces* and *labels* variables

face_recognizer = cv.face_LBPHFaceRecognizer()

#my code runs successfully till here. but after this line kernel automatically gets restared 
face_recognizer.train(faces,labels) 

Kernel Restarting Screenshot


Tags: 模型importgt版本labelsmyascode