Skip to main content

Demo package

Project description

GitHub tag (latest by date) GitHub PyPI pyversions

Spyrit

Spyrit Toolbox aims to provide all the necessary tools for single-pixel imaging. Starting from simulation, reconstruction, and interface with DMD and spectrometers. The aim of this toolbox is to cover all aspects of single-pixel imaging : from simulation to experimental, we aim to provide tools to make realistic measurements and provide reconstruction algorithms.

Getting Started

User mode

The spyrit package is available for Linux, MacOs and Windows. You can install it with pypi (we recommend you to use virtual environment).

Linux and MacOs

pip install spyrit

Windows

On Windows you need first to install torch. Here it's cpu version, adapt to your configuration.

pip install requests torch==1.8.0+cpu torchvision==0.9.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
pip install spyrit

Developper mode

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

First, you need to clone the repository

git clone --recurse-submodules https://github.com/openspyrit/spyrit.git

Then, you can install the spyrit package with python (we recommend you to use virtual environment)

Linux and MacOs

cd spyrit
pip install -e .

Windows

On Windows you need first to redo the symbolic link to fht inside the spyrit repository and then to install torch. Here it's cpu version, adapt to your configuration.

cd spyrit
rm -r -fo fht
cmd /c mklink /d fht spyrit\fht\fht
pip install requests torch==1.8.0+cpu torchvision==0.9.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
pip install -e .

Versioning

To change the version of the package on pypi, you need to:

  • change the version in setup.py to new_version
  • git commit setup.py -m "Towards new_version"
  • git tag -a new_version -m "new_version"
  • git push --follow-tags

Prerequisites

All the necessary packages and libraries are contained within the setup.py file.

  • numpy (==1.19.3)
  • matplotlib
  • scipy
  • torch
  • torchvision
  • Pillow
  • opencv-python
  • imutils
  • PyWavelets
  • wget
  • imageio
  • fht (included as a submodule in spyrit/fht),

Test

To check that the installation has been a success, try running the following lines in yout python terminal :

import spyrit

End with an example of getting some data out of the system or using it for a little demo

import torch;
a = torch.randn(64,64);

A minimal exemple can be found here. To run it, you can do

cd spyrit
python .github/workflows/example.py

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

  • Antonio Tomas Lorente Mur - Initial work - Website
  • Nicolas Ducros - Initial work - Website
  • Sebastien Crombez - Initial work - [Website]

License

This project is licensed under the Creative Commons Attribution Share Alike 4.0 - see the LICENSE.md file for details

Acknowledgments

  • Nicolas Barbey for his Fast Hadamard Transform implementation in python
  • Jin LI for his implementation of Convolutional Gated Recurrent Units for PyTorch
  • Erik Lindernoren for his processing of the UCF-101 Dataset.

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

spyrit-0.13.5.tar.gz (36.0 kB view hashes)

Uploaded Source

Built Distributions

spyrit-0.13.5-cp38-cp38-win_amd64.whl (75.6 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

spyrit-0.13.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (198.1 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

spyrit-0.13.5-cp38-cp38-manylinux2014_x86_64.whl (195.9 kB view hashes)

Uploaded CPython 3.8

spyrit-0.13.5-cp38-cp38-macosx_10_14_x86_64.whl (60.5 kB view hashes)

Uploaded CPython 3.8 macOS 10.14+ x86-64

spyrit-0.13.5-cp37-cp37m-win_amd64.whl (75.5 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

spyrit-0.13.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (200.8 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

spyrit-0.13.5-cp37-cp37m-manylinux2014_x86_64.whl (198.5 kB view hashes)

Uploaded CPython 3.7m

spyrit-0.13.5-cp37-cp37m-macosx_10_14_x86_64.whl (60.4 kB view hashes)

Uploaded CPython 3.7m macOS 10.14+ x86-64

spyrit-0.13.5-cp36-cp36m-win_amd64.whl (75.5 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

spyrit-0.13.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (196.9 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

spyrit-0.13.5-cp36-cp36m-manylinux2014_x86_64.whl (194.7 kB view hashes)

Uploaded CPython 3.6m

spyrit-0.13.5-cp36-cp36m-macosx_10_14_x86_64.whl (60.4 kB view hashes)

Uploaded CPython 3.6m macOS 10.14+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page