Skip to content

Commit

Permalink
[ADD] script to preprocess the data
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCretois committed Jul 19, 2023
1 parent e3d3dec commit e2da292
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions preprocess_data.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

DATA_DIR=$1 # Path where DCASE data have been stored (i.e. $BASE_FOLDER in dcase_setup.sh)

# Declare an associative array (key-value pairs)
declare -A SETS=( ["Training_Set"]="train" ["Validation_Set"]="validate" ["Evaluation_Set"]="test" )

# Loop through the associative array
for SET in "${!SETS[@]}"; do
STATUS=${SETS[$SET]}
docker run -v $DATA_DIR:/data \
--gpus all \
dcase \
poetry run python /app/data_utils/DCASEfewshot.py \
--set_type $SET \
--status $STATUS \
--overwrite \
--resample \
--denoise \
--normalize \
--tensor_length 128 \
--overlap 0.5
done

0 comments on commit e2da292

Please sign in to comment.