Ask Your Question
0

Merging / Combining separately trained LBPH models

asked 2018-02-16 03:09:11 -0600

jms gravatar image

If I have trained a LBPHFaceRecognizer for different faces and stored the result in separate xml files, is ist possible for LBPHFaceRecognizer to read the separate model files and combine them for prediction? When I look into the LBPHFaceRecognizer xml files, I see that the persons (labels) are stored separate anyway. So it should be possible to write a program that can combine these files into one. But it would be nicer if the LBPHFaceRecognizer could do it.

edit retag flag offensive close merge delete

Comments

So it should be possible to write a program that can combine these files into one

indeed. see src code

But it would be nicer if the LBPHFaceRecognizer could do it.

that's unlikely to happen, given the current interfaces (and it won't be possible for fisher/eigenfaces)

berak gravatar imageberak ( 2018-02-16 04:16:48 -0600 )edit

however, if you do decide to write something like this, please consider contributing it to the community!

StevenPuttemans gravatar imageStevenPuttemans ( 2018-02-16 04:21:29 -0600 )edit

Sure I would like to write a module for combining multiple xml models, but in python a LBPHFaceRecognizer cannot read from a string or from a file handle. So the LBPHFaceRecognizer only can read from a real file (or maybe from a pipe). Also there is no function setHistograms(). So the only way to implement this is to read multiple model files, merge them and write them out to a file. This is clumsy and not what I need.

jms gravatar imagejms ( 2018-02-16 06:41:40 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-02-16 06:51:46 -0600

berak gravatar image

"So the only way to implement this is to read multiple model files, merge them and write them out to a file." -- exactly.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-02-16 03:09:11 -0600

Seen: 290 times

Last updated: Feb 16 '18