Ask Your Question
0

I can save the model. However, I get a Segmentation fault when I try to read the model from the save file.

asked 2018-06-07 15:36:29 -0500

updated 2018-06-08 00:30:18 -0500

berak gravatar image

if( m_FRModes == FacerecTypes::SAVEMODEL && m_LBPHModelTrained ) { model->save( "ATS_LBPHModel" ); m_mode = m_PrvMode; // restore the previous mode } else if( m_FRModes == FacerecTypes::LOADMODEL ) { model->read( "ATS_LBPHModel" ); // segmentation fault here m_mode = MODE_RECOGNITION; // transition to the recognition mode }

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-06-08 00:29:11 -0500

berak gravatar image

please either use:

model->write();
model->read();

or

model->save();
model = FaceRecognizer::load();

the 2 versions expect slightly different structures, so please don't mix those

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-06-07 15:36:29 -0500

Seen: 65 times

Last updated: Jun 08 '18