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

void Impala::Samples::ActiveLearnEngineQuids::SubmitRequest (  )  [inline]

Definition at line 92 of file ActiveLearnEngineQuids.h.

References Impala::Util::Database::GetFilePath(), GetID(), Impala::Util::Database::GetIOBuffer(), Impala::Core::Table::AnnotationTable::GetNrNegative(), Impala::Core::Table::AnnotationTable::GetNrPositive(), ILOG_DEBUG, ILOG_WARN, mALDatabase, mAnnotations, mInfoSent, Impala::QUID_CLASS_FRAME, Impala::QuidClassToString(), and Impala::Core::Table::Write().

00093     {
00094         if (mInfoSent)
00095             return;
00096 
00097         if (mAnnotations->GetNrPositive() == 0)
00098         {
00099             ILOG_WARN("No positive examples, ALE request not submitted.");
00100             return;
00101         }
00102 
00103         if (mAnnotations->GetNrNegative() == 0)
00104         {
00105             ILOG_WARN("No negative examples and random selection disabled, ALE request not submitted.");
00106             return;
00107         }
00108 
00109         ILOG_DEBUG("Using table with " << mAnnotations->GetNrPositive() << " positive shots and " << mAnnotations->GetNrNegative() << " negative shots.");
00110 
00111         String dir = "Annotations/" + QuidClassToString(QUID_CLASS_FRAME) + "/" + "conceptsActiveLearn.txt";        
00112         String filename = mALDatabase->GetFilePath(dir, GetID() + ".tab", true, false);
00113 
00114         ILOG_DEBUG("Writing to " << filename << "...");
00115 
00116         Core::Table::Write(mAnnotations, filename, mALDatabase, true);
00117 
00118         ILOG_DEBUG("Signalling active learning engine...");
00119         
00120         String startlearnfile = mALDatabase->GetFilePath(dir, "startlearner.txt", true, false);
00121 
00122         Util::IOBuffer *slf = mALDatabase->GetIOBuffer(
00123                                 startlearnfile, false, false, "tmp");
00124         if (!slf)
00125         {
00126             ILOG_WARN("No startlearnfile, ALE request not submitted.");
00127             return;
00128         }
00129         slf->IOBuffer::Puts(GetID());
00130         delete slf;
00131 
00132         ILOG_DEBUG("Signal sent.");
00133         mInfoSent = true;
00134     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:38:06 2010 for ImpalaSrc by  doxygen 1.5.1