Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tff2020
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
Operate
Environments
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
skmad-suite
tff2020
Commits
6622f7bf
Commit
6622f7bf
authored
4 years ago
by
Marina Kreme
Browse files
Options
Downloads
Patches
Plain Diff
delet unused file
parent
6e2283a0
No related branches found
No related tags found
No related merge requests found
Pipeline
#5929
canceled
4 years ago
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/tfgm/datasets/get_bird_car_mix_icassp.m
+0
-105
0 additions, 105 deletions
matlab/tfgm/datasets/get_bird_car_mix_icassp.m
with
0 additions
and
105 deletions
matlab/tfgm/datasets/get_bird_car_mix_icassp.m
deleted
100644 → 0
+
0
−
105
View file @
6e2283a0
function
[
signal_params
,
dgt_params
,
w
,
dgt
,
idgt
,
signals
,
alpha
,
seuil
,
...
,
r
,
mask
,
dgt_mix
]
=
get_cuicui_mix_icassp
()
%% This function allows you to reproduce ICASSP dataset.
%% Signal parameters
%make_wav_pairs();
sig_len
=
2
^
(
13
);
fs
=
8000
;
signal_params
.
fs
=
fs
;
signal_params
.
sig_len
=
sig_len
;
%% dgt parameters
approx_win_duration
=
0.02
;
win_type
=
'hann'
;
win_len
=
2
^
(
round
(
log2
(
approx_win_duration
*
fs
)));
dgt_params
.
hop
=
win_len
/
4
;
dgt_params
.
nbins
=
4
*
win_len
;
dgt_params
.
sig_len
=
sig_len
;
dgt_params
.
win_type
=
win_type
;
dgt_params
.
win_len
=
win_len
;
%% window and DGT operator
L
=
dgtlength
(
dgt_params
.
sig_len
,
dgt_params
.
hop
,
dgt_params
.
nbins
);
w
=
gabwin
(
dgt_params
.
win_type
,
dgt_params
.
hop
,
dgt_params
.
nbins
,
dgt_params
.
win_len
);
dgt
=
@
(
x
)
dgtreal
(
x
,
w
,
dgt_params
.
hop
,
dgt_params
.
nbins
,
dgt_params
.
sig_len
);
wd
=
{
'dual'
,
dgt_params
.
win_type
};
idgt
=
@
(
x
)
idgtreal
(
x
,
wd
,
dgt_params
.
hop
,
dgt_params
.
nbins
,
dgt_params
.
sig_len
);
compute_stft
=
@
(
x
,
w
,
dgt_params
,
L
)
dgtreal
(
x
,
w
,
dgt_params
.
hop
,
dgt_params
.
nbins
,
L
);
%% signals and their mixtures
ind_wideband
=
1
;
ind_localized
=
2
;
deb
=
0.2
;
[
x_engine
,
x_bird
]
=
load_pairs
(
ind_wideband
,
ind_localized
,
...
,
fs
,
sig_len
,
deb
);
%%
x_target
=
x_engine
;
x_perturbation
=
x_bird
;
gamma
=
0.7
;
x_target
=
x_target
/
max
(
abs
(
x_target
));
x_perturbation
=
x_perturbation
/
max
(
abs
(
x_perturbation
));
x_target
=
gamma
*
x_target
;
x_perturbation
=
(
1
-
gamma
)
*
x_perturbation
;
x_mix
=
x_target
+
x_perturbation
;
signals
.
target
=
x_target
;
signals
.
noise
=
x_perturbation
;
signals
.
mix
=
x_mix
;
%% Spectogramm of signals
dgt_Xref
=
compute_stft
(
signals
.
target
,
w
,
dgt_params
,
L
);
dgt_Xper
=
compute_stft
(
signals
.
noise
,
w
,
dgt_params
,
L
);
dgt_mix
=
dgt_Xref
+
dgt_Xper
;
%% mask
alpha
=
2
;
seuil
=
0.02
;
r
=
3
;
mask
=
and
(
abs
(
dgt_Xper
)
<
alpha
*
abs
(
dgt_Xref
),
abs
(
dgt_Xper
)
<
seuil
);
se
=
strel
(
'disk'
,
r
);
mask
=
imclose
(
mask
,
se
);
figure
;
imagesc
(
mask
);
%% plot figures
fig_dir
=
'figures_car_bird_icassp'
;
if
~
exist
(
fig_dir
,
'dir'
)
mkdir
(
fig_dir
);
end
addpath
(
fig_dir
)
figure
;
plot_spectrogram
(
mask
,
dgt_params
,
signal_params
,
dgt
);
title
(
'mask'
)
saveas
(
gcf
,
fullfile
(
fig_dir
,
'mask.png'
));
figure
;
plot_spectrogram
(
dgt_Xref
,
dgt_params
,
signal_params
,
dgt
)
title
(
'target signal'
)
saveas
(
gcf
,
fullfile
(
fig_dir
,
'engine.png'
));
figure
;
plot_spectrogram
(
dgt_Xper
,
dgt_params
,
signal_params
,
dgt
)
title
(
'perturbation signal'
)
saveas
(
gcf
,
fullfile
(
fig_dir
,
'bird.png'
));
figure
;
plot_spectrogram
(
dgt_mix
,
dgt_params
,
signal_params
,
dgt
)
title
(
'perturbation signal'
)
saveas
(
gcf
,
fullfile
(
fig_dir
,
'engine_bird.png'
));
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