Definition at line 92 of file ActiveLearnEngineQuids.h. References AddNegative(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get1(), Impala::Util::Database::GetInstance(), ILOG_DEBUG, Impala::QUID_CLASS_IMAGE, Impala::QuidClass(), Impala::Util::Read(), and Impala::Core::Table::Table::Size(). Referenced by Impala::Application::ConceptLearnClient::DoActiveLearning(). 00093 { 00094 ILOG_DEBUG("adding " << number << " random examples as negative..."); 00095 Core::Table::QuidTable allquids; 00096 Core::Table::Read(&allquids, "unc-both2-2sift-p112213.columns.tab", &Util::Database::GetInstance() ); 00097 ILOG_DEBUG("Found " << allquids.Size() << " quids."); 00098 for (int i=0; i<number; i++) 00099 { 00100 int rnd = ( (1.0 * rand()) / RAND_MAX) * allquids.Size(); 00101 Quid randomquid = allquids.Get1(rnd); 00102 if (QuidClass(randomquid) != QUID_CLASS_IMAGE) 00103 AddNegative(randomquid); 00104 // int randomkeyframe = rnd * (mThreadSet->GetKeyframes()->GetNrKeyframes()-1); 00105 // Quid randomkeyquid = mThreadSet->GetKeyframes()->GetQuidFrame(randomkeyframe); 00106 // AddNegative(randomkeyquid); 00107 } 00108 }
Here is the call graph for this function: ![]()
|