You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Release the tflite inference from tensorflow
* Update README
* Remove the bodypix_tflite from develop branch
* Add tflite inference to the tflite_inference branch
* added initial build_tflite workflow job
* added --use-feature=in-tree-build
* don't install tflite by default
* moved build_tflite up
* added tflite extra
* using dev-install-tflite
* make dev-install-tflite install build and dev depenencies
* run pytest for tflite
* using tflite extra when installing tflite
* added make dev-pytest-tflite
* linting: addressed markdown linting
* made tensorflow import optional
* added test_should_be_able_to_use_existing_tflite_model
* import tflite_runtime.interpreter
* extracted load_image
* load image using pillow
* adapted pad_and_resize_to using _pad_image_like_tensorflow
* implemented _resize_image_to_using_pillow
* added make dev-watch-tflite
* fallback to np expand_dims without tf
* extracted _get_mobilenet_preprocessed_image with np fallback
* reuse resize_image_to for scale_and_crop_to_input_tensor_shape
* automatically reduce dimension if needed
* added support for single channel in _resize_image_to_using_pillow
* extracted get_sigmoid and implemented np version
* reuse resize_image_to
* fixed failing test
* removed trailing space from requirements.txt
* cli: automatically select tflite model if full tf is not available
* don't fail with missing tf when adding alpha mask
* added tflite support to draw mask cli
* added support for remote tflite models; defined model tflite paths
* use model path constants for cli
* added TensorFlow Lite Runtime support section to readme
* ignore tflite models
* removed obsolete bodypix_tflite diectory
* fixed draw mask
* replaced pillow resize with numpy handling floats
* retain original dtype when padding
* use float32 for imagenet preprocessing
* debug logging of input image
* added list-tflite-models sub command
* fixed resnet tflite support
* added more tflite models
Co-authored-by: MrRiahi <mohammad.r.riahi@gmail.com>
| image | Image loading via [Pillow](https://pypi.org/project/Pillow/), required by the CLI.
35
36
| video | Video support via [OpenCV](https://pypi.org/project/opencv-python/)
36
37
| webcam | Webcam support via [OpenCV](https://pypi.org/project/opencv-python/) and [pyfakewebcam](https://pypi.org/project/pyfakewebcam/)
37
-
| all | All of the libraries
38
+
| all | All of the libraries (except `tflite-runtime`)
38
39
39
40
## Python API
40
41
@@ -117,6 +118,12 @@ Those URLs can be passed as the `--model-path` arguments below, or to the `downl
117
118
118
119
The CLI will download and cache the model from the provided path. If no `--model-path` is provided, it will use a default model (mobilenet).
119
120
121
+
To list TensorFlow Lite models instead:
122
+
123
+
```bash
124
+
python -m tf_bodypix list-tflite-models
125
+
```
126
+
120
127
### Inputs and Outputs
121
128
122
129
Most commands will work with inputs (source) and outputs.
@@ -317,7 +324,7 @@ python -m tf_bodypix \
317
324
318
325
Background: [Brown Landscape Under Grey Sky](https://www.pexels.com/photo/brown-landscape-under-grey-sky-3244513/)
319
326
320
-
## TensorFlow Lite support (experimental)
327
+
## TensorFlow Lite Model support (experimental)
321
328
322
329
The model path may also point to a TensorFlow Lite model (`.tflite` extension). Whether that actually improves performance may depend on the platform and available hardware.
This project can also be used with [tflite-runtime](https://pypi.org/project/tflite-runtime/) instead of full TensorFlow (e.g. by using the `tflite` extra).
355
+
However, [TensorFlow Lite converter](https://www.tensorflow.org/lite/convert/) would require full TensorFlow.
356
+
In order to avoid it, one needs to use a TensorFlow Lite model (see previous section).
357
+
345
358
## Docker Usage
346
359
347
360
You could also use the Docker image if you prefer.
0 commit comments