Questions tagged [mobilenet]

205 questions
4
votes
2 answers

MobileNetV2 in tf.keras. Many links but no useful information

I want to use mobileNetV2 with tf.keras. If look on the tensorflow website for keras applications I find mobilenet = tf.keras.applications.MobileNetV2() If I try to import MobileNetV2 from tensorflow.keras.applications import MobileNetV2 I get an…
Florida Man
  • 2,021
  • 3
  • 25
  • 43
3
votes
0 answers

EfficientNet and MobileNetV2 models from TensorFlow.Keras not being reproducible on GPU

After downloading an EfficientNet model from tensorflow.keras.applications.efficientnet, and retraining it on our own data, I've noticed that the results are not reproducible. The results are reproducible for other architectures like VGG16,…
mohaghighat
  • 1,293
  • 17
  • 29
3
votes
1 answer

Tensorflow: Error when trying transfer learning: Invalid JPEG data or crop window

I am trying to shape my own custom image dataset into the correct input shape for the pretrained MobileNet model on Tensorflow using their tutorial here. My code: batch_size = 256 epochs = 15 IMG_HEIGHT = 160 IMG_WIDTH = 160 BATCH_SIZE =…
asdj1234
  • 77
  • 1
  • 6
3
votes
1 answer

Difference between Keras and TensorFlow Hub Version of MobileNetV2

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…
3
votes
1 answer

Validation Loss and Validation Accuracy Curve Fluctuating with the Pretrained Model

I'm currently studying about neural network and I'm having problem when try to learn about CNN, I'm trying to train data which contains Spectrogram about music genres. My data consists of 27000 Spectrogram and divided into 3 class (genre). My data…
3
votes
1 answer

AttributeError: 'function' object has no attribute 'preprocess_input'

I want to try MobileNetV2's predictions. I always get an error message, but I don't know what to change. import keras from keras import backend as K from keras.preprocessing.image import ImageDataGenerator from keras.preprocessing import image from…
glomba
  • 153
  • 2
  • 4
  • 10
2
votes
2 answers

Metrics using batches v/s metrics using full dataset

I am using training an image classification model using the pre-trained mobile network. During training, I am seeing very high values (more than 70%) for Accuracy, Precision, Recall, and F1-score on both the training dataset and validation…
learner
  • 828
  • 2
  • 19
  • 36
2
votes
0 answers

On Mnist dataset, MobileNet is showing low accuracy in tff learning environment but shows high accuracy in tensorflow env. How to improve accuracy?

The accuracy is stuck on 0.111 on every round. But the same model gives an accuracy of 91% in the normal tensorflow environment. The optimizer used in both scenarios is SGD. The model function : ` def model_fn(): model=tf.keras.Sequential() …
2
votes
0 answers

Replace activation function of MobileNetV2 in tensorflow

I am trying to replace all ReLU activation functions in the MobileNetV2 with some custom activation functions(abs, swish, leaky relu etc.). First I liked to start with abs. I saw a few similar posts but they were not really helpful for my problem ->…
vizero
  • 33
  • 5
2
votes
1 answer

How to use mobilenet as feature-extractor for high resolution images?

How can i use a mobilenet model as a feature-extractor for images with way higher resolution than 224x224? I guess i need to change a certain layer after it's loaded to increase the input size? My current code is this: const featureExtractor = await…
Martin Cremer
  • 5,191
  • 2
  • 32
  • 38
2
votes
0 answers

Completely different results using Tensorflow and Pytorch for MobilenetV3 Small

I am using transfer learning from MobileNetV3 Small to predict 5 different points on an image. I am doing this as a regression task. For both models: Setting the last 50 layers trainable and adding the same fully connected layers to the…
2
votes
1 answer

keras.models.load_model() gives ValueError

I have saved the trained model and the weights as below. model, history, score = fit_model(model, train_batches, val_batches, callbacks=[callback]) model.save('./model') model.save_weights('./weights') Then I tried to get the saved model as the…
user10960174
2
votes
0 answers

TypeError: Cannot convert a symbolic Keras input/output to a numpy array

I am trying to do a predictions on my pretrained model , I have total of 40 classes , it is showing me predictions in epsilon numbers , I want to choose maximum from it and by using if-else , I want to classify it . It is giving me above error…
2
votes
2 answers

Can we use model.fit only instead of model.fit_generator?

I am trying to use the ImageDataGenerator from Keras and I want to use model.fit instead of model.fit_generator , I want to get rid of the below statements i.e:- steps_per_epoch and validation_steps. Will it work and does it augment the data…
2
votes
1 answer

Number of parameters: Disadvantages of inverted residual blocks for image classification tasks

I have a more general question regarding MobileNet and EfficientNet inverted residual blocks. I have a classification task for an image dataset that is of lower complexity. Therefore I have chosen an architecture with few parameters (EfficientNet…
1
2
3
13 14