Giter VIP home page Giter VIP logo

motionmapperpy's Introduction

motionmapperpy : Modified Python 3.0 implementation of MotionMapper

This package is a GPU accelerated implementation of the MotionMapper pipeline for creating low dimensional density maps using tSNE or UMAP. Some methodologies may differ from the original implementation, please refer to the source code for a detailed look.

Package functions are:

  • Subsampling training points by running mini-tSNEs on a group of datasets.
  • Re-embedding new points on a learned tSNE map.
  • Watershed segmentation and grouping.

Installation:

  1. (OPTIONAL) Create a new conda environment conda create -n mmenv python=3.6
  2. Activate desired conda environemnt conda activate mmenv
  3. Download the repository and unzip contents. Open terminal and navigate to unzipped folder containing setup.py.
  4. Run
pip install -U h5py==2.1 
pip install numpy scikit-image hdf5storage
python setup.py install

Additionally, install cupy (if GPU present on system) by following the instructions here.

Demo.

After installation, run "python3 demo/demo.py".

Issues:

Please post any code related issues at https://github.com/bermanlabemory/motionmapperpy/issues with a complete error trace where possible.

motionmapperpy's People

Contributors

kanishkbjain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

motionmapperpy's Issues

Using wavelets with UMAP

Hi, in the original paper by Berman, he states the use of the KL Divergence as the metric to compare two points (wavelet coefficients). Did you achieve any success with using the "symmetric_kl" metric in UMAP? Secondly, I get very poor performance for my behaviour data using the wavelets, even after subsampling the original data. Do you have any suggestions how to improve the same? I have keypoint data (identified by DeepLabCut) at a sampling rate of 30Hz.

Installing in python 3.7.13 in Ubuntu

Hi @kanishkbjain !

I tried installing motionmapperpy in my own machine, with Ubuntu and python 3.7.13, the python version we used in the collab tutorial, as reported by sys.version)

In order to install motionmapperpy in this python version, I had to pin the version of numpy scipy and scikit-learn as follows in the setup.py

install_requires=[
    "numpy==1.21.6",
    "scipy==1.4.1",
    "matplotlib",
    "h5py",
    "hdf5storage",
    "scikit-learn==1.0.2",
    "scikit-image",
    "easydict",
    "umap-learn"
],

leaving it here in case anyone encounters versioning issues :-)

Dataset configuration

Hi @kanishkbjain, could you give more details on what the dataset should look like?
Also, details on using poses of multiple mouse videos should be very helpful.

Thanks!

OSError: No write intent on file (no write intent on file)

HI! Thank you for sharing this MotionMapper python code. When I ran the demo code (demo.py), I received the following error:

~/motionmapperpy$ python3 demo/demo.py
...
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5a.pyx", line 50, in h5py.h5a.create
OSError: No write intent on file (no write intent on file)

Can anyone please help in sorting out this issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.