Skip to content

Commit

Permalink
Merge pull request #1 from amathislab/v1
Browse files Browse the repository at this point in the history
Release v1
  • Loading branch information
AlexEMG authored Feb 19, 2024
2 parents d93fa4a + cbe8d47 commit 59c12a4
Show file tree
Hide file tree
Showing 361 changed files with 218,995 additions and 28,696 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 A.Mathis Group & M.W.Mathis Lab @ EPFL
Copyright (c) 2020+ Mathis Group @ EPFL

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 10 additions & 0 deletions PCR-data-generation/1_generate_start_points.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

##### START POINTS are already present in the folder start_points #######

## To generate them again, use the following bash code

echo "Generating start_points"

python3.6 -m pip install joblib
python3.6 generate_startpoints5.py --monkey_name 'snap'
29 changes: 29 additions & 0 deletions PCR-data-generation/2_run_dataset_seed.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

########### Bash script to generate synthetic muscle spindle inputs for each trajectory ############

echo "Generating trajectories"

## j is the folder number where the trajectory will be saved
## i is the character number (From 1 to 20 single-stroke character).

## Each character will generate two folders with the number that is even for horizontal and odd for vertical.
## E.g. character a (i=1) --> 0 horizontal folder and 1 vertical folder

## All monkey names [snap, butter, lando, han01_05, han11_22, chips]

for j in {9000..9000..1}
do

SEED=$RANDOM
for i in {1..20..1} #20

do
echo "sample $j char $i "
let "val=$i*2"
let "val2=$val-1"
python3.6 generate_data_hor_seed.py --label $i --plane 'horizontal' --monkey_name 'snap' --seed $SEED $val2 $j
python3.6 generate_data_ver_seed.py --label $i --plane 'vertical' --monkey_name 'snap' --seed $SEED $val $j

done
done
42 changes: 42 additions & 0 deletions PCR-data-generation/3_run_create_dataset_final_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

######### Bash script to generate the pcr dataset of spindle inputs used to train TCNs. ##########

### Change the init and end folder based on the index used for generating the unprocessed data.

echo "Generating trajectories for snap"

#### SNAP
python3.6 create_dataset_final_all.py --monkey_name 'snap' --lab_count_per_char 90 \
--init_folder 100 --end_folder 181

## If necessary for other monkeys

# #### HAN 01_05
# python3.6 create_dataset_final_all.py --monkey_name 'han01_05' --lab_count_per_char 90 \
# --init_folder 100 --end_folder 181

# echo "Generating trajectories han11_22"

# #### HAN 11__22
# python3.6 create_dataset_final_all.py --monkey_name 'han11_22' --lab_count_per_char 90 \
# --init_folder 100 --end_folder 181

# echo "Generating trajectories chips"

# #### CHIPS
# python3.6 create_dataset_final_all.py --monkey_name 'chips' --lab_count_per_char 90 \
# --init_folder 100 --end_folder 181

# echo "Generating trajectories lando"

# #### LANDO
# python3.6 create_dataset_final_all.py --monkey_name 'lando' --lab_count_per_char 90 \
# --init_folder 100 --end_folder 181

# echo "Generating trajectories butter"

# #### BUTTER
# python3.6 create_dataset_final_all.py --monkey_name 'butter' --lab_count_per_char 90 \
# --init_folder 100 --end_folder 181

Loading

0 comments on commit 59c12a4

Please sign in to comment.