A flexible Python front-end inference SDK.
-
Flexible
FlexInfer has a Python front-end, which makes it easy to build a computer vision product prototype.
-
Efficient
Most of time consuming part of Flexinfer is powered by C++ or CUDA, so FlexInfer is also efficient. If you are really hungry for efficiency and don't mind the trouble of C++, you can refer to CheetahInfer.
This project is released under Apache 2.0 license.
- Linux
- Python 3.6 or higher
- TensorRT 7.0.0.11 or higher
- PyTorch 1.2.0 or higher
- CUDA 9.0 or higher
- volksdep
We have tested the following versions of OS and softwares:
- OS: Ubuntu 16.04.6 LTS
- Python 3.6.9
- TensorRT 7.0.0.11
- PyTorch 1.2.0
- CUDA: 10.2
-
Install volksdep following the official instructions
-
If your platform is x86 or x64, you can create a conda virtual environment and activate it.
conda create -n flexinfer python=3.6.9 -y
conda activate flexinfer
- Clone the flexinfer repository.
git clone https://github.com/Media-Smart/flexinfer
cd flexinfer
- Install requirements.
pip install -r requirements.txt
Here is an example of deploying a classifier, you can run the following statement to classify an image.
python examples/classifier.py image_file
All sample files are in examples directory.