Skip to main content

EfficientBioAI

This package mainly focus on the efficiency of BioImage AI tasks. For the moment we just implemented quantization algorithm.

Introduction:

The whole project contains two parts: quantization and inference. In the quantization step, we quantize the pretrained model into int8 precision and transform them to the format suitable to the inference engine. The next step is to run the inference on the inference engine and do the analysis. The inference engine that we choose is openvino for intel CPU and tensorrt for nvidia GPU.
We support several popular bioimage AI tools like(mmv_im2im,cellpose). Also user-defined pytorch models are supported.

Installation:

pip:

First create a virtual environment using conda:

conda config --add channels conda-forge
conda create -n efficientbioai python=3.8 setuptools=59.5.0

Then we need to install the dependencies:

git clone git@github.com:ModelTC/MQBench.git
cd MQBench
python setup.py install
cd ..

Then install the efficientbioai package:

git clone git@github.com:MMV-Lab/EfficientBioAI.git
cd EfficientBioAI
pip install -e .[cpu/gpu/all] # for intel cpu, nvidia gpu or both

docker:(recommended)

We use different docker images for both cpu and gpu. Assume that you are in the root directory of the project.

  • for CPU:
cd docker/cpu
bash install.sh # if not install docker, run this command first
bash build_docker.sh # build the docker image
cd ../..
bash docker/cpu/run_container.sh #run the docker container
  • for GPU:
cd docker/gpu
bash install.sh # if not install docker, run this command first
bash build_docker.sh # build the docker image
cd ../..
bash docker/gpu/run_container.sh #run the docker container

How to run it:

Use scripts:

  • compression:
python efficientbioai/compress.py --config path/to/the/config.yaml --exp_path experiment/save_path
  • inference:
python efficientbioai/inference.py --config path/to/the/config.yaml

Use functions:

There is a simple example

Note that pretrained model and data should be placed in the model and data folders, respectively. You can download our mmv_im2im pretrained model from nextcloud. All the intermediate files will be saved in the experiment folder.

Metadata

Release files for efficientbioai 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for efficientbioai 0.0.6
File Size Uploaded Provenance Actions
efficientbioai-0.0.6.tar.gz 19.5 kB Without provenance Details for efficientbioai-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for efficientbioai 0.0.6
File Interpreter ABI Platform Actions
efficientbioai-0.0.6-py2.py3-none-any.whl Python 3, Python 2 none any Details for efficientbioai-0.0.6-py2.py3-none-any.whl

Total release size: 44.1 kB

Release files / efficientbioai-0.0.6.tar.gz

Download URL efficientbioai-0.0.6.tar.gz
Size 19.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7f388e674e828535836910d874671771fea74021fb95a9dfbb44efcb54f34749
BLAKE2b-256 checksum
How to use checksums
95d0405ebc3422a162cbb4c6508fa382765c56e93c2c1a202f0ebe979404f865
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / efficientbioai-0.0.6-py2.py3-none-any.whl

Download URL efficientbioai-0.0.6-py2.py3-none-any.whl
Size 24.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
024086081b51a1897378f66c62b3f045dde111e898d280f69e6f014e6237bf9a
BLAKE2b-256 checksum
How to use checksums
c12a8d0fca8d0402c651ee5400fb46835474a89a2bbda1ac7a41d92631ceea52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Security for efficientbioai 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page