Skip to content

Instantly share code, notes, and snippets.

@braysia
Last active September 30, 2016 23:58
Show Gist options
  • Save braysia/ee6f6a946274b228e3a8c7df352c8055 to your computer and use it in GitHub Desktop.
Save braysia/ee6f6a946274b228e3a8c7df352c8055 to your computer and use it in GitHub Desktop.
git clone https://github.com/braysia/covertrack.git
cd covertrack
python setup.py install

imagemagick is required.

  • LINUX:
    To install the requirements, use pip to install libraries in requirements.txt.

  • MAC:
    pip install SimpleITK would cause an error dependent on your environment. Use the following command.
    pip install https://sourceforge.net/projects/simpleitk/files/SimpleITK/0.10.0/Python/SimpleITK-0.10.0-cp27-cp27m-macosx_10_6_intel.whl
    If you have Anaconda, use the following command.
    conda install -c https://conda.anaconda.org/simpleitk SimpleITK


Optionally, the following is how I build the environment for VM.
change bashrc to bash_profile if you are using mac

Make virtual environment.

sudo apt-get install aptitude
sudo aptitude install git
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
exec "$SHELL"

Install python and requirements

pyenv install anaconda2-2.5.0
pyenv local anaconda2-2.5.0
conda create -n ktr PIL numpy scipy matplotlib pandas scikit-image joblib
pyenv local anaconda2-2.5.0/envs/ktr
conda install cython mock seaborn jupyter bokeh
pip install pymorph pywavelets simplejson centrosome ipywidgets pypng
pip install git+https://github.com/jfrelinger/cython-munkres-wrapper
conda install -c https://conda.anaconda.org/simpleitk SimpleITK
pyenv global anaconda2-2.5.0/envs/ktr

Download images and run tracking

wget http://archive.simtk.org/ktrprotocol/covertrack.zip
unzip -q covertrackdev.zip
wget -P covertrack/data/ http://archive.simtk.org/ktrprotocol/ktr_images.zip
unzip -q covertrack/data/ktr_images.zip -d covertrack/data/
rm covertrack/data/ktr_images.zip
cd covertrack
python setup.py install
exec “$SHELL"
covertrack input_file/ktr_protocol/input_*py

This would take 30min for quadcores.

Run covertrace

cd
wget http://archive.simtk.org/ktrprotocol/covertrace.zip
unzip -q covertrace.zip
cd covertrace
python setup.py install
jupyter notebook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment