TensorNets: High-Level Models for TensorFlow

TensorNets provides high-level network definitions with pre-trained weights in TensorFlow, supporting versions from 1.4.0 to 2.1.0 and beyond. It is designed for developers who need to quickly integrate, benchmark, and deploy well-known neural network architectures into their machine learning workflows.

Guiding Principles

The library is built on a set of core principles to ensure it is practical and easy to use for developers:

  • Applicability: Many developers already have their own ML workflows and want to plug a new model into their existing pipelines. TensorNets is designed as a collection of simple functional interfaces without custom classes, making models easily interchangeable and integrable.

  • Manageability: Models are implemented using tf.contrib.layers, which provides a lightweight and accessible structure similar to PyTorch and Keras. This design allows for easy access to every weight and endpoint, simplifying deployment and the expansion of pre-processing functions and pre-trained weights.

  • Readability: By leveraging modern TensorFlow APIs, TensorNets achieves more factoring and less indenting. For example, all Inception variants are implemented in approximately 500 lines of code in TensorNets, compared to over 2000 lines in the official TensorFlow models repository.

  • Reproducibility: The library enables you to reproduce original paper results with simple APIs for feature extraction, preprocessing, and weight loading. Compatibility with a wide range of TensorFlow versions is continuously verified via Travis CI, ensuring that you don't have to worry about version conflicts.

Key Features

  • Extensive Model Zoo: A wide variety of pre-trained models for image classification, including ResNets, Inceptions, DenseNets, MobileNets, and more.
  • Object Detection Models: Out-of-the-box implementations for object detection, such as YOLO and FasterRCNN, which can be coupled with any classification backbone available in the library.
  • Functional API: Models are simple functions that take a tf.Tensor and return a tf.Tensor, making them easy to chain and integrate into any TensorFlow graph.
  • Rich Utilities: A suite of helper functions for image loading, preprocessing, decoding predictions, and inspecting model internals.

License

TensorNets is licensed under the MIT License. For more details, see the LICENSE file.