Comments (8)
Commited. TFLite Float32/Float16, EdgeTPU, ONNX, OpenVINO IR, Myriad Blob, TF-TRT, TFJS, CoreML.
https://github.com/PINTO0309/PINTO_model_zoo/tree/main/053_BlazePose/20_densify_pose_detection
from tflite2tensorflow.
After analyzing the TensorFlow implementation, it seems that I need to implement the following additional steps in the following order. It's going to take some time.
- https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor
- https://www.tensorflow.org/api_docs/python/tf/sparse/to_dense
- https://github.com/tensorflow/tensorflow/blob/5d442828288614d57062f77d8af5d5b090b21469/tensorflow/lite/kernels/internal/reference/densify.h#L29-L43
- https://github.com/tensorflow/tensorflow/blob/a6b6df2de94421ecdb1baa97aca3ffca74ee04ad/tensorflow/lite/tools/optimize/sparsity/format_converter.cc#L215-L256
template <typename T>
inline void Densify(const TfLiteSparsity* sparsity,
const RuntimeShape& input_shape, const T* input_data,
const RuntimeShape& output_shape, T* output_data,
TfLiteContext* context) {
const int dims_count = output_shape.DimensionsCount();
std::vector<int> vector_shape(dims_count);
for (int i = 0; i < dims_count; i++) {
vector_shape[i] = output_shape.Dims(i);
}
tflite::optimize::sparsity::FormatConverter<T> converter(vector_shape, *sparsity);
converter.SparseToDense(input_data, output_shape.FlatSize(), output_data, context);
}
from tflite2tensorflow.
Thanks @PINTO0309 ! As I said before, take your time. I can play with the previous version.
I guess Densify allows a smaller size of the model on disk, but probably not in memory :-)
from tflite2tensorflow.
@geaxgx Sorry for the trouble, it's just in another committee there is)
from tflite2tensorflow.
@geaxgx I get the same problem. Could you please give a link to the previous version of the model, which can be converted with tflite2tensorflow?
from tflite2tensorflow.
https://github.com/PINTO0309/PINTO_model_zoo/tree/main/053_BlazePose
from tflite2tensorflow.
Fixes: f032b31
This is an experimental implementation at the moment, so it is not well tested.
tflite2tensorflow v1.11.7 https://github.com/PINTO0309/tflite2tensorflow/releases/tag/v1.11.7
from tflite2tensorflow.
Thanks @PINTO0309 !
from tflite2tensorflow.
Related Issues (20)
- Error converting face_landmark_with_attention.tflite HOT 2
- Error converting pose_detection.tflite [ No such file or directory: './pose_detection.json' ] HOT 2
- Error converting pose_detection.tflite [ No such file or directory: './pose_detection.json' ] HOT 3
- The shape of the output layer is different from the result of the tensorflow2onnx transformation. HOT 8
- Order of input channels switched on ONNX HOT 2
- Converted mediapipe palm detection coreml model cannot be deployed on IOS app HOT 7
- Add option to optimize tf.math.reduce_prod to Myriad (OAK) HOT 7
- Got error while converting magenta_arbitrary-image-stylization-v1-256_fp16_transfer_1.tflite to .h5 format HOT 1
- ValueError: The name 'serving_default_input_1:0:0' looks a like a Tensor name, but is not a valid one. Tensor names must be of the form "<op_name>:<output_index>". HOT 1
- CoreML conversions of face_landmark_with_attention.tflite fails HOT 3
- No json file HOT 1
- OSError: SavedModel file does not exist at: saved_model/{saved_model.pbtxt|saved_model.pb} HOT 1
- fail to convert [KNIFT] HOT 2
- Use docker but no *.json error HOT 6
- model quantified slower than not quantifed on windows x64 HOT 1
- tflite2tensorflow Docker has flatc error HOT 4
- Problem converting pose_landmark (full) HOT 1
- How to add custom operators to tflite runtime? HOT 1
- TypeError: Interpreter._get_tensor_details() missing 1 required positional argument: 'subgraph_index' HOT 3
- TypeError: Interpreter._get_tensor_details() missing 1 required positional argument: 'subgraph_index' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tflite2tensorflow.