Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Supervised MultiModal Integration Tool
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
Container registry
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Baptiste Bauvin
Supervised MultiModal Integration Tool
Commits
890bc288
Commit
890bc288
authored
7 years ago
by
bbauvin
Browse files
Options
Downloads
Patches
Plain Diff
Added main execution file
parent
994a0a62
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Exec.py
+0
-0
0 additions, 0 deletions
Code/Exec.py
Code/MonoMutliViewClassifiers/ExecClassif.py
+124
-122
124 additions, 122 deletions
Code/MonoMutliViewClassifiers/ExecClassif.py
with
124 additions
and
122 deletions
Code/Exec.py
0 → 100644
+
0
−
0
View file @
890bc288
This diff is collapsed.
Click to expand it.
Code/MonoMutliViewClassifiers/ExecClassif.py
+
124
−
122
View file @
890bc288
...
...
@@ -11,6 +11,7 @@ from joblib import Parallel, delayed
import
numpy
as
np
import
math
import
matplotlib
import
h5py
# Import own modules
import
Multiview
...
...
@@ -100,7 +101,7 @@ def initMonoviewKWARGS(args, classifiersNames):
return
monoviewKWARGS
def
initKWARGS
(
args
,
benchmark
):
def
initKWARGS
Func
(
args
,
benchmark
):
if
"
Monoview
"
in
benchmark
:
monoviewKWARGS
=
initMonoviewKWARGS
(
args
,
benchmark
[
"
Monoview
"
])
else
:
...
...
@@ -108,20 +109,20 @@ def initKWARGS(args, benchmark):
return
monoviewKWARGS
def
lateFusionSetArgs
(
views
,
viewsIndices
,
classes
,
method
,
classifiersNames
,
classifiersConfig
,
fusionMethodConfig
):
arguments
=
{
"
CL_type
"
:
"
Fusion
"
,
"
views
"
:
views
,
"
NB_VIEW
"
:
len
(
views
),
"
viewsIndices
"
:
viewsIndices
,
"
NB_CLASS
"
:
len
(
classes
),
"
LABELS_NAMES
"
:
args
.
CL_classes
,
"
FusionKWARGS
"
:
{
"
fusionType
"
:
"
LateFusion
"
,
"
fusionMethod
"
:
method
,
"
classifiersNames
"
:
classifiersNames
,
"
classifiersConfigs
"
:
classifiersConfig
,
'
fusionMethodConfig
'
:
fusionMethodConfig
,
"
nbView
"
:
(
len
(
viewsIndices
))}}
return
arguments
#
def lateFusionSetArgs(views, viewsIndices, classes, method,
#
classifiersNames, classifiersConfig, fusionMethodConfig):
#
arguments = {"CL_type": "Fusion",
#
"views": views,
#
"NB_VIEW": len(views),
#
"viewsIndices": viewsIndices,
#
"NB_CLASS": len(classes),
#
"LABELS_NAMES": args.CL_classes,
#
"FusionKWARGS": {"fusionType": "LateFusion", "fusionMethod": method,
#
"classifiersNames": classifiersNames,
#
"classifiersConfigs": classifiersConfig,
#
'fusionMethodConfig': fusionMethodConfig,
#
"nbView": (len(viewsIndices))}}
#
return arguments
def
initMultiviewArguments
(
args
,
benchmark
,
views
,
viewsIndices
,
argumentDictionaries
,
randomState
,
directory
,
...
...
@@ -178,6 +179,7 @@ def classifyOneIter_multicore(LABELS_DICTIONARY, argumentDictionaries, nbCores,
labels
=
np
.
array
(
[
resultMonoview
[
1
][
3
]
for
resultMonoview
in
resultsMonoview
]
+
[
resultMultiview
[
3
]
for
resultMultiview
in
resultsMultiview
]).
transpose
()
DATASET
=
h5py
.
File
(
args
.
pathF
+
args
.
name
+
str
(
0
)
+
"
.hdf5
"
,
"
r
"
)
trueLabels
=
DATASET
.
get
(
"
Labels
"
).
value
times
=
[
dataBaseTime
,
monoviewTime
,
multiviewTime
]
results
=
(
resultsMonoview
,
resultsMultiview
)
...
...
@@ -273,10 +275,10 @@ def classifyOneIter(LABELS_DICTIONARY, argumentDictionaries, nbCores, directory,
# _______________ #
# __ EXECUTION __ #
# _______________ #
def
execClassif
(
arguments
):
testVersions
()
start
=
time
.
time
()
args
=
execution
.
parseTheArgs
(
sys
.
argv
[
1
:]
)
args
=
execution
.
parseTheArgs
(
arguments
)
os
.
nice
(
args
.
nice
)
nbCores
=
args
.
CL_cores
...
...
@@ -327,7 +329,7 @@ logging.info("Start:\t Finding all available mono- & multiview algorithms")
benchmark
=
initBenchmark
(
args
)
initKWARGS
=
initKWARGS
(
args
,
benchmark
)
initKWARGS
=
initKWARGS
Func
(
args
,
benchmark
)
dataBaseTime
=
time
.
time
()
-
start
...
...
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