seetafaceengine / SeetaFace2

SeetaFace 2: open source, full stack face recognization toolkit.
http://www.seetatech.com/
Other
2.14k stars 620 forks source link

example/search 运行失败,默认图片找不到人脸 #124

Open sipercai opened 2 years ago

sipercai commented 2 years ago

开启opencv = ON编译运行示例,在人脸识别模块./search中输出id = -1 输出详情 @localhost bin]$ ./search [INFO] FaceDetector: Core size: 640x480 [INFO] FaceLandmarker: Number: 5 [INFO] FaceRecognizer: Feature size: 1024 Registering... 1.jpg Registered id = -1 ----open camera----

对应代码区域 34-47行左右 `std::vector GalleryImageFilename = { "1.jpg"};

std::vector<int64_t> GalleryIndex( GalleryImageFilename.size() );
for( size_t i = 0; i < GalleryImageFilename.size(); ++i )
{
    //register face into facedatabase
    std::string &filename = GalleryImageFilename[i];
    int64_t &index = GalleryIndex[i];
    std::cerr << "Registering... " << filename << std::endl;
    seeta::cv::ImageData image = cv::imread( filename );
    auto id = engine.Register( image );
    index = id;
    std::cerr << "Registered id = " << id << std::endl;
}
std::map<int64_t, std::string> GalleryIndexMap;

`