speak_detector.h 751 Bytes
#ifndef SPEAKCLS_DETECTOR
#define SPEALCLS_DETECTOR
#include "speakcls.h"
#include "retinaface.h"
#include "facelandmarks.h"

class SpeakDetector{
    private:
        RetinaFace face_det;
        FaceLandmarks landm_det;
        SpeakCls speak_cls;


    public:
        SpeakDetector(){};
        void init_model(string face_det_model,string landm_det_model,string speak_cls_model);
        float iou_compute(Bbox b1, Bbox b2);
        vector<vector<cv::Mat>> mouth_process(vector<vector<vector<vector<float>>>> batch_landmarks, vector<cv::Mat> batch_images);
        void image_reader(string file_path,int segment_num,vector<Mat> &bgr_frames,vector<vector<int>> &indices);

        
        void speak_recognize(string image_path);
    
};


#endif