All Projects → sayakpaul → Adventures In Tensorflow Lite

sayakpaul / Adventures In Tensorflow Lite

This repository contains notebooks that show the usage of TensorFlow Lite for quantizing deep neural networks.

Projects that are alternatives of or similar to Adventures In Tensorflow Lite

Distiller
Neural Network Distiller by Intel AI Lab: a Python package for neural network compression research. https://intellabs.github.io/distiller
Stars: ✭ 3,760 (+4659.49%)
Mutual labels:  jupyter-notebook, pruning
Neuralnetworks.thought Experiments
Observations and notes to understand the workings of neural network models and other thought experiments using Tensorflow
Stars: ✭ 199 (+151.9%)
Mutual labels:  jupyter-notebook, pruning
Mobile Yolov5 Pruning Distillation
mobilev2-yolov5s剪枝、蒸馏,支持ncnn,tensorRT部署。ultra-light but better performence!
Stars: ✭ 192 (+143.04%)
Mutual labels:  jupyter-notebook, pruning
Tf Keras Surgeon
Pruning and other network surgery for trained TF.Keras models.
Stars: ✭ 25 (-68.35%)
Mutual labels:  jupyter-notebook, pruning
Dm Competition Getting Started
数据挖掘竞赛(Kaggle,Data Castle,Analytics Vidhya,DrivenData)入门实践
Stars: ✭ 78 (-1.27%)
Mutual labels:  jupyter-notebook
Fftnet
Pytorch Implementation of FFTNet
Stars: ✭ 78 (-1.27%)
Mutual labels:  jupyter-notebook
Neural Networks Demystified
Supporting code for short YouTube series Neural Networks Demystified.
Stars: ✭ 1,215 (+1437.97%)
Mutual labels:  jupyter-notebook
Keras Deeplab V3 Plus
Keras implementation of Deeplab v3+ with pretrained weights
Stars: ✭ 1,212 (+1434.18%)
Mutual labels:  jupyter-notebook
1806
18.06 course at MIT
Stars: ✭ 1,219 (+1443.04%)
Mutual labels:  jupyter-notebook
Skogestad Python
Python code for "Multivariable Feedback Control"
Stars: ✭ 78 (-1.27%)
Mutual labels:  jupyter-notebook
Machine Learning
My Attempt(s) In The World Of ML/DL....
Stars: ✭ 78 (-1.27%)
Mutual labels:  jupyter-notebook
Tf Serving K8s Tutorial
A Tutorial for Serving Tensorflow Models using Kubernetes
Stars: ✭ 78 (-1.27%)
Mutual labels:  jupyter-notebook
Hinnefe2.github.io
Stars: ✭ 78 (-1.27%)
Mutual labels:  jupyter-notebook
Brain Tumor Segmentation Using Deep Neural Networks
Keras implementation of paper by the same name
Stars: ✭ 78 (-1.27%)
Mutual labels:  jupyter-notebook
Reverse Engineering Neural Networks
A collection of tools for reverse engineering neural networks.
Stars: ✭ 78 (-1.27%)
Mutual labels:  jupyter-notebook
Covid19 Dashboard
A site that displays up to date COVID-19 stats, powered by fastpages.
Stars: ✭ 1,212 (+1434.18%)
Mutual labels:  jupyter-notebook
Leveling Up Jupyter
Leveling up your Jupyter notebook skills
Stars: ✭ 78 (-1.27%)
Mutual labels:  jupyter-notebook
Cubehelix
A full implementation of Dave Green's "cubehelix" colormap for Python
Stars: ✭ 78 (-1.27%)
Mutual labels:  jupyter-notebook
Tutorials 2018
Geophysical Tutorials column for 2018
Stars: ✭ 78 (-1.27%)
Mutual labels:  jupyter-notebook
Learning python
Source material for Python Like You Mean it
Stars: ✭ 78 (-1.27%)
Mutual labels:  jupyter-notebook

Adventures-in-TensorFlow-Lite

This repository contains notebooks that show the usage of TensorFlow Lite (TF Lite) for quantizing deep neural networks in TensorFlow 2. It is currently under active development so, there might be some inconsistencies in the description below.



About the notebooks

  • A_tale_of_quantization.ipynb: A comprehensive notebook showing different ways to quantize a model in tf.keras (with fine-tuning). It includes both quantization-aware training as well as post-training quantization. This notebook is accompanied by this report that has some additional details and performance considerations. The notebook is best referred with this report.
  • Custom_Image_Classification_EdgeTPU.ipynb: It shows how to use post-training quantization with a representative dataset to calibrate the dynamic ranges of activations. It also shows how to quantize the model in a way that is compatible with an Edge TPU USB Accelerator.
  • DeepLabV3/DeepLab_TFLite_*.ipynb: These notebooks show how to convert several DeepLabV3 based segmentation models (trained on the PASCAL VOC 2012, ADE20k, and CityScapes datasets) to TF Lite and run inference with them.
  • ESRGAN_TFLite.ipynb: Shows how to run inference with this ESRGAN module from TF Hub, convert it to TF Lite, run inference with the model. A bonus includes running inference with a distilled version of the main model (only 33 KB).
  • Magenta_arbitrary_style_transfer_model_conversion.ipynb: Shows to how apply apply different post-training quantization schemes to the arbitrary style transfer model provided by Magenta. This generates image stylization models that produce higher-quality images than these ones. Inference notebook is available here - Style_Transfer_Demo_InceptionV3.ipynb. Additionally, in this notebook you can find how to run inference with the same TF Lite models but with dynamic shape support: Style_Transfer_Demo_InceptionV3_Dynamic_Shape.ipynb.
  • Model_Pruning_in_Deep_Learning_with_tfmot.ipynb: Shows how to use the pruning APIs of TensorFlow Model Optimization toolkit along with TF Lite.
  • Selfie2Anime_TFLite(50_Checkpoints).ipynb: Shows how to convert the UGATIT model (also known as Selfie2Anime GAN) to TF Lite. Inference notebook is available here. Here's a multi-part tutorial of this project - Part I, Part II, Part III. This was jointly done with Margaret.
  • Semantic_Segmentation_+_Background_Removal_+_Style_Transfer.ipynb: Presents a demo on how to use multiple TF Lite models to run segmentation, remove background, and apply stylization.
  • Style_Transfer_Demo.ipynb & Style_Transfer_Demo_InceptionV3.ipynb: Present interactive image stylization demos.
  • TUNIT_Conversion_to_TF_Lite.ipynb: Shows the PyTorch -> TF Lite model conversion worflow (this is currently buggy).
  • CartoonGAN_TFLite.ipynb: Shows to how to convert the CartoonGAN model (proposed here) to a TF Lite model. Includes how to run inference as well. Here's the official TensorFlow blog in case you are interested to know more.
  • EAST_TFLite.ipynb: Shows how to convert the famous EAST model for text detection to TensorFlow Lite.
  • Boundless_TFLite.ipynb: Shows how to convert the famous Boundless model for image extrapolation to TensorFlow Lite.

References

Accompanying materials

Find the models on TF Hub

https://tfhub.dev/s?publisher=sayakpaul

Acknowledgements

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].