Skip to content
Snippets Groups Projects
Commit 0d10761f authored by Julien Michel's avatar Julien Michel
Browse files

BUG: Retrieve labels even in unsupervised mode

parent 20df40dc
No related branches found
No related tags found
No related merge requests found
......@@ -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!" );
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment