mobilenet

Save TensorFlowJS MobileNet + KNN to TFLite

风流意气都作罢 提交于 2021-02-10 14:31:12
问题 I have trained a KNN on top of MobileNet logits results using TensorFlowJS. And I want to know how can I export the result of the MobileNet + KNN to a TFLite model. const knn = knnClassifier.create() const net = await mobilenet.load() const handleTrain = (imgEl, label) => { const image = tf.browser.fromPixels(imgEl); const activation = net.infer(image, true); knn.addExample(activation, label) } 回答1: 1. Save the model Save the model this example saves the file to the native file system or if

OpenCV dnn exception SSD Mobilenetv2

╄→尐↘猪︶ㄣ 提交于 2021-01-28 19:05:54
问题 Using transfer learning, I trained SSD MobileNetV2 (ssd_mobilenet_v2_coco.config) model in TensorFlow (tensorflow-gpu==1.15.0). After freezing the graph (.pb) using TensorFlow API Python script (export_inference_graph.py), I created a text graph (.pbtxt) using the Python script provided in OpenCV wiki (tf_text_graph_ssd.py). I used the Python code snippet from the wiki to test inference, but I am getting the following error: cv2.error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules

Difference between Keras and TensorFlow Hub Version of MobileNetV2

可紊 提交于 2021-01-28 09:50:32
问题 I am working on a transfer learning approach and got very different results when using the MobileNetV2 from keras.applications and the one available on TensorFlow Hub. This seems strange to me as both versions claim here and here to extract their weights from the same checkpoint mobilenet_v2_1.0_224. This is how the differences can be reproduced, you can find the Colab Notebook here: !pip install tensorflow-gpu==2.1.0 import tensorflow as tf import numpy as np import tensorflow_hub as hub

can we show underfitting with mobilenet?

时间秒杀一切 提交于 2020-11-25 03:33:28
问题 Are there any examples which could prove/demonstrate that we can see underfitting while classifying images with mobilenet too? I have tried transfer learning and feature extraction with mobilenet in ml5.js Since it's already trained on several thousand images, even when I add and train only 3 new images, I seem to get correct results. I am looking for an example such that I can demonstrate to the user that underfitting is possible with mobilenet as well. It could be by changing a particular

SSD mobilenet model does not detect objects at longer distances

白昼怎懂夜的黑 提交于 2020-01-29 05:20:05
问题 I have trained an SSD Mobilenet model with custom dataset(Battery). Sample image of the battery is given below and also attached the config file which I used to train the model. When the object is closer to the camera(tested with webcam) it detects the object accurately with probability over 0.95 but when I move the object to a longer distance it is not getting detected. Upon debugging, Found that the object gets detected but with the lower probability 0.35 . The minimum threshold is set to 0

Calculation operations with the parameters of a TFLite quantized model

為{幸葍}努か 提交于 2019-12-31 05:15:07
问题 I am trying to implement image classification in hardware using the quantized Mobilenetv2 model taken from here. To do that, I first need to reproduce the inference process from the beginning to the end to make sure I understand the calculations/operations that are performed on the data. The first target is the Conv fuction. I can see how it is being calculated, but there are several arguments that are passed to this function which I would like to know how they are produced: output_offset,

Retrain image detection with MobileNet

巧了我就是萌 提交于 2019-11-29 10:56:56
Several ways of retraining MobileNet for use with Tensorflow.js have failed for me. Is there any way to use a retrained model with Tensorflow.js? Both using the modern, hub-based tutorial, as well as using retrain.py seem to fail. Convert output of retrain.py to tensorflow.js Error converting keras model to tfjs: duplicate weight name Variable as well as some other open questions Retrain an Image Classifier in tensorflow js Loading of mobilenet v2 works, but pretrained mobilenet v2 fails Can't convert TensorFlow saved model to tfjs_layers_model webmodel The top two other questions show the

Retrain image detection with MobileNet

这一生的挚爱 提交于 2019-11-27 06:16:25
问题 Several ways of retraining MobileNet for use with Tensorflow.js have failed for me. Is there any way to use a retrained model with Tensorflow.js? Both using the modern, hub-based tutorial, as well as using retrain.py seem to fail. Convert output of retrain.py to tensorflow.js Error converting keras model to tfjs: duplicate weight name Variable as well as some other open questions Retrain an Image Classifier in tensorflow js Loading of mobilenet v2 works, but pretrained mobilenet v2 fails Can