In Face Recognition, what exactly should the buffer be when serializing models?

In Face Recognition, what exactly should the buffer be when serializing models?

Assume we want to build a large lib of many people's face models, and do recognition in real-time manner, the manual suggest serialize them, see below.

My question is, what's the buffer size should be to make a good use of memory. in experiments I've done, even if the buffer_size is set to 10KB, it's not enough, it's so memory consuming, don't you think? What will be the way to get the very valuable features of a person's face using PXC SDK?

 
const size_t buffer_size = 100000;
PXCFaceAnalysis::Recognition::Model *ref = createModelFromImage(image1);
pxcBYTE *buffer = new pxcBYTE[buffer_size];
ref->Serialize(buffer);

3 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项

The model size is stored in PXCFaceAnalysis::Recognition::ProfileInfo.modelSize
you can always call a QueryProfile(profileInfo) to get the profileInfo after the model is created.
See the example below:

PXCFaceAnalysis::Recognition::Model *models;
faceRecognizer->CreateModel(fid, &models);

PXCFaceAnalysis::Recognition::ProfileInfo rInfo;
faceRecognizer->QueryProfile(&rInfo);

pxcBYTE *modelBuf = new pxcBYTE[rInfo.modelSize];
models->Serialize(modelBuf);

Quote:

N. Sadaka (Intel) wrote:

The model size is stored in PXCFaceAnalysis::Recognition::ProfileInfo.modelSize
you can always call a QueryProfile(profileInfo) to get the profileInfo after the model is created.
See the example below:

PXCFaceAnalysis::Recognition::Model *models;
faceRecognizer->CreateModel(fid, &models);

PXCFaceAnalysis::Recognition::ProfileInfo rInfo;
faceRecognizer->QueryProfile(&rInfo);

pxcBYTE *modelBuf = new pxcBYTE[rInfo.modelSize];
models->Serialize(modelBuf);

Can I access the content of the face model? I want to build my own indexing database for the stored models when in a practical case the name database will be very large and the correspoding models should be compared effectively(in real-time), the modelSize is prefered to be the same and as small  as possible in order to be stored conveniently.

Thanks!

登陆并发表评论。