MODI: Multicommodity Optimal Transport-based Dynamics for Image Classification
Project description
MODI: Multicommodity Optimal Transport Dynamics on Images
⚠ Important note:
MODI is currently under reconstruction, thus you may find some inconsistencies in its documentation. In case you have problems using the code, please do not hesitate to contact us.
MODI (Multicommodity Optimal transport Dynamics on Images) is a Python implementation of the algorithms used in:
- [1] Alessandro Lonardi*, Diego Baptista*, and Caterina De Bacco. Immiscible Color Flows in Optimal Transport Networks for Image Classification. Front. Phys. 11:1089114 [arXiv] [poster] [CO₂ compensation].
This is a scheme capable of performing supervised classification by finding multicommodity optimal transport paths between a pair of images.
If you use this code, please cite [1].
The symbol “*” denotes equal contribution.
Requirements
All the dependencies needed to run the algorithm can be installed by:
pip install modi-flows
Please note that one of the dependencies, scikit-umfpack, may not be easily installable using pip3. In this case, it is recommended to use conda for installing it:
conda install -c conda-forge scikit-umfpack
In case that the installation of modi-flows
fails due to this, install first scikit-umfpack
first and then try installing our package again from pip
.
Now, you are ready to use the code! To do so, you can simply use the notebook dashboard.ipynb
, from which you can access our solver.
What's included
code
: contains all the scripts necessary to run MODI, and a user-friendly Jupyter notebook (dashboard.ipynb
) to interact with the code and visualize the results.data/input
: contains a small sample of images taken from [2]. These can be preprocessed usingcode/dashboard.ipynb
. The original dataset can be directly downloaded as a .zip file from the Harvard Dataversesetup.py
: setup file to build the Python environment.misc
: supplementary files (poster of MODI).
[2] Marco Seeland, Michael Rzanny, Nedal Alaqraa, Jana Wäldchen, and Patrick Mäder, Jena Flowers 30 Dataset, Harvard Dataverse (2017).
Contacts
For any issues or questions, feel free to contact us sending an email to:
License
Copyright (c) 2022 Alessandro Lonardi, Diego Baptista and Caterina De Bacco
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for modi_flows-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c71c61669e6f5315f364bfd2f00cc9817fbaaedbc1dde3b4ce2064b51cffcbf |
|
MD5 | a827fc92746fc0b9c89c61db35ea2a20 |
|
BLAKE2b-256 | 1fb4212f8503361054fc4c6e33be6f9a50947701c7410860d6228088d3d5e2f3 |