Commit 0d10761f authored by Julien Michel's avatar Julien Michel

BUG: Retrieve labels even in unsupervised mode

parent 20df40dc
......@@ -64,14 +64,11 @@ private:
void DoBeforeTrainExecute()
{
// Enforce the need of class field name in supervised mode
if (GetClassifierCategory() == Supervised)
featuresInfo.SetClassFieldNames( GetChoiceNames( "cfield" ), GetSelectedItems( "cfield" ) );
if( featuresInfo.m_SelectedCFieldIdx.empty() )
{
featuresInfo.SetClassFieldNames( GetChoiceNames( "cfield" ), GetSelectedItems( "cfield" ) );
if( featuresInfo.m_SelectedCFieldIdx.empty() )
{
otbAppLogFATAL( << "No field has been selected for data labelling!" );
}
otbAppLogFATAL( << "No field has been selected for data labelling!" );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment