Installation

TensorNets is designed to be easy to install and use in your Python environment.

Install from PyPI

The recommended way to install TensorNets is from the Python Package Index (PyPI) using pip:

pip install tensornets

Install from GitHub

To get the latest version directly from the source repository on GitHub, you can install it using pip with a git URL:

pip install git+https://github.com/taehoonlee/tensornets.git

Dependencies

TensorNets has a few core dependencies that are required for it to function correctly.

  • TensorFlow: TensorNets is tested against a wide range of TensorFlow versions, from 1.4.0 to 2.1.0 and newer. You should have a compatible version of TensorFlow installed.
  • NumPy & SciPy: Used for numerical operations.
  • Cython: Required for building Cython extensions, which are used for performance-critical parts of the object detection utilities.
  • OpenCV: The opencv-python package is used for image loading and preprocessing utilities.

These dependencies are listed in the setup.py and pyproject.toml files and will be automatically handled when installing with pip.

Special Requirements for FasterRCNN

The FasterRCNN model has an additional dependency on a custom roi-pooling operation. To use this model, you must install it separately:

  1. Clone the repository:

    git clone https://github.com/deepsense-io/roi-pooling

  2. Navigate into the directory:

    cd roi-pooling

  3. You may need to edit roi_pooling/Makefile to ensure compatibility with your version of TensorFlow, as noted in this GitHub issue comment.

  4. Install the package:

    python setup.py install