Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RAVEN2YOLO
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
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stephane Chavin
RAVEN2YOLO
Commits
66d182ed
Commit
66d182ed
authored
1 year ago
by
Stephane Chavin
Browse files
Options
Downloads
Patches
Plain Diff
Update file get_spectrogram.py
parent
36b3481b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
get_spectrogram.py
+3
-3
3 additions, 3 deletions
get_spectrogram.py
with
3 additions
and
3 deletions
get_spectrogram.py
+
3
−
3
View file @
66d182ed
...
@@ -42,7 +42,7 @@ def process_recordings(data, img_per_rec, args):
...
@@ -42,7 +42,7 @@ def process_recordings(data, img_per_rec, args):
duration
=
args
.
duration
duration
=
args
.
duration
overlap
=
args
.
overlap
overlap
=
args
.
overlap
for
count
in
range
(
args
.
img_per_rec
):
for
count
in
range
(
img_per_rec
):
offset
=
count
*
(
duration
-
overlap
)
offset
=
count
*
(
duration
-
overlap
)
filename
=
str
(
i
[
0
])
filename
=
str
(
i
[
0
])
...
@@ -54,8 +54,8 @@ def process_recordings(data, img_per_rec, args):
...
@@ -54,8 +54,8 @@ def process_recordings(data, img_per_rec, args):
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
parser
=
argparse
.
ArgumentParser
(
formatter_class
=
argparse
.
ArgumentDefaultsHelpFormatter
,
description
=
'
Extract spectrogram for each .wav file
'
)
parser
=
argparse
.
ArgumentParser
(
formatter_class
=
argparse
.
ArgumentDefaultsHelpFormatter
,
description
=
'
Extract spectrogram for each .wav file
'
)
parser
.
add_argument
(
'
path_to_data
'
,
type
=
arg_directory
,
help
=
'
Path of the folder that contains the recordings
'
,
required
=
True
)
parser
.
add_argument
(
'
path_to_data
'
,
type
=
arg_directory
,
help
=
'
Path of the folder that contains the recordings
'
)
parser
.
add_argument
(
'
directory
'
,
type
=
arg_directory
,
help
=
'
Directory to which spectrograms will be stored
'
,
required
=
True
)
parser
.
add_argument
(
'
directory
'
,
type
=
arg_directory
,
help
=
'
Directory to which spectrograms will be stored
'
)
parser
.
add_argument
(
'
-m
'
,
'
--mode
'
,
type
=
str
,
choices
=
[
'
unique
'
,
'
multiple
'
],
help
=
'
Direction of the saved spectrogram
'
,
default
=
'
multiple
'
)
parser
.
add_argument
(
'
-m
'
,
'
--mode
'
,
type
=
str
,
choices
=
[
'
unique
'
,
'
multiple
'
],
help
=
'
Direction of the saved spectrogram
'
,
default
=
'
multiple
'
)
parser
.
add_argument
(
'
-n
'
,
'
--columns_name
'
,
type
=
str
,
help
=
'
Name of the columns that contain the path of the .wav
'
,
default
=
'
Path
'
)
parser
.
add_argument
(
'
-n
'
,
'
--columns_name
'
,
type
=
str
,
help
=
'
Name of the columns that contain the path of the .wav
'
,
default
=
'
Path
'
)
parser
.
add_argument
(
'
-i
'
,
'
--input
'
,
type
=
str
,
choices
=
[
'
file
'
,
'
folder
'
],
help
=
'
Choose
"
file
"
if you have a .csv file or
"
folder
"
to export
'
parser
.
add_argument
(
'
-i
'
,
'
--input
'
,
type
=
str
,
choices
=
[
'
file
'
,
'
folder
'
],
help
=
'
Choose
"
file
"
if you have a .csv file or
"
folder
"
to export
'
...
...
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