Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Youssefi
otb
Commits
0edb97dd
Commit
0edb97dd
authored
12 years ago
by
Julien Malik
Browse files
Options
Downloads
Patches
Plain Diff
BUG: fix getter for number of classes and class min size
parent
c0aa9bd3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Learning/otbListSampleGenerator.h
+3
-1
3 additions, 1 deletion
Code/Learning/otbListSampleGenerator.h
Code/Learning/otbListSampleGenerator.txx
+4
-4
4 additions, 4 deletions
Code/Learning/otbListSampleGenerator.txx
with
7 additions
and
5 deletions
Code/Learning/otbListSampleGenerator.h
+
3
−
1
View file @
0edb97dd
...
...
@@ -169,8 +169,10 @@ private:
bool
m_PolygonEdgeInclusion
;
// if true take into consideration pixel which are on polygon edge
// useful, when dealing with small polygon area (1 or two pixels)
// false by default
unsigned
short
m_NumberOfClasses
;
std
::
string
m_ClassKey
;
double
m_ClassMinSize
;
ListSamplePointerType
m_TrainingListSample
;
ListLabelPointerType
m_TrainingListLabel
;
ListSamplePointerType
m_ValidationListSample
;
...
...
This diff is collapsed.
Click to expand it.
Code/Learning/otbListSampleGenerator.txx
+
4
−
4
View file @
0edb97dd
...
...
@@ -65,7 +65,9 @@ ListSampleGenerator<TImage, TVectorData>
m_MaxValidationSize(-1),
m_ValidationTrainingProportion(0.0),
m_PolygonEdgeInclusion(false),
m_ClassKey("Class")
m_NumberOfClasses(0),
m_ClassKey("Class"),
m_ClassMinSize(-1)
{
this->SetNumberOfRequiredInputs(2);
this->SetNumberOfRequiredOutputs(1);
...
...
@@ -232,12 +234,10 @@ ListSampleGenerator<TImage, TVectorData>
}
}
}
}
assert(m_TrainingListSample->Size() == m_TrainingListLabel->Size());
assert(m_ValidationListSample->Size() == m_ValidationListLabel->Size());
}
template <class TImage, class TVectorData>
...
...
@@ -261,7 +261,7 @@ ListSampleGenerator<TImage, TVectorData>
m_ClassesSize[datanode->GetFieldAsInt(m_ClassKey)] += area;
}
}
m_NumberOfClasses = m_ClassesSize.size();
}
template <class TImage, class TVectorData>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment