Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pseudo_image
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
Léo Calmettes
pseudo_image
Commits
9f6d850e
Commit
9f6d850e
authored
1 month ago
by
Léo Calmettes
Browse files
Options
Downloads
Patches
Plain Diff
nouveau fichier : AugmentTests.py
parent
f11926cd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
AugmentTests.py
+55
-0
55 additions, 0 deletions
AugmentTests.py
with
55 additions
and
0 deletions
AugmentTests.py
0 → 100644
+
55
−
0
View file @
9f6d850e
from
main
import
run_duo
from
config.config
import
load_args
import
pandas
as
pd
import
numpy
as
np
if
__name__
==
"
__main__
"
:
args
=
load_args
()
#On commence avec le standard
losses
=
np
.
zeros
(
20
);
accs
=
np
.
zeros
(
20
)
for
random
in
range
(
20
):
args
.
random_state
=
random
losses
[
random
],
accs
[
random
]
=
run_duo
(
args
)
records
=
pd
.
DataFrame
([[
"
Standard
"
,
losses
.
mean
(),
losses
.
std
(),
accs
.
mean
(),
accs
.
std
()]],
columns
=
[
"
Augmentation
"
,
"
mu_loss
"
,
"
std_loss
"
,
"
mu_acc
"
,
"
std_acc
"
])
records
.
to_csv
(
"
output/DataAugment/perfs.csv
"
,
index
=
False
)
#On continue avec le random_erasing
for
prob
in
[
k
/
20
for
k
in
range
(
1
,
21
)]:
args
.
augment_args
[
0
]
=
prob
for
prop
in
[
k
/
20
for
k
in
range
(
1
,
21
)]:
args
.
augment_args
[
3
]
=
prop
losses
=
np
.
zeros
(
5
);
accs
=
np
.
zeros
(
5
)
for
random
in
range
(
5
):
args
.
random_state
=
random
losses
[
random
],
accs
[
random
]
=
run_duo
(
args
)
records
=
pd
.
concat
([
records
,
pd
.
DataFrame
([[
f
"
erasing prob
{
prob
}
prop
{
prop
}
"
,
losses
.
mean
(),
losses
.
std
(),
accs
.
mean
(),
accs
.
std
()]],
columns
=
[
"
Augmentation
"
,
"
mu_loss
"
,
"
std_loss
"
,
"
mu_acc
"
,
"
std_acc
"
])])
records
.
to_csv
(
"
output/DataAugment/perfs.csv
"
,
index
=
False
)
#Puis le int shift
for
prob
in
[
k
/
20
for
k
in
range
(
1
,
21
)]:
args
.
augment_args
[
1
]
=
prob
for
maximum
in
([
k
/
10
for
k
in
range
(
11
,
20
)]
+
[
k
for
k
in
range
(
2
,
11
)]):
args
.
augment_args
[
4
]
=
maximum
losses
=
np
.
zeros
(
5
);
accs
=
np
.
zeros
(
5
)
for
random
in
range
(
5
):
args
.
random_state
=
random
losses
[
random
],
accs
[
random
]
=
run_duo
(
args
)
records
=
pd
.
concat
([
records
,
pd
.
DataFrame
([[
f
"
intShift prob
{
prob
}
max
{
maximum
}
"
,
losses
.
mean
(),
losses
.
std
(),
accs
.
mean
(),
accs
.
std
()]],
columns
=
[
"
Augmentation
"
,
"
mu_loss
"
,
"
std_loss
"
,
"
mu_acc
"
,
"
std_acc
"
])])
records
.
to_csv
(
"
output/DataAugment/perfs.csv
"
,
index
=
False
)
#Et enfin le rt-shift
for
prob
in
[
k
/
20
for
k
in
range
(
1
,
21
)]:
args
.
augment_args
[
2
]
=
prob
for
mean
in
[
5
,
10
,
15
,
20
,
25
,
30
,
40
,
50
,
60
,
70
,
80
,
90
]:
args
.
augment_args
[
5
]
=
mean
for
std
in
[
mean
/
k
for
k
in
range
(
1
,
11
)]:
args
.
augment_args
[
6
]
=
std
losses
=
np
.
zeros
(
5
);
accs
=
np
.
zeros
(
5
)
for
random
in
range
(
5
):
args
.
random_state
=
random
losses
[
random
],
accs
[
random
]
=
run_duo
(
args
)
records
=
pd
.
concat
([
records
,
pd
.
DataFrame
([[
f
"
rtShift prob
{
prob
}
mean
{
mean
}
std
{
std
}
"
,
losses
.
mean
(),
losses
.
std
(),
accs
.
mean
(),
accs
.
std
()]],
columns
=
[
"
Augmentation
"
,
"
mu_loss
"
,
"
std_loss
"
,
"
mu_acc
"
,
"
std_acc
"
])])
records
.
to_csv
(
"
output/DataAugment/perfs.csv
"
,
index
=
False
)
\ No newline at end of file
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