Comments (5)
Hi @manjrekarom ,
You can try with MobileFacenet-S, which model size will be around 1.4MB when quantized with TFlite with the following cmd:
tflite_convert --output_file tf-lite/MobileFacenet_uint8_128.tflite
--graph_def_file tf-lite/MobileFacenet.pb
--input_arrays "input"
--input_shapes "1,112,112,3"
--output_arrays output
--output_format TFLITE
--mean_values 128
--std_dev_values 127.5
--default_ranges_min 0
--default_ranges_max 255
--inference_type QUANTIZED_UINT8
--inference_input_type QUANTIZED_UINT8
But I met the other issue related to accuracy.
The result seems not correct with the quantized model, please kindly share the information if you have the idea. Many thanks!
from mobilefacenet_tf.
Hi @mvhsin ! Thanks for your reply.
Can I get a link to pretrained MobileFacenet-S?
The model that we had quantized was also about 1.5MB in size after quantization but after converting it back to .cc file it grew to about 6x - 8x (~8MB).
Sure. I will share if I find something relevant.
from mobilefacenet_tf.
Hi @manjrekarom ,
The author of MobileFacenet mentioned in the paper.
remove the linear 1 × 1 convolution layer afterthe linear GDConv layer from MobileFaceNet, the resulting network of which is called MobileFaceNet-M. From MobileFaceNet-M, removing the 1 × 1 convolution layer before the linear GDConv layer produces the smallest network called MobileFaceNet-S.
Sorry I am not sure about *.cc file.
Is that done by TF-lite microcontroller?
from mobilefacenet_tf.
Oh thanks I'll take a look.
Yes it is for TF-Lite microcontrollers. The FlatBuffer obtained from an initial tf model, is converted to a C byte array.
This C file is taking up ~7x space (1.5 -> ~8MB). So we need an even smaller model. The options I feel I am left with are network pruning, knowledge distillation and training an even smaller custom architecture similar to MobileFaceNet.
from mobilefacenet_tf.
Same here! Thanks for the info of TF-lite microcontroller.
from mobilefacenet_tf.
Related Issues (20)
- How to create tfrecords for VGGFace2 dataset using utils/dataprocess.py. HOT 2
- Cannot feed value of shape (112, 112, 3) for Tensor 'input:0', which has shape '(?, 112, 112, 3)' HOT 1
- 你好,请问该如何把test_nets.py运行起来? HOT 2
- question: input normalization and expected euclidean distance ranges HOT 1
- Cannot parse file b'/content/drive/MyDrive/MobileFaceNet/MobileFaceNet_TF-master/arch/pretrained_model/saved_model.pb': Error parsing message. HOT 7
- is refined ms-celeb-v1 dataset is from insightface?
- convert pb to tflite error
- convert pb model to tensorflow.js model HOT 2
- embedding没有度量性问题(相同人不同人的embedding距离无差别)
- Trying to read ckpt but get ValueError: HOT 1
- 自己制作的rec文件生成tfrecord出错
- What should be threshold for Euclidean distance between 2 embeddings ? HOT 2
- What should be the similarity formula between 2 embeddings (euclidian distance or cosine similarity ) ?
- Performance issues in train_nets.py(P2)
- Performance issues in your project (by P3) HOT 1
- 想问一下那个pretrained_model该怎么使用呢 我在train_nets.py里面加上了它的路径 然后执行报错了 不添加pretrained_model时候执行正常但是准确率感人...... HOT 2
- what is step to train tflite custom model please help us to build using own datasets.
- 使用作者提供的预训练模型 参数embeeding(192) 和 cls num(85742) 必须和作者的相同才能跑起来,否则会报错,有解决方法吗?
- Liveness detection
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 mobilefacenet_tf.