Skip to content

Commit e843e25

Browse files
committed
Sensors paper
0 parents  commit e843e25

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+8505
-0
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.cache/

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*.swp
2+
*.pyc
3+
.ipynb_checkpoints/
4+
.cache/
5+
/scripts/exp_inter
6+
/tmp/

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Surface EMG-based Inter-session Gesture Recognition Enhanced by Deep Domain Adaptation
2+
3+
## Requirements
4+
5+
* A CUDA compatible GPU
6+
* Ubuntu 14.04 or any other Linux/Unix that can run Docker
7+
* [Docker](http://docker.io/)
8+
* [Nvidia Docker](https://github.com/NVIDIA/nvidia-docker)
9+
10+
## Usage
11+
12+
Following commands will
13+
(1) pull docker image (see `docker/Dockerfile` for details);
14+
(2) train ConvNets on the training sets of CSL-HDEMG, CapgMyo and NinaPro DB1, respectively;
15+
and (3) test trained ConvNets on the test sets.
16+
17+
```
18+
mkdir .cache
19+
# put NinaPro DB1 in .cache/ninapro-db1
20+
# put CapgMyo DB-a in .cache/dba
21+
# put CapgMyo DB-b in .cache/dbb
22+
# put CapgMyo DB-c in .cache/dbc
23+
# put CSL-HDEMG in .cache/csl
24+
docker pull answeror/sigr:2016-09-21
25+
scripts/train.sh
26+
scripts/test.sh
27+
```
28+
29+
Training on NinaPro and CapgMyo will take 1 to 2 hours depending on your GPU.
30+
Training on CSL-HDEMG will take several days.
31+
You can accelerate traning and testing by distribute different folds on different GPUs with the `gpu` parameter.
32+
33+
The NinaPro DB1 should be segmented according to the gesture labels and stored in Matlab format as follows.
34+
`.cache/ninapro-db1/data/sss/ggg/sss_ggg_ttt.mat` contains a field `data` (frames x channels) represents the trial `ttt` of gesture `ggg` of subject `sss`.
35+
Numbers are starting from zero. Gesture 0 is the rest posture.
36+
For example, `.cache/ninapro-db1/data/000/001/000_001_000.mat` is the 0th trial of 1st gesture of 0th subject,
37+
and `.cache/ninapro-db1/data/002/003/002_003_004.mat` is the 4th trial of 3th gesture of 2nd subject.
38+
You can download the prepared dataset from <http://zju-capg.org/myo/data/ninapro-db1.zip> or prepare it by yourself.
39+
40+
## License
41+
42+
Licensed under an GPL v3.0 license.
43+
44+
## Misc
45+
46+
Thanks DMLC team for their great [MxNet](https://github.com/dmlc/mxnet)!

docker/Dockerfile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
FROM answeror/mxnet:f2684a6
2+
MAINTAINER answeror <[email protected]>
3+
4+
RUN apt-get install -y python-pip python-scipy
5+
RUN pip install click logbook joblib nose
6+
7+
RUN cd /mxnet && \
8+
git reset --hard && \
9+
git checkout master && \
10+
git pull
11+
12+
RUN cd /mxnet && \
13+
git checkout 7a485bb && \
14+
git submodule update && \
15+
git checkout 887491d src/operator/elementwise_binary_broadcast_op-inl.h && \
16+
sed -i -e 's/CHECK(ksize_x <= dshape\[3\] && ksize_y <= dshape\[2\])/CHECK(ksize_x <= dshape[3] + 2 * param_.pad[1] \&\& ksize_y <= dshape[2] + 2 * param_.pad[0])/' src/operator/convolution-inl.h && \
17+
cp make/config.mk . && \
18+
echo "USE_CUDA=1" >>config.mk && \
19+
echo "USE_CUDA_PATH=/usr/local/cuda" >>config.mk && \
20+
echo "USE_CUDNN=1" >>config.mk && \
21+
echo "USE_BLAS=openblas" >>config.mk && \
22+
make clean && \
23+
make -j8 ADD_LDFLAGS=-L/usr/local/cuda/lib64/stubs
24+
25+
ADD elementwise_binary_broadcast_op-inl.h /mxnet/src/operator/elementwise_binary_broadcast_op-inl.h
26+
RUN cd /mxnet && \
27+
make clean && \
28+
make -j8 ADD_LDFLAGS=-L/usr/local/cuda/lib64/stubs
29+
30+
RUN pip install jupyter pandas matplotlib seaborn scikit-learn
31+
RUN mkdir -p -m 700 /root/.jupyter/ && \
32+
echo "c.NotebookApp.ip = '*'" >> /root/.jupyter/jupyter_notebook_config.py
33+
EXPOSE 8888
34+
CMD ["sh", "-c", "jupyter notebook"]
35+
36+
WORKDIR /code

0 commit comments

Comments
 (0)