Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

void Impala::Core::Training::Svm::LoadModel ( const std::string &  name,
Util::Database db 
) [inline, virtual]

Implements Impala::Core::Training::Classifier.

Definition at line 239 of file Svm.h.

References Impala::Util::FileCopyRemoteToLocal(), Impala::FileNameTmp(), Impala::Util::Database::GetDataChannel(), Impala::Util::Database::GetIOBuffer(), ILOG_ERROR, SetModel(), and svm_load_model().

Referenced by Impala::Core::Training::ApplyConceptsHelperKernels::Predict(), Impala::Core::Training::TesterIOHelper::ReadModel(), and Impala::Core::VideoSet::ShotSegmenter::ShotSegmenter().

00240     {
00241         svm_model* model = 0;
00242         if (db->GetDataChannel())
00243         {
00244             std::string tmpName = FileNameTmp();
00245             Util::IOBuffer* buf = db->GetIOBuffer(name, true, false, "");
00246             FileCopyRemoteToLocal(buf, tmpName);
00247             delete buf;
00248             model = svm_load_model(tmpName.c_str());
00249             unlink(tmpName.c_str());
00250         }
00251         else
00252         {
00253             model = svm_load_model(name.c_str());
00254         }
00255         if(!model)
00256         {
00257             ILOG_ERROR("[LoadModel] unable to load " << name);
00258         }
00259         else
00260             SetModel(model);
00261     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:24:01 2010 for ImpalaSrc by  doxygen 1.5.1